/* ============================================================
   VertexStudio — Base
   Reset, global background (aurora + grain), typography,
   focus states, and shared section primitives.
   ============================================================ */

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
:target { scroll-margin-top: calc(var(--nav-h) + 24px); }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: 1.65;
  letter-spacing: -.011em;
  overflow-x: hidden;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color .4s var(--ease), color .25s var(--ease);
}

/* lighten the ambient layers when in light appearance */
[data-theme="light"] body::before { opacity: .5; filter: saturate(105%); }
[data-theme="light"] body::after { mix-blend-mode: multiply; opacity: .04; }

/* ── Ambient aurora (fixed, behind everything) ── */
body::before {
  content: '';
  position: fixed; inset: -20vmax; z-index: -2; pointer-events: none;
  background:
    radial-gradient(40vmax 40vmax at 12% -8%,  rgba(139, 92, 246, .22), transparent 60%),
    radial-gradient(38vmax 38vmax at 92% 4%,   rgba(34, 211, 238, .14), transparent 60%),
    radial-gradient(46vmax 46vmax at 78% 96%,  rgba(99, 102, 241, .16), transparent 60%),
    radial-gradient(36vmax 36vmax at 4% 92%,   rgba(232, 121, 249, .10), transparent 60%);
  filter: saturate(120%);
  animation: aurora 26s ease-in-out infinite alternate;
}
@keyframes aurora {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  50%  { transform: translate3d(2%, -2%, 0) scale(1.06); }
  100% { transform: translate3d(-2%, 1%, 0) scale(1.02); }
}

/* ── Film grain (fixed, on top of aurora, under content) ── */
body::after {
  content: '';
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image: var(--grain);
  background-size: 160px 160px;
  opacity: .05; mix-blend-mode: overlay;
}

img, svg, canvas { display: block; max-width: 100%; }

/* ── Icons ── */
.vx-ic { width: 1em; height: 1em; display: inline-block; vertical-align: middle; }
[data-icon] { display: inline-flex; align-items: center; justify-content: center; line-height: 0; }

/* ── Interactive affordance + visible focus (accessibility) ── */
a, button, [role="button"], input, select, textarea, summary { cursor: pointer; }
a { color: inherit; text-decoration: none; }
:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
  border-radius: 4px;
}

::selection { background: rgba(139, 92, 246, .35); color: #fff; }

/* ── Headings use the display face ── */
h1, h2, h3, h4, h5 { font-family: var(--font-display); font-weight: 600; letter-spacing: -.02em; }

/* ── Layout primitives ── */
.wrap { max-width: var(--maxw); margin-inline: auto; }
section { position: relative; z-index: 1; padding: clamp(72px, 9vw, 132px) var(--gutter); }

/* ── Section headings ── */
.eyebrow, .section-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono);
  font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .18em;
  color: var(--brand-2); font-weight: 500; margin-bottom: 18px;
}
.eyebrow::before, .section-eyebrow::before {
  content: ''; width: 18px; height: 1px; background: var(--brand-2); opacity: .6;
}
.section-h {
  font-size: var(--fs-h2); font-weight: 600; letter-spacing: -.03em; line-height: 1.08;
}
.section-p {
  color: var(--text-2); margin-top: 18px; font-size: var(--fs-lead);
  line-height: 1.7; max-width: 600px; font-weight: 300;
}
.sh-center { text-align: center; }
.sh-center .section-p { margin-left: auto; margin-right: auto; }

/* ── Gradient text ── */
.grad-text {
  background: var(--grad-text);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}

/* ── Divider ── */
.div-fade { height: 1px; background: var(--grad-line); margin: 0; }

/* ── Utilities ── */
.muted { color: var(--muted); }
.center { text-align: center; }

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
