/* ============================================================
   BASE — Reset · Custom Properties · Typography · Utilities
   ============================================================ */

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

:root {
  /* --- Palette --- */
  --black:     #08090C;
  --charcoal:  #11141B;
  --night:     #1A2342;
  --magenta:   #FF2EA0;
  --blue:      #3D6BFF;
  --violet:    #7A3CFF;
  --amber:     #FF7A3D;
  --lavender:  #E9A8C9;
  --green:     #3DFFB0;
  --white:     #F4F1EC;
  --muted:     #8A8B91;

  /* --- Fonts --- */
  --f-display:   'Syne', sans-serif;
  --f-body:      'Onest', sans-serif;
  --f-editorial: 'DM Serif Display', serif;
  --f-mono:      'JetBrains Mono', monospace;

  /* --- Spacing --- */
  --sp-xs:  0.5rem;
  --sp-s:   1rem;
  --sp-m:   clamp(1.5rem, 3vw, 2.5rem);
  --sp-l:   clamp(3rem,   7vw, 5.5rem);
  --sp-xl:  clamp(5rem,  12vw, 9rem);

  /* --- Layout --- */
  --max-w:       1440px;
  --max-narrow:  720px;
  --pad:         clamp(1.5rem, 5vw, 5rem);
  --nav-h:       72px;

  /* --- Motion --- */
  --t-fast:  150ms ease;
  --t-med:   300ms ease;
  --t-slow:  600ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---- Base ---- */

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--f-body);
  font-weight: 400;
  line-height: 1.65;
  background: var(--black);
  color: var(--white);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5 {
  font-family: var(--f-display);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.025em;
}

/* The italic editorial word (e.g. "pulse") */
em {
  font-family: var(--f-editorial);
  font-style: italic;
  font-weight: 400;
  color: var(--magenta);
  letter-spacing: -0.01em;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; }
ul, ol { list-style: none; }
figure { margin: 0; }

/* ---- Grain overlay ---- */

.grain {
  position: fixed;
  inset: 0;
  z-index: 2000;
  pointer-events: none;
  opacity: 0.052;
  /* SVG feTurbulence tiled as a repeating background */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='256' height='256'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 230px 230px;
}

/* ---- Layout helpers ---- */

.container {
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--pad);
}

.container-narrow {
  max-width: var(--max-narrow);
  margin-inline: auto;
  padding-inline: var(--pad);
}

.section {
  padding-block: var(--sp-xl);
}

/* ---- Eyebrow label ---- */

.eyebrow {
  display: block;
  font-family: var(--f-mono);
  font-size: 0.67rem;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--magenta);
  margin-bottom: 1.1rem;
}

/* ---- Section title ---- */

.section-title {
  font-size: clamp(2.2rem, 5vw, 4rem);
  margin-bottom: var(--sp-m);
  color: var(--white);
}

/* ---- Fade-in entrance animation ---- */

.fade-in {
  opacity: 0;
  transform: translateY(22px);
  transition:
    opacity  0.72s ease,
    transform 0.72s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  transition-delay: calc(var(--delay, 0) * 90ms);
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---- Reduced motion ---- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration:        0.01ms !important;
    animation-iteration-count: 1      !important;
    transition-duration:       0.01ms !important;
  }
  .fade-in {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
