/* ============================================
   Tech Studio Art — Design System
   Single background, single font, minimal palette.
   Change the variables below to reflect across the whole site.
   ============================================ */

:root {
  /* -- Core palette (edit here to re-theme the whole site) -- */
  --color-bg: #f7f5ee;          /* single background color for entire site */
  --color-copy: #3c5c4b;        /* copy text color (1 color for all body copy) — dark green */
  --color-heading: #142920;     /* heading color, also used on buttons — deep dark green */
  --color-muted: #7c9284;       /* secondary/faint text — dividers, labels, meta */
  --color-accent: #142920;      /* accent = same as heading, kept as its own var for clarity */

  /* -- Derived tints (kept relative to the palette above, no new hardcoded colors) -- */
  --line-soft: color-mix(in srgb, var(--color-heading) 8%, transparent);
  --line: color-mix(in srgb, var(--color-heading) 14%, transparent);
  --line-strong: color-mix(in srgb, var(--color-heading) 30%, transparent);
  --surface-soft: color-mix(in srgb, var(--color-heading) 6%, transparent);
  --bg-translucent: color-mix(in srgb, var(--color-bg) 85%, transparent);

  /* -- Type -- */
  --font-base: 'Manrope', sans-serif;
  --copy-size: 0.98rem;
  --copy-line: 1.53rem;

  /* -- Layout -- */
  --container-w: 1160px;
  --gutter: 24px;
  --radius-pill: 100px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--color-bg);
  color: var(--color-copy);
  font-family: var(--font-base);
  font-size: var(--copy-size);
  line-height: var(--copy-line);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.container {
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

img, svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

ul, ol {
  list-style: none;
}

/* ---------- Headings ---------- */

h1, h2, h3, h4, h5, h6 {
  color: var(--color-heading);
  font-family: var(--font-base);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.section-head {
  max-width: 640px;
  margin-bottom: 56px;
}

.section-head h2 {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  margin-bottom: 16px;
}

.section-head p {
  color: var(--color-copy);
}

section {
  padding: 55px 0;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-base);
  font-size: 0.92rem;
  font-weight: 600;
  padding: 14px 28px;
  border-radius: var(--radius-pill);
  border: none;
  cursor: pointer;
  transition: opacity 0.2s ease, transform 0.2s ease;
  white-space: nowrap;
}

.btn-primary {
  background: var(--color-heading);
  color: var(--color-bg);
}

.btn-primary:hover {
  opacity: 0.85;
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--color-heading);
  border: 1px solid var(--line-strong);
}

.btn-ghost:hover {
  border-color: var(--color-heading);
}

/* ---------- Nav ---------- */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 26px 0;
  background: var(--bg-translucent);
  backdrop-filter: blur(10px);
}

.nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--color-heading);
  letter-spacing: -0.01em;
}

.logo span {
  color: var(--color-muted);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 47px;
}

.nav-links a {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--color-copy);
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: var(--color-heading);
}

.nav-links a.btn-primary {
  color: var(--color-bg);
}

.nav-links a.btn-primary:hover {
  color: var(--color-bg);
}

.nav-toggle {
  display: none;
  position: relative;
  z-index: 200;
  width: 24px;
  height: 16px;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

.nav-toggle-bar {
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--color-heading);
  border-radius: 2px;
  transform-origin: center;
  transition: top 0.25s ease, transform 0.25s ease, opacity 0.2s ease;
}

.nav-toggle-bar:nth-child(1) {
  top: 0;
}

.nav-toggle-bar:nth-child(2) {
  top: 7px;
}

.nav-toggle-bar:nth-child(3) {
  top: 14px;
}

.nav-toggle.open .nav-toggle-bar:nth-child(1) {
  top: 7px;
  transform: rotate(45deg);
}

.nav-toggle.open .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}

.nav-toggle.open .nav-toggle-bar:nth-child(3) {
  top: 7px;
  transform: rotate(-45deg);
}

/* ---------- Hero ---------- */

.hero {
  padding: 200px 0 55px;
}

.hero-inner {
  max-width: 820px;
}

.hero h1 {
  font-size: clamp(2.4rem, 5.4vw, 4.4rem);
  margin-bottom: 28px;
}

.hero h1 em {
  font-style: normal;
  color: var(--color-copy);
}

.hero p {
  max-width: 700px;
  font-size: 1.1rem;
  line-height: 1.8rem;
  color: var(--color-copy);
  margin-bottom: 40px;
  font-weight: 500;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

/* ---------- Work / Filters ---------- */

.work-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px 40px;
  margin-bottom: 24px;
}

.work-toolbar .section-head {
  margin-bottom: 0;
}

@media (min-width: 901px) {
  .work-toolbar {
    padding: 0 44px;
  }

  .filter-panel {
    padding-left: 44px;
  }
}

.filter-toggle {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-base);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-heading);
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  padding: 10px 20px;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  transition: border-color 0.2s ease;
  flex-shrink: 0;
}

.filter-toggle-icon {
  display: none;
  color: var(--color-heading);
}

.filter-toggle:hover {
  border-color: var(--color-heading);
}

.filter-panel {
  margin-bottom: 56px;
}

.filter-panel[hidden] {
  display: none;
}

.filter-options {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 28px;
}

.filter-option {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-copy);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: color 0.15s ease;
}

.filter-option:hover {
  color: var(--color-heading);
}

.filter-option.active {
  color: var(--color-heading);
  font-weight: 700;
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
}

.work-item {
  background: var(--color-bg);
  padding: 44px;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.work-item.hidden {
  display: none;
}

.work-item-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 28px;
}

.work-index {
  font-size: 0.85rem;
  color: var(--color-muted);
  font-weight: 600;
}

.work-tag {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-muted);
}

.work-item h3 {
  font-size: 1.35rem;
  margin-bottom: 12px;
}

.work-item p {
  color: var(--color-copy);
  max-width: 440px;
  margin-bottom: 24px;
}

.work-open {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-heading);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  padding: 9px 20px;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.work-open:hover {
  background: var(--color-heading);
  color: var(--color-bg);
  border-color: var(--color-heading);
}

.work-empty {
  padding: 60px 0;
  color: var(--color-copy);
  display: none;
}

.work-empty.visible {
  display: block;
}

/* ---------- Team ---------- */

.team-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
}

.team-member {
  text-align: center;
}

.team-avatar {
  width: 50%;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  background: var(--surface-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-heading);
  margin: 0 auto 22px;
}

.team-member h3 {
  font-size: 1.05rem;
  margin-bottom: 4px;
}

.team-role {
  font-size: 0.85rem;
  color: var(--color-muted);
  margin-bottom: 14px;
}

.team-member p.bio {
  color: var(--color-copy);
}

/* ---------- Ethos ---------- */

.ethos {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 80px;
  align-items: start;
}

.ethos-principles {
  display: flex;
  flex-direction: column;
  gap: 36px;
}

.ethos-principle h3 {
  font-size: 1.15rem;
  margin-bottom: 10px;
}

.ethos-principle p {
  color: var(--color-copy);
  max-width: 440px;
}

.ethos-lead h2 {
  font-size: clamp(1.8rem, 3vw, 2.3rem);
  margin-bottom: 24px;
}

.ethos-lead p {
  margin-bottom: 20px;
  max-width: 520px;
}

@media (min-width: 901px) {
  .ethos-principle {
    text-align: right;
  }

  .ethos-principle p {
    margin-left: auto;
  }

  .work-empty {
    padding-left: 44px;
  }
}

/* ---------- Contact ---------- */

.contact-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px 80px;
}

.contact-head {
  grid-column: 1 / -1;
}

.contact-head h2 {
  font-size: clamp(1.8rem, 3vw, 2.3rem);
  margin-bottom: 20px;
}

.contact-head p {
  margin-bottom: 34px;
  max-width: 440px;
}

.contact-head p:empty {
  margin-bottom: 0;
}

.contact-detail {
  margin-bottom: 47px;
}

.contact-detail .label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-muted);
  margin-bottom: 6px;
}

.contact-detail a,
.contact-detail span {
  color: var(--color-heading);
  font-size: 1.05rem;
  font-weight: 600;
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.field label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-muted);
}

.field input,
.field textarea {
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--line);
  padding: 10px 0;
  color: var(--color-heading);
  font-family: var(--font-base);
  font-size: var(--copy-size);
  line-height: var(--copy-line);
  outline: none;
  transition: border-color 0.2s ease;
}

.field input::placeholder,
.field textarea::placeholder {
  color: var(--color-muted);
}

.field input:focus,
.field textarea:focus {
  border-color: var(--color-heading);
}

.field textarea {
  resize: none;
  min-height: 90px;
}

.contact-form .btn {
  margin-top: 8px;
  align-self: flex-start;
}

.hidden-field {
  display: none;
}

.form-status {
  font-size: 0.85rem;
  color: var(--color-muted);
}

/* ---------- Footer ---------- */

footer {
  padding: 48px 0;
}

footer .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-copy,
.footer-rights {
  color: var(--color-muted);
  font-size: 0.85rem;
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .filter-toggle {
    border: none;
    padding: 8px;
  }

  .filter-toggle-text {
    display: none;
  }

  .filter-toggle-icon {
    display: block;
  }

  .nav-links {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    z-index: 150;
    background: var(--color-bg);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--gutter);
    gap: 42px;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
  }

  .nav-links a {
    font-size: 1.4rem;
  }

  .nav-links.open {
    opacity: 1;
    visibility: visible;
  }

  .nav-toggle {
    display: block;
  }

  .hero {
    padding: 150px 0 40px;
  }

  .work-grid {
    grid-template-columns: 1fr;
    margin: 0 calc(-1 * var(--gutter));
  }

  .work-item {
    padding: 34px var(--gutter);
  }

  .team-grid {
    grid-template-columns: repeat(2, 1fr);
    row-gap: 40px;
  }

  .team-avatar {
    width: 20%;
    max-width: 72px;
    margin: 0 auto 14px;
  }

  .ethos {
    grid-template-columns: 1fr;
    gap: 50px;
  }

  .contact-wrap {
    grid-template-columns: 1fr;
    gap: 56px;
  }

  section {
    padding: 40px 0;
  }
}

@media (max-width: 560px) {
  .hero-actions {
    flex-direction: column;
    align-items: flex-start;
  }

  .team-grid {
    grid-template-columns: 1fr;
  }
}
