/* =========================================================
   "Your Website Isn't Doing Its Job" — scroll story
   Palette journeys from dead paper -> live void.
   Through-line accent: acid wire.
   ========================================================= */
:root {
  --paper: #ECEAE3;   /* top: dead, pale */
  --void:  #07080A;   /* bottom: charged dark */
  --ink:   #0C0D10;   /* dark text */
  --pale:  #EDEEF0;   /* light text */
  --acid:  #D6FF3F;   /* the live wire — constant */
  --wire:  #5B6CFF;   /* technical signal */
  --mut-d: #6B6B66;   /* muted on light */
  --mut-l: #6E7178;   /* muted on dark */

  /* live theme vars, driven by JS scroll */
  --bg: var(--paper);
  --fg: var(--ink);
  --mut: var(--mut-d);

  --display: "Archivo Black", system-ui, sans-serif;   /* heavy headlines */
  --body: "Space Grotesk", system-ui, sans-serif;       /* readable body */
  --mono: "Space Mono", ui-monospace, monospace;        /* technical labels */
  --brand: "Orbitron", system-ui, sans-serif;           /* castara.io mark */
  --serif: "Fraunces", Georgia, serif;                  /* the quote moment */

  /* accent journey: deep lime on light -> bright glow on dark */
  --acid-deep: #8FB300;   /* reads on pale paper */
  --acid-live: #D6FF3F;   /* glows on dark */
  --acc: var(--acid-deep);
}

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

html { scroll-behavior: smooth; }
body {
  font-family: var(--body);
  background: var(--bg);
  color: var(--fg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  transition: color 0.1s linear;
}


/* Archivo Black is a single heavy weight — never apply faux bold */
.hero-head, .statement, .bigline, .result-head, .cta-head, .work-title, .work-num {
  font-family: var(--display);
  font-weight: 400;
}
.hero-sub, .statement-sub, .work-body, .lang-body, .result-sub, .cta-sub {
  font-family: var(--body);
}

/* fixed atmosphere layer carries the bg color transition */
.bg-layer {
  position: fixed;
  inset: 0;
  z-index: -2;
  background: var(--bg);
  transition: background-color 0.1s linear;
}

/* subtle grain for the premium "printed/film" feel */
.grain {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* scroll progress wire */
.progress {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 2px;
  z-index: 50;
  background: transparent;
}
.progress-fill {
  display: block;
  height: 100%;
  width: 0%;
  background: var(--acc);
  box-shadow: 0 0 12px var(--acc);
}

/* topbar */
.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.4rem clamp(1.25rem, 4vw, 3rem);
  mix-blend-mode: difference;
  color: #fff;
}
.mark { font-family: var(--brand); font-weight: 800; font-size: 1rem; letter-spacing: 0.04em; }
.mark-meta { font-family: var(--mono); font-size: 0.8rem; letter-spacing: 0.05em; opacity: 0.8; }

/* shared layout */
main { position: relative; z-index: 1; }
section { padding-inline: clamp(1.25rem, 6vw, 6rem); }
.wrap { max-width: 1100px; margin-inline: auto; width: 100%; }

.eyebrow, .kicker {
  font-family: var(--mono);
  font-size: clamp(0.75rem, 1.4vw, 0.9rem);
  letter-spacing: 0.18em;
  text-transform: lowercase;
  color: var(--wire);
  margin-bottom: 1.5rem;
}

.accent-word { color: var(--acc); }

/* ============ HERO ============ */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 1200px;
  margin-inline: auto;
}
.hero-head {
  font-weight: 700;
  font-size: clamp(3rem, 11vw, 9.5rem);
  line-height: 0.92;
  letter-spacing: -0.03em;
}
.line { display: block; overflow: hidden; }
.line-inner { display: block; will-change: transform; }
.hero-sub {
  margin-top: 2rem;
  max-width: 30ch;
  font-size: clamp(1.1rem, 2.2vw, 1.5rem);
  font-weight: 400;
  color: var(--mut);
}
.scrollcue {
  margin-top: 4rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--mut);
}
.scrollcue-line {
  width: 60px; height: 1px;
  background: currentColor;
  transform-origin: left;
  animation: cue 2s ease-in-out infinite;
}
@keyframes cue { 0%,100%{transform:scaleX(0.3);opacity:.4} 50%{transform:scaleX(1);opacity:1} }

/* ============ ACT statements ============ */
.act { min-height: 100vh; display: flex; align-items: center; }
.act-tight { min-height: 80vh; }
.statement {
  font-weight: 700;
  font-size: clamp(2.2rem, 6.5vw, 5.5rem);
  line-height: 1.0;
  letter-spacing: -0.025em;
}
.statement + .statement { margin-top: 0.5rem; }
.statement-accent { color: var(--fg); }
.statement-sub {
  margin-top: 2rem;
  font-size: clamp(1.1rem, 2.4vw, 1.7rem);
  color: var(--mut);
  font-weight: 400;
}
.bigline {
  margin-top: 0.5rem;
  font-size: clamp(1.8rem, 5.5vw, 4.5rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
  color: var(--acc);
}
.hl { color: var(--acc); }
.hl-strong { color: var(--acc); }
.strike { position: relative; color: var(--mut); }
.strike::after {
  content: "";
  position: absolute; left: -2%; right: -2%; top: 52%;
  height: 0.09em;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
}
.strike.is-struck::after { transform: scaleX(1); transition: transform 0.6s cubic-bezier(.6,0,.2,1); }

/* ============ SIGNATURE — IGNITION ============ */
.ignite {
  min-height: 130vh;
  display: flex;
  align-items: center;
}
.ignite-text {
  max-width: 1000px;
  margin-inline: auto;
  font-weight: 600;
  font-size: clamp(1.6rem, 4.4vw, 3.6rem);
  line-height: 1.18;
  letter-spacing: -0.01em;
}
.ignite-text .w {
  color: color-mix(in srgb, var(--fg) 16%, transparent);
  transition: color 0.05s linear;
}
.ignite-text .w.on { color: var(--fg); }
.ignite-text .w.hot { color: var(--acc); text-shadow: 0 0 18px var(--acc); }

/* ============ WORKS sequence ============ */
.works { padding-block: 14vh; }
.works-intro { margin-bottom: 8vh; }
.works-list { list-style: none; max-width: 1100px; margin-inline: auto; }
.work {
  padding: clamp(2rem, 5vw, 4rem) 0;
  border-top: 1px solid color-mix(in srgb, var(--fg) 18%, transparent);
  display: grid;
  grid-template-columns: minmax(80px, 0.4fr) 1fr;
  gap: clamp(1rem, 4vw, 4rem);
  align-items: start;
}
.work:last-child { border-bottom: 1px solid color-mix(in srgb, var(--fg) 18%, transparent); }
.work-num {
  font-family: var(--mono);
  font-size: clamp(1.2rem, 3vw, 2rem);
  color: var(--acc);
  font-weight: 700;
}
.work-title {
  font-weight: 700;
  font-size: clamp(1.8rem, 5vw, 3.4rem);
  line-height: 1.0;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}
.work-body {
  font-size: clamp(1.05rem, 2vw, 1.4rem);
  font-weight: 400;
  color: var(--mut);
  max-width: 40ch;
}

/* ============ LANGUAGE ============ */
.lang-body {
  margin-top: 3rem;
  max-width: 60ch;
  font-size: clamp(1.15rem, 2.3vw, 1.7rem);
  font-weight: 400;
  line-height: 1.45;
  color: var(--mut);
}
.lang-punch {
  margin-top: 2rem;
  font-weight: 600;
  font-size: clamp(1.4rem, 3.5vw, 2.6rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
}
.lang-punch em { color: var(--acc); font-style: italic; }

/* ============ RESULT ============ */
.result {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 1200px;
  margin-inline: auto;
}
.result-head {
  font-weight: 700;
  font-size: clamp(2.8rem, 10vw, 8.5rem);
  line-height: 0.92;
  letter-spacing: -0.03em;
}
.result-sub {
  margin-top: 2.5rem;
  max-width: 44ch;
  font-size: clamp(1.1rem, 2.2vw, 1.5rem);
  font-weight: 400;
  color: var(--mut);
}

/* ============ CTA ============ */
.cta {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  max-width: 1200px;
  margin-inline: auto;
}
.cta-head {
  font-weight: 700;
  font-size: clamp(2.6rem, 8vw, 6.5rem);
  line-height: 0.96;
  letter-spacing: -0.03em;
}
.cta-sub {
  margin-top: 2rem;
  max-width: 50ch;
  font-size: clamp(1.1rem, 2.2vw, 1.45rem);
  font-weight: 400;
  color: var(--mut);
}
.cta-btn {
  margin-top: 3rem;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--acc);
  color: #07080A;
  font-weight: 700;
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  letter-spacing: -0.01em;
  text-decoration: none;
  padding: 1.1rem 2.2rem;
  border-radius: 2px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.cta-btn::after { content: "\2192"; transition: transform 0.2s ease; }
.cta-btn:hover { transform: translateY(-2px); box-shadow: 0 0 40px color-mix(in srgb, var(--acc) 60%, transparent); }
.cta-btn:hover::after { transform: translateX(5px); }

/* ============ FOOTER ============ */
.foot-mark { font-family: var(--brand); font-weight: 800; letter-spacing: 0.04em; color: var(--fg); }
.foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2.5rem clamp(1.25rem, 6vw, 6rem) 3rem;
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  color: var(--mut);
  border-top: 1px solid color-mix(in srgb, var(--fg) 14%, transparent);
}

/* reveal baseline (JS animates these in) */
.reveal-up { opacity: 0; }

@media (max-width: 680px) {
  .work { grid-template-columns: 1fr; gap: 0.75rem; }
  .foot { flex-direction: column; gap: 0.75rem; align-items: flex-start; }
  .topbar { padding-inline: 1.25rem; }
}

/* reduced motion: show everything, kill transforms */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal-up { opacity: 1 !important; }
  .ignite-text .w { color: var(--fg) !important; }
  .scrollcue-line { animation: none; }
  * { transition-duration: 0.001ms !important; }
}

/* ============ QUOTE — the breath ============ */
.quote {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}
.quote-text {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(2rem, 6vw, 5rem);
  line-height: 1.12;
  letter-spacing: -0.01em;
  max-width: 18ch;
}
.quote-text em { font-style: italic; color: var(--acc); }
.quote-cite {
  margin-top: 2.5rem;
  font-family: var(--brand);
  font-weight: 800;
  font-style: normal;
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  color: var(--mut);
}
