/* ==========================================================================
   GODY STUDIO: landing page styles
   --------------------------------------------------------------------------
   01 Fonts                08 Hero
   02 Design tokens        09 About
   03 Colour themes        10 Services
   04 Base / reset         11 Work (horizontal showcase)
   05 Utilities            12 Contact & footer
   06 Components           13 Scroll reveals
   07 Header, menu, loader 14 Responsive
                           15 Reduced motion
   ========================================================================== */


/* 01 ── Fonts ─────────────────────────────────────────────────────────────
   Poppins, the typeface used in the Gody logo animation.
   Self-hosted (no third-party requests), subset to Latin + Latin Extended. */
@font-face { font-family: "Poppins"; src: url("../assets/fonts/poppins-light.woff") format("woff");   font-weight: 300; font-style: normal; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("../assets/fonts/poppins-regular.woff") format("woff"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("../assets/fonts/poppins-medium.woff") format("woff");  font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("../assets/fonts/poppins-bold.woff") format("woff");    font-weight: 700; font-style: normal; font-display: swap; }


/* 02 ── Design tokens ─────────────────────────────────────────────────────
   Colours sampled directly from the logo files. */
:root {
  /* Brand palette */
  --paper:     #F4F4F1;   /* logo background */
  --paper-2:   #EAEAE5;   /* panels on paper */
  --ink:       #141414;   /* logo black */
  --ink-2:     #232323;   /* panels on ink */
  --graphite:  #4A4A4A;   /* "STUDIO" grey */
  --blue:      #2F5BEA;   /* the corner */
  --blue-deep: #2348C6;
  --white:     #FFFFFF;
  --danger:    #C4302B;

  /* Type */
  --font: "Poppins", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --fs-display: clamp(2.5rem, 1rem + 4.4vw, 5.5rem);
  --fs-h2:      clamp(2.125rem, 1.3rem + 3.3vw, 4.25rem);
  --fs-h3:      clamp(1.3rem, 1.15rem + .5vw, 1.625rem);
  --fs-lead:    clamp(1.075rem, 1rem + .35vw, 1.3rem);
  --fs-body:    1rem;
  --fs-small:   .875rem;

  /* Layout */
  --maxw: 1320px;
  --gutter: clamp(16px, 4vw, 48px);
  --edge: max(var(--gutter), calc((100vw - var(--maxw)) / 2 + var(--gutter)));
  --header-h: 80px;
  --section-y: clamp(96px, 11vw, 168px);

  /* Shape: round caps in the logo → pills; larger surfaces get softer radii */
  --r-pill: 999px;
  --r-lg: 28px;
  --r-md: 16px;

  /* Motion */
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-in-out: cubic-bezier(.7, 0, .2, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
}


/* 03 ── Colour themes ─────────────────────────────────────────────────────
   Mirrors the three logo applications on the brand sheet:
   light (paper + ink), dark (ink + white mark), blue (app tile). */
[data-theme="light"] {
  --bg: var(--paper); --fg: var(--ink); --fg-2: var(--graphite);
  --rule: rgba(20, 20, 20, .12); --guide: rgba(20, 20, 20, .2);
  --mk-chev: var(--ink); --mk-corner: var(--blue);
  --focus: var(--blue);
}
[data-theme="dark"] {
  --bg: var(--ink); --fg: var(--paper); --fg-2: #A3A39F;
  --rule: rgba(244, 244, 241, .14); --guide: rgba(244, 244, 241, .2);
  --mk-chev: var(--paper); --mk-corner: var(--blue);
  --focus: #7D9BF7;
}
[data-theme="blue"] {
  --bg: var(--blue); --fg: var(--white); --fg-2: rgba(255, 255, 255, .82);
  --rule: rgba(255, 255, 255, .3); --guide: rgba(255, 255, 255, .35);
  --mk-chev: var(--white); --mk-corner: var(--white);
  --focus: var(--white);
}
.surface { background-color: var(--bg); color: var(--fg); }


/* 04 ── Base / reset ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 72px;
}
/* Enabled by JS after load, so deep links jump straight to their section */
html.smooth-scroll { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--fs-body);
  font-weight: 400;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

img, video { display: block; max-width: 100%; height: auto; }
svg { display: block; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }

::selection { background: var(--blue); color: var(--white); }

:focus-visible {
  outline: 2px solid var(--focus, var(--blue));
  outline-offset: 3px;
  border-radius: 6px;
}


/* 05 ── Utilities ─────────────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: var(--section-y); }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.skip-link {
  position: fixed; top: 12px; left: 12px; z-index: 200;
  padding: .7em 1.1em; border-radius: var(--r-pill);
  background: var(--ink); color: var(--paper); text-decoration: none;
  transform: translateY(-160%); transition: transform .3s var(--ease-out);
}
.skip-link:focus { transform: none; }


/* 06 ── Components ────────────────────────────────────────────────────── */

/* The mark: two strokes, 60 units wide with round caps (as in the logo) */
.mark__chev,
.mark__corner {
  fill: none;
  stroke-width: 60;
  stroke-linecap: round;
  stroke-linejoin: round;
  transform-box: fill-box;
  transform-origin: center;
  transition: stroke .4s ease;
}
.mark__chev   { stroke: var(--mk-chev, var(--ink)); }
.mark__corner { stroke: var(--mk-corner, var(--blue)); }

/* Construction guides (hero + about) */
.guide {
  fill: none;
  stroke: var(--guide);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}
.guide--blue { stroke: rgba(47, 91, 234, .55); }
.guide--dash { stroke-dasharray: 3 7; }
.guide-label { font: 400 14px/1 var(--font); fill: var(--fg-2); letter-spacing: .02em; }

/* Arrow icon = the brand corner (┐) plus a shaft: ↗.
   Two copies so one can slide out while the other slides in on hover. */
.arrow {
  position: relative;
  display: inline-block;
  flex: none;
  width: 1.05em;
  height: 1.05em;
  overflow: hidden;
}
.arrow svg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  fill: none; stroke: currentColor; stroke-width: 2.4;
  stroke-linecap: round; stroke-linejoin: round;
  transition: transform .5s var(--ease-out);
}
.arrow svg + svg { transform: translate(-110%, 110%); }
a:hover .arrow svg:first-child,
button:hover .arrow svg:first-child,
a:focus-visible .arrow svg:first-child,
.service:hover .arrow svg:first-child,
.tile__link:hover .arrow svg:first-child { transform: translate(110%, -110%); }
a:hover .arrow svg + svg,
button:hover .arrow svg + svg,
a:focus-visible .arrow svg + svg,
.service:hover .arrow svg + svg,
.tile__link:hover .arrow svg + svg { transform: none; }

/* Buttons: pill (round caps). Hover fill blooms out from the arrow. */
.btn {
  --btn-bg: var(--ink);
  --btn-fg: var(--paper);
  --btn-fill: var(--blue);
  --btn-fill-fg: var(--white);

  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .7em;
  padding: 1.05em 1.5em 1.05em 1.75em;
  border: 0;
  border-radius: var(--r-pill);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-size: 1rem;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -.01em;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  overflow: hidden;
  transition: color .35s ease, transform .5s var(--ease-spring);
  -webkit-tap-highlight-color: transparent;
}
.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--btn-fill);
  clip-path: circle(0% at calc(100% - 2.2em) 50%);
  transition: clip-path .6s var(--ease-out);
}
.btn:hover,
.btn:focus-visible { color: var(--btn-fill-fg); }
.btn:hover::before,
.btn:focus-visible::before { clip-path: circle(150% at calc(100% - 2.2em) 50%); }
.btn:active { transform: scale(.97); }

.btn--small { padding: .8em 1.15em .8em 1.35em; font-size: .9375rem; }
.btn--light { --btn-bg: var(--paper); --btn-fg: var(--ink); }

/* Themed buttons */
[data-theme="dark"] .btn { --btn-bg: var(--paper); --btn-fg: var(--ink); }
[data-theme="blue"] .btn { --btn-bg: var(--white); --btn-fg: var(--ink); --btn-fill: var(--ink); }
.form-card .btn { --btn-bg: var(--ink); --btn-fg: var(--paper); --btn-fill: var(--blue); }

/* Underlined text link: line retracts right, redraws from left */
.link-u {
  padding: 0;
  border: 0;
  background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1.5px no-repeat;
  color: inherit;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
}
.link-u:hover,
.link-u:focus-visible { animation: underline .7s var(--ease-in-out); }
@keyframes underline {
  0%   { background-size: 100% 1.5px; background-position: 100% 100%; }
  50%  { background-size: 0% 1.5px;   background-position: 100% 100%; }
  50.1%{ background-size: 0% 1.5px;   background-position: 0 100%; }
  100% { background-size: 100% 1.5px; background-position: 0 100%; }
}

/* Section titles */
.section-title {
  font-size: var(--fs-h2);
  font-weight: 500;
  line-height: 1.04;
  letter-spacing: -.042em;
  text-wrap: balance;
}

/* Split-word masks (JS wraps each word) */
.word {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
  padding-bottom: .12em;
  margin-bottom: -.12em;
}
.word > span { display: inline-block; }


/* 07 ── Header ────────────────────────────────────────────────────────── */
.header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  color: var(--fg);
  transition: transform .55s var(--ease-out), background-color .4s ease, color .4s ease, box-shadow .4s ease;
}
.header__inner {
  display: flex;
  align-items: center;
  gap: clamp(12px, 2vw, 28px);
  height: var(--header-h);
  transition: height .45s var(--ease-out);
}
.header.is-scrolled {
  background-color: color-mix(in srgb, var(--bg) 80%, transparent);
  -webkit-backdrop-filter: saturate(1.6) blur(16px);
  backdrop-filter: saturate(1.6) blur(16px);
  box-shadow: 0 1px 0 var(--rule);
}
.header.is-scrolled .header__inner { height: 64px; }
.header.is-hidden { transform: translateY(-101%); }

.header__logo { display: block; flex: none; border-radius: 8px; }
.logo { height: 30px; width: auto; overflow: visible; }
.logo__word { fill: currentColor; }
.header .mark__chev { stroke: var(--mk-chev); }
.header .mark__corner { stroke: var(--mk-corner); }

.header__progress {
  position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
  pointer-events: none;
}
.header__progress span {
  display: block; height: 100%;
  background: var(--blue);
  transform: scaleX(0);
  transform-origin: left;
}
[data-theme="blue"] .header__progress span { background: var(--white); }

/* Primary nav with a sliding pill indicator */
.nav { position: relative; margin-left: auto; }
.nav__list { display: flex; gap: 2px; }
.nav__link {
  position: relative;
  z-index: 1;
  display: block;
  padding: .55em 1.05em;
  border-radius: var(--r-pill);
  font-size: .9375rem;
  font-weight: 500;
  line-height: 1.4;
  text-decoration: none;
  transition: color .3s ease;
}
.nav__indicator {
  position: absolute;
  top: 0; left: 0;
  height: 100%;
  width: var(--w, 0px);
  transform: translateX(var(--x, 0px));
  border-radius: var(--r-pill);
  background: color-mix(in srgb, var(--fg) 9%, transparent);
  opacity: 0;
  transition: transform .5s var(--ease-out), width .5s var(--ease-out), opacity .3s ease;
  pointer-events: none;
}
.nav__indicator.is-on { opacity: 1; }

.header__cta { flex: none; }

/* Burger */
.menu-toggle {
  display: none;
  position: relative;
  width: 48px; height: 48px;
  margin-left: auto;
  margin-right: -8px;
  border: 0; border-radius: 50%;
  background: transparent;
  cursor: pointer;
}
.menu-toggle__bar {
  position: absolute; left: 13px; right: 13px; height: 2px;
  background: currentColor; border-radius: 2px;
  transition: transform .5s var(--ease-out);
}
.menu-toggle__bar:nth-of-type(2) { transform: translateY(-4px); }
.menu-toggle__bar:nth-of-type(3) { transform: translateY(4px); }
.menu-toggle[aria-expanded="true"] .menu-toggle__bar:nth-of-type(2) { transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-toggle__bar:nth-of-type(3) { transform: rotate(-45deg); }

/* Mobile menu overlay */
.menu {
  --bg: var(--paper); --fg: var(--ink);
  position: fixed;
  inset: 0;
  z-index: 45;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: calc(var(--header-h) + 32px) var(--gutter) max(32px, env(safe-area-inset-bottom));
  background: var(--paper);
  color: var(--ink);
  clip-path: inset(0 0 100% 0);
  visibility: hidden;
  transition: clip-path .7s var(--ease-in-out), visibility 0s linear .7s;
}
.menu.is-open {
  clip-path: inset(0 0 0 0);
  visibility: visible;
  transition: clip-path .7s var(--ease-in-out);
}
.menu__link {
  display: inline-block;
  font-size: clamp(2.5rem, 11vw, 4.5rem);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -.045em;
  text-decoration: none;
  opacity: 0;
  transform: translateY(40px);
  transition: opacity .4s ease, transform .4s var(--ease-out);
}
.menu.is-open .menu__link {
  opacity: 1;
  transform: none;
  transition: opacity .7s ease calc(.25s + var(--i) * .07s), transform .9s var(--ease-out) calc(.25s + var(--i) * .07s);
}
.menu__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; }

html.menu-open,
html.is-loading { overflow: hidden; }


/* 07b ── Loader ──────────────────────────────────────────────────────── */
.loader { display: none; }
.js .loader {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: block;
  background: var(--paper);
  cursor: pointer;
}
.js.skip-loader .loader { display: none; }
.loader__word {
  position: absolute;
  top: 50%; left: 50%;
  width: min(62vw, 420px);
  translate: -50% -50%;
  opacity: 0;
}
.loader__gody   { fill: var(--ink); }
.loader__studio { fill: var(--graphite); }
.loader__mark {
  position: absolute;
  top: 50%; left: 50%;
  width: clamp(92px, 11vw, 132px);
  translate: -50% -50%;
  overflow: visible;
  transform-origin: 50% 50%;
}
.loader__mark .mark__chev,
.loader__mark .mark__corner { opacity: 0; }

/* Hide the hero mark while the loader mark is flying into its place */
.js.is-loading .hero-mark__chev,
.js.is-loading .hero-mark__corner { visibility: hidden; }


/* 08 ── Hero ──────────────────────────────────────────────────────────── */
.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
  padding-top: var(--header-h);
  overflow: clip;
  --sp: 0;                         /* scroll progress, set by JS */
}

/* Animated drafting-grid background (parallax on scroll) */
.hero__grid {
  position: absolute;
  inset: -12% 0 0;
  background-image:
    linear-gradient(var(--rule) 1px, transparent 1px),
    linear-gradient(90deg, var(--rule) 1px, transparent 1px);
  background-size: 72px 72px;
  background-position: center top;
  -webkit-mask-image: radial-gradient(ellipse 62% 58% at 72% 46%, #000 10%, transparent 72%);
  mask-image: radial-gradient(ellipse 62% 58% at 72% 46%, #000 10%, transparent 72%);
  opacity: .6;
  transform: translate3d(0, calc(var(--sp) * 140px), 0);
  will-change: transform;
  pointer-events: none;
}

.hero__inner {
  position: relative;
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  align-items: center;
  gap: clamp(24px, 4vw, 72px);
  padding-block: clamp(24px, 5vh, 64px);
}

.hero__copy { position: relative; z-index: 2; }

.status {
  display: inline-flex;
  align-items: center;
  gap: .65em;
  margin-bottom: clamp(20px, 3vh, 36px);
  font-size: var(--fs-small);
  font-weight: 500;
  color: var(--fg-2);
}
.status__dot {
  position: relative;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--blue);
}
.status__dot::after {
  content: "";
  position: absolute; inset: 0;
  border-radius: 50%;
  background: var(--blue);
  animation: pulse 2.4s var(--ease-out) infinite;
}
@keyframes pulse {
  0%   { transform: scale(1);   opacity: .6; }
  70%  { transform: scale(3.2); opacity: 0; }
  100% { transform: scale(3.2); opacity: 0; }
}

.hero__title {
  max-width: 10.5em;
  font-size: var(--fs-display);
  font-weight: 500;
  line-height: .98;
  letter-spacing: -.048em;
}

.hero__lead {
  max-width: 46ch;
  margin-top: clamp(20px, 3vh, 36px);
  font-size: var(--fs-lead);
  font-weight: 300;
  line-height: 1.55;
  color: var(--fg-2);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 32px;
  margin-top: clamp(28px, 4.5vh, 48px);
}

/* Hero mark + construction drawing */
.hero__visual {
  position: relative;
  z-index: 1;
  justify-self: end;
  width: min(100%, 460px);
  transform: translate3d(0, calc(var(--sp) * 70px), 0);
  will-change: transform;
}
.hero-mark { width: 100%; height: auto; overflow: visible; --mx: 0; --my: 0; }
.hero-mark__guides,
.hero-mark__chev,
.hero-mark__corner { transform-box: fill-box; transform-origin: center; }
.hero-mark__guides {
  transform: translate(calc(var(--mx) * 6px), calc(var(--my) * 6px + var(--sp) * 30px));
}
.hero-mark__chev {
  transform:
    translate(calc(var(--mx) * -12px - var(--sp) * 90px), calc(var(--my) * -9px - var(--sp) * 40px))
    rotate(calc(var(--sp) * -12deg));
}
.hero-mark__corner {
  transform:
    translate(calc(var(--mx) * 18px + var(--sp) * 110px), calc(var(--my) * 14px + var(--sp) * 70px))
    rotate(calc(var(--sp) * 18deg));
}

/* Slow-turning construction circle */
.spin { transform-box: fill-box; transform-origin: center; animation: spin 90s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Hero entrance states (only with JS). Revealed when <html> gets .is-ready */
.js [data-hero-in] {
  opacity: 0;
  transform: translate3d(0, 22px, 0);
  transition: opacity .9s ease var(--d, 0s), transform 1.1s var(--ease-out) var(--d, 0s);
}
.js.is-ready [data-hero-in] { opacity: 1; transform: none; }

.js .hero__title .word > span {
  transform: translate3d(0, 135%, 0);
  transition: transform 1.1s var(--ease-out) calc(.1s + var(--i) * 45ms);
}
.js.is-ready .hero__title .word > span { transform: none; }

.js .g-h, .js .g-v, .js .g-pop {
  transform-box: fill-box;
  transition: transform 1.4s var(--ease-out) calc(.35s + var(--d, 0s)), opacity .8s ease calc(.35s + var(--d, 0s));
}
.js .g-h { transform: scaleX(0); transform-origin: left center; }
.js .g-v { transform: scaleY(0); transform-origin: center top; }
.js .g-pop { transform: scale(.5); transform-origin: center; opacity: 0; }
.js.is-ready .g-h,
.js.is-ready .g-v,
.js.is-ready .g-pop { transform: none; opacity: 1; }

/* Services ticker */
.ticker {
  position: relative;
  z-index: 2;
  background: var(--bg);
  border-top: 1px solid var(--rule);
  padding-block: clamp(14px, 2vh, 22px);
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
}
.ticker__track {
  display: flex;
  width: max-content;
  animation: ticker 48s linear infinite;
}
.ticker:hover .ticker__track,
.ticker.is-paused .ticker__track { animation-play-state: paused; }
.ticker__list {
  display: flex;
  align-items: center;
  font-size: clamp(1rem, .9rem + .6vw, 1.5rem);
  font-weight: 400;
  letter-spacing: -.015em;
  white-space: nowrap;
  color: var(--fg-2);
}
.ticker__list li { display: flex; align-items: center; }
.ticker__list li::after {           /* the brand corner as separator */
  content: "";
  width: .5em; height: .5em;
  margin-inline: 1.4em;
  border-top: 3px solid var(--blue);
  border-right: 3px solid var(--blue);
  border-top-right-radius: 3px;
  translate: 0 .05em;
}
@keyframes ticker { to { transform: translate3d(-50%, 0, 0); } }


/* 09 ── About ─────────────────────────────────────────────────────────── */
.about__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: clamp(48px, 7vw, 128px);
  align-items: center;
}

.about__statement {
  max-width: 30ch;
  margin-top: clamp(28px, 3vw, 44px);
  font-size: clamp(1.3rem, 1rem + 1.05vw, 2rem);
  font-weight: 400;
  line-height: 1.38;
  letter-spacing: -.02em;
}
/* Word-by-word scrub: --p (0→1) comes from scroll, --i is each word's position */
.scrub-word {
  opacity: clamp(.16, calc((var(--p, 1) - var(--i)) * 14), 1);
  transition: opacity .15s linear;
}

.facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
  margin-top: clamp(40px, 5vw, 72px);
  padding-top: 28px;
  border-top: 1px solid var(--rule);
}
.facts dt { font-weight: 500; letter-spacing: -.01em; }
.facts dd { margin-top: 6px; font-size: var(--fs-small); line-height: 1.6; color: var(--fg-2); }

/* The mark, taken apart. --a (0→1) is the assembly progress from scroll */
.anatomy {
  position: relative;
  aspect-ratio: 1 / 1.08;
  border-radius: var(--r-lg);
  background: var(--paper-2);
  overflow: hidden;
  --a: 1;
}
.anatomy__stage { position: absolute; inset: 0; }
.anatomy__svg { width: 100%; height: 100%; overflow: visible; }
.anatomy__chev,
.anatomy__corner { transform-box: fill-box; transform-origin: center; }
.anatomy__chev {
  transform:
    translate(calc((1 - var(--a)) * -150px), calc((1 - var(--a)) * -70px))
    rotate(calc((1 - var(--a)) * -26deg));
}
.anatomy__corner {
  transform:
    translate(calc((1 - var(--a)) * 170px), calc((1 - var(--a)) * 110px))
    rotate(calc((1 - var(--a)) * 34deg));
}
.anatomy__label {
  position: absolute;
  max-width: 17ch;
  font-size: var(--fs-small);
  line-height: 1.5;
  color: var(--fg-2);
}
.anatomy__label strong { display: block; margin-bottom: 2px; font-weight: 500; color: var(--fg); }
.anatomy__label--a { top: clamp(20px, 3vw, 32px); left: clamp(20px, 3vw, 32px); }
.anatomy__label--b { right: clamp(20px, 3vw, 32px); bottom: clamp(20px, 3vw, 32px); text-align: right; }


/* 10 ── Services ──────────────────────────────────────────────────────── */
.services { padding-top: 0; }

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: end;
  gap: 24px 48px;
  margin-bottom: clamp(44px, 6vw, 88px);
}
.section-head__intro {
  justify-self: end;
  max-width: 42ch;
  font-size: var(--fs-lead);
  font-weight: 300;
  line-height: 1.55;
  color: var(--fg-2);
}

/* A drawn grid of hairlines: cards share borders, no shadows */
.services__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--rule);
  border-left: 1px solid var(--rule);
}

.service {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 40px;
  min-height: clamp(360px, 30vw, 430px);
  padding: clamp(28px, 3.4vw, 52px);
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  overflow: hidden;
  transition: color .5s var(--ease-out);
}
/* Blue fill grows out of the top-right corner, like the logo's corner */
.service::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--blue);
  clip-path: inset(0 0 100% 100% round 0 0 0 48px);
  transition: clip-path .75s var(--ease-out);
}

.service__corner {
  position: absolute;
  top: clamp(28px, 3.4vw, 52px);
  right: clamp(28px, 3.4vw, 52px);
  width: 22px; height: 22px;
  border-top: 3px solid var(--blue);
  border-right: 3px solid var(--blue);
  border-top-right-radius: 4px;
  transition: transform .6s var(--ease-out), border-color .4s ease;
}

.service__icon {
  width: 56px; height: 56px;
  fill: none;
  stroke: var(--blue);
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  overflow: visible;
  transition: stroke .4s ease;
}
.service__icon * { stroke-dasharray: 1; stroke-dashoffset: 0; }

.service__title {
  font-size: var(--fs-h3);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -.025em;
}
.service__desc {
  max-width: 40ch;
  margin-top: 12px;
  color: var(--fg-2);
  transition: color .4s ease;
}

/* Deliverables: collapsed until hover/focus (grid-rows trick, no height jank) */
.service__more {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .6s var(--ease-out);
}
.service__more-inner { min-height: 0; overflow: hidden; }
.service__list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 20px;
}
.service__list li {
  padding: .35em .85em;
  border: 1px solid currentColor;
  border-radius: var(--r-pill);
  font-size: .8125rem;
  font-weight: 500;
  opacity: .9;
}

.service__cta {
  display: inline-flex;
  align-items: center;
  gap: .55em;
  margin-top: 24px;
  font-weight: 500;
  text-decoration: none;
}
/* Whole card is clickable */
.service__cta::after { content: ""; position: absolute; inset: 0; }
.service__cta:focus-visible { outline: none; }
.service:has(.service__cta:focus-visible) { outline: 2px solid var(--blue); outline-offset: -2px; }

/* Active state: keyboard focus always; hover only on devices that really hover */
.service:focus-within { color: var(--white); }
.service:focus-within::before { clip-path: inset(0 0 0 0 round 0); }
.service:focus-within .service__corner { border-color: var(--white); transform: translate(6px, -6px); }
.service:focus-within .service__icon { stroke: var(--white); }
.service:focus-within .service__icon * { animation: draw 1s var(--ease-out) both; }
.service:focus-within .service__desc { color: rgba(255, 255, 255, .86); }
.service:focus-within .service__more { grid-template-rows: 1fr; }
@media (hover: hover) {
  .service:hover { color: var(--white); }
  .service:hover::before { clip-path: inset(0 0 0 0 round 0); }
  .service:hover .service__corner { border-color: var(--white); transform: translate(6px, -6px); }
  .service:hover .service__icon { stroke: var(--white); }
  .service:hover .service__icon * { animation: draw 1s var(--ease-out) both; }
  .service:hover .service__desc { color: rgba(255, 255, 255, .86); }
  .service:hover .service__more { grid-template-rows: 1fr; }
}
@keyframes draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }


/* Single service: one wide card, deliverables always visible */
.services__grid--single { grid-template-columns: 1fr; }
.services__grid--single .service { min-height: clamp(320px, 26vw, 400px); }
.services__grid--single .service__more { grid-template-rows: 1fr; }
.services__grid--single .service__list li { border-color: var(--rule); }
.services__grid--single .service:hover .service__list li,
.services__grid--single .service:focus-within .service__list li { border-color: currentColor; }
@media (min-width: 900px) {
  .services__grid--single .service__body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    column-gap: clamp(32px, 6vw, 96px);
    align-items: end;
  }
  .services__grid--single .service__title { grid-column: 1; grid-row: 1; }
  .services__grid--single .service__desc  { grid-column: 1; grid-row: 2; }
  .services__grid--single .service__cta   { grid-column: 1; grid-row: 3; }
  .services__grid--single .service__more  { grid-column: 2; grid-row: 1 / 4; align-self: end; }
  .services__grid--single .service__list  { justify-content: flex-end; }
}


/* 11 ── Work: horizontal showcase ─────────────────────────────────────── */
.work { position: relative; }
.work__pin { padding-block: var(--section-y) clamp(72px, 8vw, 120px); }

.work__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: clamp(32px, 4vw, 56px);
}
.work__meta {
  font-size: var(--fs-small);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: var(--fg-2);
  white-space: nowrap;
}
.work__count { color: var(--fg); }

/* Default (touch, small screens): native horizontal scroll with snapping */
.work__viewport {
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  cursor: grab;
}
.work__viewport::-webkit-scrollbar { display: none; }
.work__viewport.is-dragging { cursor: grabbing; scroll-snap-type: none; }
.work__viewport:focus-visible { outline-offset: -2px; border-radius: 0; }

.work__track {
  display: flex;
  gap: clamp(14px, 2vw, 28px);
  width: max-content;
  padding-inline: var(--edge);
}
.tile {
  flex: none;
  width: min(72vw, 420px);
  scroll-snap-align: start;
  scroll-margin-inline: var(--edge);
}
.tile--wide { width: min(84vw, 640px); }

.tile__link { display: block; color: inherit; text-decoration: none; border-radius: var(--r-md); }
.tile__media {
  position: relative;
  aspect-ratio: var(--ar, 4 / 5);
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--ink-2);
  transform: translateZ(0);         /* keeps radius clipping crisp during scale */
}
.tile__media--paper { background: var(--paper); }
.tile__art,
.tile__video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.1s var(--ease-out);
}
.tile__link:hover .tile__art,
.tile__link:hover .tile__video,
.tile__link:focus-visible .tile__art { transform: scale(1.045); }

.tile__info {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding-top: 18px;
}
.tile__title { font-size: 1.125rem; font-weight: 500; letter-spacing: -.02em; line-height: 1.3; }
.tile__type  { font-size: var(--fs-small); color: var(--fg-2); }
.tile__year  { font-size: var(--fs-small); color: var(--fg-2); font-variant-numeric: tabular-nums; }

/* Last tile: call to action */
.tile__media--cta {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
  padding: clamp(24px, 3vw, 40px);
  background: var(--blue);
  color: var(--white);
}
.tile__corner { border-color: var(--white); top: clamp(24px, 3vw, 40px); right: clamp(24px, 3vw, 40px); }
.tile__cta-text {
  max-width: 10ch;
  margin-top: auto;
  margin-bottom: 28px;
  font-size: clamp(1.75rem, 1.2rem + 1.8vw, 2.75rem);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -.04em;
}
.tile--cta .tile__link:hover .tile__corner { transform: translate(6px, -6px); }
.tile--cta .btn { pointer-events: none; }
.tile--cta .tile__link:hover .btn { color: var(--white); }
.tile--cta .tile__link:hover .btn::before { clip-path: circle(150% at calc(100% - 2.2em) 50%); }
.tile--cta .btn { --btn-fill: var(--ink); }

.work__progress {
  height: 2px;
  margin: clamp(28px, 4vh, 44px) var(--edge) 0;
  background: var(--rule);
}
.work__progress span {
  display: block;
  height: 100%;
  background: var(--blue);
  transform: scaleX(0);
  transform-origin: left;
}

/* Pinned mode (desktop + mouse): section is tall, inner panel sticks,
   JS translates the track horizontally as you scroll vertically. */
.work.is-pinned { height: var(--work-h, auto); }
.work.is-pinned .work__pin {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-block: calc(64px + 3vh) 4vh;
  overflow: hidden;
}
.work.is-pinned .work__viewport { overflow: visible; cursor: auto; }
.work.is-pinned .work__track { will-change: transform; }
.work.is-pinned .tile { width: auto; }
.work.is-pinned .tile__media {
  height: clamp(260px, calc(100svh - 420px), 620px);
  width: auto;
}

/* Cursor label */
.cursor {
  position: fixed;
  top: 0; left: 0;
  z-index: 60;
  pointer-events: none;
  display: none;
}
.cursor span {
  display: grid;
  place-items: center;
  width: 88px; height: 88px;
  margin: -44px 0 0 -44px;
  border-radius: 50%;
  background: var(--blue);
  color: var(--white);
  font-size: .875rem;
  font-weight: 500;
  transform: scale(0);
  transition: transform .45s var(--ease-out);
}
.cursor.is-active span { transform: scale(1); }
.has-cursor .cursor { display: block; }
.has-cursor [data-cursor] { cursor: none; }


/* 12 ── Contact & footer ──────────────────────────────────────────────── */
.footer { padding-top: var(--section-y); overflow: clip; }

.contact__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(48px, 6vw, 112px);
  align-items: start;
}
.contact__intro .section-title { max-width: 11ch; }
.contact__lead {
  max-width: 40ch;
  margin-top: clamp(24px, 3vw, 36px);
  font-size: var(--fs-lead);
  font-weight: 300;
  line-height: 1.55;
  color: var(--fg-2);
}
.contact__email {
  display: inline-block;
  margin-top: clamp(28px, 3.5vw, 44px);
  font-size: clamp(1.35rem, 1rem + 1.4vw, 2.125rem);
  letter-spacing: -.03em;
  background-size: 100% 2px;
  overflow-wrap: anywhere;
}

.socials { display: flex; flex-wrap: wrap; gap: 10px; margin-top: clamp(32px, 4vw, 48px); }
.socials a {
  display: inline-flex;
  align-items: center;
  gap: .5em;
  padding: .6em 1em .6em 1.15em;
  border: 1px solid var(--rule);
  border-radius: var(--r-pill);
  font-size: .9375rem;
  font-weight: 500;
  text-decoration: none;
  transition: background-color .3s ease, color .3s ease, border-color .3s ease;
}
.socials a:hover,
.socials a:focus-visible { background: var(--white); color: var(--blue); border-color: var(--white); }

/* Form card: paper on blue, so fields read clearly */
.form-card {
  --fg: var(--ink); --fg-2: var(--graphite); --rule: rgba(20, 20, 20, .16); --focus: var(--blue);
  position: relative;
  padding: clamp(24px, 3.4vw, 48px);
  border-radius: var(--r-lg);
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 50px 90px -50px rgba(8, 20, 70, .55);
}
.form { display: grid; gap: 26px; }
.form[hidden] { display: none; }

.field { display: grid; gap: 4px; min-width: 0; border: 0; padding: 0; margin: 0; }
.field__label { font-size: var(--fs-small); font-weight: 500; padding: 0; }
.field__opt { font-weight: 400; color: var(--fg-2); }
.field__input {
  width: 100%;
  padding: .65em 0 .7em;
  border: 0;
  border-bottom: 1.5px solid var(--rule);
  border-radius: 0;
  background:
    linear-gradient(var(--blue), var(--blue)) 0 100% / 0% 2px no-repeat;
  font-size: 1.0625rem;
  line-height: 1.5;
  transition: background-size .5s var(--ease-out), border-color .3s ease;
  -webkit-appearance: none;
  appearance: none;
}
.field__input::placeholder { color: rgba(20, 20, 20, .4); }
.field__input:focus { outline: none; background-size: 100% 2px; }
textarea.field__input { resize: vertical; min-height: 6.5em; }
.field.is-invalid .field__input { border-bottom-color: var(--danger); }
.field__error { min-height: 0; font-size: .8125rem; font-weight: 500; color: var(--danger); }
.field__error:empty { display: none; }

.select { position: relative; }
.select::after {                    /* corner as dropdown caret (rotated ┐) */
  content: "";
  position: absolute;
  right: 4px; top: 50%;
  width: 8px; height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-75%) rotate(45deg);
  pointer-events: none;
}
.select .field__input { padding-right: 28px; cursor: pointer; }

/* Service chips; the tick is the brand corner rotated 135° */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.chip { position: relative; cursor: pointer; }
.chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chip span {
  display: inline-flex;
  align-items: center;
  gap: 0;
  padding: .55em 1.05em;
  border: 1px solid var(--rule);
  border-radius: var(--r-pill);
  font-size: .9375rem;
  font-weight: 500;
  transition: background-color .3s ease, color .3s ease, border-color .3s ease, gap .4s var(--ease-out);
}
.chip i {
  width: 0;
  height: .34em;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  border-top-right-radius: 1px;
  transform: rotate(135deg) scale(.6);
  opacity: 0;
  transition: width .4s var(--ease-out), opacity .3s ease, transform .5s var(--ease-spring);
}
.chip:hover span { border-color: var(--ink); }
.chip input:checked + span { background: var(--ink); color: var(--paper); border-color: var(--ink); gap: .55em; }
.chip input:checked + span i { width: .68em; opacity: 1; transform: translate(.05em, -.08em) rotate(135deg); }
.chip input:focus-visible + span { outline: 2px solid var(--blue); outline-offset: 2px; }

.form__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; margin-top: 6px; }
.form__status { font-size: var(--fs-small); color: var(--fg-2); }
.form__status.is-error { color: var(--danger); font-weight: 500; }
.form__submit[aria-busy="true"] { pointer-events: none; }
.form__submit[aria-busy="true"] .arrow svg:first-child { animation: send .9s var(--ease-in-out) infinite; }
@keyframes send {
  0% { transform: none; } 45% { transform: translate(110%, -110%); }
  46% { transform: translate(-110%, 110%); } 100% { transform: none; }
}

/* Success state: the corner rotates into a tick */
.form-success { display: grid; justify-items: start; gap: 12px; padding-block: 24px; outline: none; }
.form-success[hidden] { display: none; }
.form-success__tick {
  width: 72px; height: 72px;
  margin-bottom: 8px;
  fill: none;
  stroke: var(--blue);
  stroke-width: 7;
  stroke-linecap: round;
  stroke-linejoin: round;
  transform-origin: 50% 50%;
  animation: tick 1s var(--ease-spring) both;
}
@keyframes tick {
  from { transform: rotate(0deg) translate(0, 0); }
  to   { transform: rotate(135deg) translate(-2px, 6px); }
}
.form-success__title { font-size: var(--fs-h3); font-weight: 500; letter-spacing: -.025em; }
.form-success__text { max-width: 40ch; color: var(--fg-2); }
.form-success__again { margin-top: 12px; font-size: .9375rem; }

/* Giant lockup */
.footer__brand { margin-top: clamp(88px, 12vw, 180px); }
.footer__logo { width: 100%; height: auto; overflow: visible; }
.fl-word, .fl-studio { fill: var(--white); }
.fl-studio { opacity: .85; }

.footer__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 32px;
  margin-top: clamp(28px, 4vw, 48px);
  padding-block: 24px max(24px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--rule);
  font-size: var(--fs-small);
  color: var(--fg-2);
}
.footer__bar p { margin-right: auto; }
.footer__bar .link-u { font-weight: 400; color: var(--fg); background-size: 100% 1px; }


/* 13 ── Scroll reveals ───────────────────────────────────────────────────
   Only applied with JS. Elements get .is-visible from an IntersectionObserver. */
.js [data-reveal] {
  opacity: 0;
  transform: translate3d(0, 32px, 0);
  transition:
    opacity .9s ease var(--d, 0s),
    transform 1.2s var(--ease-out) var(--d, 0s);
}
.js [data-reveal].is-visible { opacity: 1; transform: none; }

/* Headings reveal word by word through a mask */
.js [data-reveal="words"] { opacity: 1; transform: none; }
.js [data-reveal="words"] .word > span {
  transform: translate3d(0, 135%, 0);
  transition: transform 1.1s var(--ease-out) calc(var(--d, 0s) + var(--i) * 55ms);
}
.js [data-reveal="words"].is-visible .word > span { transform: none; }

/* Footer lockup: the mark assembles like the logo animation */
.js .footer__brand { opacity: 1; transform: none; }
.js .fl-chev   { transform: translate(-760px, -160px) rotate(-30deg); opacity: 0; }
.js .fl-corner { transform: translate(900px, 240px) rotate(40deg); opacity: 0; }
.js .fl-word, .js .fl-studio { opacity: 0; transform: translateY(30px); }
.js .fl-chev, .js .fl-corner, .js .fl-word, .js .fl-studio {
  transition: transform 1.4s var(--ease-out), opacity .8s ease, stroke .4s ease;
}
.js .fl-word   { transition-delay: .25s; }
.js .fl-studio { transition-delay: .4s; }
.js .footer__brand.is-visible .fl-chev,
.js .footer__brand.is-visible .fl-corner,
.js .footer__brand.is-visible .fl-word { transform: none; opacity: 1; }
.js .footer__brand.is-visible .fl-studio { transform: none; opacity: .85; }


/* 14 ── Responsive ────────────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .hero__inner { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }
  .facts { grid-template-columns: 1fr; gap: 18px; }
  .facts__item { display: grid; grid-template-columns: 9.5em 1fr; gap: 16px; }
  .facts dd { margin-top: 0; }
}

@media (max-width: 899px) {
  :root { --header-h: 68px; }
  .nav, .header__cta { display: none; }
  .menu-toggle { display: block; }
  .header.is-scrolled .header__inner { height: 60px; }
  .logo { height: 26px; }

  .hero__inner {
    grid-template-columns: 1fr;
    align-content: center;
    gap: 8px;
  }
  .hero__visual {
    order: -1;
    justify-self: end;
    width: clamp(112px, 34vw, 300px);
    margin: 0 clamp(8px, 4vw, 40px) clamp(4px, 2vh, 24px) 0;
  }
  .hero__grid {
    -webkit-mask-image: radial-gradient(ellipse 85% 45% at 80% 22%, #000 10%, transparent 75%);
    mask-image: radial-gradient(ellipse 85% 45% at 80% 22%, #000 10%, transparent 75%);
  }

  .about__grid { grid-template-columns: 1fr; }
  .about__figure { max-width: 560px; }

  .section-head { grid-template-columns: 1fr; }
  .section-head__intro { justify-self: start; }

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

@media (max-width: 720px) {
  .services__grid { grid-template-columns: 1fr; }

  /* Anatomy: labels move below the drawing so they never collide with it */
  .anatomy {
    aspect-ratio: auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 20px;
    padding: 0 20px 24px;
  }
  .anatomy__stage { position: relative; grid-column: 1 / -1; aspect-ratio: 1; margin-inline: -20px; }
  .anatomy__label { position: static; max-width: none; text-align: left; }
  .service { min-height: 0; }
  .facts__item { grid-template-columns: 1fr; gap: 4px; }
  .footer__bar p { width: 100%; }
}

@media (max-width: 600px) {
  /* one tile shape on phones keeps the swipe row tidy */
  .tile--wide { width: min(72vw, 420px); }
  .tile--wide .tile__media { aspect-ratio: 4 / 5; }
}

@media (max-width: 480px) {
  .hero__actions .btn { width: 100%; justify-content: space-between; }
  .hero__secondary { margin-inline: auto; }
  .work__head { flex-wrap: wrap; }
}

/* Touch devices: no hover, so show the service details by default */
@media (hover: none) {
  .service__more { grid-template-rows: 1fr; }
  .service__list li { border-color: var(--rule); }
}


/* 15 ── Reduced motion ────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    transition-delay: 0s !important;
  }
  .ticker__track { flex-wrap: wrap; width: auto; }
  .ticker__list[aria-hidden="true"] { display: none; }
  .ticker__list { flex-wrap: wrap; white-space: normal; padding-inline: var(--gutter); }
  .ticker { -webkit-mask-image: none; mask-image: none; }
  .scrub-word { opacity: 1 !important; }
}
