/* AiNova — base system */
:root {
  color-scheme: dark;
  --ink: #0D0D0F;
  --ink-2: #15171A;
  --ink-3: #1E2126;
  --slate: #3D4F5C;
  --slate-2: #5A6B78;
  --paper: #F4F6F7;
  --paper-2: #E7EAEC;
  --signal: #00C5A3;
  --signal-2: #00E0BC;
  --on-signal: #0D0D0F;

  --bg-sticky: rgba(13,13,15, 0.85);
  --bg-pill: rgba(13,13,15, 0.6);

  --error: #ff7a7a;
  --error-bg: rgba(255,90,90, 0.08);
  --error-border: rgba(255,90,90, 0.4);

  /* Alpha overlays — auto-invert in light mode */
  --fade-04: rgba(244,246,247, 0.04);
  --fade-06: rgba(244,246,247, 0.06);
  --fade-08: rgba(244,246,247, 0.08);
  --fade-10: rgba(244,246,247, 0.10);
  --fade-12: rgba(244,246,247, 0.12);
  --fade-16: rgba(244,246,247, 0.16);
  --fade-20: rgba(244,246,247, 0.20);
  --fade-30: rgba(244,246,247, 0.30);
  --fade-40: rgba(244,246,247, 0.40);

  --font-display: "Bricolage Grotesque", "Space Grotesk", system-ui, sans-serif;
  --font-sans: "Space Grotesk", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  --maxw: 1680px;
  --gutter: clamp(20px, 3vw, 56px);
}

/* ── Light theme ─────────────────────────── */
[data-theme="light"] {
  color-scheme: light;
  --ink: #FFFFFF;
  --ink-2: #F7F8F9;
  --ink-3: #EEF0F2;
  --paper: #111214;
  --paper-2: #2A2D32;
  --slate: #4A5764;
  --slate-2: #3D4753;
  --signal: #008A72;
  --signal-2: #007560;
  --on-signal: #0D0D0F;

  --bg-sticky: rgba(247,248,249, 0.85);
  --bg-pill: rgba(255,255,255, 0.75);

  --error: #b00020;
  --error-bg: rgba(176,0,32, 0.06);
  --error-border: rgba(176,0,32, 0.35);

  --fade-04: rgba(13,13,15, 0.03);
  --fade-06: rgba(13,13,15, 0.05);
  --fade-08: rgba(13,13,15, 0.06);
  --fade-10: rgba(13,13,15, 0.08);
  --fade-12: rgba(13,13,15, 0.10);
  --fade-16: rgba(13,13,15, 0.13);
  --fade-20: rgba(13,13,15, 0.16);
  --fade-30: rgba(13,13,15, 0.45);
  --fade-40: rgba(13,13,15, 0.55);
}
[data-theme="light"] ::selection { background: var(--signal); color: #fff; }
[data-theme="light"] .hero-vignette {
  background:
    radial-gradient(ellipse at 70% 30%, rgba(0,138,114,0.12), transparent 55%),
    radial-gradient(ellipse at 20% 80%, rgba(74,87,100,0.14), transparent 60%),
    linear-gradient(180deg, rgba(255,255,255,0.15), rgba(255,255,255,0.60));
}
[data-theme="light"] .contact-cta .signal-bg {
  background: radial-gradient(circle, rgba(0,138,114,0.18), transparent 60%);
}
[data-theme="light"] .duotone img {
  filter: grayscale(1) contrast(1.05) brightness(0.95);
}
[data-theme="light"] .duotone::before {
  background: linear-gradient(135deg, rgba(0,138,114,0.45) 0%, rgba(247,248,249,0.2) 60%, rgba(74,87,100,0.55) 100%);
}
[data-theme="light"] .duotone::after {
  background: radial-gradient(ellipse at 50% 100%, rgba(255,255,255,0.35), transparent 60%);
}
[data-theme="light"] .mosaic .stripe-mask {
  background: repeating-linear-gradient(90deg, transparent 0, transparent 8.33%, rgba(255,255,255,0.35) 8.33%, rgba(255,255,255,0.35) 8.43%);
}
[data-theme="light"] .working h2,
[data-theme="light"] .working-top,
[data-theme="light"] .working-foot p,
[data-theme="light"] .working-corner,
[data-theme="light"] .mosaic-overlay,
[data-theme="light"] .studio-frame .frame-corner {
  color: #F4F6F7;
}

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

html, body {
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}

/* Visually-hidden but accessible to AT and keyboard */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

body {
  cursor: none;
}

/* Reset everything cursor:none inside body inherits, but allow text inputs to show caret */
input, textarea, select { cursor: none; }
a, button { cursor: none; }
@media (max-width: 760px) {
  body, a, button, input, textarea, select { cursor: auto; }
}

a { color: inherit; text-decoration: none; }
button { background: none; border: none; color: inherit; font: inherit; }
img, svg { display: block; max-width: 100%; }

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

/* Layout helpers */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.row { display: flex; }
.col { display: flex; flex-direction: column; }
.between { justify-content: space-between; }
.center { align-items: center; }

/* Mono micro-labels */
.mono {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 500;
}
.mono-sm { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; }

/* Section frame */
section { position: relative; padding: clamp(80px, 10vw, 160px) 0; }
.section-head {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: clamp(24px, 4vw, 80px);
  align-items: end;
  margin-bottom: clamp(48px, 6vw, 96px);
}
.section-head .eyebrow { color: var(--signal); }
.section-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(40px, 5.6vw, 92px);
  line-height: 0.95;
  letter-spacing: -0.025em;
  text-wrap: balance;
}
.section-lede {
  font-size: clamp(18px, 1.4vw, 22px);
  color: var(--paper-2);
  max-width: 56ch;
  margin-top: 24px;
}

/* NAV */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 22px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  mix-blend-mode: difference;
  color: #fff;
  pointer-events: none;
}
.nav > * { pointer-events: auto; }
.nav-logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav-logo .dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--signal);
  display: inline-block;
  box-shadow: 0 0 18px var(--signal);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.4); opacity: 0.6; }
}
.nav-links { display: flex; gap: 32px; }
.nav-links a {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  position: relative;
  padding: 4px 0;
}
.nav-links a::after {
  content: "";
  position: absolute; left: 0; bottom: 0;
  width: 0; height: 1px; background: currentColor;
  transition: width 0.4s cubic-bezier(.7,0,.2,1);
}
.nav-links a:hover::after { width: 100%; }
.nav-cta {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 10px 18px;
  border: 1px solid currentColor;
  border-radius: 999px;
  transition: background 0.3s, color 0.3s;
  touch-action: manipulation;
}
.nav-cta:hover { background: var(--signal); color: var(--on-signal); border-color: var(--signal); }

@media (max-width: 760px) {
  .nav-links { display: none; }
}

/* HERO */
.hero {
  min-height: 100vh;
  padding: 0 var(--gutter);
  display: grid;
  grid-template-rows: 1fr auto;
  position: relative;
  overflow: hidden;
}
.hero-canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-grain {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0.5;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='200' height='200' filter='url(%23n)' opacity='0.6'/></svg>");
  background-size: 220px 220px;
}
.hero-vignette {
  position: absolute; inset: 0;
  z-index: 1;
  background:
    radial-gradient(ellipse at 70% 30%, rgba(0,197,163,0.18), transparent 55%),
    radial-gradient(ellipse at 20% 80%, rgba(61,79,92,0.4), transparent 60%),
    linear-gradient(180deg, rgba(13,13,15,0.4), rgba(13,13,15,0.85));
  pointer-events: none;
}
.hero-inner {
  position: relative;
  z-index: 3;
  padding-top: clamp(120px, 18vh, 220px);
  padding-bottom: 40px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100vh;
}
.hero-meta {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.hero-meta .label { color: var(--paper-2); }
.hero-meta .label b { color: var(--paper); font-weight: 500; }

.hero-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(64px, 12.5vw, 250px);
  line-height: 0.86;
  letter-spacing: -0.045em;
  margin-top: clamp(48px, 8vh, 120px);
}
.hero-title .line { display: block; overflow: hidden; }
.hero-title .word {
  display: inline-block;
  transform: translateY(110%);
  animation: reveal 1s cubic-bezier(.6,0,.2,1) forwards;
}
.hero-title .word.italic {
  font-style: italic;
  font-weight: 400;
  color: var(--signal);
}
.hero-title .line:nth-child(1) .word { animation-delay: 0.1s; }
.hero-title .line:nth-child(2) .word { animation-delay: 0.25s; }
.hero-title .line:nth-child(3) .word { animation-delay: 0.4s; }
@keyframes reveal {
  to { transform: translateY(0); }
}

.hero-bottom {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 24px;
  align-items: end;
  margin-top: 48px;
  padding-bottom: 40px;
}
.hero-tag {
  max-width: 36ch;
  color: var(--paper-2);
  font-size: clamp(16px, 1.2vw, 19px);
  line-height: 1.5;
}
.hero-tag b { color: var(--paper); font-weight: 500; }
.hero-cta-row { display: flex; gap: 14px; align-items: center; justify-content: flex-end; flex-wrap: wrap; }

@media (max-width: 760px) {
  .hero-bottom { grid-template-columns: 1fr; }
  .hero-cta-row { justify-content: flex-start; }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 24px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border: 1px solid var(--fade-20);
  transition: transform 0.4s cubic-bezier(.7,0,.2,1), background 0.3s, color 0.3s, border-color 0.3s;
  color: var(--paper);
  touch-action: manipulation;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--signal); color: var(--on-signal); border-color: var(--signal); }
.btn-primary:hover { background: var(--signal-2); border-color: var(--signal-2); color: var(--on-signal); }
.btn-ghost:hover { background: var(--fade-06); border-color: var(--fade-40); }
.btn .arrow {
  display: inline-block;
  transition: transform 0.4s cubic-bezier(.7,0,.2,1);
}
.btn:hover .arrow { transform: translateX(4px); }

/* Marquee */
.marquee {
  border-top: 1px solid var(--fade-12);
  border-bottom: 1px solid var(--fade-12);
  overflow: hidden;
  padding: 22px 0;
  white-space: nowrap;
  background: var(--ink-2);
}
.marquee-track {
  display: inline-flex;
  gap: 56px;
  animation: scroll 38s linear infinite;
  padding-right: 56px;
}
.marquee span {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 56px);
  font-weight: 500;
  letter-spacing: -0.02em;
  display: inline-flex;
  align-items: center;
  gap: 56px;
}
.marquee span::after {
  content: "";
  width: 14px; height: 14px;
  background: var(--signal);
  border-radius: 50%;
  flex-shrink: 0;
}
.marquee span.alt { color: var(--slate-2); font-style: italic; font-weight: 400; }
@keyframes scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* Challenge */
.challenge { background: var(--paper); color: var(--ink); }
.challenge .eyebrow { color: var(--signal); }
.challenge .section-title { color: var(--ink); }
.challenge .section-lede { color: var(--slate); }
.challenge-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--paper-2);
  border-top: 1px solid var(--paper-2);
  border-bottom: 1px solid var(--paper-2);
}
.challenge-card {
  background: var(--paper);
  padding: 48px clamp(20px, 2.5vw, 40px);
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 360px;
  transition: background 0.3s;
}
.challenge-card:hover { background: var(--paper-2); }
.challenge-card .num { color: var(--signal); font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.08em; }
.challenge-card h3 {
  font-family: var(--font-display);
  font-size: clamp(26px, 2.6vw, 36px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  font-weight: 500;
  margin-top: auto;
}
.challenge-card p { color: var(--slate); font-size: 16px; line-height: 1.55; max-width: 38ch; }

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

/* Approach */
.approach { background: var(--ink); }
.approach-list { display: flex; flex-direction: column; }
.approach-item {
  display: grid;
  grid-template-columns: 80px 1fr 2fr;
  gap: clamp(24px, 4vw, 80px);
  align-items: start;
  padding: clamp(40px, 4vw, 64px) 0;
  border-top: 1px solid var(--fade-12);
  transition: padding 0.4s;
}
.approach-item:last-child { border-bottom: 1px solid var(--fade-12); }
.approach-item:hover { padding-left: 24px; }
.approach-item .num {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--signal);
  letter-spacing: 0.08em;
}
.approach-item h3 {
  font-family: var(--font-display);
  font-size: clamp(28px, 3vw, 44px);
  line-height: 1.05;
  font-weight: 500;
  letter-spacing: -0.02em;
}
.approach-item p {
  color: var(--paper-2);
  font-size: clamp(15px, 1.1vw, 17px);
  line-height: 1.6;
  max-width: 52ch;
}

@media (max-width: 900px) {
  .approach-item { grid-template-columns: 1fr; gap: 16px; }
}

/* Process */
.process {
  background: var(--ink);
  border-top: 1px solid var(--fade-08);
}
.process-track {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  position: relative;
}
.process-track::before {
  content: "";
  position: absolute;
  top: 36px;
  left: 0; right: 0;
  height: 1px;
  background: var(--fade-12);
}
.process-step {
  padding: 0 24px 0 0;
  position: relative;
}
.process-step .step-num {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: var(--ink-3);
  border: 1px solid var(--fade-16);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 500;
  color: var(--signal);
  margin-bottom: 32px;
  position: relative;
  z-index: 1;
  transition: background 0.3s, border-color 0.3s, color 0.3s;
}
.process-step:hover .step-num { background: var(--signal); color: var(--on-signal); border-color: var(--signal); }
.process-step h3 {
  font-family: var(--font-display);
  font-size: clamp(22px, 1.9vw, 28px);
  font-weight: 500;
  letter-spacing: -0.015em;
  margin-bottom: 12px;
}
.process-step .duration {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--signal);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 8px;
}
.process-step p { color: var(--paper-2); font-size: 15px; line-height: 1.55; }

@media (max-width: 900px) {
  .process-track { grid-template-columns: 1fr; gap: 32px; }
  .process-track::before { display: none; }
}

/* Impact */
.impact { background: var(--paper); color: var(--ink); }
.impact .section-title { color: var(--ink); }
.impact .eyebrow { color: var(--signal); }
.impact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--paper-2);
}
.impact-card {
  background: var(--paper);
  padding: 48px clamp(20px, 2vw, 32px);
  min-height: 280px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: relative;
  transition: background 0.3s;
}
.impact-card:hover { background: var(--ink); color: var(--paper); }
.impact-card:hover .impact-num { color: var(--signal); }
.impact-card .impact-num {
  font-family: var(--font-display);
  font-size: clamp(48px, 5vw, 80px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--signal);
  transition: color 0.3s;
}
.impact-card .impact-num .unit {
  font-size: 0.4em;
  vertical-align: super;
  margin-left: 4px;
  letter-spacing: 0;
}
.impact-card p {
  font-size: clamp(15px, 1.1vw, 17px);
  line-height: 1.45;
  margin-top: auto;
}
.impact-card .tag {
  position: absolute;
  top: 24px; right: 24px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--slate-2);
  text-transform: uppercase;
}
.impact-card:hover .tag { color: var(--paper-2); }

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

/* Cells */
.cells { background: var(--ink); }
.cells-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--fade-08);
  border-top: 1px solid var(--fade-08);
  border-bottom: 1px solid var(--fade-08);
}
.cell {
  background: var(--ink);
  padding: clamp(32px, 3vw, 56px);
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-height: 320px;
  position: relative;
  transition: background 0.3s;
}
.cell:hover { background: var(--ink-2); }
.cell .cell-head {
  display: flex;
  align-items: baseline;
  gap: 16px;
}
.cell .cell-num {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--signal);
  letter-spacing: 0.08em;
}
.cell .cell-label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--paper-2);
}
.cell h3 {
  font-family: var(--font-display);
  font-size: clamp(28px, 2.8vw, 40px);
  font-weight: 500;
  line-height: 1.04;
  letter-spacing: -0.02em;
  margin-top: 8px;
}
.cell p { color: var(--paper-2); font-size: 16px; line-height: 1.55; max-width: 44ch; margin-top: auto; }
.cell .cell-icon {
  position: absolute; top: 28px; right: 32px;
  width: 56px; height: 56px;
  opacity: 0.7;
}

.cell-feat {
  grid-column: 1 / -1;
  background: var(--signal);
  color: var(--on-signal);
  min-height: auto;
  padding: clamp(40px, 4vw, 72px);
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 32px;
  align-items: center;
}
.cell-feat:hover { background: var(--signal-2); color: var(--on-signal); }
.cell-feat p { color: var(--on-signal); opacity: 0.85; }
.cell-feat h3 {
  font-size: clamp(36px, 4.5vw, 72px);
  line-height: 0.96;
}
.cell-feat .arrow-big {
  font-size: clamp(80px, 10vw, 160px);
  font-family: var(--font-display);
  line-height: 1;
  text-align: right;
}

@media (max-width: 900px) {
  .cells-grid { grid-template-columns: 1fr; }
  .cell-feat { grid-template-columns: 1fr; }
}

/* Work preview */
.workpreview { background: var(--ink); padding-bottom: 0; }
.workpreview .section-head { padding: 0 var(--gutter); margin-bottom: 48px; }
.workpreview-scroll {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 0 var(--gutter) 80px;
  scrollbar-width: none;
}
.workpreview-scroll::-webkit-scrollbar { display: none; }
.work-card {
  flex-shrink: 0;
  width: clamp(320px, 38vw, 580px);
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.work-card .thumb {
  aspect-ratio: 4/5;
  background: var(--ink-2);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}
.work-card .thumb-inner {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-size: clamp(40px, 5vw, 80px);
  font-weight: 500;
  letter-spacing: -0.03em;
  transition: transform 0.6s cubic-bezier(.7,0,.2,1);
}
.work-card:hover .thumb-inner { transform: scale(1.04); }
.work-card .work-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.work-card .work-title {
  font-family: var(--font-display);
  font-size: clamp(20px, 1.6vw, 26px);
  font-weight: 500;
  letter-spacing: -0.01em;
}
.work-card .work-cat {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--paper-2);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* Contact CTA */
.contact-cta {
  background: var(--ink-2);
  text-align: left;
  padding: clamp(80px, 12vw, 200px) 0;
  position: relative;
  overflow: hidden;
}
.contact-cta .signal-bg {
  position: absolute;
  bottom: -40%; right: -10%;
  width: 80%; aspect-ratio: 1;
  background: radial-gradient(circle, rgba(0,197,163,0.25), transparent 60%);
  filter: blur(40px);
  pointer-events: none;
}
.contact-cta .wrap { position: relative; z-index: 2; }
.contact-cta h2 {
  font-family: var(--font-display);
  font-size: clamp(48px, 8vw, 140px);
  font-weight: 500;
  line-height: 0.92;
  letter-spacing: -0.035em;
  text-wrap: balance;
  max-width: 18ch;
}
.contact-cta h2 .italic { font-style: italic; font-weight: 400; color: var(--signal); }
.contact-cta .ledep {
  margin-top: 32px;
  font-size: clamp(18px, 1.4vw, 22px);
  max-width: 56ch;
  color: var(--paper-2);
}
.contact-cta .row-cta { margin-top: 56px; display: flex; gap: 16px; flex-wrap: wrap; }

/* Footer */
.footer {
  background: var(--ink);
  border-top: 1px solid var(--fade-10);
  padding: 80px 0 32px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
}
.footer h4 {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--slate-2);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 20px;
}
.footer ul { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.footer ul a {
  font-family: var(--font-sans);
  font-size: 16px;
  color: var(--paper);
  transition: color 0.3s;
}
.footer ul a:hover { color: var(--signal); }
.footer .brand-block { max-width: 36ch; }
.footer .brand-block .logo {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}
.footer .brand-block p { color: var(--paper-2); font-size: 15px; line-height: 1.55; }
.footer-legal {
  margin-top: 80px;
  padding-top: 24px;
  border-top: 1px solid var(--fade-10);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--slate-2);
  letter-spacing: 0.04em;
}
@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

/* Custom cursor */
.cursor {
  position: fixed;
  pointer-events: none;
  z-index: 1000;
  top: 0; left: 0;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--signal);
  mix-blend-mode: difference;
  transform: translate(-50%, -50%);
  transition: width 0.3s cubic-bezier(.7,0,.2,1), height 0.3s cubic-bezier(.7,0,.2,1), background 0.3s;
}
.cursor.is-hover {
  width: 56px; height: 56px;
  background: var(--paper);
}
.cursor.is-text { width: 4px; height: 24px; border-radius: 2px; background: var(--paper); }
.cursor-trail {
  position: fixed;
  pointer-events: none;
  z-index: 999;
  top: 0; left: 0;
  width: 36px; height: 36px;
  border: 1px solid var(--fade-40);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: transform 0.2s ease-out, width 0.4s, height 0.4s, opacity 0.3s;
}
.cursor-trail.is-hover { width: 80px; height: 80px; border-color: var(--signal); }

@media (max-width: 760px) {
  .cursor, .cursor-trail { display: none; }
}

/* Reveal on scroll */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.9s cubic-bezier(.6,0,.2,1), transform 0.9s cubic-bezier(.6,0,.2,1);
}
.reveal.in {
  opacity: 1;
  transform: none;
}

/* Work page - horizontal */
.workpage {
  position: relative;
  /* height is set by JS to (innerWidth - viewportWidth + viewportHeight) so we scroll long enough to translate the inner panel fully */
}
.workpage-inner {
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  height: 100vh;
  padding: 0 var(--gutter);
  gap: 32px;
  will-change: transform;
  overflow: hidden;
}
.workpage-intro {
  flex-shrink: 0;
  width: 90vw;
  max-width: 800px;
  padding-right: 80px;
}
.workpage-intro .eyebrow { color: var(--signal); margin-bottom: 24px; }
.workpage-intro h1 {
  font-family: var(--font-display);
  font-size: clamp(48px, 7vw, 120px);
  font-weight: 500;
  line-height: 0.92;
  letter-spacing: -0.035em;
  margin-bottom: 32px;
}
.workpage-intro h1 .italic { font-style: italic; color: var(--signal); font-weight: 400; }
.workpage-intro p { color: var(--paper-2); font-size: clamp(16px, 1.2vw, 19px); max-width: 50ch; }
.case-card {
  flex-shrink: 0;
  width: 70vw;
  max-width: 900px;
  height: 78vh;
  background: var(--ink-2);
  border-radius: 6px;
  padding: clamp(28px, 3vw, 56px);
  display: grid;
  grid-template-rows: auto 1fr auto;
  position: relative;
  overflow: hidden;
  transition: transform 0.5s;
}
.case-card:hover { transform: translateY(-4px); }
.case-card .case-bg {
  position: absolute; inset: 0;
  opacity: 0.4;
  pointer-events: none;
}
.case-card > * { position: relative; z-index: 2; }
.case-card .case-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.case-card .case-num {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--signal);
}
.case-card .case-cat {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--paper-2);
  text-transform: uppercase;
}
.case-card h2 {
  font-family: var(--font-display);
  font-size: clamp(36px, 4.5vw, 68px);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 0.96;
  align-self: end;
  margin-top: 48px;
}
.case-card .case-foot {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 24px;
  flex-wrap: wrap;
}
.case-card .case-meta {
  display: grid;
  grid-template-columns: repeat(3, auto);
  gap: 32px;
}
.case-card .case-meta div {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--paper-2);
}
.case-card .case-meta b {
  display: block;
  color: var(--signal);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 500;
  margin-bottom: 6px;
  font-size: 10px;
}
.case-card .case-stat {
  font-family: var(--font-display);
  font-size: clamp(40px, 4vw, 72px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--signal);
}

.workpage-end {
  flex-shrink: 0;
  width: 70vw;
  max-width: 700px;
  text-align: left;
  padding: 0 80px;
}
.workpage-end h2 {
  font-family: var(--font-display);
  font-size: clamp(40px, 5vw, 84px);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 0.95;
  margin-bottom: 32px;
}
.workpage-end h2 .italic { font-style: italic; color: var(--signal); font-weight: 400; }

.scroll-indicator {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--paper-2);
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 50;
  background: rgba(13,13,15,0.6);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid var(--fade-10);
}
.scroll-indicator .bar {
  width: 80px; height: 2px;
  background: var(--fade-20);
  position: relative;
  border-radius: 999px;
  overflow: hidden;
}
.scroll-indicator .bar-fill {
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 0%;
  background: var(--signal);
  transition: width 0.1s linear;
}

@media (max-width: 760px) {
  .workpage { height: auto; overflow: visible; }
  .workpage-inner { position: static; flex-direction: column; height: auto; padding: 120px var(--gutter); gap: 24px; transform: none !important; overflow: visible; }
  .case-card, .workpage-intro, .workpage-end { width: 100%; height: auto; min-height: 60vh; padding: 32px; }
  .scroll-indicator { display: none; }
}

/* Contact page */
.contactpage { min-height: 100vh; padding: 160px var(--gutter) 80px; }
.contactpage-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(48px, 6vw, 120px);
  max-width: var(--maxw);
  margin: 0 auto;
}
.contactpage h1 {
  font-family: var(--font-display);
  font-size: clamp(48px, 7vw, 120px);
  font-weight: 500;
  line-height: 0.92;
  letter-spacing: -0.035em;
  margin-bottom: 32px;
}
.contactpage h1 .italic { font-style: italic; color: var(--signal); font-weight: 400; }
.contactpage .ledep { color: var(--paper-2); font-size: clamp(17px, 1.3vw, 20px); max-width: 48ch; }
.contact-info { margin-top: 80px; display: flex; flex-direction: column; gap: 32px; }
.contact-info .info-block { border-top: 1px solid var(--fade-12); padding-top: 20px; }
.contact-info .label { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; color: var(--slate-2); text-transform: uppercase; margin-bottom: 8px; display: block; }
.contact-info .value {
  font-family: var(--font-display);
  font-size: clamp(22px, 2vw, 30px);
  font-weight: 500;
  letter-spacing: -0.015em;
}

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

/* Page transition */
.page-trans {
  position: fixed;
  inset: 0;
  background: var(--ink);
  z-index: 9999;
  transform: translateY(100%);
  pointer-events: none;
}
.page-trans.in {
  transform: translateY(0);
  transition: transform 0.6s cubic-bezier(.7,0,.2,1);
}
.page-trans.out {
  transform: translateY(-100%);
  transition: transform 0.6s cubic-bezier(.7,0,.2,1) 0.1s;
}

/* ========================================
   IMAGE TREATMENTS — duotone + animations
   ======================================== */

/* Base duotone wrapper */
.duotone {
  position: relative;
  overflow: hidden;
  background: var(--ink);
}
.duotone img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: grayscale(1) contrast(1.15) brightness(0.6);
  transition: filter 1.2s ease, transform 1.4s cubic-bezier(.2,.6,.2,1);
}
.duotone::before {
  content: "";
  position: absolute; inset: 0;
  z-index: 2;
  background: linear-gradient(135deg, rgba(0,197,163,0.55) 0%, rgba(13,13,15,0.3) 60%, rgba(61,79,92,0.6) 100%);
  mix-blend-mode: color;
  pointer-events: none;
}
.duotone::after {
  content: "";
  position: absolute; inset: 0;
  z-index: 3;
  background: radial-gradient(ellipse at 50% 100%, rgba(13,13,15,0.5), transparent 60%);
  pointer-events: none;
}
.duotone .scan-grid {
  position: absolute; inset: 0;
  z-index: 4;
  background-image:
    linear-gradient(0deg, rgba(0,197,163,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,197,163,0.06) 1px, transparent 1px);
  background-size: 80px 80px;
  pointer-events: none;
  mix-blend-mode: screen;
}
.duotone .scan-grain {
  position: absolute; inset: 0;
  z-index: 5;
  opacity: 0.4;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='200' height='200' filter='url(%23n)' opacity='0.6'/></svg>");
  background-size: 220px 220px;
  pointer-events: none;
}

/* Working-session full-bleed (landing) */
.working {
  position: relative;
  height: 90vh;
  min-height: 600px;
  overflow: hidden;
  background: var(--ink);
}
.working .duotone {
  position: absolute; inset: 0;
  z-index: 0;
}
.working .duotone img {
  /* slow ken-burns */
  animation: kenburns 22s ease-in-out infinite alternate;
}
@keyframes kenburns {
  from { transform: scale(1.05) translate(0, 0); }
  to { transform: scale(1.18) translate(-1.5%, -2%); }
}
.working-inner {
  position: relative;
  z-index: 10;
  height: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding-top: clamp(80px, 10vh, 140px);
  padding-bottom: clamp(48px, 6vh, 80px);
}
.working-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--paper);
}
.working-top .marker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.working-top .marker::before {
  content: "";
  width: 8px; height: 8px;
  background: var(--signal);
  border-radius: 50%;
  box-shadow: 0 0 14px var(--signal);
  animation: pulse 2s ease-in-out infinite;
}
.working h2 {
  align-self: end;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(48px, 7.5vw, 130px);
  line-height: 0.92;
  letter-spacing: -0.035em;
  color: var(--paper);
  text-wrap: balance;
  max-width: 16ch;
}
.working h2 .italic { font-style: italic; color: var(--signal); font-weight: 400; }
.working-foot {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
  align-items: end;
}
.working-foot p {
  color: var(--paper-2);
  font-size: clamp(16px, 1.2vw, 19px);
  line-height: 1.5;
  max-width: 48ch;
}
.working-corner {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--paper-2);
  text-align: right;
  line-height: 1.6;
}

@media (max-width: 760px) {
  .working { height: auto; min-height: 80vh; padding: 32px 0; }
  .working-foot { grid-template-columns: 1fr; }
}

/* Mosaic strip (services page hero) */
.mosaic {
  position: relative;
  height: clamp(220px, 35vh, 440px);
  overflow: hidden;
  border-top: 1px solid var(--fade-08);
  border-bottom: 1px solid var(--fade-08);
}
.mosaic .duotone { position: absolute; inset: 0; }
.mosaic .duotone img {
  transform: scale(1.02);
  animation: drift 28s ease-in-out infinite alternate;
}
@keyframes drift {
  from { transform: scale(1.02) translateX(0); }
  to { transform: scale(1.08) translateX(-2%); }
}
.mosaic .stripe-mask {
  position: absolute; inset: 0;
  z-index: 6;
  background: repeating-linear-gradient(
    90deg,
    transparent 0,
    transparent 8.33%,
    rgba(13,13,15,0.4) 8.33%,
    rgba(13,13,15,0.4) 8.43%
  );
  pointer-events: none;
}
.mosaic-overlay {
  position: relative;
  z-index: 10;
  height: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex;
  align-items: end;
  justify-content: space-between;
  padding-bottom: 32px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--paper-2);
}
.mosaic-overlay .marker-row { display: flex; gap: 24px; flex-wrap: wrap; }
.mosaic-overlay .marker-row span::before { content: "+ "; color: var(--signal); }

/* Studio block (contact page) */
.studio {
  margin-top: 80px;
  position: relative;
}
.studio-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  margin-bottom: 24px;
  gap: 24px;
  flex-wrap: wrap;
}
.studio-head .eyebrow { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--signal); }
.studio-head h2,
.studio-head h3 {
  font-family: var(--font-display);
  font-size: clamp(28px, 3vw, 44px);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1;
}
.studio-frame {
  position: relative;
  aspect-ratio: 3/2;
  overflow: hidden;
  border-radius: 4px;
}
.studio-frame .duotone { position: absolute; inset: 0; }
.studio-frame:hover .duotone img {
  filter: grayscale(0.2) contrast(1.05) brightness(0.85);
  transform: scale(1.04);
}
.studio-frame:hover .duotone::before { opacity: 0.4; }
.studio-frame .duotone::before { transition: opacity 0.8s ease; }
.studio-frame .frame-corner {
  position: absolute;
  z-index: 10;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--paper);
}
.studio-frame .corner-tl { top: 16px; left: 16px; }
.studio-frame .corner-tr { top: 16px; right: 16px; }
.studio-frame .corner-bl { bottom: 16px; left: 16px; }
.studio-frame .corner-br { bottom: 16px; right: 16px; }
.studio-frame .corner-tl::before,
.studio-frame .corner-tr::before,
.studio-frame .corner-bl::before,
.studio-frame .corner-br::before {
  content: "";
  position: absolute;
  width: 14px; height: 14px;
  border: 1px solid var(--signal);
}
.studio-frame .corner-tl::before { top: -8px; left: -8px; border-right: 0; border-bottom: 0; }
.studio-frame .corner-tr::before { top: -8px; right: -8px; border-left: 0; border-bottom: 0; }
.studio-frame .corner-bl::before { bottom: -8px; left: -8px; border-right: 0; border-top: 0; }
.studio-frame .corner-br::before { bottom: -8px; right: -8px; border-left: 0; border-top: 0; }

/* ── Nav actions (toggle + CTA group) ──── */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* ── Theme toggle ────────────────────────── */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid currentColor;
  border-radius: 50%;
  background: transparent;
  color: inherit;
  transition: border-color 0.3s;
  flex-shrink: 0;
}
.theme-toggle:hover { border-color: var(--signal); }
.theme-toggle svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.theme-toggle .icon-sun  { display: none; }
.theme-toggle .icon-moon { display: block; }
[data-theme="light"] .theme-toggle .icon-sun  { display: block; }
[data-theme="light"] .theme-toggle .icon-moon { display: none; }

@media (prefers-reduced-motion: no-preference) {
  .theme-transitioning,
  .theme-transitioning *,
  .theme-transitioning *::before,
  .theme-transitioning *::after {
    transition: background-color 0.4s ease, color 0.4s ease, border-color 0.4s ease !important;
  }
}

/* ── Italic accent (utility) ─────────────── */
.italic {
  font-style: italic;
  color: var(--signal);
  font-weight: 400;
}

/* ── Tabular numerals on changing readouts ── */
[data-cdmx-time] {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
}

/* ── Accessibility ───────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

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

.skip-link {
  position: absolute;
  top: 0;
  left: var(--gutter);
  z-index: 200;
  padding: 12px 24px;
  background: var(--signal);
  color: var(--on-signal);
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-radius: 0 0 4px 4px;
  transform: translateY(-110%);
  transition: transform 0.3s;
}
.skip-link:focus { transform: translateY(0); }

