/* ============================================================
   ARCHITECTURAL ORCHESTRA — Giorgi Bigvava
   Shared design system for the 5-page static site
   Landing structure & choreography modeled on a modern
   builder-portfolio pattern: pill menu, giant wordmark hero,
   pinned shrinking media, ruled headings, labeled columns.
   ============================================================ */

/* Metric-matched fallbacks. Georgia sets ~14% wider than Fraunces at the same
   size, so every serif line re-wrapped when the webfonts swapped in and the
   whole page shifted. size-adjust scales the local face to the webfont's
   measured width, so the swap is invisible. Ratios measured in-browser. */
@font-face {
  font-family: "Fraunces Fallback";
  src: local("Georgia"), local("Times New Roman"), local("Times");
  size-adjust: 87.5%;
}
@font-face {
  font-family: "Outfit Fallback";
  src: local("Helvetica Neue"), local("Arial"), local("Liberation Sans");
  size-adjust: 99%;
}

:root {
  --paper: #f7f5f0;
  --paper-2: #edeae2;
  --ink: #191813;
  --ink-soft: #5c5a52;
  --line: rgba(25, 24, 19, 0.16);
  --line-strong: rgba(25, 24, 19, 0.4);
  --accent: #3c5a45;
  --accent-deep: #32503c;
  --paper-on-ink: rgba(247, 245, 240, 0.94);
  --line-on-ink: rgba(247, 245, 240, 0.22);

  --serif: "Fraunces", "Fraunces Fallback", "Georgia", serif;
  --sans: "Outfit", "Outfit Fallback", "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", "SF Mono", monospace;

  --nav-h: 96px;
  --gutter: clamp(20px, 3.2vw, 44px);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --z-nav: 100;
  --z-menu: 150;
  --z-curtain: 200;
  --z-modal: 300;
  --z-toast: 400;
}

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

html {
  /* smooth scrolling is driven by JS (Lenis-style glide); CSS smooth
     would fight the rAF loop */
  scroll-behavior: auto;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16.5px;
  font-weight: 300;
  line-height: 1.6;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }

a { color: inherit; text-decoration: none; cursor: pointer; }
button { cursor: pointer; font-family: inherit; }

::selection { background: var(--accent); color: var(--paper); }

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

.skip-link {
  position: fixed;
  top: -60px;
  left: 16px;
  z-index: calc(var(--z-toast) + 1);
  background: var(--ink);
  color: var(--paper);
  padding: 10px 18px;
  font-size: 13px;
  transition: top 0.2s;
}
.skip-link:focus { top: 12px; }

.container {
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

section { position: relative; }
.section-pad { padding: clamp(80px, 10vw, 150px) 0; }

/* ---------- typographic primitives ---------- */

/* square-bullet label — ■ Philosophy */
.sq-label {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.01em;
  color: var(--ink);
}
.sq-label::before {
  content: "";
  width: 8px;
  height: 8px;
  background: var(--accent);
  flex: none;
}

/* big ruled section heading */
.sec-title {
  font-family: var(--sans);
  font-weight: 400;
  font-size: clamp(2.4rem, 4.6vw, 4.3rem);
  line-height: 1.04;
  letter-spacing: -0.03em;
  margin: 0 0 26px;
}
.sec-rule {
  border: none;
  border-top: 1px solid var(--line);
  margin: 0 0 clamp(30px, 4vw, 56px);
}

/* two-column body under a heading: label left, text right */
.sec-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(28px, 5vw, 120px);
  align-items: start;
}
.u-link {
  display: inline-block;
  font-size: clamp(1rem, 1.2vw, 1.15rem);
  padding-bottom: 3px;
  border-bottom: 1.5px solid var(--ink);
  transition: color 0.25s, border-color 0.25s;
  background: none;
  border-top: none; border-left: none; border-right: none;
  font-weight: 300;
}
.u-link:hover { color: var(--accent); border-color: var(--accent); }

.display {
  font-family: var(--serif);
  font-weight: 380;
  line-height: 1.06;
  letter-spacing: -0.02em;
  margin: 0;
}
/* accent words stay in the same face and colour, set upright rather than
   italic — the slanted cut was hard to read at display sizes */
.display em { font-style: normal; font-weight: 380; color: var(--accent); }
.h-xl { font-size: clamp(2.6rem, 6.4vw, 5.6rem); }
.h-lg { font-size: clamp(2.1rem, 4.6vw, 3.9rem); }

.label {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--ink-soft);
  display: inline-flex;
  align-items: center;
  gap: 14px;
}
.label::before {
  content: "";
  width: 34px;
  height: 1px;
  background: var(--accent);
  flex: none;
}
.label--bare::before { display: none; }

.lead {
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  line-height: 1.75;
  color: var(--ink-soft);
  max-width: 40.73em;
}

.section-head {
  display: flex;
  flex-direction: column;
  gap: 22px;
  margin-bottom: clamp(40px, 6vw, 88px);
}

/* ============================================================
   TOP BAR — logo left · Menu pill center · Let's Talk right
   ============================================================ */

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-nav);
  height: var(--nav-h);
  pointer-events: none;
  display: flex;
  align-items: center;
  transition: transform 0.45s var(--ease-out), opacity 0.4s var(--ease-out);
}
/* scroll-down hides the logo/Let's-Talk bar; the Menu pill (.menu-panel)
   is a separate fixed element and is never affected by this */
.topbar.is-hidden {
  transform: translateY(-100%);
  opacity: 0;
}
.topbar > .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.topbar .brand,
.topbar .talk-link { pointer-events: auto; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  line-height: 1;
}
.brand-logo {
  height: 48px;
  width: auto;
  filter: brightness(0); /* the source logo is grey — render it black like the mark */
}
.brand-mark {
  font-family: var(--serif);
  font-size: 27px;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--ink);
}
.brand-mark span { color: var(--accent); font-style: normal; }

.talk-link {
  font-size: 15px;
  font-weight: 400;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s, color 0.25s;
}
.talk-link:hover { border-color: var(--ink); }

/* the pill — expands in place into a dropdown card.
   Centered with left/right + auto margins, NOT translateX: a transform
   on a fixed element with backdrop-filter misplaces in Safari, and 100vw
   (unlike 100%) includes the scrollbar width on classic-scrollbar setups. */
.menu-panel {
  position: fixed;
  top: 24px;
  left: 0;
  right: 0;
  margin-left: auto;
  margin-right: auto;
  z-index: calc(var(--z-menu) + 2);
  width: min(360px, calc(100% - 150px));
  height: 46px;
  overflow: hidden;
  background: rgba(236, 233, 224, 0.92);
  -webkit-backdrop-filter: blur(10px);
          backdrop-filter: blur(10px);
  border-radius: 6px;
  box-shadow: 0 1px 2px rgba(25, 24, 19, 0.06);
  color: var(--ink);
  transition:
    height 0.65s var(--ease-out),
    width 0.55s var(--ease-out),
    background 0.4s ease,
    box-shadow 0.55s ease,
    color 0.35s ease;
}
.menu-panel:not(.is-open):hover { background: rgba(228, 224, 213, 0.96); }
.menu-panel.is-open {
  width: min(430px, calc(100% - 28px));
  background: var(--accent-deep);
  color: var(--paper);
  box-shadow: 0 30px 70px rgba(25, 24, 19, 0.3);
  -webkit-backdrop-filter: none;
          backdrop-filter: none;
}

.menu-head {
  width: 100%;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  background: none;
  border: none;
  color: inherit;
  font-size: 15px;
  font-weight: 400;
}
.menu-head .pill-lines {
  position: relative;
  width: 58px;
  height: 12px;
}
.menu-head .pill-lines i {
  position: absolute;
  left: 0;
  display: block;
  width: 100%;
  height: 1.5px;
  background: currentColor;
  transition: transform 0.5s var(--ease-out), top 0.5s var(--ease-out), width 0.5s var(--ease-out);
}
.menu-head .pill-lines i:nth-child(1) { top: 2px; }
.menu-head .pill-lines i:nth-child(2) { top: 8.5px; width: 72%; left: auto; right: 0; }
.menu-panel.is-open .pill-lines i:nth-child(1) { top: 5.5px; transform: rotate(9deg); }
.menu-panel.is-open .pill-lines i:nth-child(2) { top: 5.5px; width: 100%; transform: rotate(-9deg); }

.menu-drop {
  padding: 10px 16px 24px;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.35s ease, transform 0.35s var(--ease-out);
}
.menu-panel.is-open .menu-drop {
  opacity: 1;
  transform: none;
  transition-delay: 0.18s;
}
.menu-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.menu-list a {
  display: block;
  font-size: 23px;
  font-weight: 300;
  letter-spacing: -0.01em;
  padding: 21px 0;
  border-bottom: 1px solid rgba(247, 245, 240, 0.28);
  color: var(--paper);
}
/* the row never moves — only the inner text glides right on hover */
.menu-list a span {
  display: inline-block;
  transform: translateX(0);
  transition: transform 1s cubic-bezier(0.14, 0.9, 0.34, 0.94);
  will-change: transform;
}
.menu-list a:hover span,
.menu-list a:focus-visible span { transform: translateX(22px); }
.menu-list a[aria-current="page"] { color: #cfdcc9; }
.menu-contact {
  display: grid;
  gap: 12px;
  padding-top: 28px;
  font-size: 15px;
}
.menu-contact a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: rgba(247, 245, 240, 0.92);
  justify-self: start;
}
.menu-contact a:hover { color: #fff; }
.menu-contact svg { flex: none; }

body.no-scroll { overflow: hidden; }

/* ============================================================
   PAGE CURTAIN TRANSITION
   ============================================================ */

.curtain {
  position: fixed;
  inset: 0;
  z-index: var(--z-curtain);
  background: var(--accent-deep);
  transform-origin: top;
  transform: scaleY(0);
  pointer-events: none;
}
.curtain.is-closing { animation: curtainIn 0.55s var(--ease-out) forwards; }
body.is-arriving .curtain {
  transform: scaleY(1);
  transform-origin: bottom;
  animation: curtainOut 0.7s var(--ease-out) 0.05s forwards;
}
@keyframes curtainIn { to { transform: scaleY(1); } }
@keyframes curtainOut { to { transform: scaleY(0); } }

/* ============================================================
   SCROLL REVEALS
   ============================================================ */

.reveal {
  opacity: 0;
  transform: translateY(38px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
  transition-delay: var(--d, 0s);
  will-change: opacity, transform;
}
.reveal.is-in { opacity: 1; transform: none; }
/* the reveal is one-shot: hand the compositor layer back when it is over
   (see settleReveal in main.js) */
.reveal.is-done, .reveal-img.is-done, .reveal-img.is-done img { will-change: auto; }

.reveal-img { position: relative; overflow: hidden; }
.reveal-img::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--paper-2);
  transform: scaleY(1);
  transform-origin: top;
  transition: transform 1.1s var(--ease-out);
  transition-delay: var(--d, 0s);
  z-index: 2;
}
.reveal-img img {
  transform: scale(1.12);
  transition: transform 1.4s var(--ease-out);
  transition-delay: var(--d, 0s);
}
.reveal-img.is-in::after { transform: scaleY(0); }
.reveal-img.is-in img { transform: scale(1); }

/* progressive word-by-word text reveal */
.words .w {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.45em);
  transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out);
  transition-delay: calc(var(--wi) * 14ms);
}
.words.is-in .w { opacity: 1; transform: none; }

/* ============================================================
   LANDING — MAST (wordmark hero)
   ============================================================ */

/* cover reveal: the mast pins (sticky) while .risescreen rides over it */
.cover-wrap { position: relative; }

.mast {
  min-height: calc(100svh - 50px); /* the next image band peeks above the fold */
  display: flex;
  flex-direction: column;
  padding-top: var(--nav-h);
  position: sticky;
  top: 0;
  z-index: 1;
  will-change: transform, opacity;
}

/* two overlapping images centered above the wordmark */
.mast-imgs {
  position: relative;
  flex: 1;
  min-height: 300px;
}
.mi { margin: 0; position: absolute; overflow: hidden; }
.mi img { width: 100%; height: 100%; object-fit: cover; }
.mi-a {
  left: 20%;
  top: 18%;
  width: 35%;
  aspect-ratio: 7 / 5;
}
.mi-b {
  left: 48.8%;
  top: 34%;
  width: 31%;
  aspect-ratio: 15 / 8;
  border: 9px solid var(--paper);
  z-index: 2;
}

.wordmark {
  display: block;
  width: 100%;
  margin: 0 0 30px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 9.4vw;
  line-height: 0.94;
  letter-spacing: -0.012em;
  color: #918e85;
  white-space: nowrap;
  user-select: none;
  transform: translateY(0.03em);
}
.wordmark em {
  font-style: normal;
  color: var(--ink);
}

/* both giant marks are JS-fitted to their glyph run, so they stay hidden
   until the first fit made with the real font (see revealMarks in main.js) */
.wordmark, .footer-mark {
  opacity: 0;
  transition: opacity 0.45s var(--ease-out);
}
html.fonts-ready .wordmark, html.fonts-ready .footer-mark { opacity: 1; }

/* hero entrance */
.mast .rise {
  display: block;
  overflow: hidden;
}
.mast .rise > * {
  display: block;
  transform: translateY(105%);
  animation: riseUp 1s var(--ease-out) forwards;
  animation-delay: var(--d, 0.15s);
}
@keyframes riseUp { to { transform: translateY(0.03em); } }

/* ============================================================
   LANDING — FULL-HEIGHT MEDIA that rises with the scroll
   (plain document flow — the glide comes from smooth scrolling)
   ============================================================ */

.risescreen {
  height: 100vh;
  position: relative;
  z-index: 2; /* renders above the pinned mast while covering it */
  background: var(--paper); /* same page background shows through the side gutters */
}
.risescreen-media {
  /* same left/right gutter as the logo and "Let's Talk" — not full-bleed */
  width: calc(100% - 2 * var(--gutter));
  height: 100%;
  margin: 0 auto;
  overflow: hidden;
}
.risescreen-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  will-change: transform;
  transform-origin: center center;
  /* the settle animation zooms the image INSIDE the clipped box
     (1.06 → 1), so no background is ever exposed at any progress */
}

/* ============================================================
   LANDING — ABOUT US
   (structure after septiembrearquitectura.com: centered kicker,
   giant mixed-font statement with scroll-linked word fill,
   flush square-image strip with an index counter)
   ============================================================ */

.au-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding-bottom: clamp(22px, 3vw, 36px);
  border-bottom: 1px solid var(--line);
}
.au-kicker {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 15px;
  font-weight: 500;
  color: var(--accent);
}
.au-kicker::before {
  content: "";
  width: 8px;
  height: 8px;
  background: var(--accent);
  flex: none;
}
.au-since {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.au-statement {
  margin: clamp(34px, 4.6vw, 68px) 0 0;
  /* measured: at 18-19em this wraps to 5 lines in the fallback face and 6 in
     Fraunces, so the page jumped ~60px when the webfont swapped in. 20em and
     wider gives the same line count in both. */
  max-width: 21em;
  font-family: var(--serif);
  font-weight: 380;
  font-size: clamp(1.7rem, 3.5vw, 3.3rem);
  line-height: 1.18;
  letter-spacing: -0.01em;
}

/* the directions rail: two identical sets sliding by half the track width,
   so the loop is seamless */
.au-rail {
  margin-top: clamp(52px, 7vw, 100px);
  padding: clamp(15px, 1.8vw, 22px) 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.au-rail-track {
  display: flex;
  width: max-content;
  animation: auDrift 42s linear infinite;
}
.au-rail:hover .au-rail-track { animation-play-state: paused; }
.au-rail-set { display: flex; flex: none; }
.au-rail-set > span {
  display: inline-flex;
  align-items: center;
  padding: 0 clamp(22px, 3.4vw, 52px);
  font-family: var(--mono);
  font-size: clamp(11px, 1.05vw, 13px);
  letter-spacing: 0.17em;
  text-transform: uppercase;
  color: var(--ink-soft);
  white-space: nowrap;
}
.au-rail-set > span::after {
  content: "";
  width: 5px;
  height: 5px;
  margin-left: clamp(22px, 3.4vw, 52px);
  background: var(--accent);
  border-radius: 50%;
  flex: none;
}
@keyframes auDrift { to { transform: translateX(-50%); } }
.au-statement strong {
  font-family: var(--sans);
  font-weight: 500;
  letter-spacing: -0.02em;
}
/* scroll-linked fill: words start as a pale tint and ink up in order */
.au-statement .w {
  color: rgba(25, 24, 19, 0.18);
  transition: color 0.45s ease;
}
.au-statement .w.lit { color: var(--ink); }

/* ============================================================
   LANDING — LABELED MEDIA (name left · meta right)
   ============================================================ */

.tagged-media { margin: 0; }
.tagged-media .tags {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 12px;
  font-size: 14.5px;
}
.tagged-media .tags .t2 { color: var(--ink-soft); }
.tagged-media .frame { overflow: hidden; cursor: pointer; }
.tagged-media .frame img {
  width: 100%;
  object-fit: cover;
  transition: transform 0.9s var(--ease-out);
}
.tagged-media:hover .frame img { transform: scale(1.04); }
.tagged-media .caption {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding-top: 12px;
  font-size: 14.5px;
  color: var(--ink-soft);
}

/* ============================================================
   LANDING — FEATURED PROJECTS HORIZONTAL RAIL
   The stage is a tall scroll track; .fp-pin sticks for its whole
   length while JS drives .fp-track sideways (see initFeaturedRail).
   Stage height is set from the real track width at runtime.
   ============================================================ */

.fp-stage { position: relative; margin-top: clamp(50px, 7vw, 100px); }
.fp-pin {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(18px, 2.6vw, 34px);
}
.fp-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
}
.fp-count {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--ink-soft);
}
.fp-count em { font-style: normal; color: var(--ink); }
.fp-count i { font-style: normal; margin: 0 6px; opacity: 0.5; }

.fp-track {
  display: flex;
  align-items: flex-start;
  gap: clamp(18px, 2.6vw, 44px);
  padding: 0 var(--gutter);
  will-change: transform;
}
.fp-panel {
  flex: none;
  width: min(56vw, 660px);
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  text-align: left;
}
.fp-media {
  position: relative;
  overflow: hidden;
  height: clamp(280px, 56vh, 580px);
  background: var(--paper-2);
}
.fp-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  /* scaled up so the parallax counter-drift never exposes an edge */
  transform: scale(1.14);
  will-change: transform;
}
.fp-info {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: baseline;
  column-gap: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  margin-top: 16px;
  opacity: 0.42;
  transition: opacity 0.5s var(--ease-out);
}
.fp-panel.is-active .fp-info { opacity: 1; }
.fp-idx {
  grid-row: span 2;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--accent);
}
.fp-name {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.2rem, 2vw, 1.85rem);
  letter-spacing: -0.015em;
  line-height: 1.12;
  margin: 0 0 5px;
  transition: color 0.3s;
}
.fp-panel:hover .fp-name, .fp-panel:focus-visible .fp-name { color: var(--accent); }
.fp-meta {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.fp-meta i { font-style: normal; margin: 0 7px; opacity: 0.55; }

.fp-progress {
  display: block;
  height: 2px;
  background: var(--line);
  overflow: hidden;
}
.fp-progress i {
  display: block;
  height: 100%;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
}

/* ============================================================
   LANDING — PROJECT GRID
   ============================================================ */

.filter-bar {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: clamp(30px, 4vw, 54px) 0;
}
/* the pill that slides between whichever filter is active */
.filter-ink {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 0;
  border-radius: 999px;
  background: var(--ink);
  pointer-events: none;
  opacity: 0;
}
.filter-bar.is-ready .filter-ink {
  opacity: 1;
  transition: transform 0.55s var(--ease-out), width 0.55s var(--ease-out), opacity 0.3s;
}
.filter-btn {
  position: relative;
  z-index: 1;
  font-size: 14px;
  background: none;
  color: var(--ink-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 20px;
  transition: color 0.35s, border-color 0.35s;
}
.filter-btn:hover { border-color: var(--line-strong); color: var(--ink); }
.filter-btn.is-active { color: var(--paper); border-color: transparent; }
/* label swap: the visible word lifts out as its clone rises into place.
   The clip lives on this inner span, not the button — Chromium does not
   apply overflow:hidden to a <button>'s own content box. */
.fb-clip { position: relative; display: block; overflow: hidden; }
.fb-t { display: block; transition: transform 0.42s var(--ease-out); }
.fb-clip::after {
  content: attr(data-label);
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  transform: translateY(105%);
  transition: transform 0.42s var(--ease-out);
}
.filter-btn:hover .fb-t, .filter-btn:focus-visible .fb-t { transform: translateY(-105%); }
.filter-btn:hover .fb-clip::after, .filter-btn:focus-visible .fb-clip::after { transform: none; }

/* ---------- ALL PROJECTS: alternating editorial rows ---------- */
.plist { display: grid; gap: clamp(46px, 7vw, 104px); }
.prow {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  align-items: center;
  gap: clamp(22px, 4vw, 68px);
  width: 100%;
  background: none;
  border: none;
  padding: 0;
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
  transition: opacity 0.45s var(--ease-out), transform 0.45s var(--ease-out);
}
/* every other visible row mirrors — JS reassigns this after filtering
   so the rhythm survives whichever set is on screen */
.prow.is-flip .prow-media { order: 2; }
.prow.is-hidden { opacity: 0; transform: translateY(18px); }

.prow-media {
  position: relative;
  overflow: hidden;
  background: var(--paper-2);
  aspect-ratio: 16 / 10;
}
/* the plate is scaled taller than its frame so the parallax drift
   never exposes an edge; JS translates this, the img keeps its own
   reveal/hover transforms */
.prow-plate {
  display: block;
  width: 100%;
  height: 108%;
  margin-top: -4%;
}
.prow-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.prow:hover .prow-media img, .prow:focus-visible .prow-media img { transform: scale(1.04); }

.prow-body { display: grid; gap: 10px; justify-items: start; }
.prow-n {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.14em;
  color: var(--accent);
}
.prow-name {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.5rem, 3vw, 2.6rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0;
  transition: color 0.3s;
}
.prow:hover .prow-name, .prow:focus-visible .prow-name { color: var(--accent); }
.prow-loc { font-size: clamp(0.95rem, 1.2vw, 1.1rem); color: var(--ink-soft); }
.prow-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.prow-tags i {
  font-style: normal;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 11px;
}
.prow-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  font-size: 14px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--line-strong);
  transition: color 0.3s, border-color 0.3s;
}
.prow-cta svg { transition: transform 0.4s var(--ease-out); }
.prow:hover .prow-cta, .prow:focus-visible .prow-cta { color: var(--accent); border-color: var(--accent); }
.prow:hover .prow-cta svg, .prow:focus-visible .prow-cta svg { transform: translateX(6px); }

/* show-more control under the project list */
.plist-more { display: flex; justify-content: center; margin-top: clamp(40px, 5vw, 72px); }
.more-btn {
  position: relative;
  background: none;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 14px 32px;
  font: inherit;
  font-size: 14.5px;
  color: var(--ink);
  overflow: hidden;
  isolation: isolate; /* keeps the -1 fill inside the button */
  transition: color 0.35s, border-color 0.35s;
}
/* the ink fills from the bottom on hover, matching the filter pills */
.more-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--ink);
  transform: translateY(101%);
  transition: transform 0.45s var(--ease-out);
}
.more-btn:hover, .more-btn:focus-visible { color: var(--paper); border-color: var(--ink); }
.more-btn:hover::before, .more-btn:focus-visible::before { transform: none; }

/* the flying clone used by the click-to-expand morph (see main.js playFlip) */
.flip-clone {
  position: fixed;
  z-index: 9999;
  object-fit: cover;
  pointer-events: none;
  transition-property: top, left, width, height, opacity;
  transition-timing-function: var(--ease-out);
}

/* ---------- FEATURED PROJECTS — magazine opening ---------- */
.fx-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding-bottom: clamp(26px, 3.4vw, 44px);
  border-bottom: 1px solid var(--line);
}
.fx-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: clamp(0.95rem, 1.1vw, 1.06rem);
  padding-bottom: 4px;
  border-bottom: 1px solid var(--line-strong);
  transition: color 0.3s, border-color 0.3s;
}
.fx-cta svg { transition: transform 0.4s var(--ease-out); }
.fx-cta:hover, .fx-cta:focus-visible { color: var(--accent); border-color: var(--accent); }
.fx-cta:hover svg, .fx-cta:focus-visible svg { transform: translateX(6px); }

.fx-lead {
  margin: clamp(32px, 4.2vw, 58px) 0 clamp(30px, 3.8vw, 52px);
  max-width: 28.91em;
  font-size: clamp(1.45rem, 2.9vw, 2.5rem);
  font-weight: 400;
  line-height: 1.18;
  letter-spacing: -0.022em;
}
.fx-cols {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(24px, 4vw, 80px);
}
.fx-cols p {
  margin: 0;
  max-width: 30.22em;
  font-size: clamp(1rem, 1.2vw, 1.14rem);
  font-weight: 300;
  line-height: 1.6;
  color: var(--ink-soft);
}

/* ============================================================
   FOOTER — brand-green block with giant wordmark
   ============================================================ */

.footer {
  background: var(--accent-deep);
  color: var(--paper-on-ink);
  padding: clamp(56px, 7vw, 96px) 0 0;
  overflow: hidden;
}
.footer a { transition: color 0.25s, opacity 0.25s; }
.footer-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(30px, 4vw, 60px);
  align-items: start;
  margin-bottom: clamp(60px, 9vw, 130px);
}
.footer .brand-mark { color: var(--paper); }
.footer .brand-mark span { color: #b8cdb9; }
.footer-nav ul {
  list-style: none;
  margin: 26px 0 0;
  padding: 0;
  display: grid;
  gap: 10px;
}
.footer-nav a { font-size: 15.5px; color: rgba(247, 245, 240, 0.88); }
.footer-nav a:hover { color: #fff; }
.footer-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 34px;
}
.footer-social {
  display: grid;
  gap: 8px;
  justify-items: end;
}
.footer-social a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 15.5px;
  color: rgba(247, 245, 240, 0.88);
}
.footer-social a:hover { color: #fff; }
.footer-social svg { flex: none; }
.footer-recent { max-width: 360px; width: 100%; }
.footer-recent .sq-label { color: var(--paper-on-ink); }
.footer-recent .sq-label::before { background: #b8cdb9; }
.footer-recent a { display: block; margin-top: 14px; position: relative; overflow: hidden; }
.footer-recent img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  transition: transform 0.8s var(--ease-out);
}
.footer-recent a:hover img { transform: scale(1.04); }
.footer-recent .fr-tags {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 12px 14px;
  font-size: 13.5px;
  color: #fff;
  background: linear-gradient(to top, rgba(20, 30, 22, 0.55), transparent 45%);
}
.footer-mark {
  display: block;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 18.4vw;
  line-height: 0.76;
  letter-spacing: -0.055em;
  color: var(--paper);
  white-space: nowrap;
  text-align: justify;
  width: 100%;
  transform: translateY(0.045em);
  user-select: none;
}
.footer-mark em { font-style: normal; color: #cfdcc9; }
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 38px;
  padding: 18px 0 22px;
  font-size: 13px;
  color: rgba(247, 245, 240, 0.6);
}
.footer-bottom a:hover { color: #fff; }

/* ============================================================
   PROJECT MODAL
   ============================================================ */

.modal {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  display: none;
}
.modal.is-open { display: block; }
.modal-scrim {
  position: absolute;
  inset: 0;
  background: rgba(20, 19, 14, 0.62);
  -webkit-backdrop-filter: blur(6px);
          backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.4s;
}
.modal.is-open .modal-scrim { opacity: 1; }
.modal-panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(760px, 100%);
  background: var(--paper);
  overflow-y: auto;
  overscroll-behavior: contain;
  transform: translateX(100%);
  transition: transform 0.55s var(--ease-out);
}
.modal.is-open .modal-panel { transform: none; }
.modal-close {
  position: sticky;
  top: 0;
  z-index: 5;
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--paper);
  border: none;
  border-bottom-left-radius: 12px;
  padding: 16px 22px;
  font-size: 14px;
}
.modal-close:hover { color: var(--accent); }
.modal-body { padding: 0 clamp(24px, 5vw, 56px) 64px; }
.modal-kicker {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 10px 0 16px;
}
.modal-title {
  font-family: var(--serif);
  font-weight: 420;
  font-size: clamp(1.9rem, 4vw, 3rem);
  line-height: 1.08;
  margin: 0 0 14px;
}
.modal-meta {
  font-size: 14px;
  color: var(--ink-soft);
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
  padding-bottom: 26px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 26px;
}
.modal-desc { color: var(--ink-soft); max-width: 39.42em; }
.modal-gallery { display: grid; gap: 18px; margin-top: 34px; }
.modal-gallery img { width: 100%; }

/* ============================================================
   INNER PAGE HERO
   ============================================================ */

.page-hero {
  padding: calc(var(--nav-h) + clamp(48px, 9vh, 110px)) 0 clamp(40px, 6vw, 80px);
  position: relative;
}
.page-hero .display { max-width: 10.42em; }
.page-hero .lead { margin-top: 28px; }
.page-hero-rule {
  margin-top: clamp(40px, 6vw, 70px);
  border: none;
  border-top: 1px solid var(--line);
}

/* ============================================================
   ART PAGE
   ============================================================ */

/* A grid, not CSS columns: multi-column fills each column top-to-bottom, so
   the works read 1,10,19 across the first row. A grid fills left-to-right,
   which is the order they are numbered in. */
.art-masonry {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(16px, 2.2vw, 32px);
  align-items: start;
}
.art-item {
  margin: 0;
  position: relative;
  border: none;
  background: var(--paper-2);
  padding: 0;
  display: block;
  width: 100%;
  overflow: hidden;
}
.art-item img {
  width: 100%;
  transition: transform 0.7s var(--ease-out), filter 0.7s;
}
.art-item:hover img, .art-item:focus-visible img { transform: scale(1.035); }
.art-item .art-zoom {
  position: absolute;
  right: 14px;
  bottom: 14px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(247, 245, 240, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.35s, transform 0.35s var(--ease-out);
  pointer-events: none;
}
.art-item:hover .art-zoom, .art-item:focus-visible .art-zoom { opacity: 1; transform: none; }
.art-idx {
  position: absolute;
  left: 14px;
  top: 12px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--paper);
  background: rgba(25, 24, 19, 0.55);
  padding: 5px 10px;
  border-radius: 999px;
  opacity: 0;
  transition: opacity 0.35s;
}
.art-item:hover .art-idx { opacity: 1; }

/* ---------- lightbox ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  background: rgba(16, 15, 11, 0.96);
  display: none;
  flex-direction: column;
  color: var(--paper-on-ink);
}
.lightbox.is-open { display: flex; }
.lightbox-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px var(--gutter);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  flex: none;
  z-index: 3;
}
.lightbox-stage {
  flex: 1;
  position: relative;
  overflow: hidden;
  touch-action: none;
  cursor: grab;
}
.lightbox-stage.is-panning { cursor: grabbing; }
.lightbox-stage img {
  position: absolute;
  top: 50%;
  left: 50%;
  max-width: none;
  transform-origin: 0 0;
  user-select: none;
  -webkit-user-drag: none;
  will-change: transform;
}
.lightbox-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 18px var(--gutter) 26px;
  flex: none;
  z-index: 3;
  flex-wrap: wrap;
}
.lb-btn {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 1px solid var(--line-on-ink);
  background: none;
  color: var(--paper-on-ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.25s, border-color 0.25s;
}
.lb-btn:hover { background: rgba(247, 245, 240, 0.12); }
.lb-zoom-level {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  min-width: 58px;
  text-align: center;
  color: rgba(247, 245, 240, 0.7);
}
.lb-hint {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(247, 245, 240, 0.45);
  width: 100%;
  text-align: center;
}

/* ============================================================
   ABOUT PAGE
   ============================================================ */

.about-statement {
  font-family: var(--serif);
  font-weight: 380;
  font-size: clamp(1.7rem, 3.6vw, 3.1rem);
  line-height: 1.32;
  letter-spacing: -0.01em;
  max-width: 17.36em;
  margin: 0;
}
.about-statement em { color: var(--accent); font-style: normal; }
.about-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(28px, 5vw, 90px);
  margin-top: clamp(40px, 6vw, 76px);
}
.about-cols p { margin: 0; color: var(--ink-soft); font-size: 1.02rem; line-height: 1.8; }

/* Rows, not a boxed grid: the grid drew its hairlines with a 1px gap over a
   grey backdrop, so any count that did not fill the last row left an empty
   grey cell. Rows read the same at any number of directions. */
.directions-grid { border-top: 1px solid var(--line); }
.direction-card {
  position: relative;
  display: grid;
  grid-template-columns: 56px minmax(0, 4fr) minmax(0, 6fr);
  align-items: baseline;
  gap: clamp(14px, 2.6vw, 40px);
  padding: clamp(22px, 2.8vw, 36px) 0;
  border-bottom: 1px solid var(--line);
}
/* a wash that wipes in from the left, bleeding just past the gutter */
.direction-card::before {
  content: "";
  position: absolute;
  left: calc(var(--gutter) * -0.5);
  right: calc(var(--gutter) * -0.5);
  top: 0;
  bottom: 0;
  z-index: 0;
  background: var(--paper-2);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.55s var(--ease-out);
}
.direction-card:hover::before { transform: scaleX(1); }
.direction-card > * { position: relative; z-index: 1; }
.direction-card .num {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--accent);
  transition: transform 0.45s var(--ease-out);
}
.direction-card:hover .num { transform: translateX(5px); }
.direction-card h3 {
  font-family: var(--serif);
  font-size: clamp(1.15rem, 1.7vw, 1.5rem);
  font-weight: 500;
  letter-spacing: -0.01em;
  margin: 0;
}
.direction-card p { margin: 0; color: var(--ink-soft); font-size: clamp(0.94rem, 1.1vw, 1.04rem); }

.on-ink {
  background: var(--ink);
  color: var(--paper-on-ink);
}
.on-ink .label { color: rgba(247, 245, 240, 0.65); }
.on-ink .label::before { background: #cfdcc9; }
.on-ink .lead { color: rgba(247, 245, 240, 0.72); }
.on-ink .reveal-img::after { background: #26251e; }

.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(20px, 3vw, 44px);
}
.team-card figure { margin: 0; overflow: hidden; }
.team-card img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  filter: grayscale(1);
  transition: filter 0.5s, transform 0.8s var(--ease-out);
}
.team-card:hover img { filter: grayscale(0); transform: scale(1.03); }
.team-card h3 {
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 480;
  margin: 18px 0 4px;
}
.team-card .role {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-soft);
  display: block;
  margin-bottom: 8px;
}
.team-card a {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--accent);
}
.team-card a:hover { text-decoration: underline; }

/* ============================================================
   SERVICES PAGE
   ============================================================ */

.services-list { border-top: 1px solid var(--line); }
.service-row {
  display: grid;
  grid-template-columns: 90px 1fr auto;
  align-items: center;
  gap: clamp(16px, 3vw, 44px);
  padding: clamp(20px, 2.6vw, 30px) 0;
  border-bottom: 1px solid var(--line);
  transition: padding-left 0.4s var(--ease-out);
}
.service-row:hover { padding-left: 18px; }
.service-row .num {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--accent);
}
.service-row h3 {
  font-family: var(--serif);
  font-weight: 420;
  font-size: clamp(1.25rem, 2.4vw, 1.9rem);
  margin: 0;
}
.service-row .tag {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-soft);
  border: 1px solid var(--line);
  padding: 7px 14px;
  border-radius: 999px;
  white-space: nowrap;
}


/* ============================================================
   CTA BAND (inner pages)
   ============================================================ */

.cta-band { text-align: center; }
.cta-band .display { margin-bottom: 34px; }
.btn-solid {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  background: var(--ink);
  color: var(--paper);
  border: 1px solid var(--ink);
  border-radius: 999px;
  padding: 18px 36px;
  transition: background 0.3s, border-color 0.3s, transform 0.3s var(--ease-out);
}
.btn-solid:hover { background: var(--accent); border-color: var(--accent); transform: translateY(-2px); }
.on-ink .btn-solid { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.on-ink .btn-solid:hover { background: #cfdcc9; border-color: #cfdcc9; }

/* ============================================================
   CONTACT PAGE
   ============================================================ */

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: clamp(40px, 6vw, 110px);
}
.contact-block { margin-bottom: 40px; }
.contact-block h3 {
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 14px;
}
.contact-block p, .contact-block address {
  font-style: normal;
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.15rem, 1.9vw, 1.5rem);
  line-height: 1.55;
}
.contact-block a { transition: color 0.25s; }
.contact-block a:hover { color: var(--accent); }
.contact-socials { display: flex; gap: 12px; margin-top: 8px; }
.contact-socials a {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1px solid var(--line);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s, color 0.3s, border-color 0.3s;
}
.contact-socials a:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }

.form { display: grid; gap: 26px; }
.form-field { display: grid; gap: 8px; }
.form-field label {
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.form-field label .req { color: var(--accent); }
.form-field input,
.form-field textarea {
  width: 100%;
  background: none;
  border: none;
  border-bottom: 1px solid var(--line-strong);
  padding: 12px 2px;
  font-family: var(--serif);
  font-size: 1.15rem;
  color: var(--ink);
  border-radius: 0;
  transition: border-color 0.3s;
}
.form-field input:focus,
.form-field textarea:focus {
  outline: none;
  border-bottom-color: var(--accent);
}
.form-field textarea { resize: vertical; min-height: 120px; }
.form-error {
  font-family: var(--mono);
  font-size: 11px;
  color: #a03422;
  display: none;
}
.form-field.has-error .form-error { display: block; }
.form-field.has-error input,
.form-field.has-error textarea { border-bottom-color: #a03422; }
.form .btn-solid { justify-self: start; }
.form .btn-solid[disabled] { opacity: 0.55; cursor: progress; transform: none; }

.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translate(-50%, 90px);
  z-index: var(--z-toast);
  background: var(--ink);
  color: var(--paper);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  padding: 16px 28px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: transform 0.5s var(--ease-out);
  max-width: calc(100vw - 40px);
}
.toast.is-visible { transform: translate(-50%, 0); }
.toast svg { color: #9fc0a4; flex: none; }

.address-band {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: clamp(30px, 4vw, 50px) 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.address-band .big {
  font-family: var(--serif);
  font-size: clamp(1.4rem, 3vw, 2.4rem);
  font-weight: 400;
  margin: 0;
}
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink);
  background: none;
  border: none;
  padding: 6px 0;
}
.link-arrow svg { transition: transform 0.35s var(--ease-out); }
.link-arrow:hover svg { transform: translateX(6px); }

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* Where the pinned rail can't run — narrow screens and reduced
   motion — it degrades to a native scroll-snap strip. initFeaturedRail
   keeps its scrub switched off under exactly these conditions. */
@media (max-width: 900px), (prefers-reduced-motion: reduce) {
  .fp-stage { height: auto !important; }
  .fp-pin {
    position: static;
    height: auto;
    overflow: visible;
  }
  .fp-track {
    transform: none !important;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-left: var(--gutter);
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 6px;
  }
  .fp-track::-webkit-scrollbar { display: none; }
  .fp-panel { width: min(78vw, 520px); scroll-snap-align: center; }
  .fp-media { height: clamp(240px, 48vh, 420px); }
  .fp-media img { transform: none !important; }
  .fp-info { opacity: 1; }
  .fp-count, .fp-progress { display: none; }
}

@media (max-width: 1024px) {
  .art-masonry { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  .sec-grid, .about-cols, .contact-grid { grid-template-columns: 1fr; }
  /* rows stack: image always above its text, so is-flip must not reorder */
  .fx-cols { grid-template-columns: 1fr; gap: clamp(16px, 3vw, 24px); }
  .prow { grid-template-columns: 1fr; gap: clamp(16px, 3vw, 26px); }
  .direction-card { grid-template-columns: 40px minmax(0, 1fr); row-gap: 8px; }
  .direction-card p { grid-column: 2; }
  .prow.is-flip .prow-media { order: 0; }
  .team-grid { grid-template-columns: 1fr; max-width: 460px; }
  .service-row { grid-template-columns: 48px 1fr; }
  .service-row .tag { display: none; }
  .footer-top { grid-template-columns: 1fr; }
  .footer-right { align-items: flex-start; }
  .footer-social { justify-items: start; }
  .stage-word.left { left: var(--gutter); }
  .stage-word.right { right: var(--gutter); }
}

@media (max-width: 640px) {
  :root { --nav-h: 76px; }
  .art-masonry { grid-template-columns: 1fr; }
  .menu-panel { width: min(210px, 54%); }
  .menu-panel.is-open { width: calc(100% - 28px); }
  .talk-link { display: none; }
  .brand-logo { height: 38px; }
  .mi-a { left: 2%; top: 10%; width: 62%; }
  .mi-b { left: 40%; top: 34%; width: 56%; border-width: 6px; }
  .footer-mark { font-size: 19.5vw; }
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal, .reveal-img::after, .reveal-img img { opacity: 1; transform: none; }
  .au-rail-track { animation: none; }
  .words .w { opacity: 1; transform: none; }
}
