/* ============================================================
   Base layer — reset, typography, layout primitives
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 6rem;
  /* The reveal animation translates elements 34px horizontally before settling.
     `body` clips that, but `html` did not, so a transient horizontal scrollbar
     could appear mid-reveal. `clip` (unlike `hidden`) does not create a scroll
     container, so the sticky header keeps working. */
  overflow-x: clip;
}

body {
  margin: 0;
  background: var(--bg-deep);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: var(--lh-body);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
}

/* The ambient field every glass surface is read against. Fixed so the
   glass has something that actually moves behind it as the page scrolls. */
.bg-field {
  position: fixed;
  inset: 0;
  z-index: var(--z-bg);
  pointer-events: none;
  background:
    radial-gradient(1100px 700px at 12% -6%, rgba(98, 18, 129, 0.55), transparent 62%),
    radial-gradient(900px 620px at 92% 6%, rgba(75, 6, 112, 0.48), transparent 60%),
    radial-gradient(1000px 800px at 50% 108%, rgba(46, 4, 71, 0.62), transparent 66%),
    linear-gradient(178deg, var(--bg-deep) 0%, var(--violet-900) 42%, var(--bg-deep) 100%);
}
.bg-field::after {
  /* fine grain so large flat areas do not band on wide gamut screens */
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='0.045'/%3E%3C/svg%3E");
}

/* floating orbs — parallax targets */
.orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.5;
  pointer-events: none;
  z-index: var(--z-bg);
  will-change: transform;
}
.orb--a { width: 46vw; height: 46vw; max-width: 620px; max-height: 620px; top: -8vh; left: -8vw; background: radial-gradient(circle, rgba(139, 63, 174, 0.62), transparent 68%); }
.orb--b { width: 38vw; height: 38vw; max-width: 520px; max-height: 520px; top: 42vh; right: -10vw; background: radial-gradient(circle, rgba(255, 180, 0, 0.20), transparent 68%); }
.orb--c { width: 42vw; height: 42vw; max-width: 560px; max-height: 560px; bottom: -14vh; left: 26vw; background: radial-gradient(circle, rgba(75, 6, 112, 0.72), transparent 68%); }

main { position: relative; z-index: var(--z-content); }

/* ---- typography ---- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: var(--lh-snug);
  margin: 0 0 var(--sp-4);
  letter-spacing: -0.015em;
  text-wrap: balance;
}
h1 { font-size: var(--step-6); line-height: var(--lh-tight); letter-spacing: -0.03em; }
h2 { font-size: var(--step-4); letter-spacing: -0.022em; }
h3 { font-size: var(--step-2); }
h4 { font-size: var(--step-1); }
h5, h6 { font-size: var(--step-0); }

p { margin: 0 0 var(--sp-4); color: var(--fg-muted); text-wrap: pretty; }
p:last-child { margin-bottom: 0; }
ul:last-child, ol:last-child { margin-bottom: 0; }

a { color: var(--gold-200); text-decoration: none; transition: color var(--dur-fast) var(--ease-out); }
a:hover { color: var(--gold-100); }
a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--gold-200);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}

strong, b { color: var(--fg); font-weight: 700; }
img { max-width: 100%; height: auto; display: block; }
ul, ol { margin: 0 0 var(--sp-4); padding-left: 1.25rem; color: var(--fg-muted); }
li { margin-bottom: var(--sp-2); }
li::marker { color: var(--gold-300); }
hr { border: 0; height: 1px; background: var(--grad-hairline); margin: var(--sp-7) 0; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: var(--z-modal);
  background: var(--gold-200);
  color: var(--ink-900);
  padding: 0.75rem 1.25rem;
  border-radius: 0 0 var(--r-md) 0;
  font-weight: 700;
}
.skip-link:focus { left: 0; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

/* ---- layout ---- */
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.wrap--narrow { max-width: var(--wrap-narrow); }
.wrap--wide { max-width: var(--wrap-wide); }

.section { position: relative; padding-block: var(--section-y); }
.section--tight { padding-block: calc(var(--section-y) * 0.6); }

.grid { display: grid; gap: var(--sp-5); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }

.stack > * + * { margin-top: var(--sp-4); }
.cluster { display: flex; flex-wrap: wrap; gap: var(--sp-3); align-items: center; }
.center { text-align: center; }
.mx-auto { margin-inline: auto; }

/* ---- section headers ---- */
/* No leading rule: a 28px gold line before the label reads as an em dash in
   front of every section title. The eyebrow carries itself on weight, colour
   and tracking. */
.eyebrow {
  display: inline-flex;
  align-items: center;
  font-size: var(--step--1);
  font-weight: 700;
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--gold-200);
  margin-bottom: var(--sp-4);
}

.section-head { max-width: 760px; margin-bottom: var(--sp-6); }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head p { font-size: var(--step-1); color: var(--fg-muted); }

.text-gold {
  background: var(--grad-text-gold);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lede { font-size: var(--step-1); color: var(--fg-muted); line-height: 1.6; }
