/* ============================================================
   AURORA PORTFOLIO — BASE
   Font, reset, grounds, textures, motion primitives.
   ============================================================ */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/InterVariable.woff2") format("woff2");
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  font-size: var(--step-0);
  line-height: 1.65;
  font-feature-settings: "cv11";
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  transition: background-color var(--t-micro) var(--ease), color var(--t-micro) var(--ease);
}

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

a {
  color: inherit;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

h1,
h2,
h3,
h4 {
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  text-wrap: balance;
}

::selection {
  background: var(--aurora-blue);
  color: #ffffff;
}

:focus-visible {
  outline: 2px solid var(--aurora-blue);
  outline-offset: 3px;
  border-radius: 4px;
}

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

/* ------------------------------------------------------------
   Materials
   ------------------------------------------------------------ */

/* glass: always paired with a hairline border for edge definition */
.glass {
  background: var(--glass);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  backdrop-filter: blur(20px) saturate(1.4);
  border: 1px solid var(--glass-border);
}

/* grain: film-like texture over aurora color fields only, so gradients
   read photographic instead of vector-flat */
.grain::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.35;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
}

/* Display numerals and keywords render in solid ink — the aurora stays in
   glow fields and the menu prelayers, never as text fill. */

/* ------------------------------------------------------------
   Scroll reveals (main.js adds .is-visible once)
   ------------------------------------------------------------ */
.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity var(--t-reveal) var(--ease), transform var(--t-reveal) var(--ease);
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}
/* stagger within a marked group */
.reveal-group .reveal:nth-child(2) { transition-delay: 60ms; }
.reveal-group .reveal:nth-child(3) { transition-delay: 120ms; }
.reveal-group .reveal:nth-child(4) { transition-delay: 180ms; }
.reveal-group .reveal:nth-child(5) { transition-delay: 240ms; }
.reveal-group .reveal:nth-child(6) { transition-delay: 300ms; }
.reveal-group .reveal:nth-child(7) { transition-delay: 360ms; }
.reveal-group .reveal:nth-child(8) { transition-delay: 420ms; }

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