/* ==========================================================================
   Crosm — styles
   Modern techniques used here (all progressively enhanced):
   - CSS scroll-driven animations (animation-timeline: scroll() / view())
   - Named view timelines for a pinned horizontal gallery
   - @property for animatable custom properties (rotating gradient border)
   - oklch() + color-mix() colors, text-wrap: balance / pretty
   - :has() selectors, container queries, sticky stacking cards
   - prefers-reduced-motion respected everywhere
   ========================================================================== */

@property --angle {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}

:root {
  color-scheme: dark;

  --bg: oklch(0.15 0.025 265);
  --bg-2: oklch(0.19 0.03 265);
  --surface: oklch(0.22 0.03 265 / 0.6);
  --line: oklch(1 0 0 / 0.09);
  --line-strong: oklch(1 0 0 / 0.18);
  --text: oklch(0.96 0.01 265);
  --muted: oklch(0.72 0.02 265);
  --dim: oklch(0.55 0.02 265);
  --accent: oklch(0.72 0.15 250);
  --accent-2: oklch(0.8 0.12 195);
  --accent-soft: color-mix(in oklch, var(--accent) 18%, transparent);

  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-serif: "Instrument Serif", Georgia, serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  --radius: 18px;
  --radius-lg: 28px;
  --gutter: clamp(16px, 4vw, 40px);
  --max: 1200px;
  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);
  --header-h: 72px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; font-weight: 500; line-height: 1.1; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
em { font-family: var(--font-serif); font-style: italic; font-weight: 400; color: var(--accent-2); }
::selection { background: var(--accent); color: var(--bg); }

.container {
  width: min(100% - 2 * var(--gutter), var(--max));
  margin-inline: auto;
}

.skip-link {
  position: absolute; left: 16px; top: -100px; z-index: 100;
  background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 8px;
}
.skip-link:focus { top: 16px; }

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

/* ---------- Scroll progress (scroll-driven) ---------- */
.scroll-progress {
  position: fixed; inset: 0 0 auto 0; height: 2px; z-index: 60;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transform-origin: 0 50%;
  transform: scaleX(0);
}
@supports (animation-timeline: scroll()) {
  .scroll-progress {
    animation: grow-x linear both;
    animation-timeline: scroll(root);
  }
}
@keyframes grow-x { to { transform: scaleX(1); } }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  height: var(--header-h);
  display: flex; flex-direction: column; justify-content: center;
  transition: background 0.3s, border-color 0.3s;
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled,
.site-header:has(.menu-toggle[aria-expanded="true"]) {
  background: color-mix(in oklch, var(--bg) 78%, transparent);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom-color: var(--line);
}

.nav { display: flex; align-items: center; gap: 32px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 19px; letter-spacing: -0.01em; }
.brand-mark { width: 30px; height: 30px; }
.nav-links { display: flex; gap: 28px; margin: 0 0 0 auto; padding: 0; list-style: none; font-size: 15px; }
.nav-links a { color: var(--muted); position: relative; transition: color 0.2s; }
.nav-links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 1px;
  background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform 0.35s var(--ease);
}
.nav-links a:hover, .nav-links a[aria-current="true"] { color: var(--text); }
.nav-links a:hover::after, .nav-links a[aria-current="true"]::after { transform: scaleX(1); transform-origin: left; }

.menu-toggle {
  display: none; margin-left: auto; width: 44px; height: 44px; border: 1px solid var(--line-strong);
  background: transparent; border-radius: 12px; cursor: pointer; position: relative;
}
.menu-toggle span {
  position: absolute; left: 12px; right: 12px; height: 1.5px; background: var(--text);
  transition: transform 0.3s var(--ease);
}
.menu-toggle span:first-child { top: 17px; }
.menu-toggle span:last-child { top: 25px; }
.menu-toggle[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }

.mobile-menu {
  position: absolute; top: var(--header-h); left: 0; right: 0;
  display: grid; padding: 8px var(--gutter) 24px;
  background: color-mix(in oklch, var(--bg) 94%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.mobile-menu[hidden] { display: none; }
.mobile-menu a { padding: 14px 0; font-size: 20px; border-bottom: 1px solid var(--line); }
.mobile-menu a:last-child { border: 0; color: var(--accent); }

/* ---------- Buttons ---------- */
.btn {
  --pad-x: 24px;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 50px; padding: 0 var(--pad-x); border-radius: 999px;
  font: 500 15px/1 var(--font-sans); letter-spacing: 0.01em;
  border: 1px solid transparent; cursor: pointer; position: relative; isolation: isolate;
  transition: transform 0.25s var(--ease), background 0.25s, color 0.25s, border-color 0.25s;
  will-change: transform;
}
.btn svg { width: 18px; height: 18px; transition: transform 0.3s var(--ease); }
.btn:hover svg { transform: translateX(3px); }
.btn-small { min-height: 42px; --pad-x: 18px; font-size: 14px; }
.btn-block { width: 100%; }

/* Primary: rotating gradient border powered by @property */
.btn-primary {
  background: var(--text); color: var(--bg);
}
.btn-primary::before {
  content: ""; position: absolute; inset: -2px; border-radius: inherit; z-index: -1;
  background: conic-gradient(from var(--angle), var(--accent), var(--accent-2), transparent 40%, var(--accent));
  animation: spin 4s linear infinite;
  opacity: 0; transition: opacity 0.3s;
}
.btn-primary:hover::before { opacity: 1; }
@keyframes spin { to { --angle: 360deg; } }

.btn-ghost { border-color: var(--line-strong); color: var(--text); }
.btn-ghost:hover { background: oklch(1 0 0 / 0.06); border-color: oklch(1 0 0 / 0.3); }

/* ---------- Shared ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font: 500 13px/1 var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted);
  margin-bottom: 22px;
}
.eyebrow .dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--accent-2);
  box-shadow: 0 0 0 0 var(--accent-2); animation: pulse 2.4s infinite;
}
@keyframes pulse { 70% { box-shadow: 0 0 0 10px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }

.section { padding-block: clamp(96px, 14vw, 180px); position: relative; }
.section-head { max-width: 760px; margin-bottom: clamp(48px, 7vw, 80px); }
.section-title { font-size: clamp(34px, 5.2vw, 64px); letter-spacing: -0.03em; }
.section-lead { margin-top: 22px; color: var(--muted); font-size: clamp(17px, 1.6vw, 19px); max-width: 560px; }

/* Reveal: CSS view() timeline when supported, IntersectionObserver fallback in JS */
.reveal { opacity: 0; transform: translateY(28px); }
.reveal.in { opacity: 1; transform: none; transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }

@supports (animation-timeline: view()) {
  .reveal, .reveal.in {
    opacity: 1; transform: none; transition: none;
    animation: reveal-up linear both;
    animation-timeline: view();
    animation-range: entry 5% cover 28%;
  }
}
@keyframes reveal-up {
  from { opacity: 0; transform: translateY(40px); filter: blur(6px); }
  to   { opacity: 1; transform: none; filter: blur(0); }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100svh;
  display: grid; align-content: center;
  padding: calc(var(--header-h) + 48px) 0 120px;
  overflow: clip;
}
.hero-bg { position: absolute; inset: 0; z-index: -1; }
.hero-grid {
  position: absolute; inset: -1px;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 35%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 35%, #000 20%, transparent 75%);
}
.hero-glow {
  position: absolute; width: 900px; height: 900px; left: 50%; top: -360px; translate: -50% 0;
  background: radial-gradient(circle, color-mix(in oklch, var(--accent) 35%, transparent), transparent 60%);
  filter: blur(40px); opacity: 0.55;
  animation: drift 14s ease-in-out infinite alternate;
}
@keyframes drift { to { translate: -42% 60px; scale: 1.1; } }

.hero-inner { position: relative; z-index: 1; }
.hero-title {
  font-size: clamp(42px, 6.2vw, 88px); letter-spacing: -0.045em; line-height: 1.02;
  max-width: 13ch;
}
.hero-title .word { display: inline-block; overflow: clip; vertical-align: top; padding-bottom: 0.08em; margin-bottom: -0.08em; }
.hero-title .word > span {
  display: inline-block; transform: translateY(105%);
  animation: word-in 1s var(--ease) forwards;
  animation-delay: calc(var(--i) * 70ms + 150ms);
}
@keyframes word-in { to { transform: none; } }

.hero-lead { margin-top: 30px; max-width: 560px; font-size: clamp(17px, 1.7vw, 20px); color: var(--muted); }
.hero-actions { margin-top: 40px; display: flex; flex-wrap: wrap; gap: 14px; }

.rise { opacity: 0; transform: translateY(24px); animation: rise 1s var(--ease) forwards; animation-delay: calc(var(--d, 0) * 1ms); }
@keyframes rise { to { opacity: 1; transform: none; } }

/* hero content drifts & fades as you scroll away */
@supports (animation-timeline: scroll()) {
  .hero-inner {
    animation: hero-out linear both;
    animation-timeline: scroll(root);
    animation-range: 0 80vh;
  }
  .hero-grid {
    animation: grid-parallax linear both;
    animation-timeline: scroll(root);
    animation-range: 0 100vh;
  }
}
@keyframes hero-out { to { opacity: 0; transform: translateY(-80px) scale(0.97); } }
@keyframes grid-parallax { to { transform: translateY(120px); } }

/* Floating code window */
.hero-device {
  position: absolute; right: max(var(--gutter), calc((100vw - var(--max)) / 2 - 40px)); top: 50%;
  width: min(440px, 36vw); translate: 0 -30%;
  perspective: 1200px;
}
.device-window {
  border: 1px solid var(--line-strong); border-radius: var(--radius);
  background: linear-gradient(180deg, oklch(0.24 0.03 265 / 0.85), oklch(0.18 0.03 265 / 0.85));
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 40px 100px -30px oklch(0 0 0 / 0.7), inset 0 1px 0 oklch(1 0 0 / 0.08);
  transform: rotateY(-14deg) rotateX(8deg);
  animation: float 7s ease-in-out infinite;
}
@keyframes float { 50% { transform: rotateY(-10deg) rotateX(5deg) translateY(-12px); } }
.device-bar { display: flex; align-items: center; gap: 7px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.device-bar i { width: 10px; height: 10px; border-radius: 50%; background: oklch(1 0 0 / 0.16); }
.device-bar span { margin-left: auto; font: 12px var(--font-mono); color: var(--dim); }
.device-code { margin: 0; padding: 22px 22px 26px; font: 13.5px/1.75 var(--font-mono); color: var(--muted); white-space: pre; overflow: hidden; }
.device-code .k { color: oklch(0.75 0.13 300); }
.device-code .f { color: var(--accent-2); }
.device-code .s { color: oklch(0.82 0.12 140); }
.device-code .c { color: var(--dim); }

.scroll-cue {
  position: absolute; left: 50%; bottom: 32px; translate: -50% 0;
  width: 26px; height: 42px; border: 1.5px solid var(--line-strong); border-radius: 20px;
}
.scroll-cue span {
  position: absolute; left: 50%; top: 8px; width: 3px; height: 8px; translate: -50% 0;
  border-radius: 2px; background: var(--text); animation: cue 1.8s ease-in-out infinite;
}
@keyframes cue { 0% { opacity: 0; transform: translateY(0); } 40% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }

/* ---------- Marquee ---------- */
.marquee {
  border-block: 1px solid var(--line); padding: 26px 0; overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.marquee-track { display: flex; width: max-content; animation: marquee 40s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee ul { display: flex; gap: 56px; padding: 0 28px; margin: 0; list-style: none; }
.marquee li { font: 500 15px var(--font-mono); color: var(--dim); white-space: nowrap; letter-spacing: 0.04em; transition: color 0.2s; }
.marquee li:hover { color: var(--text); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Services ---------- */
.service-grid {
  display: grid; gap: 18px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr));
}
.service-card {
  container-type: inline-size;
  position: relative; padding: 34px 30px 30px; border-radius: var(--radius-lg);
  background: var(--surface); border: 1px solid var(--line);
  overflow: hidden; isolation: isolate;
  transition: border-color 0.3s, transform 0.4s var(--ease);
}
/* Cursor spotlight (mouse position fed by JS as CSS vars) */
.service-card::before {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity 0.3s;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), color-mix(in oklch, var(--accent) 16%, transparent), transparent 45%);
}
.service-grid:hover .service-card::before { opacity: 1; }
.service-card:hover { border-color: var(--line-strong); transform: translateY(-4px); }
.service-icon {
  width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent); margin-bottom: 26px;
}
.service-icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.service-card h3 { font-size: 23px; letter-spacing: -0.015em; margin-bottom: 12px; }
.service-card p { color: var(--muted); font-size: 16px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 0; padding: 0; list-style: none; }
.tags li { font: 12px var(--font-mono); color: var(--muted); padding: 6px 10px; border: 1px solid var(--line); border-radius: 999px; }

@container (min-width: 420px) {
  .service-card h3 { font-size: 26px; }
}

/* ---------- Statement: per-word scroll scrub ---------- */
.statement { padding-block: clamp(80px, 12vw, 160px); }
.statement-text {
  font-size: clamp(30px, 4.6vw, 60px); line-height: 1.18; letter-spacing: -0.03em; font-weight: 500;
  max-width: 22ch;
}
.statement-text .w { color: var(--text); }
@supports (animation-timeline: view()) {
  .statement-text .w {
    color: color-mix(in oklch, var(--text) 18%, transparent);
    animation: word-light linear both;
    animation-timeline: view();
    animation-range: cover 18% cover 42%;
  }
}
@keyframes word-light { to { color: var(--text); } }
.statement-text.js-scrub .w { color: color-mix(in oklch, var(--text) calc(18% + var(--p, 0) * 82%), transparent); }

/* ---------- Process: sticky stacking cards ---------- */
.process-layout { display: grid; gap: 40px; grid-template-columns: 1fr; }
@media (min-width: 960px) {
  .process-layout { grid-template-columns: 0.9fr 1.1fr; gap: 80px; align-items: start; }
  .process-head { position: sticky; top: calc(var(--header-h) + 60px); }
}
.stack { list-style: none; margin: 0; padding: 0; display: grid; gap: 28px; }
.stack-card {
  --i: 0;
  position: sticky; top: calc(var(--header-h) + 40px + var(--i) * 22px);
  display: grid; grid-template-columns: auto 1fr; gap: 26px; align-items: start;
  padding: clamp(28px, 4vw, 44px); border-radius: var(--radius-lg);
  background: linear-gradient(160deg, var(--bg-2), oklch(0.17 0.028 265));
  border: 1px solid var(--line-strong);
  box-shadow: 0 -20px 60px -20px oklch(0 0 0 / 0.6);
  min-height: 240px; transform-origin: 50% 0;
}
.stack-card:nth-child(2) { --i: 1; }
.stack-card:nth-child(3) { --i: 2; }
.stack-card:nth-child(4) { --i: 3; }
.stack-num { font: 500 14px var(--font-mono); color: var(--accent); padding: 8px 12px; border: 1px solid var(--accent-soft); border-radius: 10px; background: var(--accent-soft); }
.stack-card h3 { font-size: clamp(26px, 3vw, 34px); letter-spacing: -0.02em; margin-bottom: 12px; }
.stack-card p { color: var(--muted); }

@supports (animation-timeline: view()) {
  .stack-card {
    animation: stack-shrink linear both;
    animation-timeline: view();
    animation-range: exit-crossing 0% exit-crossing 100%;
  }
  .stack-card:last-child { animation: none; }
}
@keyframes stack-shrink { to { transform: scale(0.92); filter: brightness(0.6); } }

/* ---------- Work: pinned horizontal scroll ---------- */
.work { position: relative; height: var(--work-h, 320vh); view-timeline: --work block; }
.work-pin {
  position: sticky; top: 0; height: 100svh; overflow: hidden;
  display: flex; flex-direction: column; justify-content: center; gap: clamp(32px, 5vh, 56px);
  padding-top: var(--header-h);
}
.work-head .eyebrow { margin-bottom: 16px; }
.work-track {
  display: flex; gap: 24px; padding-inline: max(var(--gutter), calc((100vw - var(--max)) / 2));
  width: max-content; will-change: transform;
}
@supports (animation-timeline: view()) {
  .work-track {
    animation: hscroll linear both;
    animation-timeline: --work;
    animation-range: contain 0% contain 100%;
  }
}
@keyframes hscroll { to { transform: translateX(var(--hdist, -60%)); } }

.work-card {
  --hue: 250;
  width: clamp(300px, 34vw, 460px); flex-shrink: 0;
  border-radius: var(--radius-lg); border: 1px solid var(--line);
  background: var(--surface); overflow: hidden;
  transition: border-color 0.3s;
}
.work-card:hover { border-color: var(--line-strong); }
.work-visual {
  aspect-ratio: 4 / 3; display: grid; place-items: center; position: relative; overflow: hidden;
  background:
    radial-gradient(circle at 30% 20%, oklch(0.6 0.14 var(--hue) / 0.55), transparent 55%),
    radial-gradient(circle at 80% 90%, oklch(0.55 0.12 calc(var(--hue) + 40) / 0.45), transparent 50%),
    oklch(0.2 0.03 var(--hue));
}
.mock { border-radius: 14px; border: 1px solid oklch(1 0 0 / 0.25); background: oklch(1 0 0 / 0.08); backdrop-filter: blur(6px); transition: transform 0.6s var(--ease); }
.work-card:hover .mock { transform: translateY(-8px) scale(1.03); }
.mock-phone { width: 34%; aspect-ratio: 9 / 18; border-radius: 22px;
  background:
    linear-gradient(oklch(1 0 0 / 0.25), oklch(1 0 0 / 0.25)) 50% 8% / 40% 3% no-repeat,
    linear-gradient(oklch(1 0 0 / 0.18), oklch(1 0 0 / 0.18)) 50% 30% / 80% 20% no-repeat,
    linear-gradient(oklch(1 0 0 / 0.12), oklch(1 0 0 / 0.12)) 50% 58% / 80% 8% no-repeat,
    linear-gradient(oklch(1 0 0 / 0.12), oklch(1 0 0 / 0.12)) 50% 70% / 80% 8% no-repeat,
    oklch(1 0 0 / 0.08);
}
.mock-dash { width: 74%; aspect-ratio: 16 / 10;
  background:
    linear-gradient(oklch(1 0 0 / 0.16), oklch(1 0 0 / 0.16)) 4% 50% / 20% 84% no-repeat,
    linear-gradient(oklch(1 0 0 / 0.2), oklch(1 0 0 / 0.2)) 90% 14% / 62% 22% no-repeat,
    linear-gradient(oklch(1 0 0 / 0.12), oklch(1 0 0 / 0.12)) 58% 82% / 29% 46% no-repeat,
    linear-gradient(oklch(1 0 0 / 0.12), oklch(1 0 0 / 0.12)) 94% 82% / 29% 46% no-repeat,
    oklch(1 0 0 / 0.08);
}
.work-meta { padding: 26px 28px 30px; }
.work-meta span { font: 12px var(--font-mono); color: var(--dim); text-transform: uppercase; letter-spacing: 0.08em; }
.work-meta h3 { font-size: 28px; letter-spacing: -0.02em; margin: 10px 0 8px; }
.work-meta p { color: var(--muted); font-size: 16px; }
.work-card-cta { display: grid; align-content: center; background: linear-gradient(150deg, var(--accent-soft), transparent 70%), var(--surface); }
.work-card-cta h3 { font-family: var(--font-serif); font-style: italic; font-weight: 400; font-size: 44px; }
.work-card-cta .btn { margin-top: 26px; }

/* On small screens: native swipe with scroll-snap instead of pinning */
@media (max-width: 760px) {
  .work { height: auto; padding-block: 96px; }
  .work-pin { position: static; height: auto; padding-top: 0; }
  .work-track {
    width: auto; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px;
    animation: none !important; transform: none !important;
    scroll-padding-inline: var(--gutter); scrollbar-width: none;
  }
  .work-track::-webkit-scrollbar { display: none; }
  .work-card { width: 82vw; scroll-snap-align: start; }
}

/* ---------- Stats ---------- */
.stats { padding-block: clamp(72px, 10vw, 120px); border-block: 1px solid var(--line); }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 40px 24px; }
.stat strong {
  display: block; font-size: clamp(48px, 6vw, 76px); font-weight: 500; letter-spacing: -0.04em; line-height: 1;
  background: linear-gradient(180deg, var(--text), color-mix(in oklch, var(--text) 45%, transparent));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  font-variant-numeric: tabular-nums;
}
.stat span { display: block; margin-top: 12px; color: var(--muted); font-size: 15px; }

/* ---------- About ---------- */
.about-grid { display: grid; gap: 24px; }
@media (min-width: 960px) { .about-grid { grid-template-columns: 1fr 1fr; gap: 80px; } }
.about-body > p { font-size: clamp(18px, 1.8vw, 21px); color: var(--muted); }
.values { margin: 40px 0 0; display: grid; gap: 0; }
.value { padding: 22px 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: 160px 1fr; gap: 16px; }
.value dt { font-weight: 500; }
.value dd { margin: 0; color: var(--muted); }
@media (max-width: 520px) { .value { grid-template-columns: 1fr; gap: 4px; } }

/* ---------- Testimonial ---------- */
.testimonial { padding-top: 0; }
.quote { margin: 0; padding: clamp(36px, 6vw, 72px); border-radius: var(--radius-lg); border: 1px solid var(--line); background: radial-gradient(circle at 0 0, var(--accent-soft), transparent 50%), var(--surface); }
.quote blockquote { margin: 0; }
.quote p { font-family: var(--font-serif); font-size: clamp(26px, 3.4vw, 44px); line-height: 1.25; letter-spacing: -0.01em; }
.quote figcaption { margin-top: 28px; color: var(--muted); font-size: 15px; }
.quote figcaption strong { color: var(--text); font-weight: 500; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; gap: 48px; }
@media (min-width: 960px) { .contact-grid { grid-template-columns: 1fr 1fr; gap: 80px; align-items: start; } }
.contact-list { list-style: none; margin: 36px 0 0; padding: 0; display: grid; gap: 12px; }
.contact-list li { display: flex; gap: 20px; align-items: baseline; }
.contact-list span { font: 12px var(--font-mono); color: var(--dim); text-transform: uppercase; letter-spacing: 0.08em; width: 52px; }
.contact-list a { font-size: 20px; border-bottom: 1px solid var(--line-strong); transition: border-color 0.2s; }
.contact-list a:hover { border-color: var(--accent); }

.contact-form {
  display: grid; gap: 18px; padding: clamp(24px, 4vw, 40px);
  border-radius: var(--radius-lg); border: 1px solid var(--line); background: var(--surface);
}
.field { position: relative; }
.field input, .field textarea {
  width: 100%; padding: 26px 16px 10px; border-radius: 12px;
  border: 1px solid var(--line-strong); background: oklch(0.13 0.02 265 / 0.6);
  color: var(--text); font: 16px var(--font-sans); resize: vertical;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field textarea { min-height: 130px; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.field label {
  position: absolute; left: 17px; top: 18px; color: var(--dim); pointer-events: none;
  transition: transform 0.2s var(--ease), font-size 0.2s, color 0.2s; transform-origin: 0 0;
}
.field input:focus + label, .field input:not(:placeholder-shown) + label,
.field textarea:focus + label, .field textarea:not(:placeholder-shown) + label {
  transform: translateY(-10px); font-size: 12px; color: var(--muted);
}
.field input:user-invalid { border-color: oklch(0.65 0.2 25); }

.chips { border: 0; margin: 4px 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips legend { font-size: 14px; color: var(--muted); margin-bottom: 12px; padding: 0; }
.chips label { cursor: pointer; }
.chips input { position: absolute; opacity: 0; pointer-events: none; }
.chips span { display: inline-block; padding: 9px 16px; border-radius: 999px; border: 1px solid var(--line-strong); font-size: 14px; color: var(--muted); transition: all 0.2s; }
.chips label:hover span { border-color: oklch(1 0 0 / 0.35); color: var(--text); }
.chips label:has(input:checked) span { background: var(--text); color: var(--bg); border-color: var(--text); }
.chips label:has(input:focus-visible) span { outline: 2px solid var(--accent); outline-offset: 2px; }
.form-note { font-size: 14px; color: var(--accent-2); min-height: 1em; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 40px 0 32px; overflow: clip; }
.footer-big {
  font-size: clamp(80px, 22vw, 300px); font-weight: 600; letter-spacing: -0.06em; line-height: 0.8;
  background: linear-gradient(180deg, color-mix(in oklch, var(--text) 14%, transparent), transparent 85%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  margin: 20px 0 40px; user-select: none;
}
@supports (animation-timeline: view()) {
  .footer-big {
    animation: footer-rise linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 100%;
  }
}
@keyframes footer-rise { from { transform: translateY(40%); letter-spacing: 0.02em; opacity: 0; } }
.footer-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; color: var(--dim); font-size: 14px; }
.footer-row nav { display: flex; flex-wrap: wrap; gap: 24px; }
.footer-row a:hover { color: var(--text); }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .hero-device { display: none; }
}
@media (max-width: 860px) {
  .nav-links, .nav > .btn { display: none; }
  .menu-toggle { display: block; }
}

/* ---------- View Transitions (menu open/close) ---------- */
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 0.25s; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .hero-title .word > span { transform: none; }
  .rise { opacity: 1; transform: none; }
  .statement-text .w { color: var(--text) !important; }
  .work { height: auto; padding-block: 96px; }
  .work-pin { position: static; height: auto; }
  .work-track { width: auto; overflow-x: auto; transform: none !important; scroll-snap-type: x mandatory; }
  .work-card { scroll-snap-align: start; }
}
