/* ShapeMorph landing — reset, base, primitives */

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg-0);
  color: var(--text-1);
  font-family: var(--font-body);
  font-size: var(--step-body);
  line-height: 1.6;
  overflow-x: clip;
}

::selection { background: var(--accent); color: var(--bg-0); }

img, svg, video { display: block; max-width: 100%; }

a { color: inherit; }

h1, h2, h3, p { margin: 0; }

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--accent-soft);
  outline-offset: 3px;
  border-radius: 4px;
}

/* WebGL canvas sits behind everything */
#gl {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* Fallback backdrop when WebGL is unavailable */
body.no-webgl #gl { display: none; }
body.no-webgl::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(60% 50% at 72% 30%, var(--accent-dim), transparent 70%),
    radial-gradient(50% 45% at 20% 80%, rgba(139, 92, 246, 0.12), transparent 70%),
    var(--bg-0);
}

/* Readability scrim over the 3D field */
.scrim {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(120% 90% at 50% 50%, transparent 55%, rgba(5, 8, 16, 0.55) 100%),
    linear-gradient(180deg, rgba(5, 8, 16, 0.35), transparent 18%, transparent 82%, rgba(5, 8, 16, 0.5));
}

main { position: relative; z-index: 1; }

.section {
  position: relative;
  padding: var(--section-gap) var(--gutter);
  max-width: 1520px;
  margin-inline: auto;
}

/* Typographic primitives */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  font-family: var(--font-hud);
  font-size: var(--step-eyebrow);
  font-weight: 600;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--accent-soft);
  transition: color 0.6s;
}

.eyebrow::before {
  content: "";
  width: 2.2em;
  height: 1px;
  background: var(--accent);
  transition: background 0.6s;
}

.headline {
  font-family: var(--font-display);
  font-size: var(--step-h2);
  font-weight: 800;
  font-stretch: 110%;
  line-height: 0.98;
  letter-spacing: -0.015em;
  text-transform: uppercase;
  text-wrap: balance;
  margin-top: 0.55em;
}

.lede {
  margin-top: 1.6em;
  max-width: 34em;
  color: var(--text-2);
  font-size: calc(var(--step-body) * 1.08);
}

.lede strong, .card p strong { color: var(--text-1); font-weight: 600; }

.num {
  font-family: var(--font-hud);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.accent { color: var(--accent-soft); transition: color 0.6s; }
.gold { color: var(--gold-soft); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.65em;
  padding: 0.95em 1.7em;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1rem;
  line-height: 1;
  text-decoration: none;
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s, background 0.6s, color 0.6s;
}

.btn svg { width: 1.25em; height: 1.25em; flex: none; }

.btn-solid {
  background: var(--text-1);
  color: #0b0f1c;
}

.btn-solid:hover { transform: translateY(-2px); box-shadow: 0 12px 32px -12px var(--accent); }

.btn-ghost {
  border: 1px solid var(--line);
  color: var(--text-1);
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(8px);
}

.btn-ghost:hover { border-color: var(--accent-line); transform: translateY(-2px); }

/* Reveal defaults (GSAP takes over; visible without JS) */
.js .reveal { opacity: 0; transform: translateY(28px); }
.no-js .reveal { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; }
}
