/* ---------------------------------------------------------------------------
 * Base styles. Landing-page-only rules live below under `body.landing`.
 * ------------------------------------------------------------------------- */

@font-face {
  font-family: "Exo 2";
  src: url("/fonts/Exo2-VariableFont_wght.ttf") format("truetype-variations");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Exo 2";
  src: url("/fonts/Exo2-Italic-VariableFont_wght.ttf") format("truetype-variations");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

:root {
  --bg: #0a0a0f;
  --bg-elev: #13131a;
  --fg: #ececf1;
  --fg-muted: #a0a0b0;
  --accent-1: #8b5cf6;
  --accent-2: #22d3ee;
  --border: rgba(255, 255, 255, 0.08);
  --radius: 0.75rem;
  --container: 1100px;

  color-scheme: dark;
  font-family: "Exo 2", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
}

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

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  min-height: 100vh;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent-2);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

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

:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 2px;
  border-radius: 2px;
}

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

.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  background: var(--bg-elev);
  color: var(--fg);
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  z-index: 100;
}

.skip-link:focus {
  top: 1rem;
}

/* ---------------------------------------------------------------------------
 * Login page (body.login-page) — frosted card over the flock animation
 * ------------------------------------------------------------------------- */

body.login-page {
  display: grid;
  place-items: center;
  padding: 2rem 1rem;
  min-height: 100vh;
  min-height: 100dvh;
  position: relative;
  overflow: hidden;
}

/* Full-bleed flock canvas pinned behind everything. */
body.login-page .flock--background {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  z-index: 0;
  cursor: crosshair;
}

/* Share the landing's nav placement for visual continuity. */
body.login-page .nav--login {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  padding: 0.75rem 1.5rem;
  background: transparent;
  pointer-events: none;
}

body.login-page .nav--login .nav__wordmark {
  pointer-events: auto;
  color: var(--fg);
  font-weight: 700;
  letter-spacing: -0.01em;
  font-size: 1.1rem;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.55);
}

body.login-page .nav--login .nav__wordmark:hover {
  text-decoration: none;
  color: var(--fg);
}

body.login-page .login {
  position: relative;
  z-index: 5;
  display: grid;
  gap: 1.5rem;
  width: 100%;
  max-width: 22rem;
  justify-items: center;
}

body.login-page .login__card {
  width: 100%;
  background: rgba(19, 19, 26, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  padding: 2rem 1.75rem;
  display: grid;
  gap: 1.25rem;
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(255, 255, 255, 0.03) inset;
}

body.login-page .login__title {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-align: center;
  color: var(--fg);
}

body.login-page .login__subtitle {
  margin: -0.5rem 0 0 0;
  text-align: center;
  color: var(--fg-muted);
  font-size: 0.85rem;
  letter-spacing: 0.02em;
}

body.login-page .login__providers {
  display: grid;
  gap: 0.75rem;
}

body.login-page .login__provider {
  display: inline-grid;
  grid-template-columns: 18px 1fr;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--fg);
  font-weight: 600;
  font-size: 0.95rem;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.1s ease;
}

body.login-page .login__provider:hover {
  text-decoration: none;
  border-color: var(--accent-2);
  background: rgba(34, 211, 238, 0.08);
  transform: translateY(-1px);
}

body.login-page .login__provider:active {
  transform: translateY(0);
}

body.login-page .login__provider[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
  pointer-events: none;
}

/* Reset the default <button> appearance so .login__provider styling wins. */
body.login-page button.login__provider {
  font-family: inherit;
  text-align: left;
  cursor: pointer;
}

body.login-page .login__provider-icon {
  width: 18px;
  height: 18px;
}

body.login-page .login__provider-label {
  text-align: left;
}

body.login-page .login__divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.75rem;
  color: var(--fg-muted);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

body.login-page .login__divider::before,
body.login-page .login__divider::after {
  content: "";
  height: 1px;
  background: var(--border);
}

body.login-page .login__error {
  padding: 0.65rem 0.9rem;
  border: 1px solid rgba(255, 99, 99, 0.35);
  background: rgba(255, 99, 99, 0.12);
  color: #ffbcbc;
  border-radius: var(--radius);
  font-size: 0.85rem;
}


/* ---------------------------------------------------------------------------
 * Landing page (body.landing) — tokens and base
 * ------------------------------------------------------------------------- */

body.landing {
  display: block;
}

body.landing main {
  max-width: none;
  padding: 0;
  position: relative;
}

body.landing .hero-overlay {
  position: absolute;
  left: 1.5rem;
  bottom: 2.5rem;
  max-width: 38ch;
  padding-right: 1rem;
  pointer-events: none;
  z-index: 5;
}

body.landing .hero-overlay__title {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.15;
  margin: 0 0 0.75rem 0;
  color: var(--fg);
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.85);
}

body.landing .hero-overlay__body {
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--fg-muted);
  margin: 0 0 1.25rem 0;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.85);
}

body.landing .hero-overlay__cta {
  margin: 0;
  color: var(--fg);
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.85);
}

body.landing .hero-overlay__cta-trigger {
  pointer-events: auto;
  cursor: pointer;
}

body.landing .hero-overlay__cta-reveal {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
}

body.landing .hero-overlay__cta.is-revealed .hero-overlay__cta-reveal,
body.landing .hero-overlay__cta:focus-within .hero-overlay__cta-reveal {
  opacity: 1;
}

body.landing .hero-overlay__cta a {
  pointer-events: auto;
  color: var(--fg);
  text-decoration: none;
  padding: 0.15rem 0;
}

body.landing .hero-overlay__cta a:hover {
  text-decoration: none;
  color: var(--accent-2);
}

/* ---------------------------------------------------------------------------
 * Landing nav
 * ------------------------------------------------------------------------- */

body.landing .nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: 1fr 44px;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1.5rem;
  background: transparent;
}

body.landing .nav__wordmark {
  justify-self: start;
  color: var(--fg);
  font-weight: 700;
  letter-spacing: -0.01em;
  font-size: 1.1rem;
}

body.landing .nav__wordmark:hover {
  text-decoration: none;
  color: var(--fg);
}

body.landing .nav__user {
  position: relative;
  width: 44px;
  height: 44px;
  display: inline-grid;
  place-items: center;
  justify-self: end;
  border-radius: 50%;
}

body.landing .nav__user:hover {
  text-decoration: none;
}

body.landing .nav__user-canvas {
  position: absolute;
  width: 80px;
  height: 80px;
  left: -18px;
  top: -18px;
  pointer-events: none;
  display: block;
}


/* ---------------------------------------------------------------------------
 * Flocking canvas
 * ------------------------------------------------------------------------- */

body.landing .flock {
  display: block;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  background: #050813;
  cursor: crosshair;
}

/* ---------------------------------------------------------------------------
 * Reduced-motion catch-all — kill transitions and animations
 * ------------------------------------------------------------------------- */

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

/* ---------------------------------------------------------------------------
 * Game launcher (desktop only)
 * ------------------------------------------------------------------------- */

body.landing .game-launcher {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 44px;
  height: 44px;
  display: inline-grid;
  place-items: center;
  background: transparent;
  color: var(--fg);
  border: none;
  border-radius: 50%;
  z-index: 20;
  padding: 0;
  overflow: visible;
  cursor: pointer;
  transition: transform 0.15s ease;
}

body.landing .game-launcher:hover {
  transform: translateY(-1px);
}

body.landing .game-launcher__canvas {
  position: absolute;
  width: 80px;
  height: 80px;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  display: block;
}

@media (max-width: 1023px) {
  body.landing .game-launcher {
    display: none;
  }
}

/* ---------------------------------------------------------------------------
 * Games modal
 * ------------------------------------------------------------------------- */

body.landing .games-modal {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: grid;
  place-items: center;
  z-index: 30;
  padding: 1.5rem;
}

body.landing .games-modal__card {
  position: relative;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  width: min(420px, 100%);
  max-height: 80vh;
  overflow: auto;
}

body.landing .games-modal__title {
  margin: 0 0 1.25rem 0;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg);
}

body.landing .games-modal__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}

body.landing .games-modal__item {
  display: grid;
  gap: 0.25rem;
  padding: 0.85rem 1rem;
  width: 100%;
  text-align: left;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--fg);
  transition: border-color 0.15s ease, background 0.15s ease;
}

body.landing .games-modal__item:hover {
  border-color: var(--accent-2);
  background: rgba(34, 211, 238, 0.04);
}

body.landing .games-modal__item-title {
  display: block;
  font-weight: 700;
  font-size: 1rem;
}

body.landing .games-modal__item-desc {
  display: block;
  color: var(--fg-muted);
  font-size: 0.85rem;
}

body.landing .games-modal__close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 32px;
  height: 32px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  color: var(--fg-muted);
  font-size: 1.1rem;
  line-height: 1;
  padding: 0;
}

body.landing .games-modal__close:hover {
  color: var(--fg);
}

/* ---------------------------------------------------------------------------
 * Game host (replaces the flock canvas region while playing)
 * ------------------------------------------------------------------------- */

body.landing .game-host {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: var(--bg);
  z-index: 20;
}

body.landing.game-active {
  overflow: hidden;
}

body.landing .game-close {
  position: fixed;
  top: 1rem;
  right: 1rem;
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  background: var(--bg-elev);
  color: var(--fg);
  border: 1px solid var(--border);
  border-radius: 50%;
  z-index: 25;
  font-size: 1.1rem;
  line-height: 1;
  padding: 0;
  transition: border-color 0.15s ease;
}

body.landing .game-close:hover {
  border-color: var(--accent-2);
}

body.landing.game-active #flock-canvas,
body.landing.game-active .hero-overlay,
body.landing.game-active #nav {
  display: none;
}

/* ---------------------------------------------------------------------------
 * Breakout (brand-palette restyle)
 * ------------------------------------------------------------------------- */

body.landing .breakout-wrap {
  position: relative;
  width: min(95vw, calc(95vh * 4 / 3));
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow:
    0 20px 60px rgba(34, 211, 238, 0.18),
    0 0 0 1px var(--border);
}

body.landing .breakout-canvas {
  display: block;
  width: 100%;
  height: 100%;
  cursor: none;
}

body.landing .breakout-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  text-align: center;
  transition: opacity 0.25s ease;
  gap: 0.25rem;
}

body.landing .breakout-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

body.landing .breakout-overlay__title {
  font-size: 2.5rem;
  margin: 0 0 0.5rem 0;
  letter-spacing: 0.5em;
  color: var(--fg);
  font-weight: 700;
}

body.landing .breakout-overlay p {
  font-size: 0.85rem;
  color: var(--fg-muted);
  margin: 0.15rem 0;
  line-height: 1.6;
}

body.landing .breakout-overlay kbd {
  display: inline-block;
  padding: 0.1rem 0.45rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-family: inherit;
  font-size: 0.75rem;
  color: var(--fg);
}

body.landing .breakout-overlay__btn {
  margin-top: 1.25rem;
  padding: 0.75rem 2rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: transparent;
  color: var(--fg);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  transition: border-color 0.15s ease, transform 0.1s ease;
}

body.landing .breakout-overlay__btn:hover {
  border-color: var(--accent-2);
  transform: translateY(-1px);
}

body.landing .breakout-overlay__btn:active {
  transform: translateY(0);
}

/* ---------------------------------------------------------------------------
 * Asteroids
 * ------------------------------------------------------------------------- */

body.landing .asteroids-wrap {
  position: relative;
  width: min(95vw, calc(95vh * 4 / 3));
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow:
    0 20px 60px rgba(34, 211, 238, 0.18),
    0 0 0 1px var(--border);
}

body.landing .asteroids-canvas {
  display: block;
  width: 100%;
  height: 100%;
}

body.landing .asteroids-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  text-align: center;
  transition: opacity 0.25s ease;
  gap: 0.25rem;
}

body.landing .asteroids-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

body.landing .asteroids-overlay__title {
  font-size: 2.5rem;
  margin: 0 0 0.5rem 0;
  letter-spacing: 0.5em;
  color: var(--fg);
  font-weight: 700;
}

body.landing .asteroids-overlay p {
  font-size: 0.85rem;
  color: var(--fg-muted);
  margin: 0.15rem 0;
  line-height: 1.6;
}

body.landing .asteroids-overlay kbd {
  display: inline-block;
  padding: 0.1rem 0.45rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-family: inherit;
  font-size: 0.75rem;
  color: var(--fg);
}

body.landing .asteroids-overlay__btn {
  margin-top: 1.25rem;
  padding: 0.75rem 2rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: transparent;
  color: var(--fg);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  transition: border-color 0.15s ease, transform 0.1s ease;
}

body.landing .asteroids-overlay__btn:hover {
  border-color: var(--accent-2);
  transform: translateY(-1px);
}

body.landing .asteroids-overlay__btn:active {
  transform: translateY(0);
}

/* ---------------------------------------------------------------------------
 * Space Invaders
 * ------------------------------------------------------------------------- */

body.landing .space-invaders-wrap {
  position: relative;
  width: min(95vw, calc(95vh * 8 / 9));
  aspect-ratio: 8 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow:
    0 20px 60px rgba(34, 211, 238, 0.18),
    0 0 0 1px var(--border);
  background: #000;
}

body.landing .space-invaders-canvas {
  display: block;
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

body.landing .space-invaders-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  text-align: center;
  transition: opacity 0.25s ease;
  gap: 0.25rem;
}

body.landing .space-invaders-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

body.landing .space-invaders-overlay__title {
  font-size: 2.5rem;
  margin: 0 0 0.5rem 0;
  letter-spacing: 0.5em;
  color: var(--fg);
  font-weight: 700;
}

body.landing .space-invaders-overlay p {
  font-size: 0.85rem;
  color: var(--fg-muted);
  margin: 0.15rem 0;
  line-height: 1.6;
}

body.landing .space-invaders-overlay kbd {
  display: inline-block;
  padding: 0.1rem 0.45rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-family: inherit;
  font-size: 0.75rem;
  color: var(--fg);
}

body.landing .space-invaders-overlay__btn {
  margin-top: 1.25rem;
  padding: 0.75rem 2rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: transparent;
  color: var(--fg);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  transition: border-color 0.15s ease, transform 0.1s ease;
}

body.landing .space-invaders-overlay__btn:hover {
  border-color: var(--accent-2);
  transform: translateY(-1px);
}

body.landing .space-invaders-overlay__btn:active {
  transform: translateY(0);
}

/* ---------------------------------------------------------------------------
 * Landing depth sections — "descend into the ocean" (services, fathom)
 * ------------------------------------------------------------------------- */

/* The hero occupies exactly the first viewport, so the hero overlay (absolute,
   bottom-anchored) pins to the bottom of the hero — not the bottom of the
   whole scrolling page. */
body.landing .hero {
  position: relative;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

/* Everything below the waterline is one continuous water column: a single
   gradient that carries the deep-water tone from just under the hero all the
   way down, darkening to black at the bottom of the page. The depth sections
   are transparent so this shows through both of them seamlessly. */
body.landing .deep {
  position: relative;
  /* Linear from the hero's deep-water seam tone (#081b2b, where the shader's
     below-waterline gradient lands at the hero's bottom edge) to black — same
     per-pixel rate as the shader, so the two meet with no seam line. */
  background: linear-gradient(180deg, #081b2b 0%, #000 100%);
}

body.landing .depth {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 6rem 1.5rem;
}

/* Sections are transparent; the continuous water gradient lives on `.deep`. */
body.landing .depth--services,
body.landing .depth--fathom {
  background: transparent;
}

body.landing .depth__bubbles {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
  z-index: 0;
}

/* Seabed at the very bottom of the ocean (deepest section). */
body.landing .ocean-floor {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 30vh;
  display: block;
  pointer-events: none;
  z-index: 1;
}

body.landing .depth__inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--container);
  display: flex;
  align-items: center;
  gap: clamp(2rem, 5vw, 5rem);
}

body.landing .depth__text {
  flex: 1 1 0;
  min-width: 0;
}

body.landing .depth__graphic,
body.landing .depth__media {
  flex: 1.4 1 0;
  min-width: 0;
  display: flex;
  justify-content: center;
}

body.landing .depth__title {
  margin: 0 0 0.75rem 0;
  font-size: clamp(1.6rem, 3.2vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.15;
  color: var(--fg);
}

body.landing .depth__title--xl {
  font-size: clamp(1.8rem, 4vw, 3.25rem);
}

body.landing .depth__lead {
  margin: 0;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--fg-muted);
  max-width: 42ch;
}

body.landing .depth__graphic svg {
  width: 100%;
  max-width: 520px;
  height: auto;
}

/* Diagram micro-animations — a radar ping from the core and gently pulsing
   labelled nodes. Disabled under reduced motion (see the block below). */
body.landing .dash-ping {
  transform-box: fill-box;
  transform-origin: center;
  animation: dash-ping 3.4s ease-out infinite;
}

@keyframes dash-ping {
  0% {
    transform: scale(1);
    opacity: 0.5;
  }
  80% {
    opacity: 0;
  }
  100% {
    transform: scale(3.8);
    opacity: 0;
  }
}

body.landing .dash-pulse {
  animation: dash-pulse 2.6s ease-in-out infinite;
}

body.landing .dash-pulse--2 {
  animation-delay: 0.85s;
}

body.landing .dash-pulse--3 {
  animation-delay: 1.7s;
}

@keyframes dash-pulse {
  0%,
  100% {
    opacity: 0.3;
  }
  50% {
    opacity: 1;
  }
}

/* Faux product screenshot — a compact agent-dashboard UI. Sized in container
   query units (cqw) so it scales with the image slot's width. */
body.landing .depth__media {
  container-type: inline-size;
}
body.landing .depth__shot {
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 1.6cqw;
  background: #0a0c12;
  border: 1px solid var(--border);
  box-shadow: 0 4cqw 9cqw rgba(0, 0, 0, 0.5);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  color: var(--fg);
}
body.landing .shot__bar {
  display: flex;
  align-items: center;
  gap: 1.4cqw;
  padding: 1.4cqw 2cqw;
  background: #0d1018;
  border-bottom: 1px solid var(--border);
}
body.landing .shot__dots {
  display: inline-flex;
  gap: 1cqw;
}
body.landing .shot__dots i {
  width: 1.4cqw;
  height: 1.4cqw;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
}
body.landing .shot__title {
  font-size: 1.7cqw;
  letter-spacing: 0.04em;
  color: var(--fg-muted);
}
body.landing .shot__body {
  flex: 1;
  display: flex;
  min-height: 0;
}
body.landing .shot__side {
  width: 9%;
  background: #0c0f16;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.4cqw;
  padding: 1.8cqw 0;
}
body.landing .shot__logo {
  width: 2.6cqw;
  height: 2.6cqw;
  border-radius: 0.8cqw;
  background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
  margin-bottom: 0.6cqw;
}
body.landing .shot__nav {
  width: 52%;
  height: 0.9cqw;
  border-radius: 0.5cqw;
  background: rgba(255, 255, 255, 0.1);
}
body.landing .shot__nav--on {
  background: var(--accent-2);
}
body.landing .shot__main {
  flex: 1;
  min-width: 0;
  padding: 2cqw;
  display: flex;
  flex-direction: column;
  gap: 1.6cqw;
}
body.landing .shot__stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.4cqw;
}
body.landing .shot__stat {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 1.2cqw;
  padding: 1.3cqw 1.5cqw;
  display: flex;
  flex-direction: column;
  gap: 0.4cqw;
}
body.landing .shot__stat b {
  font-size: 2.6cqw;
  font-weight: 700;
  line-height: 1;
  color: var(--fg);
  font-variant-numeric: tabular-nums;
}
body.landing .shot__stat span {
  font-size: 1.4cqw;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg-muted);
}
body.landing .shot__panel {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 1.2cqw;
  padding: 1.3cqw 1.5cqw 0.9cqw;
}
body.landing .shot__panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1cqw;
}
body.landing .shot__panel-title {
  font-size: 1.6cqw;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg-muted);
}
body.landing .shot__chip {
  font-size: 1.4cqw;
  color: var(--accent-2);
  border: 1px solid rgba(34, 211, 238, 0.4);
  border-radius: 999px;
  padding: 0.2cqw 1cqw;
}
body.landing .shot__chart {
  width: 100%;
  height: 8cqw;
  display: block;
}
body.landing .shot__area {
  fill: rgba(34, 211, 238, 0.14);
}
body.landing .shot__line {
  fill: none;
  stroke: var(--accent-2);
  stroke-width: 1.5;
  vector-effect: non-scaling-stroke;
}
body.landing .shot__list {
  display: flex;
  flex-direction: column;
  gap: 1cqw;
}
body.landing .shot__row {
  display: flex;
  align-items: center;
  gap: 1.4cqw;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 1cqw;
  padding: 1cqw 1.4cqw;
}
body.landing .shot__av {
  width: 2.4cqw;
  height: 2.4cqw;
  border-radius: 0.7cqw;
  background: var(--accent-2);
  flex-shrink: 0;
}
body.landing .shot__av--2 {
  background: var(--accent-1);
}
body.landing .shot__av--3 {
  background: #5a9b9b;
}
body.landing .shot__av--4 {
  background: #9b6d8a;
}
body.landing .shot__rowname {
  flex: 1;
  min-width: 0;
  font-size: 1.7cqw;
  color: var(--fg);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
body.landing .shot__pill {
  font-size: 1.4cqw;
  letter-spacing: 0.03em;
  border-radius: 999px;
  padding: 0.3cqw 1.1cqw;
  flex-shrink: 0;
}
body.landing .shot__pill--run {
  color: #34d399;
  background: rgba(52, 211, 153, 0.15);
}
body.landing .shot__pill--idle {
  color: var(--fg-muted);
  background: rgba(255, 255, 255, 0.06);
}
body.landing .shot__pill--queue {
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.15);
}

body.landing .depth-scroll {
  position: absolute;
  bottom: 2.5rem;
  right: 2rem;
  z-index: 6;
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.65rem 1.5rem;
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
  color: var(--fg);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  border-radius: 999px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.6);
  transition: border-color 0.18s ease, background 0.18s ease;
}

body.landing .depth-scroll--hero {
  bottom: 2rem;
}

body.landing .depth-scroll:hover {
  border-color: var(--accent-2);
  background: rgba(34, 211, 238, 0.1);
}

body.landing .depth-scroll__arrow {
  transition: transform 0.2s ease;
  animation: depth-bob 1.8s ease-in-out infinite;
}

body.landing .depth-scroll:hover .depth-scroll__arrow {
  transform: translateY(2px);
}

@keyframes depth-bob {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(3px);
  }
}

/* Reveal-on-scroll: hidden until the section gets `.revealed` (added in JS). */
body.landing .depth .depth__text,
body.landing .depth .depth__graphic,
body.landing .depth .depth__media {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.9s ease, transform 0.9s ease;
}

body.landing .depth.revealed .depth__text {
  opacity: 1;
  transform: none;
}

body.landing .depth.revealed .depth__graphic,
body.landing .depth.revealed .depth__media {
  opacity: 1;
  transform: none;
  transition-delay: 1s;
}

body.landing.game-active #services,
body.landing.game-active #fathom {
  display: none;
}

@media (max-width: 720px) {
  body.landing .depth__inner {
    flex-direction: column;
  }
}

/* Reduced motion: show content immediately, no bobbing arrow. */
@media (prefers-reduced-motion: reduce) {
  body.landing .depth .depth__text,
  body.landing .depth .depth__graphic,
  body.landing .depth .depth__media {
    opacity: 1;
    transform: none;
    transition: none;
  }
  body.landing .depth-scroll__arrow {
    animation: none;
  }
  /* Static diagram: drop the ping, hold the labelled nodes at full opacity. */
  body.landing .dash-ping {
    display: none;
  }
  body.landing .dash-pulse {
    opacity: 0.9;
  }
}
