/* Super Intellect: scroll story. Dark by brand, one accent (gold, from the teaser). */

/* Fonts match motion.dev: TASA Orbiter for text, Geist Mono for small labels. */
@font-face {
  font-family: "TASA Orbiter";
  src: url("fonts/TASAOrbiter-Variable.woff2") format("woff2");
  font-weight: 400 800;
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("fonts/GeistMono-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --bg: #08090b;
  --text: #ecedf0;
  --muted: #c6cad3;
  --faint: #5c616c;
  --gold: #c9a24a;
  --gutter: clamp(20px, 5vw, 72px);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg); color: var(--text);
  font-family: "TASA Orbiter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1.125rem; line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p { margin: 0; }

#particles { position: fixed; inset: 0; pointer-events: none; }

/* ---------- Brand ---------- */
.top { position: fixed; top: 0; left: 0; right: 0; z-index: 10; padding: 28px var(--gutter); text-align: center; pointer-events: none; }
.brand {
  pointer-events: auto;
  font-family: var(--mono); font-size: 0.8125rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted); text-decoration: none;
}
.brand:focus-visible, a:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 4px; }

/* ---------- White gradient type with a slow shine sweep ---------- */
.grad {
  background-image:
    linear-gradient(100deg, rgba(255, 255, 255, 0) 36%, rgba(255, 255, 255, 1) 50%, rgba(255, 255, 255, 0) 64%),
    linear-gradient(180deg, #ffffff 0%, #f5f7fc 45%, #c4cad8 100%);
  background-size: 260% 100%, 100% 100%;
  background-repeat: no-repeat;
  background-position: 140% 0, 0 0;
  -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
  animation: shine 6s ease-in-out infinite;
  filter: drop-shadow(0 2px 26px rgba(8, 9, 11, 0.85));
}
@keyframes shine {
  0%, 18% { background-position: 140% 0, 0 0; }
  62%, 100% { background-position: -40% 0, 0 0; }
}

/* ---------- 1. Intro (pinned; the line is driven by scroll) ---------- */
.intro { position: relative; height: 340vh; }
.intro-sticky {
  position: sticky; top: 0; height: 100vh; height: 100dvh;
  display: flex; align-items: center; justify-content: center;
  padding: 0 var(--gutter);
}
.intro-line {
  position: relative; max-width: 15em; text-align: center;
  font-size: clamp(2.2rem, 6.6vw, 5.8rem);
  font-weight: 700; letter-spacing: -0.045em; line-height: 1.06;
  will-change: opacity, transform;
}
.js .intro-line .c { visibility: hidden; }
.js .intro-line .c.on { visibility: visible; }
.caret {
  display: inline-block; width: 0; height: 0.88em; margin: 0 -0.03em;
  border-left: 0.06em solid var(--gold); vertical-align: -0.08em;
  animation: blink 1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* ---------- 2. Content (centred) ---------- */
.content {
  position: relative;
  min-height: 100vh; min-height: 100dvh;
  display: flex; align-items: center; justify-content: center;
  padding: 18vh var(--gutter) 14vh;
}
.stack { width: 100%; max-width: 700px; text-align: center; display: grid; justify-items: center; gap: 0; }
.lead {
  font-size: clamp(2rem, 5vw, 3.6rem);
  font-weight: 700; letter-spacing: -0.04em; line-height: 1.08;
  max-width: 17em; margin-bottom: 0.9em;
}
.stack p { color: var(--muted); margin-bottom: 1.4em; max-width: 34em; text-shadow: 0 1px 18px rgba(8, 9, 11, 0.95); }
.cycle {
  font-family: var(--mono); font-size: 0.8125rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 2.4em !important;
}
.cycle span { display: inline-block; min-width: 13ch; text-align: left; color: var(--gold); }
.contact { margin-top: clamp(32px, 7vh, 72px); display: grid; justify-items: center; }
.contact h3 {
  font-family: var(--mono); font-size: 0.8125rem; font-weight: 400;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--gold); margin-bottom: 0.9em;
}
.contact p { margin-bottom: 0; }
a {
  color: var(--text);
  text-decoration: underline; text-decoration-color: rgba(201, 162, 74, 0.6); text-underline-offset: 4px;
  transition: text-decoration-color 0.25s ease, color 0.25s ease;
}
a:hover { color: var(--gold); text-decoration-color: var(--gold); }

/* Apple-style reveal: rise, settle, fade in (staggered by JS via --i) */
.js .reveal {
  opacity: 0; transform: translateY(44px) scale(0.985);
  transition: opacity 1.1s var(--ease), transform 1.1s var(--ease);
  transition-delay: calc(var(--i, 0) * 110ms);
}
.js .reveal.in { opacity: 1; transform: none; }

footer {
  position: relative; padding: 28px var(--gutter) 36px; text-align: center;
  font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint);
}

/* ---------- Mobile ---------- */
@media (max-width: 720px) {
  .intro { height: 300vh; }
  .intro-line { font-size: clamp(2rem, 10.5vw, 3.2rem); }
  .top { padding: 20px var(--gutter); }
}

/* ---------- Reduced motion: no pinned scrub, everything simply shown ---------- */
@media (prefers-reduced-motion: reduce) {
  .grad { animation: none; background-position: 140% 0, 0 0; }
  .intro { height: 100vh; height: 100dvh; }
  .js .intro-line .c { visibility: visible; }
  .caret { display: none; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
}
