/* ========================================================================
   ROCKSMITH TECH — STYLES
   Editorial brutalism · Obsidian base · Molten accents
   ======================================================================== */

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body { min-height: 100vh; line-height: 1.55; overflow-x: hidden; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* ---------- Design Tokens ---------- */
:root {
  /* Core palette */
  --bg: #0C0A08;
  --bg-elev: #15120F;
  --bg-deeper: #050403;

  --paper: #F2ECE2;
  --paper-warm: #EBE3D5;
  --ink: #0C0A08;

  --muted: #8A8176;          /* on dark */
  --muted-light: #6A6158;    /* on paper */
  --muted-deep: #4A4239;

  --ember: #FF4A1C;
  --ember-soft: #FF7A42;
  --amber: #E89B4B;
  --iron: #3A4A5E;

  --line: rgba(242, 236, 226, 0.08);
  --line-strong: rgba(242, 236, 226, 0.18);
  --line-dark: rgba(12, 10, 8, 0.10);
  --line-dark-strong: rgba(12, 10, 8, 0.22);

  /* Typography */
  --f-display: "Fraunces", "Times New Roman", Georgia, serif;
  --f-sans: "Instrument Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* Type scale (fluid) */
  --t-xs:   clamp(0.70rem, 0.40vw + 0.60rem, 0.80rem);
  --t-sm:   clamp(0.82rem, 0.40vw + 0.75rem, 0.95rem);
  --t-base: clamp(0.95rem, 0.40vw + 0.85rem, 1.10rem);
  --t-lg:   clamp(1.10rem, 0.70vw + 0.95rem, 1.35rem);
  --t-xl:   clamp(1.35rem, 1.20vw + 1.05rem, 1.85rem);
  --t-2xl:  clamp(1.85rem, 2.5vw + 1.20rem, 3.00rem);
  --t-3xl:  clamp(2.50rem, 4.5vw + 1.30rem, 5.00rem);
  --t-disp: clamp(3.50rem, 9.5vw + 0.50rem, 10.0rem);
  --t-mega: clamp(4.00rem, 20vw, 22rem);

  /* Spacing */
  --s-1: 0.25rem;
  --s-2: 0.5rem;
  --s-3: 0.75rem;
  --s-4: 1rem;
  --s-5: 1.5rem;
  --s-6: 2rem;
  --s-7: 3rem;
  --s-8: 4rem;
  --s-9: 6rem;
  --s-10: 8rem;

  /* Layout */
  --pad-x: clamp(1.25rem, 4vw, 3.5rem);
  --max-w: 1520px;

  /* Motion */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.76, 0, 0.24, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ---------- Base ---------- */
html, body {
  background: var(--bg);
  color: var(--paper);
  font-family: var(--f-sans);
  font-size: var(--t-base);
  font-variation-settings: "wdth" 100;
  font-feature-settings: "ss01", "ss02";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

body.lenis-scrolling { pointer-events: none; }
body.lenis-scrolling a { pointer-events: auto; }

/* Hide scrollbar chrome, keep function */
html { scrollbar-color: var(--muted) transparent; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 4px; }

/* ---------- Grain ---------- */
.grain {
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 9998;
  opacity: 0.45;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' 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='200' height='200' filter='url(%23n)'/></svg>");
}

/* ---------- Custom Cursor ---------- */
.cursor {
  position: fixed; top: 0; left: 0;
  pointer-events: none;
  z-index: 10000;
  mix-blend-mode: difference;
  display: none;
}
@media (pointer: fine) { .cursor { display: block; } body { cursor: none; } a, button, [data-magnetic], .service, .stage, .principle { cursor: none; } }

.cursor__dot {
  position: absolute;
  width: 6px; height: 6px;
  background: var(--paper);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: transform 0.2s var(--ease-out), width 0.3s var(--ease-out), height 0.3s var(--ease-out);
}
.cursor__ring {
  position: absolute;
  width: 40px; height: 40px;
  border: 1px solid var(--paper);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: transform 0.3s var(--ease-out), width 0.3s var(--ease-out), height 0.3s var(--ease-out), opacity 0.3s var(--ease-out), border-color 0.3s var(--ease-out);
  opacity: 0.5;
}
.cursor.is-hover .cursor__dot { width: 0; height: 0; }
.cursor.is-hover .cursor__ring { width: 64px; height: 64px; opacity: 1; }

/* ---------- Scroll progress ---------- */
.progress {
  position: fixed; top: 0; left: 0;
  height: 2px; width: 0%;
  background: var(--ember);
  z-index: 9999;
  transition: width 0.1s linear;
  box-shadow: 0 0 10px var(--ember);
}

/* ---------- HUD ---------- */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.hud {
  position: fixed;
  right: var(--pad-x);
  bottom: var(--pad-x);
  z-index: 999;
  font-family: var(--f-mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  opacity: 0;
  animation: fadeIn 1s 2s var(--ease-out) forwards;
  background: rgba(12, 10, 8, 0.4);
  backdrop-filter: blur(6px);
  border: 1px solid var(--line);
  padding: 10px 14px;
  border-radius: 4px;
}
.hud__row { display: flex; gap: 10px; min-width: 180px; }
.hud__k { width: 40px; color: var(--ember-soft); }
.hud__v { flex: 1; text-align: right; color: var(--paper); opacity: 0.7; }

@media (max-width: 800px) { .hud { display: none; } }

/* ---------- Utility: reveal ---------- */
[data-reveal] { opacity: 0; transform: translateY(20px); }

@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;
  }
  [data-reveal] { opacity: 1; transform: none; }
  .process__track-wrap { overflow-x: auto; }
  .process__track { transform: none !important; }
  .hero__title .fill { transform: none !important; }
  .stage, .service, .principle { opacity: 1 !important; transform: none !important; }
}

/* ========================================================================
   NAV
   ======================================================================== */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: var(--s-6);
  padding: 1rem var(--pad-x);
  font-family: var(--f-sans);
  font-size: 14px;
  background: linear-gradient(180deg, rgba(12, 10, 8, 0.85) 0%, rgba(12, 10, 8, 0) 100%);
  backdrop-filter: blur(10px) saturate(1.1);
  -webkit-backdrop-filter: blur(10px) saturate(1.1);
  transition: padding 0.4s var(--ease-out), background 0.4s var(--ease-out);
}
.nav.is-scrolled {
  padding-top: 0.7rem; padding-bottom: 0.7rem;
  background: rgba(12, 10, 8, 0.95);
  border-bottom: 1px solid var(--line);
}

.nav__brand {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--f-display);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.01em;
  font-variation-settings: "opsz" 48, "SOFT" 0, "WONK" 0;
}
.nav__mark {
  width: 30px; height: 30px;
  color: var(--paper);
  transition: transform 0.5s var(--ease-spring);
}
.nav__mark .mark-spark { fill: var(--ember); }
.nav__brand:hover .nav__mark { transform: rotate(-10deg) scale(1.08); }
.nav__wordmark em {
  font-style: italic;
  color: var(--ember-soft);
  font-variation-settings: "opsz" 48, "SOFT" 50;
}

.nav__menu {
  display: flex;
  gap: clamp(1rem, 2vw, 2.25rem);
  justify-content: center;
}
.nav__menu a {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 4px 0;
  color: var(--paper);
  opacity: 0.75;
  transition: opacity 0.25s var(--ease-out);
}
.nav__menu a::after {
  content: "";
  position: absolute;
  left: 0; right: 100%;
  bottom: 0;
  height: 1px;
  background: var(--ember);
  transition: right 0.4s var(--ease-out);
}
.nav__menu a:hover { opacity: 1; }
.nav__menu a:hover::after { right: 0; }
.nav__num {
  font-family: var(--f-mono);
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.08em;
}

@media (max-width: 900px) {
  .nav__menu { display: none; }
  .nav { grid-template-columns: auto 1fr auto; }
}

.nav__cta {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 10px 18px;
  border: 1px solid var(--paper);
  border-radius: 100px;
  font-size: 13px;
  letter-spacing: 0.02em;
  transition: background 0.3s var(--ease-out), color 0.3s var(--ease-out), transform 0.3s var(--ease-out);
}
.nav__cta:hover { background: var(--paper); color: var(--ink); }
.nav__cta svg { transition: transform 0.4s var(--ease-out); }
.nav__cta:hover svg { transform: translateX(4px); }

@media (max-width: 520px) {
  .nav__cta span { display: none; }
  .nav__cta { padding: 10px; }
}

/* ========================================================================
   HERO
   ======================================================================== */
.hero {
  position: relative;
  min-height: 100vh;
  padding: clamp(6rem, 10vw, 9rem) var(--pad-x) var(--s-8);
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto 1fr auto;
  gap: var(--s-4);
  overflow: hidden;
}

.hero__marker {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  opacity: 0.8;
}
.hero__marker .tick {
  color: var(--ember);
  font-size: 12px;
  animation: pulse 3s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.hero__kicker {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--paper);
  opacity: 0.7;
  text-transform: uppercase;
  margin-top: var(--s-4);
}
.kicker__dot {
  width: 7px; height: 7px;
  background: #6DF07A;
  border-radius: 50%;
  box-shadow: 0 0 12px #6DF07A;
  animation: pulse 2s infinite;
}

/* Hero title -------- */
.hero__title {
  font-family: var(--f-display);
  font-size: var(--t-disp);
  line-height: 0.92;
  letter-spacing: -0.035em;
  font-weight: 400;
  font-variation-settings: "opsz" 144, "SOFT" 0, "WONK" 0;
  margin-top: auto;
  margin-bottom: auto;
  padding: clamp(2rem, 6vh, 6rem) 0;
  max-width: 1400px;
  color: var(--paper);
}
.hero__title .line {
  display: block;
  overflow: hidden;
  padding: 0.02em 0;
}
.hero__title .fill {
  display: inline-block;
  will-change: transform;
}
.hero__title em.italic {
  font-style: italic;
  font-weight: 300;
  color: var(--ember);
  font-variation-settings: "opsz" 144, "SOFT" 100, "WONK" 1;
}

/* Hero bottom row */
.hero__bottom {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--s-6);
  align-items: end;
  margin-top: var(--s-4);
}
.hero__sub {
  max-width: 480px;
  font-size: var(--t-lg);
  color: var(--paper);
  opacity: 0.75;
  line-height: 1.45;
  font-weight: 400;
}
.hero__meta {
  text-align: right;
  font-family: var(--f-mono);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.meta__scroll {
  display: inline-flex; align-items: center; gap: 8px;
  flex-direction: column-reverse;
}
.meta__scroll svg { animation: scrolldot 2s infinite ease-in-out; }
.meta__scrolldot { animation: scrolldotInner 2s infinite ease-in-out; }
@keyframes scrolldotInner {
  0% { transform: translateY(0); opacity: 1; }
  80% { transform: translateY(7px); opacity: 0; }
  81% { transform: translateY(0); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}

/* Hero visual */
.hero__visual {
  position: absolute;
  top: 50%;
  right: clamp(-8rem, -4vw, -3rem);
  transform: translateY(-50%);
  width: clamp(400px, 46vw, 700px);
  max-width: 55vw;
  pointer-events: none;
  opacity: 0.9;
  z-index: 0;
}
.hero__title, .hero__kicker, .hero__bottom, .hero__marker { position: relative; z-index: 2; }

.forge { width: 100%; height: auto; }
.forge * { transform-box: fill-box; }
.forge__ember, .forge__molten, .forge__rings, .forge__ticks { transform-box: view-box; }
.forge__ember { transform-origin: 300px 300px; animation: emberPulse 4s ease-in-out infinite; }
@keyframes emberPulse {
  0%, 100% { opacity: 0.75; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.05); }
}
.forge__rings { transform-origin: 300px 300px; animation: spin 80s linear infinite; }
.forge__ticks { transform-origin: 300px 300px; animation: spin 120s linear infinite reverse; }
@keyframes spin { to { transform: rotate(360deg); } }

.forge__molten { transform-origin: 300px 300px; animation: moltenPulse 5s ease-in-out infinite; mix-blend-mode: screen; }
@keyframes moltenPulse {
  0%, 100% { transform: scale(1) rotate(0); }
  50% { transform: scale(1.04) rotate(3deg); }
}

/* Anvil + phone use SVG transform attributes; skip CSS transform animations to avoid coord conflicts. */

.spark { opacity: 0; }
.spark.s1 { animation: sparkBlink 2.3s infinite; }
.spark.s2 { animation: sparkBlink 2.1s 0.3s infinite; }
.spark.s3 { animation: sparkBlink 2.8s 0.7s infinite; }
.spark.s4 { animation: sparkBlink 2.5s 1.1s infinite; }
.spark.s5 { animation: sparkBlink 2.0s 1.5s infinite; }
.spark.dot1 { animation: sparkBlink 1.8s infinite; }
.spark.dot2 { animation: sparkBlink 2.3s 0.4s infinite; }
.spark.dot3 { animation: sparkBlink 1.6s 0.9s infinite; }
.spark.dot4 { animation: sparkBlink 2.1s 1.3s infinite; }
@keyframes sparkBlink {
  0%, 100% { opacity: 0; }
  40% { opacity: 1; }
  60% { opacity: 0.5; }
}

.hero__edge {
  position: absolute;
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--muted);
  text-transform: uppercase;
  opacity: 0.4;
  writing-mode: vertical-rl;
  text-orientation: mixed;
}
.hero__edge--l { left: calc(var(--pad-x) / 2 - 12px); top: 40%; }
.hero__edge--r { right: calc(var(--pad-x) / 2 - 12px); top: 40%; transform: rotate(180deg); }

@media (max-width: 900px) {
  .hero__visual { position: absolute; opacity: 0.3; width: 90%; right: -20%; top: 50%; }
  .hero__edge { display: none; }
  .hero__bottom { grid-template-columns: 1fr; }
  .hero__meta { text-align: left; }
}

/* ========================================================================
   MARQUEE
   ======================================================================== */
.marquee {
  position: relative;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  padding: 1.5rem 0;
  background: var(--bg-deeper);
}
.marquee__track {
  display: flex;
  gap: 2.5rem;
  white-space: nowrap;
  font-family: var(--f-display);
  font-size: clamp(1.5rem, 3vw, 2.75rem);
  font-variation-settings: "opsz" 144, "SOFT" 0, "WONK" 0;
  letter-spacing: -0.01em;
  font-weight: 300;
  color: var(--paper);
  animation: marqueeScroll 40s linear infinite;
  will-change: transform;
}
.marquee__track span { flex-shrink: 0; }
.marquee__track .dot { color: var(--ember); font-size: 0.7em; opacity: 0.7; }
@keyframes marqueeScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.marquee:hover .marquee__track { animation-play-state: paused; }

/* ========================================================================
   Section Head (shared)
   ======================================================================== */
.section-head {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: var(--s-7);
}
.section-head__num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-size: 10px;
}
.section-head__label::before { content: "— "; opacity: 0.5; }
.section-head--light { color: var(--muted); }

/* ========================================================================
   MANIFESTO (paper section)
   ======================================================================== */
.paper {
  background: var(--paper);
  color: var(--ink);
  --muted: var(--muted-light);
  --line: var(--line-dark);
  --line-strong: var(--line-dark-strong);
}

.manifesto {
  position: relative;
  padding: clamp(5rem, 12vw, 10rem) var(--pad-x);
  overflow: hidden;
}
.manifesto__content {
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
}
.manifesto__text {
  font-family: var(--f-display);
  font-size: clamp(1.75rem, 4.5vw, 4rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-variation-settings: "opsz" 100, "SOFT" 30, "WONK" 0;
  font-weight: 400;
  color: var(--muted-light);
}
.manifesto__text [data-word] {
  opacity: 0.25;
  transition: opacity 0.3s var(--ease-out), color 0.3s var(--ease-out);
}
.manifesto__text [data-word].is-lit { opacity: 1; color: var(--ink); }

.manifesto__byline {
  margin-top: clamp(3rem, 6vw, 5rem);
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 24px;
  align-items: center;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted-light);
}
.byline__line { height: 1px; background: var(--ink); width: 60px; }
.byline__content { display: flex; gap: 24px; flex-wrap: wrap; }
.byline__content em {
  font-family: var(--f-display);
  font-style: italic;
  font-weight: 400;
  color: var(--ink);
  font-size: 14px;
  text-transform: none;
  letter-spacing: 0;
  font-variation-settings: "opsz" 48, "SOFT" 60;
}

.manifesto__seal {
  position: absolute;
  right: var(--pad-x);
  top: var(--s-8);
  width: 140px; height: 140px;
  color: var(--ink);
  opacity: 0.9;
  animation: spin 60s linear infinite;
}
@media (max-width: 900px) {
  .manifesto__seal { width: 90px; height: 90px; top: 4rem; right: 1.5rem; }
}

/* ========================================================================
   SERVICES
   ======================================================================== */
.services {
  padding: clamp(5rem, 10vw, 9rem) var(--pad-x);
  position: relative;
}
.services__title {
  font-family: var(--f-display);
  font-size: var(--t-3xl);
  line-height: 1;
  letter-spacing: -0.03em;
  font-weight: 400;
  font-variation-settings: "opsz" 144, "SOFT" 0;
  margin-bottom: var(--s-8);
  color: var(--paper);
}
.services__title span[data-reveal]:nth-child(3) {
  font-style: italic;
  color: var(--ember);
  font-variation-settings: "opsz" 144, "SOFT" 100, "WONK" 1;
}

.services__list {
  border-top: 1px solid var(--line-strong);
}
.service {
  position: relative;
  display: grid;
  grid-template-columns: 80px 1fr auto 60px;
  gap: var(--s-5);
  align-items: center;
  padding: clamp(1.5rem, 3vw, 2.75rem) 0;
  border-bottom: 1px solid var(--line);
  transition: padding-left 0.5s var(--ease-out);
}
.service::before {
  content: "";
  position: absolute;
  left: -100%; top: 0;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent 0%, var(--ember) 30%, var(--ember) 70%, transparent 100%);
  opacity: 0.06;
  transition: left 0.6s var(--ease-out);
  pointer-events: none;
}
.service:hover::before { left: 0; }
.service:hover { padding-left: 20px; }

.service__num {
  font-family: var(--f-mono);
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.1em;
}
.service__text { display: flex; flex-direction: column; gap: 6px; max-width: 620px; }
.service__name {
  font-family: var(--f-display);
  font-size: clamp(1.5rem, 2.5vw, 2.25rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-weight: 400;
  font-variation-settings: "opsz" 60, "SOFT" 20;
  color: var(--paper);
  transition: color 0.3s var(--ease-out);
}
.service:hover .service__name { color: var(--ember); font-variation-settings: "opsz" 60, "SOFT" 100, "WONK" 1; font-style: italic; }
.service__desc {
  font-size: var(--t-base);
  color: var(--muted);
  max-width: 56ch;
  line-height: 1.55;
}
.service__icon {
  width: 56px; height: 56px;
  display: grid; place-items: center;
  color: var(--paper);
  opacity: 0.6;
  transition: opacity 0.4s var(--ease-out), transform 0.5s var(--ease-spring), color 0.4s var(--ease-out);
}
.service__icon svg { width: 48px; height: 48px; }
.service:hover .service__icon { opacity: 1; transform: rotate(-6deg) scale(1.1); color: var(--ember); }

.service__arrow {
  font-size: 24px;
  color: var(--muted);
  opacity: 0;
  transform: translateX(-10px);
  transition: opacity 0.4s var(--ease-out), transform 0.4s var(--ease-out), color 0.4s var(--ease-out);
}
.service:hover .service__arrow { opacity: 1; transform: translateX(0); color: var(--ember); }

@media (max-width: 820px) {
  .service { grid-template-columns: 50px 1fr auto; gap: 1rem; }
  .service__icon { display: none; }
  .service__arrow { display: none; }
}

/* ========================================================================
   PROCESS (horizontal)
   ======================================================================== */
.process {
  position: relative;
  padding: clamp(5rem, 10vw, 9rem) 0 clamp(3rem, 6vw, 6rem);
  overflow: hidden;
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-elev) 100%);
}
.process .section-head,
.process__intro {
  padding: 0 var(--pad-x);
}
.process__title {
  font-family: var(--f-display);
  font-size: var(--t-3xl);
  line-height: 1;
  letter-spacing: -0.03em;
  font-weight: 400;
  font-variation-settings: "opsz" 144;
  margin-bottom: 1rem;
}
.process__title [data-reveal]:nth-child(n+4) {
  font-style: italic;
  color: var(--ember);
  font-variation-settings: "opsz" 144, "SOFT" 100, "WONK" 1;
}
.process__lede {
  font-size: var(--t-lg);
  max-width: 540px;
  color: var(--muted);
  margin-bottom: var(--s-8);
}

.process__track-wrap {
  overflow: hidden;
  padding-left: var(--pad-x);
}
.process__track {
  display: flex;
  gap: clamp(1rem, 2vw, 2rem);
  padding-right: var(--pad-x);
  will-change: transform;
}

.stage {
  flex: 0 0 clamp(300px, 28vw, 420px);
  min-height: 540px;
  padding: clamp(1.25rem, 2vw, 2rem);
  border: 1px solid var(--line);
  background: var(--bg);
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  position: relative;
  transition: border-color 0.4s var(--ease-out), transform 0.4s var(--ease-out);
}
.stage:hover { border-color: var(--line-strong); transform: translateY(-4px); }
.stage--accent {
  background: linear-gradient(135deg, #18110C 0%, #0C0A08 100%);
  border-color: rgba(255, 74, 28, 0.3);
}
.stage--accent::after {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(circle at 70% 30%, rgba(255, 74, 28, 0.14) 0%, transparent 60%);
  pointer-events: none;
  border-radius: inherit;
}

.stage__head {
  display: flex; align-items: baseline; gap: 10px;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.stage__num { color: var(--ember); font-weight: 500; }
.stage__title {
  font-family: var(--f-display);
  font-size: var(--t-xl);
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-weight: 400;
  font-variation-settings: "opsz" 48, "SOFT" 30;
  color: var(--paper);
  margin-bottom: 0.25rem;
}
.stage__desc {
  font-size: var(--t-base);
  color: var(--muted);
  max-width: 48ch;
  line-height: 1.6;
}
.stage__svg {
  margin-top: auto;
  width: 100%;
  aspect-ratio: 1;
  color: var(--paper);
  opacity: 0.75;
}
.stage--accent .stage__svg { color: var(--ember); opacity: 1; }

.process__footer {
  padding: var(--s-6) var(--pad-x) 0;
  display: flex;
  justify-content: flex-end;
}
.process__scrollhint {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.process__scrollhint .arrow {
  display: inline-block;
  animation: scrollHint 2s infinite;
  color: var(--ember);
  font-size: 14px;
}
@keyframes scrollHint {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(6px); }
}

/* ========================================================================
   PRINCIPLES (paper)
   ======================================================================== */
.principles {
  padding: clamp(5rem, 10vw, 9rem) var(--pad-x);
}
.principles__title {
  font-family: var(--f-display);
  font-size: var(--t-3xl);
  line-height: 1;
  letter-spacing: -0.03em;
  font-weight: 400;
  font-variation-settings: "opsz" 144, "SOFT" 0;
  margin-bottom: var(--s-8);
  max-width: 900px;
}
.principles__title [data-reveal]:nth-child(3),
.principles__title [data-reveal]:nth-child(6) {
  font-style: italic;
  color: var(--ember);
  font-variation-settings: "opsz" 144, "SOFT" 100, "WONK" 1;
}

.principles__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 0;
  border-top: 1px solid var(--ink);
  border-left: 1px solid var(--ink);
}
.principle {
  padding: clamp(1.5rem, 3vw, 2.75rem);
  border-right: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  background: var(--paper);
  position: relative;
  transition: background 0.4s var(--ease-out);
  cursor: default;
}
.principle:hover { background: var(--paper-warm); }
.principle::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(255, 74, 28, 0.10) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
.principle:hover::before { opacity: 1; }

.principle__art {
  width: 72px; height: 72px;
  margin-bottom: var(--s-5);
  color: var(--ink);
}
.principle__art svg { width: 100%; height: 100%; }
.principle h3 {
  font-family: var(--f-display);
  font-size: clamp(1.25rem, 2vw, 1.75rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
  font-weight: 400;
  font-variation-settings: "opsz" 48, "SOFT" 20;
  margin-bottom: 0.75rem;
  color: var(--ink);
}
.principle p {
  font-size: var(--t-base);
  color: var(--muted-light);
  line-height: 1.55;
  max-width: 40ch;
}

/* ========================================================================
   CONTACT
   ======================================================================== */
.contact {
  position: relative;
  padding: clamp(5rem, 10vw, 9rem) var(--pad-x) clamp(2rem, 4vw, 4rem);
  overflow: hidden;
  background: radial-gradient(ellipse at 70% 20%, rgba(255, 74, 28, 0.12) 0%, transparent 60%), var(--bg);
}
.contact__inner {
  position: relative;
  z-index: 2;
}
.contact__title {
  font-family: var(--f-display);
  font-size: clamp(4rem, 14vw, 16rem);
  line-height: 0.88;
  letter-spacing: -0.05em;
  font-weight: 400;
  font-variation-settings: "opsz" 144, "SOFT" 0;
  margin-bottom: var(--s-8);
}
.contact__title .line {
  display: block;
  overflow: hidden;
}
.contact__title .line [data-split-line] {
  display: inline-block;
}
.contact__title em {
  font-style: italic;
  color: var(--ember);
  font-variation-settings: "opsz" 144, "SOFT" 100, "WONK" 1;
}

.contact__email {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  padding: 1rem 0;
  font-family: var(--f-display);
  font-size: clamp(1.5rem, 3.5vw, 2.75rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
  font-weight: 400;
  font-variation-settings: "opsz" 60, "SOFT" 30;
  color: var(--paper);
  border-bottom: 1px solid var(--line-strong);
  margin-bottom: var(--s-5);
  transition: border-color 0.3s var(--ease-out);
  position: relative;
  overflow: hidden;
}

.contact__phone {
  display: inline-flex;
  align-items: baseline;
  gap: 14px;
  padding: 0.4rem 0;
  margin-left: var(--s-6);
  margin-bottom: var(--s-8);
  color: var(--paper);
  transition: color 0.3s var(--ease-out);
}
.contact__phone-k {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}
.contact__phone-n {
  font-family: var(--f-display);
  font-size: clamp(1.2rem, 2.5vw, 2rem);
  font-weight: 400;
  font-variation-settings: "opsz" 60, "SOFT" 30;
  letter-spacing: 0.02em;
  border-bottom: 1px solid var(--line);
  transition: border-color 0.3s var(--ease-out), color 0.3s var(--ease-out);
}
.contact__phone:hover .contact__phone-n { color: var(--ember); border-color: var(--ember); }
@media (max-width: 720px) {
  .contact__phone { margin-left: 0; display: flex; flex-direction: column; gap: 4px; }
}
.contact__email:hover { border-color: var(--ember); }
.contact__email-text {
  display: inline-block;
  position: relative;
  overflow: hidden;
  height: 1.1em;
}
.contact__email-text span {
  display: block;
  transition: transform 0.5s var(--ease-out);
}
.contact__email-text span:last-child {
  position: absolute;
  top: 100%;
  left: 0;
  color: var(--ember);
}
.contact__email:hover .contact__email-text span { transform: translateY(-100%); }
.contact__email svg { transition: transform 0.4s var(--ease-out); }
.contact__email:hover svg { transform: translate(8px, -8px); color: var(--ember); }

.contact__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--s-6);
  max-width: 1200px;
  border-top: 1px solid var(--line);
  padding-top: var(--s-6);
}
.contact__col { display: flex; flex-direction: column; gap: 10px; }
.contact__label {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ember);
}
.contact__col p {
  color: var(--muted);
  font-size: var(--t-base);
  line-height: 1.5;
  max-width: 36ch;
}

/* Giant background mark */
.contact__mark {
  position: absolute;
  bottom: -0.15em;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--f-display);
  font-size: var(--t-mega);
  line-height: 0.8;
  letter-spacing: -0.04em;
  font-weight: 400;
  font-variation-settings: "opsz" 144, "SOFT" 0;
  color: transparent;
  -webkit-text-stroke: 1px var(--line-strong);
  text-stroke: 1px var(--line-strong);
  white-space: nowrap;
  pointer-events: none;
  z-index: 1;
  opacity: 0.8;
}

/* ========================================================================
   FOOTER
   ======================================================================== */
.footer {
  padding: var(--s-7) var(--pad-x) var(--s-5);
  border-top: 1px solid var(--line);
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--muted);
  position: relative;
  z-index: 5;
  background: var(--bg);
}
.footer__row {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: var(--s-6);
  padding-bottom: var(--s-6);
  border-bottom: 1px solid var(--line);
}
.footer__brand {
  display: flex; gap: 14px; align-items: flex-start;
}
.footer__mark {
  width: 32px; height: 32px;
  color: var(--paper);
  flex-shrink: 0;
}
.footer__name {
  font-family: var(--f-display);
  font-size: 15px;
  color: var(--paper);
  letter-spacing: -0.01em;
  text-transform: none;
  font-weight: 400;
}
.footer__line {
  font-family: var(--f-sans);
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
  letter-spacing: 0;
  text-transform: none;
}
.footer__col { display: flex; flex-direction: column; gap: 4px; }
.footer__k {
  font-size: 10px;
  color: var(--ember);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.footer__col a:hover { color: var(--paper); }
.footer__baseline {
  display: flex;
  justify-content: space-between;
  padding-top: var(--s-5);
  gap: var(--s-5);
  flex-wrap: wrap;
}
.footer__sig { font-style: italic; opacity: 0.6; }

@media (max-width: 720px) {
  .footer__row { grid-template-columns: 1fr 1fr; }
  .footer__brand { grid-column: 1 / -1; }
  .footer__baseline { flex-direction: column; gap: 8px; }
}

/* ========================================================================
   404 PAGE
   ======================================================================== */
.err {
  position: relative;
  min-height: 100vh;
  padding: clamp(6rem, 10vw, 9rem) var(--pad-x) clamp(2rem, 5vw, 4rem);
  overflow: hidden;
  background:
    radial-gradient(ellipse at 78% 40%, rgba(255, 74, 28, 0.10) 0%, transparent 55%),
    var(--bg);
  display: flex;
  flex-direction: column;
  gap: clamp(1rem, 2vw, 2rem);
}

.err__marker {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}
.err__marker .tick {
  color: var(--ember);
  font-size: 12px;
  animation: pulse 3s infinite;
}

.err__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
  flex: 1;
}

.err__text { display: flex; flex-direction: column; gap: clamp(1.25rem, 2vw, 2rem); min-width: 0; }

.err__display {
  font-family: var(--f-display);
  font-size: clamp(7rem, 22vw, 20rem);
  line-height: 0.85;
  letter-spacing: -0.05em;
  font-weight: 400;
  font-variation-settings: "opsz" 144, "SOFT" 0, "WONK" 0;
  color: var(--paper);
  display: inline-flex;
  align-items: baseline;
  gap: 0;
  margin-bottom: -0.05em;
}
.err__display .d-num { display: inline-block; }
.err__display .d-zero {
  display: inline-block;
  font-style: italic;
  color: var(--ember);
  font-variation-settings: "opsz" 144, "SOFT" 100, "WONK" 1;
  transform-origin: center;
  animation: zeroWobble 5s ease-in-out infinite;
  position: relative;
}
@keyframes zeroWobble {
  0%, 100% { transform: rotate(0) scale(1); }
  50% { transform: rotate(-4deg) scale(1.02); }
}
.err__display .d-zero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 50%, rgba(255, 74, 28, 0.35) 0%, transparent 60%);
  filter: blur(20px);
  z-index: -1;
  pointer-events: none;
}

.err__title {
  font-family: var(--f-display);
  font-size: clamp(2rem, 4.2vw, 3.6rem);
  line-height: 1.0;
  letter-spacing: -0.025em;
  font-weight: 400;
  font-variation-settings: "opsz" 144, "SOFT" 0;
  color: var(--paper);
  max-width: 14ch;
}
.err__title .line { display: block; overflow: hidden; padding: 0.02em 0; }
.err__title .fill { display: inline-block; will-change: transform; }
.err__title em {
  font-style: italic;
  color: var(--ember);
  font-variation-settings: "opsz" 144, "SOFT" 100, "WONK" 1;
}

.err__sub {
  font-size: var(--t-lg);
  line-height: 1.45;
  color: var(--paper);
  opacity: 0.75;
  max-width: 42ch;
}

.err__actions {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.5vw, 2rem);
  flex-wrap: wrap;
  margin-top: var(--s-3);
}

.err__home {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 14px 22px 14px 18px;
  background: var(--paper);
  color: var(--ink);
  border-radius: 100px;
  font-family: var(--f-sans);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: background 0.35s var(--ease-out), color 0.35s var(--ease-out);
}
.err__home:hover { background: var(--ember); color: var(--paper); }
.err__home svg { transition: transform 0.4s var(--ease-out); }
.err__home:hover svg { transform: translateX(-4px); }

.err__report {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 6px 0;
  border-bottom: 1px solid transparent;
  transition: color 0.3s var(--ease-out), border-color 0.3s var(--ease-out);
}
.err__report:hover { color: var(--paper); border-bottom-color: var(--ember); }

.err__path {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: rgba(242, 236, 226, 0.04);
  border: 1px solid var(--line);
  border-radius: 4px;
  max-width: max-content;
  font-family: var(--f-mono);
  font-size: 12px;
}
.err__path-k {
  color: var(--ember);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 10px;
}
.err__path code {
  color: var(--paper);
  word-break: break-all;
  opacity: 0.85;
}

.err__footnote {
  margin-top: auto;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  padding-top: var(--s-5);
  border-top: 1px solid var(--line);
}
.err__footnote span:last-child { text-transform: none; font-style: italic; letter-spacing: 0.02em; opacity: 0.85; }

.err__visual {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.broken { width: 100%; max-width: 560px; height: auto; }
.broken * { transform-box: view-box; }
.broken__ember { transform-origin: 250px 250px; animation: emberPulse 5s ease-in-out infinite; }
.broken__rings { transform-origin: 250px 250px; animation: spin 200s linear infinite; }
.broken__chunk, .broken__hammer { transform-origin: center; animation: floatDrift 6s ease-in-out infinite; }
.broken__chunk { animation-delay: -1s; }
@keyframes floatDrift {
  0%, 100% { transform: translate(var(--tx, 0), 0) rotate(var(--tr, 0)); }
  50% { transform: translate(var(--tx, 0), -6px) rotate(calc(var(--tr, 0) + 2deg)); }
}
.broken__top { transform-origin: center; animation: anvilSag 8s ease-in-out infinite; }
@keyframes anvilSag {
  0%, 100% { transform: translate(250px, 250px) rotate(-14deg) translate(-250px, -250px); }
  50% { transform: translate(250px, 250px) rotate(-16deg) translate(-250px, -250px); }
}

.broken__sparks .sp { opacity: 0; }
.broken__sparks .sp.a { animation: sparkBlink 2.1s infinite; }
.broken__sparks .sp.b { animation: sparkBlink 2.4s 0.3s infinite; }
.broken__sparks .sp.c { animation: sparkBlink 2.0s 0.7s infinite; }
.broken__sparks .sp.d { animation: sparkBlink 2.6s 1.0s infinite; }
.broken__sparks .sp.e { animation: sparkBlink 2.2s 1.4s infinite; }
.broken__sparks .sp.f { animation: sparkBlink 2.5s 0.2s infinite; }
.broken__sparks .sp.g { animation: sparkBlink 2.1s 0.6s infinite; }
.broken__sparks .sp.h { animation: sparkBlink 2.3s 0.9s infinite; }
.broken__sparks .sp.i { animation: sparkBlink 2.7s 1.3s infinite; }

.err__edge {
  position: absolute;
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--muted);
  text-transform: uppercase;
  opacity: 0.4;
  writing-mode: vertical-rl;
  text-orientation: mixed;
}
.err__edge--l { left: calc(var(--pad-x) / 2 - 12px); top: 42%; }
.err__edge--r { right: calc(var(--pad-x) / 2 - 12px); top: 38%; transform: rotate(180deg); }

@media (max-width: 900px) {
  .err__grid { grid-template-columns: 1fr; }
  .err__visual { order: -1; width: 70%; margin: 0 auto; max-width: 340px; }
  .err__edge { display: none; }
  .err__display { font-size: clamp(6rem, 38vw, 14rem); }
}

/* ========================================================================
   Animated reveal classes for data-split
   ======================================================================== */
.fill.is-in { transform: translateY(0); transition: transform 1s var(--ease-out); }
[data-split-line].is-in { transform: translateY(0); transition: transform 1s var(--ease-out); }
[data-reveal].is-in { opacity: 1; transform: translateY(0); transition: opacity 1s var(--ease-out), transform 1s var(--ease-out); }

/* Magnetic button glow */
[data-magnetic] { position: relative; }

/* stage reveal */
.stage { opacity: 0.5; transform: translateY(20px); transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out); }
.stage.is-in { opacity: 1; transform: translateY(0); }

.principle { opacity: 0; transform: translateY(24px); transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out); }
.principle.is-in { opacity: 1; transform: translateY(0); }

.service { opacity: 0; transform: translateY(16px); transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out); }
.service.is-in { opacity: 1; transform: translateY(0); }
