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

  :root {
    --bg: rgb(8 9 12);
    --bg-raised: rgb(14 16 23);
    --bg-elevated: rgb(19 22 32);
    --text: rgb(192 196 208);
    --bright: rgb(232 234 240);
    --dim: rgba(192, 196, 208, 0.5);
    --gold: rgb(212 168 83);
    --gold-dim: rgb(154 122 61);
    --gold-glow: rgba(212, 168, 83, 0.08);
    --cyan: rgb(78 205 196);
    --cyan-dim: rgba(78, 205, 196, 0.15);
    --green: rgb(123 196 127);
    --green-dim: rgba(123, 196, 127, 0.08);
    --red: rgb(232 93 93);
    --red-dim: rgba(232, 93, 93, 0.06);
    --violet: rgb(155 114 207);
    --violet-dim: rgba(155, 114, 207, 0.08);
    --coral-alive: rgb(255 107 138);
    --coral-white: rgb(216 208 200);
  }

  html {
    font-size: 18px;
    scroll-behavior: smooth;
  }
  body {
    overflow-x: hidden;
    font-family: "Source Serif 4", Georgia, serif;
    font-optical-sizing: auto;
    -webkit-font-smoothing: antialiased;
    line-height: 1.75;
    color: var(--text);
    background: var(--bg);
  }
  ::selection {
    color: var(--bright);
    background: rgba(212, 168, 83, 0.25);
  }

  .container {
    max-inline-size: 680px;
    padding: 0 2rem;
    margin: 0 auto;
  }
  a {
    color: var(--gold);
    text-decoration: none;
    border-block-end: 1px solid rgba(212, 168, 83, 0.3);
  }
  a:hover {
    border-block-end-color: var(--gold);
  }
  strong {
    font-weight: 600;
    color: var(--bright);
  }
  em {
    font-style: italic;
  }

  /* ── Nav ── */
  .nav {
    position: fixed;
    inset-block-start: 0;
    inset-inline-start: 0;
    inset-inline-end: 0;
    z-index: 100;
    padding: 1.2rem 2rem;
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.72rem;
    letter-spacing: 0.1em;
  }
  .nav a {
    color: var(--gold-dim);
    border: none;
  }

  /* ── Hero ── */
  .hero {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-block-size: 100vh;
    padding: 4rem 2rem;
    overflow: hidden;
  }
  .hero canvas {
    position: absolute;
    inset: 0;
    inline-size: 100%;
    block-size: 100%;
    opacity: 0.5;
  }
  .hero-content {
    position: relative;
    z-index: 1;
    max-inline-size: 800px;
    text-align: center;
  }
  .hero-label {
    margin-block-end: 1.5rem;
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.68rem;
    font-weight: 400;
    color: var(--gold-dim);
    text-transform: uppercase;
    letter-spacing: 0.18em;
    opacity: 0;
    animation: fadeUp 1s 0.3s forwards;
  }
  .hero h1 {
    margin-block-end: 1.5rem;
    font-family: "Fraunces", serif;
    font-size: clamp(2.4rem, 6vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
    color: var(--bright);
    opacity: 0;
    animation: fadeUp 1s 0.6s forwards;
  }
  .hero h1 em {
    font-style: italic;
    color: var(--coral-alive);
  }
  .hero-sub {
    max-inline-size: 580px;
    margin: 0 auto 1rem;
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--text);
    opacity: 0;
    animation: fadeUp 1s 0.9s forwards;
  }
  .hero-meta {
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.65rem;
    color: var(--dim);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    opacity: 0;
    animation: fadeUp 1s 1.2s forwards;
  }
  .scroll-chevron {
    position: absolute;
    inset-block-end: 2.5rem;
    inset-inline-start: 50%;
    cursor: pointer;
    opacity: 0;
    transform: translateX(-50%);
    animation: fadeUp 1s 1.5s forwards;
  }
  .scroll-chevron svg {
    inline-size: 24px;
    block-size: 24px;
    stroke: var(--gold-dim);
    animation: bounce 2s infinite;
  }
  /* Text for screen readers only; the chevron itself is the picture. */
  .scroll-chevron-label {
    position: absolute;
    inline-size: 1px;
    block-size: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    white-space: nowrap;
    border: 0;
    clip-path: inset(50%);
  }
  @keyframes fadeUp {
    from {
      opacity: 0;
      transform: translateY(20px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  /* ── Hero Voice Highlighting ── */
  .hero h1.voice-visual-active {
    color: var(--gold);
    text-shadow: 0 0 30px rgba(212, 168, 83, 0.2);
    transition:
      color 0.6s ease,
      text-shadow 0.6s ease;
  }
  .hero .hero-label.voice-visual-active {
    color: var(--gold);
    transition: color 0.4s ease;
  }
  .hero .hero-sub.voice-visual-active {
    color: var(--bright);
    transition: color 0.5s ease;
  }
  @keyframes bounce {
    0%,
    100% {
      transform: translateY(0);
    }
    50% {
      transform: translateY(8px);
    }
  }

  /* ── Sections ── */
  .section {
    position: relative;
    padding: 5rem 2rem;
  }
  .section-number {
    margin-block-end: 0.5rem;
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.62rem;
    font-weight: 500;
    color: var(--gold-dim);
    text-transform: uppercase;
    letter-spacing: 0.22em;
  }
  .section h2 {
    margin-block-end: 2rem;
    font-family: "Fraunces", serif;
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    font-weight: 600;
    line-height: 1.2;
    color: var(--bright);
  }
  .section h2 em {
    color: var(--gold);
  }
  .section h3 {
    margin: 2.5rem 0 1rem;
    font-family: "Fraunces", serif;
    font-size: 1.3rem;
    font-weight: 600;
    line-height: 1.3;
    color: var(--bright);
  }
  .section p {
    max-inline-size: 680px;
    margin: 0 auto 1.5rem;
  }

  [data-accent="cyan"] .section-number {
    color: var(--cyan);
  }
  [data-accent="cyan"] h2 em {
    color: var(--cyan);
  }
  [data-accent="cyan"] {
    border-block-start: 1px solid rgba(78, 205, 196, 0.1);
  }
  [data-accent="green"] .section-number {
    color: var(--green);
  }
  [data-accent="green"] h2 em {
    color: var(--green);
  }
  [data-accent="green"] {
    border-block-start: 1px solid rgba(123, 196, 127, 0.1);
  }
  [data-accent="violet"] .section-number {
    color: var(--violet);
  }
  [data-accent="violet"] h2 em {
    color: var(--violet);
  }
  [data-accent="violet"] {
    border-block-start: 1px solid rgba(155, 114, 207, 0.1);
  }
  [data-accent="red"] .section-number {
    color: var(--red);
  }
  [data-accent="red"] h2 em {
    color: var(--red);
  }

  /* After the accent rules: a hero heading's em under the voice highlight is more specific than they are. */
  .hero h1.voice-visual-active em {
    color: var(--gold);
  }
}
