/* ═══════════════════════════════════════════
   MERIDIAN — agency site
   Visual language after astudio.agency:
   mint #bfe5e6, brown #322625, yellow #FEC933,
   flat geometric blocks, no rounded corners.

   Neutra Text / Neutra Display are licensed
   (House Industries). Jost is the geometric
   stand-in — swap the --f-sans / --f-display
   stacks for the real faces when licensed.

   1. Tokens & reset
   2. Preloader
   3. Primitives (shell, buttons, reveal)
   4. Header & nav
   5. Hero
   6. Clients marquee
   7. Service pillars
   8. Production
   9. Case studies (offset masonry)
   10. Stats
   11. Testimonials
   12. Contact
   13. Footer
   14. Responsive
   ═══════════════════════════════════════════ */

/* ── 1. Tokens & reset ─────────────────────── */
:root {
  --ink:        #322625;          /* brown — body copy, dark sections */
  --ink-soft:   rgba(50, 38, 37, .62);
  --muted:      #7d747b;
  --paper:      #ffffff;
  --paper-2:    #f7f5f3;
  --mint:       #bfe5e6;          /* primary accent */
  --mint-2:     #bee5e5;          /* block fill behind imagery */
  --mint-deep:  #8fcfd1;
  --yellow:     #fec933;          /* display numerals only */
  --line:       #efefef;
  --line-soft:  rgba(50, 38, 37, .12);

  --shell:      1280px;
  --gutter:     clamp(20px, 5vw, 64px);

  --f-sans:    "Jost", "Neutra Text", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --f-display: "Jost", "Neutra Display", "Neutra Text", Helvetica, Arial, sans-serif;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --header-h: 110px;              /* astudio desktop header height */
  --header-h-stuck: 60px;         /* floating header height */
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--f-sans);
  font-size: 16px;
  line-height: 30px;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
[hidden] { display: none !important; }

h1, h2, h3 {
  margin: 0;
  font-family: var(--f-display);
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.08;
}
p { margin: 0 0 1em; }
strong, b { font-weight: 600; }

::selection { background: var(--mint); color: var(--ink); }

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

/* ── 2. Preloader ──────────────────────────── */
#load {
  position: fixed;
  inset: 0;
  z-index: 9901;
  background: var(--paper);
  display: grid;
  place-items: center;
  transition: opacity .45s var(--ease), visibility .45s;
}
#load.is-done { opacity: 0; visibility: hidden; }

.load-wrap {
  width: 74px;
  height: 74px;
  border: 2px solid var(--mint);
  border-top-color: var(--ink);
  border-radius: 50%;
  animation: loadSpin .85s linear infinite;
}
@keyframes loadSpin { to { transform: rotate(360deg); } }

/* ── 3. Primitives ─────────────────────────── */
.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

section { position: relative; }

/* the 2.5px-tracked uppercase label used throughout astudio */
.eyebrow,
.section-kicker,
.stat-label,
.case-client,
.footer-col h3,
.field > span,
.field legend,
.contact-details span,
.line-separator p {
  font-size: 14px;
  line-height: 1.5;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  font-weight: 600;
}

.section-kicker {
  color: var(--muted);
  margin: 0;
}

.section-title {
  font-size: clamp(36px, 6vw, 88px);
  font-weight: 400;
  letter-spacing: 1px;
  line-height: 1.06;
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: clamp(40px, 6vw, 80px);
}

.section-note,
.section-lead {
  max-width: 46ch;
  color: var(--muted);
  font-size: 16px;
  line-height: 30px;
  margin: 0;
}

/* buttons — flat rectangles, fill on hover */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 30px;
  border-radius: 0;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  white-space: nowrap;
  border: 1px solid transparent;
  transition: background-color .4s var(--ease), color .4s var(--ease),
              border-color .4s var(--ease);
}
.btn-lg { padding: 18px 40px; }
.btn-block { width: 100%; }

.btn-solid { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn-solid:hover { background: var(--mint); color: var(--ink); border-color: var(--mint); }

.btn-outline { border-color: var(--ink); color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: #fff; }

.btn-ghost { border-color: rgba(255, 255, 255, .55); color: #fff; }
.btn-ghost:hover { background: var(--mint); color: var(--ink); border-color: var(--mint); }

/* scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .9s var(--ease), transform .9s var(--ease);
  transition-delay: var(--reveal-delay, 0ms);
}
.reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .marquee-track,
  .load-wrap { animation: none !important; }
}

/* ── 4. Header & nav ───────────────────────── */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  padding-top: env(safe-area-inset-top, 0px);
  background: transparent;
  color: #fff;
  transition: background-color .45s var(--ease), color .45s var(--ease),
              box-shadow .45s var(--ease);
}
.site-header.is-stuck,
.site-header.is-open {
  background: var(--paper);
  box-shadow: 0 1px 0 var(--line);
  color: var(--ink);
}

.header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 24px;
  transition: height .4s var(--ease);
}
.site-header.is-stuck .header-inner { height: var(--header-h-stuck); }

.brand { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.brand-mark {
  width: 16px; height: 16px;
  border-radius: 0;
  background: var(--mint);
}
.brand-word {
  font-family: var(--f-display);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 4px;
}

.nav { margin-inline: auto; }
.nav-list { display: flex; align-items: center; gap: 22px; }
.nav-list > li { position: relative; }
.nav-list a,
.nav-sub-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  padding: 6px 0;
  position: relative;
  transition: color .25s var(--ease);
}
.nav-list > li > a::after,
.nav-sub-toggle::after {
  content: "";
  position: absolute;
  left: 0; right: 100%; bottom: 0;
  height: 1px;
  background: var(--mint);
  transition: right .35s var(--ease);
}
.nav-list > li > a:hover::after,
.nav-sub-toggle:hover::after { right: 0; }

.caret {
  width: 6px; height: 6px;
  border-right: 1.4px solid currentColor;
  border-bottom: 1.4px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform .3s var(--ease);
}
.nav-sub-toggle[aria-expanded="true"] .caret { transform: rotate(225deg) translateY(-2px); }

.sub-menu {
  position: absolute;
  top: calc(100% + 14px);
  left: -18px;
  min-width: 200px;
  padding: 8px 0;
  background: var(--paper);
  color: var(--ink);
  border-top: 2px solid var(--mint);
  box-shadow: 0 18px 46px rgba(50, 38, 37, .12);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity .3s var(--ease), transform .3s var(--ease), visibility .3s;
}
.has-sub.is-open .sub-menu { opacity: 1; visibility: visible; transform: none; }
.sub-menu a {
  display: block;
  padding: 9px 20px;
  letter-spacing: 1.4px;
  transition: background-color .25s var(--ease);
}
.sub-menu a::after { display: none; }
.sub-menu a:hover { background: var(--mint); }

.header-actions { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }

.lang-toggle {
  font-size: 13px;
  letter-spacing: 1.6px;
  font-weight: 600;
  display: inline-flex;
  gap: 3px;
}
.lang-sep, .lang-off { opacity: .45; }
.lang-toggle.is-ar .lang-on { opacity: .45; }
.lang-toggle.is-ar .lang-off { opacity: 1; }

.icon-btn {
  display: grid;
  place-items: center;
  width: 38px; height: 38px;
  border: 1px solid currentColor;
  opacity: .75;
  transition: opacity .25s var(--ease), background-color .25s var(--ease),
              color .25s var(--ease), border-color .25s var(--ease);
}
.icon-btn:hover { opacity: 1; background: var(--mint); border-color: var(--mint); color: var(--ink); }

.burger { display: none; width: 34px; height: 24px; position: relative; }
.burger span {
  position: absolute; left: 0; right: 0; height: 1.6px;
  background: currentColor;
  transition: transform .35s var(--ease), opacity .25s var(--ease);
}
.burger span:nth-child(1) { top: 4px; }
.burger span:nth-child(2) { top: 11px; }
.burger span:nth-child(3) { top: 18px; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── 5. Hero ───────────────────────────────── */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  color: #fff;
  overflow: hidden;
}
.hero-media { position: absolute; inset: 0; }
.hero-media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transform: scale(1.06);
  animation: heroZoom 14s var(--ease) forwards;
}
@keyframes heroZoom { to { transform: scale(1); } }

.hero-scrim {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(50,38,37,.52) 0%, rgba(50,38,37,.18) 38%, rgba(50,38,37,.86) 100%),
    linear-gradient(90deg, rgba(50,38,37,.35), transparent 62%);
}

.hero-inner {
  position: relative;
  padding-bottom: clamp(88px, 12vh, 150px);
  padding-top: calc(var(--header-h) + 60px);
}
.hero .eyebrow { color: var(--mint); margin: 0; }

.hero-title {
  font-size: clamp(40px, 7vw, 104px);
  font-weight: 400;
  letter-spacing: 1px;
  line-height: 1.04;
  max-width: 18ch;
  margin: 22px 0 0;
}
.hero-title em {
  font-style: normal;
  color: var(--mint);
}
.hero-sub {
  margin: 26px 0 0;
  max-width: 48ch;
  font-size: 17px;
  line-height: 32px;
  color: rgba(255, 255, 255, .8);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 40px; }
.hero .btn-solid { background: var(--mint); color: var(--ink); border-color: var(--mint); }
.hero .btn-solid:hover { background: #fff; border-color: #fff; }

.scroll-cue {
  position: absolute;
  left: 50%; bottom: 28px;
  transform: translateX(-50%);
  width: 26px; height: 42px;
  border: 1px solid rgba(255,255,255,.5);
}
.scroll-cue span {
  position: absolute; left: 50%; top: 9px;
  width: 3px; height: 7px;
  background: var(--mint);
  animation: cue 1.9s var(--ease) infinite;
}
@keyframes cue {
  0%   { transform: translate(-50%, 0);    opacity: 0; }
  30%  { opacity: 1; }
  100% { transform: translate(-50%, 16px); opacity: 0; }
}

/* ── 6. Clients marquee ────────────────────── */
.clients {
  padding: clamp(80px, 11vw, 140px) 0 clamp(60px, 8vw, 100px);
  background: var(--paper);
}
.clients .section-lead { margin-top: 20px; }

.marquee {
  margin-top: 50px;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee + .marquee { margin-top: 14px; }

.marquee-track { display: flex; width: max-content; animation: slide 46s linear infinite; }
.marquee[data-direction="reverse"] .marquee-track { animation-direction: reverse; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes slide { to { transform: translateX(-50%); } }

.logo-row { display: flex; align-items: center; }
.logo-row li {
  flex: none;
  padding: 16px 34px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 2.5px;
  color: var(--muted);
  white-space: nowrap;
  border-right: 1px solid var(--line);
  transition: color .3s var(--ease);
}
.logo-row li:hover { color: var(--ink); }

/* ── 7. Service pillars ────────────────────── */
.pillars {
  padding: clamp(80px, 11vw, 150px) 0;
  background: var(--mint);
  color: var(--ink);
}
.pillars .section-note { color: rgba(50, 38, 37, .68); }

.pillar-list { border-top: 1px solid rgba(50, 38, 37, .2); }
.pillar { border-bottom: 1px solid rgba(50, 38, 37, .2); }

.pillar-head {
  width: 100%;
  display: grid;
  grid-template-columns: 62px minmax(180px, 1fr) 2fr 44px;
  align-items: center;
  gap: 16px;
  padding: clamp(22px, 3vw, 34px) 0;
  text-align: left;
  transition: opacity .3s var(--ease);
}
.pillar-head:hover { opacity: .7; }

.pillar-num {
  font-size: 14px;
  letter-spacing: 2.5px;
  font-weight: 600;
  color: rgba(50, 38, 37, .55);
}
.pillar-name {
  font-family: var(--f-display);
  font-size: clamp(28px, 4vw, 52px);
  font-weight: 400;
  letter-spacing: 1px;
}
.pillar-tag { color: rgba(50, 38, 37, .62); font-size: 15px; }

.pillar-icon {
  justify-self: end;
  position: relative;
  width: 42px; height: 42px;
  border: 1px solid rgba(50, 38, 37, .35);
  transition: background-color .35s var(--ease), border-color .35s var(--ease),
              color .35s var(--ease), transform .35s var(--ease);
}
.pillar-icon::before,
.pillar-icon::after {
  content: "";
  position: absolute; top: 50%; left: 50%;
  width: 13px; height: 1.5px;
  background: currentColor;
  transform: translate(-50%, -50%);
  transition: transform .35s var(--ease), opacity .3s var(--ease);
}
.pillar-icon::after { transform: translate(-50%, -50%) rotate(90deg); }
.pillar.is-open .pillar-icon {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--mint);
  transform: rotate(180deg);
}
.pillar.is-open .pillar-icon::after { opacity: 0; }

.pillar-body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .6s var(--ease);
}
.pillar.is-open .pillar-body { grid-template-rows: 1fr; }

.pillar-body-inner {
  overflow: hidden;
  display: grid;
  grid-template-columns: 62px 1fr;
}
.pillar-body-inner > * { grid-column: 2; }
.pillar-body-inner p {
  max-width: 62ch;
  color: rgba(50, 38, 37, .78);
  font-size: 16px;
  line-height: 30px;
}

.chip-row { display: flex; flex-wrap: wrap; gap: 8px; padding-bottom: 36px; }
.chip-row li {
  padding: 7px 16px;
  background: rgba(255, 255, 255, .55);
  font-size: 13px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--ink);
}

/* ── 8. Production ─────────────────────────── */
.production {
  padding: clamp(80px, 11vw, 150px) 0;
  background: var(--paper-2);
}
.production-grid {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: clamp(36px, 6vw, 84px);
  align-items: center;
}
.production-copy p {
  color: var(--muted);
  max-width: 46ch;
  margin-top: 26px;
}

.prod-list { margin: 32px 0 36px; border-top: 1px solid var(--line-soft); }
.prod-list li {
  display: flex;
  align-items: baseline;
  gap: 18px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: 17px;
}
.prod-list span {
  font-size: 13px;
  letter-spacing: 2.5px;
  font-weight: 600;
  color: var(--mint-deep);
}

/* mint block sits behind the stack, offset like astudio's portfolio cells */
.production-media {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.production-media::before {
  content: "";
  position: absolute;
  inset: -42px -42px auto auto;
  width: 78%;
  height: 62%;
  background: var(--mint-2);
  z-index: 0;
}
.pm { margin: 0; overflow: hidden; position: relative; z-index: 1; }
.pm img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.1s var(--ease); }
.pm:hover img { transform: scale(1.06); }
.pm-a { grid-row: span 2; aspect-ratio: 3 / 4; }
.pm-b, .pm-c { aspect-ratio: 4 / 3; }

/* ── 9. Case studies (offset masonry) ──────── */
.work { padding: clamp(80px, 11vw, 150px) 0 clamp(110px, 13vw, 190px); }

.work-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  column-gap: clamp(18px, 2.6vw, 34px);
}

.case { display: block; position: relative; padding-top: 75px; }

/* mint block offset behind each image — left on odd cells, right on even */
.case-media {
  display: block;
  position: relative;
  overflow: visible;
  aspect-ratio: 6 / 7;
}
.case-media::before {
  content: "";
  position: absolute;
  width: 100%;
  height: 100%;
  background: var(--mint-2);
  top: -50px;
  left: -50px;
  z-index: 0;
}
.case:nth-child(even) .case-media::before { left: auto; right: -50px; }

.case-media img {
  position: relative;
  z-index: 1;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 1.2s var(--ease);
}
.case:hover .case-media img { transform: scale(1.04); }

/* every third cell runs full width, block inset from the right */
.case:nth-child(3n) { grid-column: 1 / -1; margin: 50px 0; }
.case:nth-child(3n) .case-media { aspect-ratio: 16 / 9; padding-inline: 60px; }
.case:nth-child(3n) .case-media::before {
  left: auto;
  right: 0;
  top: -50px;
  width: calc(100% - 110px);
}

.case-body { display: block; padding-top: 24px; }
.case-client { display: block; color: var(--muted); }
.case-title {
  display: block;
  margin-top: 10px;
  font-family: var(--f-display);
  font-size: clamp(24px, 3vw, 40px);
  font-weight: 400;
  letter-spacing: 1px;
  line-height: 1.1;
}
.case-meta { display: block; margin-top: 6px; color: var(--muted); font-size: 15px; }

/* ── 10. Stats ─────────────────────────────── */
.stats {
  padding: clamp(70px, 9vw, 120px) 0;
  background: var(--ink);
  color: #fff;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(24px, 4vw, 60px);
}
.stat { padding-left: clamp(20px, 3vw, 44px); border-left: 1px solid rgba(255,255,255,.18); }
.stat:first-child { border-left: 0; padding-left: 0; }

/* astudio's yellow Neutra Display numerals */
.stat-num {
  display: block;
  font-family: var(--f-display);
  font-size: clamp(64px, 10vw, 150px);
  font-weight: 400;
  letter-spacing: 3px;
  line-height: 1.11;
  color: var(--yellow);
  font-variant-numeric: tabular-nums;
}
.stat-label {
  display: block;
  margin-top: 12px;
  color: rgba(255, 255, 255, .7);
}

/* ── 11. Testimonials ──────────────────────── */
.quotes { padding: clamp(80px, 11vw, 150px) 0; background: var(--paper-2); }

.quote-viewport { overflow: hidden; }
.quote-track {
  display: flex;
  transition: transform .75s var(--ease);
  will-change: transform;
}
.quote-slide { flex: 0 0 100%; }

.quote-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: clamp(20px, 3vw, 44px);
  align-items: start;
  margin: 0;
}
.quote-photo {
  width: clamp(84px, 11vw, 140px);
  aspect-ratio: 1;
  object-fit: cover;
  filter: grayscale(1);
  background: var(--mint-2);
}
.quote-text {
  font-family: var(--f-display);
  font-size: clamp(22px, 3vw, 40px);
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: .5px;
  margin: 0;
}
.quote-who { margin: 24px 0 0; font-size: 15px; color: var(--muted); }
.quote-who strong {
  display: block;
  color: var(--ink);
  font-size: 14px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  font-weight: 600;
}

.quote-controls {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: clamp(32px, 5vw, 56px);
}
.q-btn {
  display: grid; place-items: center;
  width: 48px; height: 48px;
  border: 1px solid var(--line-soft);
  transition: background-color .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease);
}
.q-btn:hover { background: var(--ink); border-color: var(--ink); color: var(--mint); }

.quote-dots { display: flex; gap: 8px; margin-inline: auto; flex-wrap: wrap; }
.quote-dots button {
  width: 8px; height: 8px;
  background: var(--line-soft);
  transition: background-color .3s var(--ease), transform .3s var(--ease);
}
.quote-dots button.is-active { background: var(--ink); transform: scale(1.4); }

/* ── 12. Contact ───────────────────────────── */
.contact { padding: clamp(80px, 11vw, 150px) 0; }
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: clamp(40px, 6vw, 90px);
  align-items: start;
}
.contact-intro p { color: var(--muted); max-width: 40ch; margin-top: 24px; }

.contact-details { margin-top: 36px; border-top: 1px solid var(--line-soft); }
.contact-details li {
  display: flex;
  gap: 20px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: 16px;
}
.contact-details span {
  flex: 0 0 86px;
  color: var(--muted);
  padding-top: 4px;
}
.contact-details a { border-bottom: 1px solid transparent; transition: border-color .3s var(--ease); }
.contact-details a:hover { border-bottom-color: var(--ink); }

.contact-form { display: grid; gap: 20px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

.field { display: grid; gap: 8px; min-width: 0; border: 0; padding: 0; margin: 0; }
.field > span,
.field legend { color: var(--muted); padding: 0; }

.field input,
.field select,
.field textarea {
  font: inherit;
  font-size: 16px;
  line-height: 30px;
  color: var(--ink);
  width: 100%;
  padding: 10px 0;
  background: none;
  border: 0;
  border-bottom: 1px solid var(--line-soft);
  border-radius: 0;
  transition: border-color .3s var(--ease);
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-bottom-color: var(--ink);
}
.field textarea { resize: vertical; }
.field input[aria-invalid="true"] { border-bottom-color: #c0392b; }

.file-field input { font-size: 15px; color: var(--muted); border-bottom: 0; }

/* divider from astudio's contact form */
.line-separator { display: flex; align-items: center; gap: 12px; margin: 20px 0; }
.line-separator .line { flex: 1; height: 1px; background: #ccc; }
.line-separator p { margin: 0; color: var(--muted); }

/* astudio's custom 10px square checkbox */
.check-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px 18px;
}
.check-grid label {
  display: flex;
  align-items: center;
  font-size: 16px;
  cursor: pointer;
}
.check-grid input { position: absolute; opacity: 0; width: 0; height: 0; }
.check-grid label span {
  position: relative;
  padding-left: 22px;
}
.check-grid label span::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 10px; height: 10px;
  border: 1px solid var(--muted);
  border-radius: 3px;
  transition: box-shadow .25s var(--ease), background-color .25s var(--ease);
}
.check-grid label:hover span::before {
  box-shadow: 0 0 0 4px rgba(125, 116, 123, .12);
  background: rgba(125, 116, 123, .12);
}
.check-grid input:checked + span::before {
  background-color: var(--ink);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2 6.2 4.6 8.8 10 3.4' fill='none' stroke='%23ffffff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  border-color: var(--ink);
}
.check-grid input:focus-visible + span::before {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.form-status { margin: 4px 0 0; font-size: 15px; min-height: 1.4em; }
.form-status.is-ok { color: var(--ink); }
.form-status.is-err { color: #c0392b; }

/* ── 13. Footer ────────────────────────────── */
.site-footer {
  background: var(--ink);
  color: #fff;
  padding: clamp(60px, 8vw, 110px) 0 calc(34px + env(safe-area-inset-bottom, 0px));
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr repeat(4, 1fr);
  gap: clamp(28px, 4vw, 52px);
  padding-bottom: clamp(40px, 6vw, 70px);
  border-bottom: 1px solid rgba(255,255,255,.18);
}
.footer-brand .brand-word { color: var(--mint); }
.footer-brand p { color: rgba(255,255,255,.62); max-width: 32ch; margin-top: 18px; font-size: 15px; }

.socials { display: flex; gap: 10px; margin-top: 26px; }
.socials a {
  display: grid; place-items: center;
  width: 38px; height: 38px;
  border: 1px solid rgba(255,255,255,.25);
  font-size: 12px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  transition: background-color .3s var(--ease), border-color .3s var(--ease), color .3s var(--ease);
}
.socials a:hover { background: var(--mint); border-color: var(--mint); color: var(--ink); }

.footer-col h3 { color: var(--mint); margin-bottom: 18px; }
.footer-col li + li { margin-top: 8px; }
.footer-col a {
  font-size: 15px;
  color: rgba(255,255,255,.72);
  transition: color .25s var(--ease);
}
.footer-col a:hover { color: var(--mint); }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-top: 28px;
  font-size: 14px;
  color: rgba(255,255,255,.5);
}
.footer-bottom p { margin: 0; }
.footer-bottom ul { display: flex; gap: 22px; }
.footer-bottom a:hover { color: var(--mint); }

/* ── 14. Responsive ────────────────────────── */
@media (max-width: 1200px) {
  /* astudio drops the offset blocks below its portfolio breakpoint */
  .case { padding-top: 40px; }
  .case-media::before,
  .case:nth-child(3n) .case-media::before { display: none; }
  .case:nth-child(3n) .case-media { padding-inline: 0; }
  .case:nth-child(3n) { margin: 0; }
  .work-grid { column-gap: clamp(18px, 2.6vw, 34px); }
}

@media (max-width: 1080px) {
  :root { --header-h: 84px; }
  .nav-list { gap: 16px; }
  .nav-list a, .nav-sub-toggle { font-size: 12px; letter-spacing: 1.2px; }
  .footer-grid { grid-template-columns: 1fr 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 900px) {
  .burger { display: block; }
  .header-cta { display: none; }

  .nav {
    position: fixed;
    inset: calc(var(--header-h) + env(safe-area-inset-top, 0px)) 0 0 0;
    background: var(--paper);
    color: var(--ink);
    padding: 24px var(--gutter) 60px;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-12px);
    transition: opacity .35s var(--ease), transform .35s var(--ease), visibility .35s;
  }
  .site-header.is-open .nav { opacity: 1; visibility: visible; transform: none; }

  .nav-list { flex-direction: column; align-items: stretch; gap: 0; }
  .nav-list > li { border-bottom: 1px solid var(--line); }
  .nav-list a, .nav-sub-toggle {
    width: 100%;
    justify-content: space-between;
    padding: 16px 0;
    font-size: 16px;
  }
  .nav-list > li > a::after, .nav-sub-toggle::after { display: none; }
  .sub-menu {
    position: static;
    box-shadow: none;
    border-top: 0;
    padding: 0 0 10px 14px;
    display: none;
    opacity: 1; visibility: visible; transform: none;
  }
  .has-sub.is-open .sub-menu { display: block; }

  .production-grid,
  .contact-grid { grid-template-columns: 1fr; }
  .production-media { max-width: 560px; }
  .production-media::before { inset: -26px -26px auto auto; }

  .pillar-head { grid-template-columns: 40px 1fr 42px; }
  .pillar-tag { display: none; }
  .pillar-body-inner { grid-template-columns: 40px 1fr; }
}

@media (max-width: 700px) {
  :root { --header-h: 66px; --header-h-stuck: 56px; }

  .hero { min-height: 92svh; }
  .work-grid { grid-template-columns: 1fr; }
  .case:nth-child(3n) .case-media { aspect-ratio: 6 / 7; }

  .stats-grid { grid-template-columns: 1fr; gap: 34px; }
  .stat { border-left: 0; padding-left: 0; border-top: 1px solid rgba(255,255,255,.18); padding-top: 28px; }
  .stat:first-child { border-top: 0; padding-top: 0; }

  .quote-card { grid-template-columns: 1fr; }
  .quote-photo { width: 76px; }

  .field-row { grid-template-columns: 1fr; }
  .check-grid { grid-template-columns: 1fr 1fr; }

  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}
