/* Pentestiverse — hand-written styles (plain CSS, no build step).
   Tailwind v4 is loaded from the CDN in each page; theme tokens (--color-ember-*, --color-plum-*,
   --font-*, --ease-*) come from the inline `@theme static` block in the page <head>. */

/* Match Tailwind's layer order so our components sit below its utilities. */
@layer theme, base, components, utilities;

@font-face {
  font-family: "Space Grotesk";
  src: url("../fonts/space-grotesk-var.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "JetBrains Mono";
  src: url("../fonts/jetbrains-mono-var.woff2") format("woff2");
  font-weight: 100 800;
  font-style: normal;
  font-display: swap;
}

/* Animatable custom properties (interpolated by transitions/keyframes). */
@property --angle { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@property --halo-ember { syntax: "<number>"; inherits: true; initial-value: 0.22; }
@property --halo-plum { syntax: "<number>"; inherits: true; initial-value: 0.36; }
@property --light { syntax: "<color>"; inherits: true; initial-value: rgb(255 255 255 / 0.06); }

@layer base {
  :root {
    color-scheme: dark;

    /* RGB triplets so alpha can vary per use: rgb(var(--ember) / .4) */
    --ember: 237 91 46;
    --ember-soft: 255 138 92;
    --plum: 142 36 170;
    --plum-deep: 74 20 140;
    --plum-soft: 221 180 246;

    /* Width of the centre column that holds the beam. */
    --beam-w: 3.5rem;

    /* Pointer position, written by assets/js/app.js. */
    --px: 0;
    --py: 0;
  }

  @media (width >= 64rem) { :root { --beam-w: 7.5rem; } }
  @media (width >= 80rem) { :root { --beam-w: 9rem; } }

  html { background-color: var(--color-ink); }
  body { overflow-x: clip; -webkit-tap-highlight-color: transparent; }
  ::selection { background: rgb(var(--ember) / 0.35); color: #fff; }
}

@layer components {
  /* ── Backdrop ─────────────────────────────────────────────── */

  .backdrop {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
    animation: fade-in 1.4s ease both;
  }

  .glow {
    position: absolute;
    border-radius: 9999px;
    opacity: 0.8;
    translate: calc(var(--px) * var(--depth)) calc(var(--py) * var(--depth));
    transition: opacity 0.8s ease, scale 1s var(--ease-out-expo), translate 1.2s var(--ease-out-expo);
  }

  .glow--ember {
    --depth: -2rem;
    top: -10rem;
    left: -40%;
    width: 180%;
    height: 48rem;
    background: radial-gradient(closest-side, rgb(var(--ember) / 0.34), rgb(var(--ember) / 0.1) 55%, transparent);
    animation: drift 18s ease-in-out infinite alternate;
  }

  .glow--plum {
    --depth: 2rem;
    bottom: -10rem;
    left: -40%;
    width: 180%;
    height: 52rem;
    background: radial-gradient(closest-side, rgb(var(--plum-deep) / 0.85), rgb(var(--plum) / 0.16) 55%, transparent);
    animation: drift 24s ease-in-out -8s infinite alternate-reverse;
  }

  @media (width >= 48rem) {
    .glow--ember { top: -15%; left: -28%; width: 78%; height: 130%; }
    .glow--plum { top: -15%; bottom: auto; left: auto; right: -28%; width: 78%; height: 130%; }
  }

  [data-side="services"] .glow--ember,
  [data-side="products"] .glow--plum { opacity: 1; scale: 1.08; }
  [data-side="services"] .glow--plum,
  [data-side="products"] .glow--ember { opacity: 0.4; }

  /* Fine grid, masked to the centre, slowly panning downwards. */
  .grid-plane {
    position: absolute;
    inset: 0;
    mask-image: radial-gradient(ellipse 60% 55% at 50% 50%, #000 10%, transparent 75%);
  }

  .grid-plane::before {
    content: "";
    position: absolute;
    inset: -4rem 0 0;
    background-image:
      linear-gradient(rgb(255 255 255 / 0.05) 1px, transparent 1px),
      linear-gradient(90deg, rgb(255 255 255 / 0.05) 1px, transparent 1px);
    background-size: 4rem 4rem;
    background-position: calc(50% + 2rem) 0;
    animation: grid-pan 8s linear infinite;
  }

  .noise {
    position: absolute;
    inset: 0;
    opacity: 0.07;
    mix-blend-mode: overlay;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  }

  .vignette {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 85% 75% at 50% 50%, transparent 40%, rgb(0 0 0 / 0.75) 100%);
  }

  /* Embers rise on the services side, motes fall on the products side. */
  .particle {
    position: absolute;
    left: var(--x);
    bottom: -1rem;
    width: var(--s);
    height: var(--s);
    border-radius: 9999px;
    opacity: 0;
    animation: rise var(--d) linear var(--delay) infinite;
  }

  .particle--ember {
    background: var(--color-ember-300);
    box-shadow: 0 0 6px 1px rgb(var(--ember) / 0.8);
  }

  .particle--plum {
    top: -1rem;
    bottom: auto;
    background: var(--color-plum-300);
    box-shadow: 0 0 6px 1px rgb(var(--plum) / 0.9);
    animation-name: fall;
  }

  /* Soft light that follows the mouse and takes the colour of the hovered side. */
  .cursor-light {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1;
    width: 36rem;
    height: 36rem;
    margin: -18rem 0 0 -18rem;
    border-radius: 9999px;
    pointer-events: none;
    opacity: 0;
    translate: var(--cx, -100vw) var(--cy, -100vh);
    background: radial-gradient(closest-side, var(--light), transparent);
    mix-blend-mode: screen;
    transition: opacity 0.6s ease, --light 0.6s ease;
  }

  .has-pointer .cursor-light { opacity: 1; }
  [data-side="services"] .cursor-light { --light: rgb(237 91 46 / 0.14); }
  [data-side="products"] .cursor-light { --light: rgb(142 36 170 / 0.22); }

  @media not ((hover: hover) and (pointer: fine)) {
    .cursor-light { display: none; }
  }

  /* ── Brand ────────────────────────────────────────────────── */

  .brand { animation: drop-in 0.9s var(--ease-out-expo) 0.15s both; }

  .brand__logo {
    border-radius: 9999px;
    box-shadow: 0 0 0 1px rgb(var(--ember) / 0.35), 0 0 28px -4px rgb(var(--ember) / 0.6);
    transition: transform 0.6s var(--ease-spring), box-shadow 0.4s ease;
  }

  .brand:is(:hover, :focus-visible) .brand__logo {
    transform: rotate(-12deg) scale(1.06);
    box-shadow: 0 0 0 1px rgb(var(--ember) / 0.6), 0 0 36px -2px rgb(var(--ember) / 0.8);
  }

  .brand__word {
    margin-right: -0.34em; /* cancel trailing letter-spacing so the word centres */
    font-weight: 600;
    letter-spacing: 0.34em;
    text-transform: uppercase;
    background: linear-gradient(90deg, #fff, rgb(255 255 255 / 0.62));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }

  .brand-sub { animation: fade-in 1s ease 0.5s both; }

  /* ── Beam (horizontal on phones, vertical from md) ──────── */

  .beam {
    position: relative;
    z-index: 0;
    height: 2px;
    margin-block: 2.75rem;
    transition: --halo-ember 0.6s ease, --halo-plum 0.6s ease;
  }

  [data-side="services"] .beam { --halo-ember: 0.42; --halo-plum: 0.18; }
  [data-side="products"] .beam { --halo-ember: 0.12; --halo-plum: 0.6; }

  .beam__body {
    position: absolute;
    inset: 0;
    animation: grow-x 1.1s var(--ease-out-expo) 0.35s both;
  }

  .beam__halo {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 10rem;
    translate: 0 -50%;
    background: linear-gradient(180deg,
      transparent,
      rgb(var(--ember) / calc(var(--halo-ember) * 0.35)) 22%,
      rgb(var(--ember) / var(--halo-ember)) 40%,
      rgb(255 255 255 / 0.32) 50%,
      rgb(var(--plum) / var(--halo-plum)) 60%,
      rgb(var(--plum) / calc(var(--halo-plum) * 0.35)) 78%,
      transparent);
    mask-image: linear-gradient(90deg, transparent, #000 15%, #000 85%, transparent);
  }

  .beam__glow {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 12px;
    translate: 0 -50%;
    background: linear-gradient(180deg, transparent, rgb(255 255 255 / 0.5), transparent);
    mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  }

  .beam__core {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, #fff 12%, #fff 88%, transparent);
  }

  .beam__lane {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 2rem;
    translate: 0 -50%;
    overflow: hidden;
    mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  }

  .beam__pulse {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 2px;
    translate: 0 -50%;
    background: linear-gradient(90deg, transparent 42%, #fff 50%, transparent 58%);
    filter: drop-shadow(0 0 3px #fff) drop-shadow(0 0 8px rgb(var(--ember)));
    animation: pulse-x 4.8s cubic-bezier(0.45, 0, 0.55, 1) 1.6s infinite both;
  }

  .beam__pulse--alt {
    filter: drop-shadow(0 0 3px #fff) drop-shadow(0 0 8px rgb(var(--plum)));
    animation-duration: 6.4s;
    animation-delay: 3.2s;
    animation-direction: reverse;
  }

  .beam__flare {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 14rem;
    height: 14rem;
    translate: -50% -50%;
    border-radius: 9999px;
    pointer-events: none;
    background: radial-gradient(closest-side, rgb(255 255 255 / 0.9), rgb(255 255 255 / 0.22) 25%, transparent 70%);
    animation: flare 1.6s var(--ease-out-expo) 0.55s both;
  }

  @media (width >= 48rem) {
    .beam { height: auto; margin: 0; }
    .beam__body { animation-name: grow-y; }

    .beam__halo {
      top: 0;
      left: 50%;
      width: calc(var(--beam-w) + 10rem);
      height: 100%;
      translate: -50% 0;
      background: linear-gradient(90deg,
        transparent,
        rgb(var(--ember) / calc(var(--halo-ember) * 0.35)) 22%,
        rgb(var(--ember) / var(--halo-ember)) 40%,
        rgb(255 255 255 / 0.32) 50%,
        rgb(var(--plum) / var(--halo-plum)) 60%,
        rgb(var(--plum) / calc(var(--halo-plum) * 0.35)) 78%,
        transparent);
      mask-image: linear-gradient(180deg, transparent, #000 14%, #000 86%, transparent);
    }

    .beam__glow {
      top: 0;
      left: 50%;
      width: 12px;
      height: 100%;
      translate: -50% 0;
      background: linear-gradient(90deg, transparent, rgb(255 255 255 / 0.5), transparent);
      mask-image: linear-gradient(180deg, transparent, #000 12%, #000 88%, transparent);
    }

    .beam__core {
      inset: 0 auto;
      left: 50%;
      width: 2px;
      translate: -50% 0;
      background: linear-gradient(180deg, transparent, #fff 12%, #fff 88%, transparent);
    }

    .beam__lane {
      top: 0;
      left: 50%;
      width: 2rem;
      height: 100%;
      translate: -50% 0;
      mask-image: linear-gradient(180deg, transparent, #000 12%, #000 88%, transparent);
    }

    .beam__pulse {
      top: 0;
      left: 50%;
      width: 2px;
      height: 100%;
      translate: -50% 0;
      background: linear-gradient(180deg, transparent 42%, #fff 50%, transparent 58%);
      animation-name: pulse-y;
    }

    .beam__flare {
      width: 18rem;
      height: 18rem;
    }
  }

  /* ── Sides ────────────────────────────────────────────────── */

  .side {
    --base-delay: 1s;
    transition: opacity 0.6s ease, filter 0.6s ease;
  }

  .side--services { --accent: var(--ember); --accent-soft: var(--ember-soft); }
  .side--products { --accent: var(--plum); --accent-soft: var(--plum-soft); }

  [data-side="services"] .side--products,
  [data-side="products"] .side--services { opacity: 0.5; filter: saturate(0.5) brightness(0.85); }

  .side-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: rgb(var(--accent-soft));
    animation: fade-in 0.8s ease 0.85s both;
  }

  .side-label__dot {
    flex: none;
    width: 0.4rem;
    height: 0.4rem;
    border-radius: 9999px;
    background: rgb(var(--accent-soft));
    animation: ping 2.4s ease-out infinite;
  }

  .side-label__rule {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgb(var(--accent) / 0.55), transparent);
  }

  .side-label__count {
    color: rgb(255 255 255 / 0.35);
    letter-spacing: 0.1em;
  }

  /* ── Cards ────────────────────────────────────────────────── */

  .card {
    --from-x: 0px;
    --from-y: 0.875rem;
    position: relative;
    isolation: isolate;
    display: flex;
    align-items: center;
    gap: 0.875rem;
    width: 100%;
    padding: 0.875rem 1rem;
    border: 1px solid rgb(255 255 255 / 0.08);
    border-radius: 1rem;
    background:
      linear-gradient(180deg, rgb(255 255 255 / 0.05), rgb(255 255 255 / 0.015)),
      rgb(5 5 7 / 0.6);
    box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.04), 0 10px 30px -12px rgb(0 0 0 / 0.8);
    outline: none;
    transition: translate 0.45s var(--ease-out-expo), border-color 0.3s ease, box-shadow 0.3s ease;
    animation: card-in 0.9s var(--ease-out-expo) both;
    animation-delay: calc(var(--base-delay) + var(--i, 0) * 85ms);
  }

  @media (width >= 48rem) {
    .side--services .card { --from-x: 2.5rem; --from-y: 0px; }
    .side--products .card { --from-x: -2.5rem; --from-y: 0px; }
  }

  /* Spotlight fill that follows the cursor (--mx/--my set by x-spotlight). */
  .card::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    border-radius: inherit;
    background: radial-gradient(16rem circle at var(--mx, 50%) var(--my, 50%), rgb(var(--accent) / 0.2), transparent 65%);
    opacity: 0;
    transition: opacity 0.35s ease;
  }

  /* Spotlight border: same gradient, masked down to a 1px ring. */
  .card::after {
    content: "";
    position: absolute;
    inset: -1px;
    z-index: 1;
    padding: 1px;
    border-radius: inherit;
    pointer-events: none;
    background: radial-gradient(12rem circle at var(--mx, 50%) var(--my, 50%), rgb(var(--accent-soft) / 0.95), transparent 70%);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
    opacity: 0;
    transition: opacity 0.35s ease;
  }

  a.card:is(:hover, :focus-visible) {
    translate: 0 -2px;
    border-color: rgb(var(--accent) / 0.35);
    box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.06), 0 18px 40px -18px rgb(var(--accent) / 0.6);
  }

  a.card:focus-visible { box-shadow: 0 0 0 2px rgb(var(--accent-soft) / 0.9), 0 18px 40px -18px rgb(var(--accent) / 0.6); }

  a.card:is(:hover, :focus-visible)::before,
  a.card:is(:hover, :focus-visible)::after { opacity: 1; }

  .card__index {
    flex: none;
    width: 1.25rem;
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    letter-spacing: 0.08em;
    color: rgb(var(--accent-soft) / 0.5);
    transition: color 0.3s ease;
  }

  .card__icon {
    display: grid;
    flex: none;
    place-items: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.75rem;
    color: rgb(var(--accent-soft));
    background: rgb(var(--accent) / 0.12);
    box-shadow: inset 0 0 0 1px rgb(var(--accent) / 0.25);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
  }

  .card__icon svg {
    width: 1.25rem;
    height: 1.25rem;
    transition: transform 0.5s var(--ease-spring);
  }

  .card__body {
    display: flex;
    min-width: 0;
    flex: 1;
    flex-direction: column;
    gap: 0.15rem;
  }

  .card__title {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: -0.01em;
  }

  .card__desc {
    font-size: 0.8125rem;
    line-height: 1.4;
    color: rgb(255 255 255 / 0.55);
  }

  .card__arrow {
    flex: none;
    width: 1rem;
    height: 1rem;
    color: rgb(255 255 255 / 0.25);
    transition: translate 0.35s var(--ease-out-expo), color 0.3s ease;
  }

  a.card:is(:hover, :focus-visible) .card__index { color: rgb(var(--accent-soft)); }
  a.card:is(:hover, :focus-visible) .card__icon {
    background: rgb(var(--accent) / 0.22);
    box-shadow: inset 0 0 0 1px rgb(var(--accent) / 0.55), 0 0 22px rgb(var(--accent) / 0.4);
  }
  a.card:is(:hover, :focus-visible) .card__icon svg { transform: rotate(-8deg) scale(1.1); }
  a.card:is(:hover, :focus-visible) .card__arrow { translate: 0.25rem 0; color: rgb(var(--accent-soft)); }

  @media (width >= 80rem) {
    .card { padding: 1rem 1.125rem; }
    .card__title { font-size: 1.0625rem; }
  }

  /* Trace: dashed line linking each card to the beam (md and up). */
  .trace { display: none; }

  @media (width >= 48rem) {
    .trace {
      --run: calc(var(--beam-w) / 2 - 1.75rem);
      display: block;
      position: absolute;
      top: 50%;
      width: calc(var(--beam-w) / 2);
      height: 1px;
      pointer-events: none;
      background-image: linear-gradient(90deg, rgb(var(--accent) / 0.8) 50%, transparent 50%);
      background-size: 6px 1px;
      opacity: 0.3;
      transition: opacity 0.3s ease;
    }

    .side--services .trace { left: 100%; --dir: 1; }
    .side--products .trace { right: 100%; --dir: -1; }

    /* Energy packet that runs from the card into the beam. */
    .trace::before {
      content: "";
      position: absolute;
      top: -1px;
      width: 1.75rem;
      height: 3px;
      border-radius: 2px;
      opacity: 0;
      filter: drop-shadow(0 0 4px rgb(var(--accent-soft)));
    }

    .side--services .trace::before { left: 0; background: linear-gradient(90deg, transparent, #fff); }
    .side--products .trace::before { right: 0; background: linear-gradient(270deg, transparent, #fff); }

    /* Spark where the trace meets the beam. */
    .trace::after {
      content: "";
      position: absolute;
      top: 50%;
      width: 0.5rem;
      height: 0.5rem;
      border-radius: 9999px;
      background: #fff;
      box-shadow: 0 0 10px 3px rgb(var(--accent) / 0.9), 0 0 26px 8px rgb(255 255 255 / 0.3);
      translate: -50% -50%;
      scale: 0;
      transition: scale 0.4s var(--ease-spring);
    }

    .side--services .trace::after { left: 100%; }
    .side--products .trace::after { left: 0; }

    a.card:is(:hover, :focus-visible) .trace {
      opacity: 1;
      animation: dash-flow 0.5s linear infinite;
    }

    a.card:is(:hover, :focus-visible) .trace::before { animation: trace-run 0.9s cubic-bezier(0.55, 0, 0.45, 1) infinite; }
    a.card:is(:hover, :focus-visible) .trace::after { scale: 1; }
  }

  /* Flagship product card with a rotating conic border. */
  .card--featured {
    align-items: flex-start;
    padding-block: 1.125rem;
    border-color: rgb(var(--plum) / 0.3);
    background:
      linear-gradient(160deg, rgb(var(--plum-deep) / 0.4), rgb(5 5 7 / 0.6) 60%),
      rgb(5 5 7 / 0.6);
  }

  .card--featured .card__index { padding-top: 0.75rem; }
  .card--featured .card__arrow { align-self: center; }
  .card--featured .card__desc { margin-top: 0.15rem; }

  .card__ring {
    position: absolute;
    inset: -1px;
    padding: 1px;
    border-radius: inherit;
    pointer-events: none;
    background: conic-gradient(from var(--angle), transparent 0 55%, rgb(var(--plum-soft) / 0.9) 72%, rgb(var(--plum) / 0.9) 84%, transparent 96%);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
    animation: spin-angle 6s linear infinite;
  }

  .pill,
  .chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-family: var(--font-mono);
    font-size: 0.625rem;
    line-height: 1;
    white-space: nowrap;
  }

  .pill {
    padding: 0.3rem 0.5rem;
    border: 1px solid rgb(var(--plum-soft) / 0.35);
    border-radius: 9999px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--color-plum-200);
    background: rgb(var(--plum) / 0.25);
  }

  .chip {
    padding: 0.3rem 0.45rem;
    border: 1px solid rgb(var(--plum) / 0.3);
    border-radius: 0.375rem;
    letter-spacing: 0.04em;
    color: rgb(var(--plum-soft) / 0.85);
    background: rgb(var(--plum) / 0.12);
  }

  /* Work-in-progress product slots: greyed out, redacted, not clickable. */
  .card--wip {
    --accent: 150 150 160;
    --accent-soft: 175 175 185;
    cursor: default;
    border-style: dashed;
    border-color: rgb(255 255 255 / 0.1);
    background:
      repeating-linear-gradient(-45deg, rgb(255 255 255 / 0.03) 0 8px, transparent 8px 16px),
      rgb(5 5 7 / 0.55);
    background-size: 22.6px 22.6px, auto;
    box-shadow: none;
    opacity: 0.75;
  }

  .card--wip:hover { animation: card-in 0.9s var(--ease-out-expo) both, stripes 1s linear infinite; animation-delay: calc(var(--base-delay) + var(--i, 0) * 85ms), 0s; }
  .card--wip .card__icon { box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.1); background: rgb(255 255 255 / 0.04); }
  .card--wip .card__desc { font-family: var(--font-mono); font-size: 0.6875rem; letter-spacing: 0.16em; text-transform: uppercase; color: rgb(255 255 255 / 0.35); }

  .redact {
    display: inline-block;
    width: var(--w, 8rem);
    max-width: 100%;
    height: 0.85em;
    vertical-align: -0.08em;
    border-radius: 3px;
    background: linear-gradient(90deg, rgb(255 255 255 / 0.1) 0 35%, rgb(255 255 255 / 0.26) 50%, rgb(255 255 255 / 0.1) 65% 100%);
    background-size: 300% 100%;
    animation: shimmer 2.8s linear infinite;
  }

  .wip-badge {
    display: inline-flex;
    flex: none;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.5rem;
    border: 1px solid rgb(var(--plum) / 0.4);
    border-radius: 9999px;
    font-family: var(--font-mono);
    font-size: 0.625rem;
    line-height: 1;
    letter-spacing: 0.2em;
    color: rgb(var(--plum-soft) / 0.75);
    background: rgb(var(--plum) / 0.1);
  }

  .wip-badge::before {
    content: "";
    width: 0.375rem;
    height: 0.375rem;
    border-radius: 9999px;
    background: rgb(var(--plum-soft));
    animation: blink 1.4s steps(1, end) infinite;
  }

  /* ── Tagline ──────────────────────────────────────────────── */

  .tagline { animation: fade-in 0.8s ease 1.5s both; }

  .tagline-rule {
    width: 10rem;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgb(var(--ember)), #fff, rgb(var(--plum-soft)), transparent);
    animation: grow-x 1.2s var(--ease-out-expo) 1.8s both;
  }

  .scramble-noise {
    font-family: var(--font-mono);
    font-weight: 400;
    color: rgb(255 255 255 / 0.3);
  }

  .footnote { animation: fade-in 1s ease 2.2s both; }
}

/* ── Keyframes ──────────────────────────────────────────────── */

@keyframes fade-in { from { opacity: 0; } }
@keyframes drop-in { from { opacity: 0; transform: translateY(-0.75rem); filter: blur(6px); } }
@keyframes drift { from { transform: translate3d(-2%, -3%, 0); } to { transform: translate3d(3%, 2%, 0); } }
@keyframes grid-pan { to { transform: translate3d(0, 4rem, 0); } }
@keyframes grow-x { from { opacity: 0; transform: scaleX(0); } }
@keyframes grow-y { from { opacity: 0; transform: scaleY(0); } }
@keyframes pulse-x { from { transform: translateX(-60%); } to { transform: translateX(60%); } }
@keyframes pulse-y { from { transform: translateY(-60%); } to { transform: translateY(60%); } }
@keyframes flare { 0% { opacity: 0; transform: scale(0.2); } 25% { opacity: 1; } 100% { opacity: 0; transform: scale(1.4); } }
@keyframes spin-angle { to { --angle: 360deg; } }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: 0% 0; } }
@keyframes stripes { to { background-position: 22.6px 0, 0 0; } }
@keyframes blink { 50% { opacity: 0.2; } }
@keyframes dash-flow { to { background-position: calc(var(--dir) * 12px) 0; } }
@keyframes trace-run {
  0% { opacity: 0; translate: 0 0; }
  20% { opacity: 1; }
  100% { opacity: 0; translate: calc(var(--dir) * var(--run)) 0; }
}

@keyframes card-in {
  from {
    opacity: 0;
    transform: translate3d(var(--from-x), var(--from-y), 0) scale(0.97);
    filter: blur(8px);
  }
}

@keyframes ping {
  0% { box-shadow: 0 0 0 0 rgb(var(--accent) / 0.7); }
  70%, 100% { box-shadow: 0 0 0 0.5rem rgb(var(--accent) / 0); }
}

@keyframes rise {
  0% { opacity: 0; transform: translate3d(0, 0, 0); }
  10% { opacity: 0.9; }
  80% { opacity: 0.5; }
  100% { opacity: 0; transform: translate3d(var(--drift), -100vh, 0); }
}

@keyframes fall {
  0% { opacity: 0; transform: translate3d(0, 0, 0); }
  10% { opacity: 0.8; }
  80% { opacity: 0.45; }
  100% { opacity: 0; transform: translate3d(var(--drift), 100vh, 0); }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }

  .particle,
  .cursor-light,
  .beam__lane,
  .beam__flare { display: none; }
}
