:root {
  --bg: #E8E4DE;
  --bg-2: #DCD7CF;
  --ink: #141414;
  --ink-60: rgba(20, 20, 20, 0.6);
  --ink-30: rgba(20, 20, 20, 0.3);
  --ink-12: rgba(20, 20, 20, 0.12);
  --coral: #FF4E2B;
  --coral-2: #FF7A5C;
  --lavender: #B8B5BE;
  --radius: 2px;
  --maxw: 1440px;
  --gutter: clamp(20px, 4vw, 56px);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Inter Tight', ui-sans-serif, system-ui, sans-serif;
  font-feature-settings: 'ss01', 'ss02', 'cv11';
  -webkit-font-smoothing: antialiased;
  cursor: none;
}

@media (hover: none) {
  html, body { cursor: auto; }
}

a { color: inherit; text-decoration: none; }

/* Grain overlay — subtle film texture */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 5;
  opacity: 0.35;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg viewBox='0 0 300 300' xmlns='http://www.w3.org/2000/svg'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.08  0 0 0 0 0.08  0 0 0 0 0.08  0 0 0 0.55 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* Ambient coral gradient — lower-right of page, soft */
.ambient {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background:
    radial-gradient(1200px 900px at 115% 90%, rgba(255, 78, 43, 0.22), transparent 55%),
    radial-gradient(900px 700px at 100% 10%, rgba(184, 181, 190, 0.35), transparent 60%);
}

/* Custom cursor */
.cursor {
  position: fixed;
  top: 0; left: 0;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--coral);
  mix-blend-mode: normal;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: width 200ms ease, height 200ms ease, background 200ms ease, border-radius 200ms ease, opacity 200ms ease;
  will-change: transform;
}
.cursor.hover {
  width: 64px; height: 64px;
  background: rgba(255, 78, 43, 0.25);
  border: 1px solid var(--coral);
}
.cursor.drag {
  width: 88px; height: 88px;
  background: rgba(255, 78, 43, 0.15);
  border: 1px solid var(--coral);
}

/* Layout */
.shell {
  position: relative;
  z-index: 2;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* Nav */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 10;
  background: transparent;
  pointer-events: none;
}
.nav a, .nav button { pointer-events: auto; }
.nav-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 18px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.nav-logo {
  display: inline-flex;
  align-items: flex-end;
  font-family: 'Inter Tight', sans-serif;
  font-style: italic;
  font-weight: 800;
  letter-spacing: -0.04em;
  text-transform: none;
  line-height: 0.85;
  text-decoration: none;
  position: relative;
}
.nav-logo .nl-main {
  font-size: 38px;
  color: var(--ink);
  line-height: 0.85;
}
.nav-logo .nl-sub {
  font-size: 11px;
  color: var(--coral);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 800;
  font-style: italic;
  margin-left: 4px;
  margin-bottom: 4px;
  white-space: nowrap;
}
.nav-links { display: flex; gap: 28px; }
.nav-links a { opacity: 0.7; transition: opacity 200ms; }
.nav-links a:hover { opacity: 1; }
.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: var(--ink);
  color: var(--bg);
  border-radius: 999px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
}
.nav-cta .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--coral);
  box-shadow: 0 0 0 0 rgba(255, 78, 43, 0.7);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(255, 78, 43, 0.8); }
  70%  { box-shadow: 0 0 0 8px rgba(255, 78, 43, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 78, 43, 0); }
}

/* Hero */
.hero {
  padding-top: 100px;
  padding-bottom: 120px;
  position: relative;
}
.hero-meta {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-60);
  margin-bottom: 56px;
}
.hero-meta .live {
  display: inline-flex; align-items: center; gap: 8px;
}
.hero-meta .live::before {
  content: '';
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--coral);
  animation: pulse 2s infinite;
}
.hero-title {
  font-style: italic;
  font-weight: 800;
  font-size: clamp(48px, 11vw, 180px);
  line-height: 0.92;
  padding-bottom: 0.12em;
  will-change: transform;
  letter-spacing: -0.045em;
  margin: 0;
  text-transform: uppercase;
}
.hero-title .coral { color: var(--coral); }
.hero-title .outline {
  -webkit-text-stroke: 2px var(--ink);
  color: transparent;
}
.hero-title .row { display: block; }
.hero-title .row.indent { padding-left: clamp(40px, 10vw, 180px); }
.hero-sub {
  margin-top: 120px;
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}
.hero-sub p {
  font-size: 20px;
  line-height: 1.4;
  max-width: 46ch;
  margin: 0;
  color: var(--ink);
}
.hero-sub .col-2 {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-60);
  line-height: 1.8;
  justify-self: end;
  text-align: right;
}

/* Marquee / ticker */
.ticker {
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  overflow: hidden;
  padding: 22px 0;
  margin: 80px 0 0 0;
  background: var(--bg);
}
.ticker-track {
  display: flex;
  gap: 60px;
  white-space: nowrap;
  animation: scroll 40s linear infinite;
  font-family: 'Inter Tight', sans-serif;
  font-style: italic;
  font-weight: 800;
  font-size: clamp(28px, 4vw, 56px);
  letter-spacing: -0.02em;
  text-transform: uppercase;
}
.ticker-track span { display: inline-flex; align-items: center; gap: 60px; }
.ticker-track .star {
  color: var(--coral);
  font-size: 0.7em;
  font-style: normal;
}
.ticker-track .outline {
  -webkit-text-stroke: 1.5px var(--ink);
  color: transparent;
}
@keyframes scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* Section framing */
.section {
  padding: 140px 0;
  position: relative;
}
.section-label {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-60);
  margin-bottom: 48px;
}
.section-label::before {
  content: '';
  width: 10px; height: 10px;
  background: var(--coral);
  border-radius: 50%;
}
.section-h {
  font-style: italic;
  font-weight: 800;
  font-size: clamp(44px, 7vw, 112px);
  line-height: 0.92;
  letter-spacing: -0.035em;
  margin: 0 0 24px 0;
  text-transform: uppercase;
}
.section-h .coral { color: var(--coral); }

/* Services — hover reveal */
.services {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--ink);
}
.service {
  display: grid;
  grid-template-columns: 80px 1fr auto;
  align-items: center;
  gap: 32px;
  padding: 32px 0;
  border-bottom: 1px solid var(--ink-12);
  position: relative;
  cursor: none;
  transition: padding 300ms cubic-bezier(.2,.8,.2,1);
}
.service:hover { padding-left: 24px; }
.service-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--ink-60);
}
.service-name {
  font-style: italic;
  font-weight: 800;
  font-size: clamp(32px, 5vw, 72px);
  letter-spacing: -0.03em;
  text-transform: uppercase;
  line-height: 1;
  transition: color 300ms, transform 300ms cubic-bezier(.2,.8,.2,1);
}
.service:hover .service-name { color: var(--coral); }
.service-arrow {
  width: 48px; height: 48px;
  border: 1px solid var(--ink);
  border-radius: 50%;
  display: grid; place-items: center;
  transition: background 300ms, color 300ms, transform 300ms;
}
.service:hover .service-arrow { background: var(--coral); border-color: var(--coral); color: var(--bg); transform: rotate(-45deg); }

/* Case study card that follows cursor on hover */
.case-card {
  position: fixed;
  top: 0; left: 0;
  width: 360px;
  background: var(--ink);
  color: var(--bg);
  border-radius: 8px;
  padding: 20px;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.92);
  transition: opacity 200ms ease, transform 300ms cubic-bezier(.2,.8,.2,1);
  z-index: 20;
  box-shadow: 0 30px 60px rgba(0,0,0,0.25);
}
.case-card.active { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.case-card .cc-top {
  display: flex; justify-content: space-between;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase;
  color: rgba(232, 228, 222, 0.55);
  margin-bottom: 18px;
}
.case-card .cc-top .tag { color: var(--coral); }
.case-card .cc-art {
  aspect-ratio: 4 / 3;
  border-radius: 4px;
  background: linear-gradient(135deg, var(--coral), #ff9d80 60%, var(--lavender));
  position: relative; overflow: hidden;
  margin-bottom: 18px;
}
.case-card .cc-art::after {
  content: '';
  position: absolute; inset: 0;
  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='1.2' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.5 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  mix-blend-mode: multiply;
  opacity: 0.4;
}
.case-card .cc-title {
  font-style: italic; font-weight: 800;
  font-size: 22px; letter-spacing: 0.02em;
  line-height: 1.1; text-transform: uppercase;
  margin-bottom: 10px;
  font-family: 'JetBrains Mono', monospace;
}
.case-card .cc-stats {
  display: flex; gap: 16px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em;
  color: rgba(232, 228, 222, 0.7);
}
.case-card .cc-stats b { color: var(--coral); font-weight: 400; }

/* Stats */
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}
.stat {
  padding: 56px 32px;
  border-right: 1px solid var(--ink-12);
  position: relative;
}
.stat:last-child { border-right: none; }
.stat-n {
  font-style: italic;
  font-weight: 800;
  font-size: clamp(64px, 9vw, 144px);
  line-height: 0.9;
  letter-spacing: -0.04em;
  margin: 0 0 8px 0;
}
.stat-n .coral { color: var(--coral); }
.stat-n .suffix { font-size: 0.55em; color: var(--coral); }
.stat-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-60);
}

/* Approach / process */
.approach {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}
.approach-steps { list-style: none; padding: 0; margin: 0; }
.approach-steps li {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 24px;
  padding: 28px 0;
  border-top: 1px solid var(--ink-12);
  align-items: baseline;
}
.approach-steps li:last-child { border-bottom: 1px solid var(--ink-12); }
.approach-steps .step-n {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--coral);
}
.approach-steps .step-t {
  font-style: italic;
  font-weight: 800;
  font-size: 32px;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  line-height: 1;
  margin-bottom: 8px;
}
.approach-steps .step-d {
  font-size: 15px;
  color: var(--ink-60);
  line-height: 1.5;
  max-width: 44ch;
}

/* CTA */
.cta {
  padding: 40px 0 60px;
  text-align: left;
  position: relative;
}
.cta-h {
  font-style: italic;
  font-weight: 800;
  font-size: clamp(56px, 12vw, 192px);
  line-height: 0.86;
  letter-spacing: -0.045em;
  text-transform: uppercase;
  margin: 0 0 48px 0;
}
.cta-h .coral { color: var(--coral); }
.cta-h .outline { -webkit-text-stroke: 2px var(--ink); color: transparent; }
.cta-button {
  display: inline-flex;
  align-items: center;
  gap: 20px;
  padding: 24px 36px;
  background: var(--ink);
  color: var(--bg);
  border-radius: 999px;
  font-family: 'Inter Tight', sans-serif;
  font-style: italic;
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  transition: transform 300ms cubic-bezier(.2,.8,.2,1), background 300ms;
  cursor: none;
}
.cta-button:hover { background: var(--coral); transform: translateX(8px); }
.cta-button .arrow {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--coral);
  display: grid; place-items: center;
  transition: background 300ms, transform 300ms;
}
.cta-button:hover .arrow { background: var(--ink); transform: rotate(-45deg); }

.cta-meta {
  margin-top: 80px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  border-top: 1px solid var(--ink-12);
  padding-top: 40px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-60);
}
.cta-meta b { color: var(--ink); font-weight: 400; display: block; margin-top: 6px; font-size: 14px; letter-spacing: 0; text-transform: none; }
.cta-meta b a { border-bottom: 1px solid var(--ink-30); }

/* Footer */
.footer {
  border-top: 1px solid var(--ink);
  padding: 32px 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-60);
}

/* Visitor-facing tweaks toggle — floating gear button */
.tweaks-toggle {
  position: fixed;
  bottom: 20px; right: 20px;
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--bg);
  border: none;
  cursor: pointer;
  z-index: 99;
  display: grid;
  place-items: center;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
  transition: transform 300ms cubic-bezier(.2,.8,.2,1), background 300ms;
}
.tweaks-toggle:hover {
  background: var(--coral);
  transform: rotate(60deg);
}
.tweaks-toggle.hidden { opacity: 0; pointer-events: none; transform: scale(0.8); }

/* Tweaks panel */
.tweaks {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 280px;
  background: var(--ink);
  color: var(--bg);
  border-radius: 12px;
  padding: 16px;
  z-index: 100;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  transform: translateY(calc(100% + 40px));
  transition: transform 400ms cubic-bezier(.2,.8,.2,1);
  box-shadow: 0 30px 60px rgba(0,0,0,0.25);
}
.tweaks.open { transform: translateY(0); }
.tweaks-header {
  display: flex; justify-content: space-between; align-items: center;
  text-transform: uppercase; letter-spacing: 0.1em;
  margin-bottom: 16px;
}
.tweak-row { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.tweak-row label { color: rgba(232,228,222,0.6); text-transform: uppercase; letter-spacing: 0.08em; }
.tweak-swatches { display: flex; gap: 8px; }
.tweak-swatches button {
  width: 36px; height: 36px;
  border: 2px solid transparent;
  border-radius: 50%;
  cursor: none;
}
.tweak-swatches button.active { border-color: var(--bg); }
.tweak-row input[type="range"] { accent-color: var(--coral); }
.tweak-row select {
  background: rgba(255,255,255,0.08);
  color: var(--bg);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 4px;
  padding: 8px;
  font-family: inherit; font-size: inherit;
}

/* Responsive */
@media (max-width: 860px) {
  :root { --gutter: 20px; }
  html, body { cursor: auto; }
  .cursor { display: none; }

  /* Nav — keep logo + CTA visible but compact */
  .nav-inner { padding: 14px var(--gutter); }
  .nav-logo .nl-main { font-size: 20px; }
  .nav-logo .nl-sub { font-size: 10px; }
  .nav-cta { padding: 8px 12px; font-size: 10px; }
  .nav-links { display: none; }

  /* Hero */
  .hero { padding-top: 96px; padding-bottom: 60px; }
  .hero-meta { margin-bottom: 32px; font-size: 10px; gap: 12px; }
  .hero-title {
    font-size: clamp(56px, 16vw, 96px);
    line-height: 0.95;
    letter-spacing: -0.04em;
  }
  .hero-title .row.indent { padding-left: 0; }
  .hero-sub { grid-template-columns: 1fr; margin-top: 48px; gap: 24px; }
  .hero-sub p { font-size: 17px; }
  .hero-sub .col-2 { justify-self: start; text-align: left; font-size: 11px; }

  /* Ticker */
  .ticker { margin-top: 48px; padding: 14px 0; }
  .ticker-track { font-size: 26px; gap: 32px; }
  .ticker-track span { gap: 32px; }

  /* Sections */
  .section { padding: 72px 0; }
  .section-label { margin-bottom: 28px; font-size: 10px; }
  .section-h {
    font-size: clamp(36px, 9vw, 56px);
    line-height: 0.95;
    letter-spacing: -0.03em;
  }

  /* Services */
  .service {
    grid-template-columns: 32px 1fr 36px;
    gap: 12px;
    padding: 22px 0;
  }
  .service:hover { padding-left: 0; }
  .service-num { font-size: 10px; }
  .service-name { font-size: clamp(28px, 7vw, 44px); letter-spacing: -0.025em; }
  .service-arrow { width: 36px; height: 36px; font-size: 14px; }

  /* Case card — hide on touch; hover doesn't exist anyway */
  .case-card { display: none !important; }

  .stats { grid-template-columns: 1fr; }
  .stat { border-right: none; border-bottom: 1px solid var(--ink-12); padding: 40px 20px; }
  .approach { grid-template-columns: 1fr; gap: 40px; }
  .cta { padding: 32px 0 48px; }
  .cta-meta {
    grid-template-columns: 1fr;
    gap: 24px;
    padding-top: 32px;
  }
  .footer { flex-direction: column; gap: 10px; text-align: center; padding: 24px 0; font-size: 10px; }

  /* Tweaks — hide on mobile */
  .tweaks { display: none !important; }
  .tweaks-toggle { display: none !important; }

  /* Ambient softened on mobile — saves paint */
  .ambient { background:
    radial-gradient(600px 500px at 100% 100%, rgba(255, 78, 43, 0.18), transparent 60%),
    radial-gradient(500px 400px at 100% 0%, rgba(184, 181, 190, 0.3), transparent 65%);
  }
}

@media (max-width: 480px) {
  .hero-title { font-size: clamp(48px, 15vw, 72px); }
  .section-h { font-size: clamp(32px, 9vw, 44px); }
  .service-name { font-size: clamp(24px, 7vw, 36px); }
  .ticker-track { font-size: 22px; }
}

@media (hover: none) {
  html, body { cursor: auto; }
  .cursor { display: none; }
  .tweaks { display: none !important; }
  .tweaks-toggle { display: none !important; }
  .service:hover .service-name { color: inherit; }
  .service:hover { padding-left: 0; }
}

/* Reveal on scroll */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 800ms ease, transform 800ms cubic-bezier(.2,.8,.2,1);
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}
