/* ============================================================
   AETHER — Aerospace Intelligence
   Editorial deep-space minimalism · instrument-grade precision
   Hero: oversized wordmark + numbered engine index (editorial)
   ============================================================ */

:root {
  --ink: #06080C;
  --ink-raised: #0C1118;
  --glass: rgba(255, 255, 255, 0.04);
  --glass-border: rgba(255, 255, 255, 0.10);
  --aether: #6FE3FF;
  --aether-dim: rgba(111, 227, 255, 0.35);
  --aether-faint: rgba(111, 227, 255, 0.08);
  --verify: #E9C77B;
  --text: #EAF1F6;
  --text-dim: #8A97A6;
  --rule-dotted: rgba(255, 255, 255, 0.16);

  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --radius: 18px;
  --container: 1280px;
  --nav-h: 76px;
  color-scheme: dark;
}

/* ============================================================
   LIGHT THEME — bright, daytime-legible, same editorial system.
   Variable overrides win by source order; component overrides
   below win by the added [data-theme="light"] specificity.
   ============================================================ */
[data-theme="light"] {
  --ink: #EEF2F7;                       /* bright cool page background */
  --ink-raised: #FFFFFF;                /* cards & raised sections */
  --glass: rgba(255, 255, 255, 0.62);
  --glass-border: rgba(15, 27, 42, 0.12);
  --aether: #0892BD;                    /* deeper cyan for contrast on white */
  --aether-dim: rgba(8, 146, 189, 0.40);
  --aether-faint: rgba(8, 146, 189, 0.08);
  --verify: #9A6B12;                    /* darker gold, readable on light */
  --text: #0B1118;
  --text-dim: #51606F;
  --rule-dotted: rgba(15, 27, 42, 0.18);
  color-scheme: light;
}

[data-theme="light"] .nav.is-scrolled {
  background: rgba(255, 255, 255, 0.74);
  border-bottom-color: var(--glass-border);
}
[data-theme="light"] .nav__links a:hover { background: rgba(15, 27, 42, 0.06); }
[data-theme="light"] .nav__theme:hover {
  background: rgba(15, 27, 42, 0.06);
  border-color: rgba(15, 27, 42, 0.12);
}
[data-theme="light"] .glass {
  box-shadow: 0 1px 2px rgba(15, 27, 42, 0.05), 0 10px 34px rgba(15, 27, 42, 0.07);
}
[data-theme="light"] .glass::before {
  background: linear-gradient(90deg, transparent, rgba(15, 27, 42, 0.10), transparent);
}
[data-theme="light"] .tier:hover { border-color: rgba(15, 27, 42, 0.18); }
[data-theme="light"] .tier--featured {
  background: var(--glass);
}
/* Filled blue surfaces use the bright sign-in cyan in light mode too (matches
   dark mode); text/accent uses of --aether stay deep for contrast on white. */
[data-theme="light"] .btn--primary { background: #6FE3FF; color: #06080C; }
[data-theme="light"] .tier__badge { background: #6FE3FF; color: #06080C; }
[data-theme="light"] .billing-toggle__btn.is-active { background: #6FE3FF; }
[data-theme="light"] .footer__legal { border-top-color: rgba(15, 27, 42, 0.08); }
[data-theme="light"] .readout__code { background: rgba(15, 27, 42, 0.05); }
[data-theme="light"] .verify-tag { border-color: rgba(154, 107, 18, 0.40); }
[data-theme="light"] .hero__glow {
  background:
    radial-gradient(1100px 640px at 16% -10%, rgba(8, 146, 189, 0.12), transparent 68%),
    radial-gradient(940px 560px at 90% 112%, rgba(8, 146, 189, 0.10), transparent 70%);
}
/* Hover & divider tints: the dark theme lifts surfaces with white washes;
   on light those vanish, so swap to ink-based tints of equal weight. */
[data-theme="light"] .engine-card:hover {
  border-color: rgba(15, 27, 42, 0.18);
  background: rgba(15, 27, 42, 0.035);
}
[data-theme="light"] .tier:hover {
  border-color: rgba(15, 27, 42, 0.18);
  background: rgba(15, 27, 42, 0.035);
}
[data-theme="light"] .tier__features li { border-bottom-color: rgba(15, 27, 42, 0.08); }

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--ink);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

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

::selection { background: var(--aether-dim); color: var(--text); }

.container {
  width: min(100% - 3.5rem, var(--container));
  margin-inline: auto;
}

.section { padding: clamp(5.5rem, 12vh, 9rem) 0; position: relative; }

.mono { font-family: var(--font-mono); }

/* ---------- Typography ---------- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  color: var(--text-dim);
  margin-bottom: 1.4rem;
}

.section__title {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 4vw, 2.9rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.12;
  margin-bottom: 1.2rem;
}

/* ---------- Buttons ---------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  padding: 0.85rem 1.9rem;
  border-radius: 10px;
  transition: transform 200ms var(--ease-out), box-shadow 200ms var(--ease-out),
              background-color 200ms var(--ease-out), border-color 200ms var(--ease-out);
  overflow: hidden;
}
.btn:active { transform: scale(0.98); }

.btn--primary { background: var(--aether); color: var(--ink); }
.btn--primary:hover {
  box-shadow: 0 0 32px rgba(111, 227, 255, 0.35);
  transform: translateY(-1px);
}

.btn--ghost {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  color: var(--text);
}
.btn--ghost:hover {
  border-color: var(--aether-dim);
  box-shadow: 0 0 24px rgba(111, 227, 255, 0.12);
  transform: translateY(-1px);
}

.btn--full { width: 100%; }

/* Cursor-following radial highlight (set via --mx/--my from JS) */
.glow::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  transition: opacity 250ms var(--ease-out);
  background: radial-gradient(220px circle at var(--mx, 50%) var(--my, 50%),
              rgba(111, 227, 255, 0.10), transparent 65%);
}
.glow:hover::after { opacity: 1; }
.engine-card.glow::after,
.tier.glow::after {
  display: none;
}

/* ---------- Glass surfaces ---------- */
.glass {
  position: relative;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.glass::before {
  content: "";
  position: absolute;
  top: 0; left: 8%; right: 8%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.22), transparent);
  pointer-events: none;
}

/* ============================================================
   NAV — editorial: underlined links with counts
   ============================================================ */
#nav-sentinel { position: absolute; top: 0; height: 1px; width: 1px; }

.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  transition: background-color 300ms var(--ease-out), border-color 300ms var(--ease-out);
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  background: rgba(6, 8, 12, 0.72);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom-color: var(--glass-border);
}

.nav__inner {
  width: min(100% - 3.5rem, var(--container));
  margin-inline: auto;
  display: flex;
  align-items: center;
  height: var(--nav-h);
}

.nav__brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: 0.05em;
}
.nav__brand sup { font-size: 0.55em; letter-spacing: 0; opacity: 0.7; }

.nav__links {
  display: flex;
  gap: clamp(0.2rem, 0.8vw, 0.7rem);
  margin-inline: auto;
}
.nav__links a {
  position: relative;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text);
  padding: 0.42rem 0.72rem;
  border-radius: 9px;
  transition: background-color 240ms var(--ease-out), color 240ms var(--ease-out),
    backdrop-filter 240ms var(--ease-out);
}
.nav__links a:hover {
  background: rgba(255, 255, 255, 0.05);
  -webkit-backdrop-filter: blur(8px) saturate(130%);
  backdrop-filter: blur(8px) saturate(130%);
}
.nav__links a.is-current { color: var(--aether); }
.nav__count {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--text-dim);
  vertical-align: super;
  margin-left: 0.2rem;
}

.nav__cta {
  font-size: 0.92rem;
  font-weight: 500;
  padding: 0.5rem 1.05rem;
  border-radius: 11px;
  border: 1px solid var(--aether-dim);
  background: rgba(111, 227, 255, 0.06);
  transition: background-color 240ms var(--ease-out), border-color 240ms var(--ease-out),
    backdrop-filter 240ms var(--ease-out);
}
.nav__cta:hover {
  background: rgba(111, 227, 255, 0.12);
  border-color: var(--aether);
  -webkit-backdrop-filter: blur(10px) saturate(140%);
  backdrop-filter: blur(10px) saturate(140%);
}

/* theme toggle */
.nav__theme {
  flex: none;
  margin-left: 0.6rem;
  width: 40px; height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 11px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font-size: 1.05rem;
  line-height: 1;
  transition: background-color 240ms var(--ease-out), border-color 240ms var(--ease-out),
    backdrop-filter 240ms var(--ease-out);
}
.nav__theme:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
  -webkit-backdrop-filter: blur(8px) saturate(130%);
  backdrop-filter: blur(8px) saturate(130%);
}
.nav__theme::before { content: "\263C"; }                       /* ☼ sun — offer light off dark */
[data-theme="light"] .nav__theme::before { content: "\263E"; }  /* ☾ moon — offer dark off light */

/* hamburger toggle — hidden on desktop, shown below the breakpoint */
.nav__toggle {
  display: none;
  flex: none;
  width: 40px; height: 40px;
  margin-left: 0.4rem;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 11px;
  background: transparent;
  cursor: pointer;
}
.nav__toggle span {
  display: block;
  width: 20px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 240ms var(--ease-out), opacity 200ms var(--ease-out);
}
.nav.is-open .nav__toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav.is-open .nav__toggle span:nth-child(2) { opacity: 0; }
.nav.is-open .nav__toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.nav__links-cta { display: none; }

@media (max-width: 860px) {
  .nav__toggle { display: inline-flex; }
  .nav__theme { margin-left: auto; }
  .nav__cta { display: none; }                 /* CTA moves into the menu */

  /* the bar stays clear — the menu is a soft glass veil, not a boxed panel */
  .nav.is-open { background: transparent; border-bottom-color: transparent; }

  .nav__links {
    display: flex;
    position: absolute;
    top: var(--nav-h);
    left: 0; right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.1rem;
    margin: 0;
    padding: 1rem 1.6rem 2.2rem;
    background: linear-gradient(to bottom, rgba(6, 8, 12, 0.6), rgba(6, 8, 12, 0));
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
    border: 0;
    /* smooth open / close */
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
    transition: opacity 340ms var(--ease-out), transform 340ms var(--ease-out);
  }
  .nav.is-open .nav__links {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }
  .nav__links a {
    width: auto;
    font-size: 1.3rem;
    font-weight: 500;
    color: var(--text);
    padding: 0.5rem 0;
    border: 0;
    border-radius: 0;
    background: none;
  }
  .nav__links a:hover,
  .nav__links a:active { background: none; }
  .nav__links a.is-current { color: var(--aether); }
  .nav__count { font-size: 0.7rem; }
  .nav__links-cta {
    display: inline-block !important;
    margin-top: 0.7rem;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: none !important;
    color: var(--aether) !important;
    font-size: 1.3rem;
  }
  [data-theme="light"] .nav__links {
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.66), rgba(255, 255, 255, 0));
  }
}

/* ============================================================
   HERO — editorial composition
   wordmark top-left · numbered index top-right
   statement bottom-left · talk card bottom-right
   ============================================================ */
.hero {
  position: relative;
  min-height: 100svh;
  overflow: hidden;
}

.hero__field { position: absolute; inset: 0; width: 100%; height: 100%; }

.hero__glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(1100px 640px at 18% -8%, rgba(111, 227, 255, 0.07), transparent 70%),
    radial-gradient(900px 540px at 88% 112%, rgba(111, 227, 255, 0.05), transparent 70%);
}

.hero__inner {
  position: relative;
  z-index: 2;
  width: min(100% - 3.5rem, var(--container));
  margin-inline: auto;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  padding: calc(var(--nav-h) + 2.2rem) 0 2.6rem;
}

/* centered focal block — vertically and horizontally centered, restrained scale */
.hero__center {
  margin: auto 0;
  width: 100%;
  text-align: center;
}
.hero__centerline {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 5.2vw, 4.2rem);
  font-weight: 600;
  letter-spacing: -0.012em;
  line-height: 1.05;
}
.hero__centersub {
  margin-top: 1.1rem;
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  color: var(--text-dim);
  text-transform: uppercase;
}

/* two-part headline reveal: first word shows, second eases in.
   Base state is the visible/final state so it never gets stuck hidden;
   the keyframes (with `both` fill) supply the entrance. */
.hero__word { display: inline-block; }
.hero__word--in {
  animation: word-in 1100ms var(--ease-out) 950ms both;
}
@keyframes word-in {
  0%   { opacity: 0; filter: blur(12px); transform: translateY(0.1em) scale(0.98); }
  100% { opacity: 1; filter: blur(0);    transform: none; }
}

/* bottom band — statement left, plus markers across */
.hero__base {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
}

.hero__statement { max-width: 36ch; }
.hero__statement-dim,
.hero__statement-strong {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.7vw, 2rem);
  font-weight: 600;
  letter-spacing: -0.018em;
  line-height: 1.22;
}
.hero__statement-dim { color: var(--text-dim); }

.hero__scroll {
  display: inline-block;
  margin-top: 1.7rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  transition: color 200ms var(--ease-out);
}
.hero__scroll:hover { color: var(--text); }
.hero__scroll span {
  display: inline-block;
  margin-left: 0.5rem;
  animation: scroll-pulse 1.6s var(--ease-out) infinite;
}
@keyframes scroll-pulse {
  0%, 100% { transform: translateY(0); opacity: 0.5; }
  50% { transform: translateY(5px); opacity: 1; }
}

/* hero responsive */
@media (max-width: 620px) {
  .hero__base { flex-direction: column; align-items: flex-start; }
}

/* ============================================================
   DEPLOYMENT — local / on-prem / air-gap / cloud posture
   ============================================================ */
.deployment { background: var(--ink); }

.deployment__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.1rem;
}
@media (max-width: 1040px) {
  .deployment__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
  .deployment__grid { grid-template-columns: 1fr; }
}

.deployment-card {
  padding: 1.65rem 1.45rem;
  min-height: 230px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-color: rgba(111, 227, 255, 0.13);
}
.deployment-card__kicker {
  font-size: 0.64rem;
  letter-spacing: 0.18em;
  color: var(--aether);
}
.deployment-card h3 {
  font-family: var(--font-display);
  font-size: 1.08rem;
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin: 1rem 0 0.7rem;
}
.deployment-card p:not(.deployment-card__kicker) {
  color: var(--text-dim);
  font-size: 0.9rem;
  overflow-wrap: break-word;
}
/* ============================================================
   ENGINES — independent units, each links to its own page
   ============================================================ */
.engines__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}
.engines__note {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  color: var(--text-dim);
  text-transform: uppercase;
  max-width: 340px;
  line-height: 2;
}

.engines__grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1rem;
}

.engine-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 250px;
  padding: 1.65rem 1.45rem;
  overflow: hidden;
  border-color: rgba(111, 227, 255, 0.13);
  transition: transform 260ms var(--ease-out), background-color 220ms var(--ease-out),
              border-color 220ms var(--ease-out), box-shadow 220ms var(--ease-out);
  will-change: transform;
}
.engine-card:hover {
  transform: translateY(-6px);
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.045);
  box-shadow: none;
}

.engine-card__descriptor {
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  margin-bottom: 1.1rem;
  /* (NN) NAME on the first line, the function word directly UNDER the name */
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.45rem 0.55rem;
  align-items: baseline;
}
.engine-card__num { grid-column: 1; color: var(--text-dim); font-size: 0.64rem; }
.engine-card__name { grid-column: 2; font-weight: 600; transition: color 200ms var(--ease-out); }
.engine-card:hover .engine-card__name { color: var(--aether); }
.engine-card__fn { grid-column: 2; color: var(--text-dim); font-size: 0.66rem; }

.engine-card__title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.32;
  margin-bottom: 0.6rem;
}

.engine-card__copy {
  font-size: 0.86rem;
  line-height: 1.55;
  color: var(--text-dim);
  margin-bottom: 0;
}

.engine-card__open {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.16em;
  color: var(--text-dim);
  white-space: nowrap;
  opacity: 0.55;
  margin-top: 1.6rem;
  transition: color 200ms var(--ease-out), opacity 200ms var(--ease-out);
}
.engine-card:hover .engine-card__open { color: var(--aether); opacity: 1; }

@media (max-width: 1080px) {
  .engines__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* ============================================================
   MOBILE — swipeable 3D card decks (engines + deployment).
   Replaces the tall vertical stack with a shuffle-through carousel.
   Tablet and desktop layouts are untouched.
   ============================================================ */
@media (max-width: 620px) {
  .engines__grid,
  .deployment__grid {
    display: flex;
    grid-template-columns: none;
    overflow-x: auto;
    overflow-y: visible;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 7%;
    -webkit-overflow-scrolling: touch;
    gap: 0.85rem;
    padding: 1.6rem 7% 1.9rem;       /* leading/trailing space centers end cards */
    margin: 0;
    perspective: 1200px;
    scrollbar-width: none;
  }
  .engines__grid::-webkit-scrollbar,
  .deployment__grid::-webkit-scrollbar { display: none; }

  .engine-card,
  .deployment-card {
    flex: 0 0 86%;
    scroll-snap-align: center;
    min-height: auto;
  }
  /* keep deck cards visible regardless of horizontal reveal position */
  .engines__grid > .reveal,
  .deployment__grid > .reveal { opacity: 1; transform: none; }
}

/* 3D coverflow where scroll-driven animation is supported; otherwise a
   clean flat snap carousel. */
@supports (animation-timeline: view(inline)) {
  @media (max-width: 620px) {
    .engine-card,
    .deployment-card {
      transform-style: preserve-3d;
      animation: cardShuffle linear both;
      animation-timeline: view(inline);
      animation-range: cover;
    }
    @keyframes cardShuffle {
      0%   { opacity: 0.35; transform: scale(0.8) rotateY(24deg); }
      50%  { opacity: 1;    transform: scale(1)   rotateY(0deg); }
      100% { opacity: 0.35; transform: scale(0.8) rotateY(-24deg); }
    }
  }
}

/* ============================================================
   PROOF / SHOW-THE-WORK
   ============================================================ */
.proof { background: var(--ink-raised); border-block: 1px solid var(--glass-border); }

.proof__layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.85fr) 1.3fr;
  gap: 3.5rem;
  align-items: center;
}
@media (max-width: 920px) {
  .proof__layout { grid-template-columns: 1fr; gap: 2.4rem; }
}
/* keep the readout's wide <pre> from stretching the grid track */
.proof__layout > * { min-width: 0; }

.proof__copy { color: var(--text-dim); max-width: 420px; }

.readout { overflow: hidden; }

.readout__bar {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.85rem 1.3rem;
  border-bottom: 1px solid var(--glass-border);
}
.readout__dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--aether);
  box-shadow: 0 0 8px var(--aether-dim);
}
.readout__bar-label {
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  color: var(--text-dim);
}

.readout__body {
  padding: 1.6rem 1.3rem 1.5rem;
  font-size: 0.78rem;
  line-height: 1.9;
}

.readout__line { white-space: pre-wrap; overflow-wrap: break-word; }
.readout__key { color: var(--text-dim); }
.readout__line--result strong { color: var(--text); font-weight: 600; }
.readout__ok { color: var(--aether); }
.readout__warn { color: var(--verify); }

.readout__body [data-line] {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 420ms var(--ease-out), transform 420ms var(--ease-out);
}
.readout__body [data-line].is-on { opacity: 1; transform: translateY(0); }

.readout__code {
  margin: 1.1rem 0;
  padding: 1rem 1.1rem;
  background: rgba(6, 8, 12, 0.6);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  font-size: 0.74rem;
  line-height: 1.7;
  overflow-x: auto;
}
.readout__code .c { color: var(--text-dim); }
.readout__code .k { color: var(--aether); }
.readout__code .f { color: var(--text); font-weight: 600; }

.verify-tag {
  display: inline-block;
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: var(--verify);
  border: 1px solid rgba(233, 199, 123, 0.35);
  border-radius: 6px;
  padding: 0.45rem 0.8rem;
  margin-top: 0.4rem;
}

/* ============================================================
   ENGINE PAGES
   ============================================================ */
/* engine-page hero uses the same minimal composition as the homepage:
   centered engine name + descriptor, statement bottom-left, plus marks */
.ep-hero .hero__centerline { font-size: clamp(2.6rem, 9vw, 7rem); }

/* editorial task rows */
.tasks__list { margin-top: 2.6rem; }
.task-row {
  display: grid;
  grid-template-columns: 64px 1fr 1.4fr;
  gap: 1.6rem;
  align-items: baseline;
  padding: 1.5rem 0.2rem;
  border-bottom: 1px dotted var(--rule-dotted);
}
.task-row:first-child { border-top: 1px dotted var(--rule-dotted); }
@media (max-width: 760px) {
  .task-row { grid-template-columns: 48px 1fr; }
  .task-row__copy { grid-column: 2; }
}

.task-row__num {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-dim);
}
.task-row__title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.task-row__copy { font-size: 0.92rem; color: var(--text-dim); }

/* cross-links to the other engines */
.others { border-top: 1px solid var(--glass-border); }
.others__list { margin-top: 2.2rem; }
.others__list a {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  padding: 1.1rem 0.2rem;
  border-bottom: 1px dotted var(--rule-dotted);
}
.others__list a:first-child { border-top: 1px dotted var(--rule-dotted); }
.others__num { font-family: var(--font-mono); font-size: 0.66rem; color: var(--text-dim); }
.others__name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.3rem;
  letter-spacing: 0.02em;
  transition: color 200ms var(--ease-out);
}
.others__list a:hover .others__name { color: var(--aether); }
.others__fn {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.16em;
  color: var(--text-dim);
  text-transform: uppercase;
}

/* ============================================================
   AUDIENCE
   ============================================================ */
.audience {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1.2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--glass-border);
}
.audience__label {
  flex: none;
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  color: var(--text-dim);
}

.audience__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.65rem;
}
.chip {
  font-size: 0.6rem;
  letter-spacing: 0.16em;
  color: var(--text-dim);
  padding: 0.2rem 0;
  border: 0;
  border-radius: 0;
  transition: color 200ms var(--ease-out), border-color 200ms var(--ease-out);
}
.chip::after {
  content: "/";
  margin-left: 0.65rem;
  color: rgba(138, 151, 166, 0.45);
}
.chip:last-child::after { content: ""; margin-left: 0; }
.chip:hover { color: var(--text); }
@media (max-width: 760px) {
  .audience {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.45rem;
  }
}

/* ============================================================
   PRICING
   ============================================================ */
.pricing { background: var(--ink-raised); border-block: 1px solid var(--glass-border); }
.pricing .container { text-align: center; }

.pricing__note {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  color: var(--text-dim);
  text-transform: uppercase;
}
.pricing__fx {
  margin-top: 1.8rem;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  opacity: 0.85;
}
.pricing__fx[hidden] { display: none; }

.pricing__grid {
  margin-top: 3.2rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
  align-items: stretch;
  text-align: left;
}
@media (max-width: 920px) {
  .pricing__grid { grid-template-columns: 1fr; max-width: 440px; margin-inline: auto; }
}

.tier {
  display: flex;
  flex-direction: column;
  padding: 2.1rem 1.8rem 1.8rem;
  transition: background-color 200ms var(--ease-out), border-color 200ms var(--ease-out);
}
.tier:hover {
  transform: none;
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.045);
}

.tier--featured {
  border-color: var(--aether-dim);
  background: var(--glass);
}

.tier__badge {
  position: absolute;
  top: -11px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: var(--ink);
  background: var(--aether);
  padding: 0.3rem 0.85rem;
  border-radius: 999px;
  white-space: nowrap;
}

.tier__name {
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  color: var(--text-dim);
  margin-bottom: 1.3rem;
}

.tier__price { display: flex; align-items: baseline; gap: 0.5rem; margin-bottom: 1.6rem; }
.tier__amount {
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.tier__per {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-dim);
  letter-spacing: 0.1em;
}

.tier__features { flex: 1; margin-bottom: 1.9rem; }
.tier__features li {
  font-size: 0.92rem;
  color: var(--text-dim);
  padding: 0.5rem 0 0.5rem 1.45rem;
  position: relative;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.tier__features li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--aether-dim);
}

/* ============================================================
   FINAL CTA
   ============================================================ */
.final { text-align: center; overflow: hidden; }
.final::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(720px 380px at 50% 100%, rgba(111, 227, 255, 0.06), transparent 70%);
}

.final__headline {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5.4vw, 3.8rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 2.4rem;
}

.final__ctas {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  border-top: 1px solid var(--glass-border);
  padding: 4rem 0 2.5rem;
  background: var(--ink);
}

.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 3.2rem;
}
@media (max-width: 720px) {
  .footer__grid { grid-template-columns: 1fr; }
}

.footer__wordmark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: 0.24em;
  margin-bottom: 0.5rem;
}
.footer__tagline {
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  color: var(--text-dim);
}

.footer__col { display: flex; flex-direction: column; gap: 0.65rem; }
.footer__head {
  font-size: 0.64rem;
  letter-spacing: 0.2em;
  color: var(--text-dim);
  margin-bottom: 0.4rem;
}
.footer__col a {
  font-size: 0.88rem;
  color: var(--text-dim);
  transition: color 200ms var(--ease-out);
}
.footer__col a:hover { color: var(--text); }

.footer__legal {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 1.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}
.footer__honesty {
  font-size: 0.85rem;
  line-height: 1.55;
  color: var(--text-dim);
  max-width: 42ch;
  margin-top: 1.2rem;
}
.footer__copyright {
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  color: var(--text-dim);
  opacity: 0.7;
  text-align: center;
}

/* ============================================================
   INFO / LEGAL PAGES (contact · privacy · terms)
   ============================================================ */
.page {
  padding: calc(var(--nav-h) + clamp(3rem, 8vh, 5.5rem)) 0 clamp(4rem, 10vh, 7rem);
  min-height: 72svh;
  position: relative;
}
.page__lead {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--text-dim);
  max-width: 56ch;
  margin-top: 1.4rem;
}
.prose { max-width: 64ch; margin-top: 2.6rem; }
.prose h2 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
  margin: 2.4rem 0 0.7rem;
}
.prose h2:first-child { margin-top: 0; }
.prose p { color: var(--text-dim); margin-bottom: 1rem; line-height: 1.7; }
.prose a { color: var(--aether); text-decoration: underline; text-underline-offset: 3px; }
.prose ul { margin: 0 0 1.1rem 1.2rem; }
.prose li { list-style: disc; color: var(--text-dim); margin-bottom: 0.5rem; line-height: 1.65; }
.prose__updated {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  color: var(--text-dim);
  text-transform: uppercase;
  margin-top: 3rem;
}

/* contact — minimalist editorial */
.page--contact .container { max-width: 800px; }
.contact__title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5.4vw, 3.4rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.06;
  margin-top: 1.1rem;
}
.contact__lead {
  color: var(--text-dim);
  font-size: 1.05rem;
  line-height: 1.7;
  max-width: 46ch;
  margin-top: 1.3rem;
}
.contact__list {
  list-style: none;
  margin-top: clamp(2.8rem, 8vh, 4.8rem);
  border-top: 1px solid var(--glass-border);
}
.contact__row {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 1.5rem;
  align-items: baseline;
  padding: 2rem 0;
  border-bottom: 1px solid var(--glass-border);
}
.contact__role {
  font-size: 0.64rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-dim);
  padding-top: 0.5rem;
}
.contact__detail { display: flex; flex-direction: column; gap: 0.55rem; }
.contact__email {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 4.2vw, 2.15rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
  width: fit-content;
  transition: color 200ms var(--ease-out);
}
.contact__email:hover { color: var(--aether); }
.contact__desc { color: var(--text-dim); font-size: 0.92rem; line-height: 1.6; }
.contact__foot {
  margin-top: clamp(2.8rem, 8vh, 4rem);
  color: var(--text-dim);
  font-size: 0.82rem;
  line-height: 1.75;
  max-width: 58ch;
}
.contact__foot-links { white-space: nowrap; }
.contact__foot a { color: var(--aether); text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 560px) {
  .contact__row { grid-template-columns: 1fr; gap: 0.65rem; }
  .contact__role { padding-top: 0; }
}

/* ============================================================
   MOTION — load & scroll reveals
   ============================================================ */
.load-reveal {
  opacity: 0;
  transform: translateY(14px);
  animation: rise 560ms var(--ease-out) forwards;
  animation-delay: var(--d, 0ms);
}
@keyframes rise {
  to { opacity: 1; transform: translateY(0); }
}

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 600ms var(--ease-out), transform 600ms var(--ease-out);
  transition-delay: var(--d, 0ms);
}
.reveal.is-on { opacity: 1; transform: translateY(0); }

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  .load-reveal { animation: none; opacity: 1; transform: none; }

  .hero__word--in { animation: none; opacity: 1; filter: none; transform: none; }
  .hero__scroll span { animation: none; }

  .reveal,
  .readout__body [data-line] {
    transition: opacity 200ms linear;
    transform: none;
  }
  .reveal { opacity: 0; }
  .reveal.is-on { opacity: 1; }

  .engine-card, .tier, .btn { transition-duration: 1ms; }
  .engine-card:hover, .tier:hover, .btn:hover { transform: none; }
  .engine-card::after { transition: none; }
}


/* ============ Brand logos (added) ============ */
.nav__logo { height: 26px; width: auto; display: block; }
.footer__logo { width: 220px; max-width: 72%; height: auto; display: block; margin-bottom: 1.1rem; }
/* Logos are luminous white (transparent PNG) for the dark theme; invert to dark
   on the light theme. Invert keeps the etched texture (it only flips RGB, not alpha). */
[data-theme="light"] .nav__logo,
[data-theme="light"] .footer__logo { filter: invert(1); }

/* ============================================================
   CHECKOUT — on-site Stripe modal (themed to match the site)
   ============================================================ */
.checkout { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 1.2rem; }
.checkout[hidden] { display: none; }
.checkout__backdrop { position: absolute; inset: 0; background: rgba(2, 4, 8, 0.66); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.checkout__panel {
  position: relative;
  width: min(100%, 460px);
  max-height: 92vh;
  overflow-y: auto;
  padding: 2rem 1.9rem 1.6rem;
  border-radius: 18px;
  background: var(--ink-raised);
  border: 1px solid var(--glass-border);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
  animation: checkoutIn 260ms var(--ease-out);
}
[data-theme="light"] .checkout__panel { background: #ffffff; box-shadow: 0 24px 80px rgba(15, 27, 42, 0.18); }
@keyframes checkoutIn { from { opacity: 0; transform: translateY(10px) scale(0.99); } to { opacity: 1; transform: none; } }
.checkout__close {
  position: absolute; top: 0.9rem; right: 1rem;
  width: 34px; height: 34px; border: 0; background: transparent;
  color: var(--text-dim); font-size: 1.5rem; line-height: 1; cursor: pointer; border-radius: 8px;
  transition: color 200ms var(--ease-out), background-color 200ms var(--ease-out);
}
.checkout__close:hover { color: var(--text); background: rgba(127, 127, 127, 0.12); }
.checkout__eyebrow { font-size: 0.6rem; letter-spacing: 0.2em; color: var(--text-dim); }
.checkout__title { font-family: var(--font-display); font-size: 1.7rem; font-weight: 600; letter-spacing: -0.01em; margin-top: 0.4rem; }
.checkout__price { font-size: 1.05rem; color: var(--aether); margin-top: 0.3rem; font-weight: 500; }
.checkout__note { font-size: 0.85rem; color: var(--text-dim); margin-top: 0.4rem; line-height: 1.6; }
.checkout__body { margin-top: 1.4rem; }
.checkout__label { display: block; font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-dim); margin-bottom: 0.4rem; }
.checkout__input {
  width: 100%; padding: 0.8rem 0.9rem; font-size: 0.95rem; font-family: var(--font-body);
  color: var(--text); background: var(--glass); border: 1px solid var(--glass-border);
  border-radius: 12px; margin-bottom: 1rem; transition: border-color 200ms var(--ease-out), box-shadow 200ms var(--ease-out);
}
.checkout__input:focus { outline: none; border-color: var(--aether); box-shadow: 0 0 0 1px var(--aether); }
.checkout__pay { margin-top: 0.4rem; }
.checkout__express { margin-bottom: 0.4rem; }
.checkout__or { position: relative; text-align: center; margin: 1rem 0; }
.checkout__or::before { content: ""; position: absolute; top: 50%; left: 0; right: 0; height: 1px; background: var(--glass-border); }
.checkout__or span { position: relative; padding: 0 0.8rem; background: var(--ink-raised); font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-dim); }
[data-theme="light"] .checkout__or span { background: #ffffff; }
.checkout__submit { margin-top: 1.1rem; }
.checkout__status { font-size: 0.85rem; line-height: 1.55; margin-top: 0.9rem; min-height: 1.1rem; color: var(--text-dim); }
.checkout__status.is-error { color: #ff8a8a; }
.checkout__status.is-ok { color: var(--aether); }
.checkout__secure { font-size: 0.56rem; letter-spacing: 0.1em; color: var(--text-dim); text-align: center; margin-top: 1.3rem; opacity: 0.7; }
@media (max-width: 480px) { .checkout__panel { padding: 1.7rem 1.3rem 1.3rem; } .checkout__title { font-size: 1.45rem; } }

/* checkout PAGE — two columns: plan info (left) · payment form (right) */
.page--checkout .container { max-width: 1000px; }
.pay {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: start;
}
.pay__info { padding-right: 3rem; }
.pay__name {
  display: flex; align-items: center; flex-wrap: wrap;
  gap: 0.2rem 0.7rem; margin-top: 1.1rem;
}
.pay__logo { height: clamp(1.5rem, 3.1vw, 2rem); width: auto; display: block; }
[data-theme="light"] .pay__logo { filter: invert(1); }
.pay__tier {
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  font-weight: 600; letter-spacing: 0.01em; line-height: 1; color: var(--text);
}
.pay__price { font-size: 1.3rem; color: var(--aether); font-weight: 500; margin-top: 0.6rem; }
.pay__note { color: var(--text-dim); font-size: 0.95rem; line-height: 1.6; margin-top: 0.5rem; max-width: 34ch; }
.pay__points { list-style: none; margin: 1.9rem 0 0; padding: 0; border-top: 1px solid var(--glass-border); }
.pay__points li {
  position: relative; color: var(--text-dim); font-size: 0.9rem;
  padding: 0.65rem 0 0.65rem 1.4rem; border-bottom: 1px solid var(--glass-border);
}
.pay__points li::before { content: "\2192"; position: absolute; left: 0; color: var(--aether); }
/* Pro engine picker — choose exactly two engines */
.pay__engines { margin-top: 1.9rem; }
.pay__engines-head { font-size: 0.66rem; letter-spacing: 0.16em; color: var(--text-dim); margin-bottom: 0.85rem; }
.pay__engines-count { color: var(--aether); }
.pay__engines-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; }
.pay__engine {
  position: relative; text-align: left; cursor: pointer;
  background: var(--glass); border: 1px solid var(--glass-border); border-radius: 12px;
  padding: 0.8rem 0.95rem; display: flex; flex-direction: column; gap: 0.2rem;
  color: var(--text); transition: border-color 0.18s var(--ease-out), background-color 0.18s var(--ease-out), transform 0.18s var(--ease-out);
}
.pay__engine:hover { border-color: var(--aether-dim); transform: translateY(-1px); }
.pay__engine-name { font-size: 0.82rem; letter-spacing: 0.08em; }
.pay__engine-fn { font-size: 0.74rem; color: var(--text-dim); }
.pay__engine-tick {
  position: absolute; top: 0.6rem; right: 0.7rem; width: 18px; height: 18px; border-radius: 50%;
  display: grid; place-items: center; font-size: 11px; color: var(--ink);
  background: var(--aether); opacity: 0; transform: scale(0.6); transition: opacity 0.18s var(--ease-out), transform 0.18s var(--ease-out);
}
.pay__engine.is-selected { border-color: var(--aether); background: var(--aether-faint); }
.pay__engine.is-selected .pay__engine-tick { opacity: 1; transform: scale(1); }
@media (max-width: 560px) { .pay__engines-grid { grid-template-columns: 1fr; } }

/* Enterprise enquiry — sent confirmation (replaces the form) */
.ent-sent { text-align: center; padding: 1.8rem 0.5rem 1.4rem; animation: entSentIn 0.4s var(--ease-out); }
.ent-sent__check {
  width: 56px; height: 56px; margin: 0 auto 1.3rem; border-radius: 50%;
  display: grid; place-items: center; font-size: 1.55rem; line-height: 1; color: var(--aether);
  background: var(--aether-faint); border: 1px solid var(--aether-dim);
}
.ent-sent__title { font-family: var(--font-display); font-size: 1.45rem; font-weight: 600; letter-spacing: -0.01em; margin-bottom: 0.65rem; }
.ent-sent__msg { color: var(--text-dim); font-size: 0.96rem; line-height: 1.6; max-width: 38ch; margin: 0 auto; }
.ent-sent__ref { margin-top: 1.3rem; font-size: 0.7rem; letter-spacing: 0.14em; color: var(--aether); }
@keyframes entSentIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.pay__secure { font-size: 0.56rem; letter-spacing: 0.1em; color: var(--text-dim); margin-top: 1.7rem; opacity: 0.7; }
.pay__back { margin-top: 1rem; font-size: 0.85rem; }
.pay__back a { color: var(--text-dim); transition: color 200ms var(--ease-out); }
.pay__back a:hover { color: var(--aether); }

.pay__panel { padding-left: 3rem; border-left: 1px solid var(--glass-border); }
.pay__panel-head { font-size: 0.62rem; letter-spacing: 0.18em; color: var(--text-dim); margin-bottom: 1.3rem; }
.pay__panel .checkout__submit { margin-top: 1.1rem; }
.checkout__or span { background: var(--ink); }

@media (max-width: 760px) {
  .pay { grid-template-columns: 1fr; }
  .pay__info { padding-right: 0; }
  .pay__panel {
    padding-left: 0; border-left: 0;
    border-top: 1px solid var(--glass-border);
    margin-top: 2.2rem; padding-top: 2.2rem;
  }
}

/* enterprise PAGE — two columns (info left · form right), reuses .pay layout */
.pay__heading {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  font-weight: 600; letter-spacing: -0.02em; line-height: 1.05; margin-top: 1.1rem;
}
.pay__lead { color: var(--text-dim); font-size: 0.95rem; line-height: 1.65; margin-top: 0.7rem; max-width: 40ch; }
.ent-form { margin-top: 0; }
.ent-form .btn { margin-top: 0.6rem; }
.checkout__textarea { resize: vertical; min-height: 92px; line-height: 1.55; font-family: var(--font-body); }

/* billing period toggle (pricing section) */
.billing-toggle {
  display: inline-flex;
  gap: 0.25rem;
  margin-top: 1.9rem;
  padding: 0.3rem;
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  background: var(--glass);
}
.billing-toggle__btn {
  display: inline-flex; align-items: center; gap: 0.45rem;
  font-family: var(--font-display);
  font-size: 0.85rem; font-weight: 500;
  color: var(--text-dim);
  padding: 0.5rem 1.15rem;
  border: 0; border-radius: 999px;
  background: transparent; cursor: pointer;
  transition: color 200ms var(--ease-out), background-color 200ms var(--ease-out);
}
.billing-toggle__btn:hover { color: var(--text); }
.billing-toggle__btn.is-active { background: var(--aether); color: var(--ink); }
[data-theme="light"] .billing-toggle__btn.is-active { color: #06080C; }
.billing-toggle__save {
  font-family: var(--font-mono);
  font-size: 0.58rem; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 0.14rem 0.42rem; border-radius: 999px;
  background: rgba(111, 227, 255, 0.16); color: var(--aether);
}
.billing-toggle__btn.is-active .billing-toggle__save { background: rgba(6, 8, 12, 0.18); color: inherit; }

/* ============================================================
   ACCOUNTS — nav account control · sign in/up · account page
   ============================================================ */

/* ---- nav account control (static on home, injected elsewhere by js/auth.js) ---- */
.nav__account {
  flex: none;
  display: inline-flex;
  align-items: center;
  margin-left: 0.5rem;
  padding: 0.5rem 0.85rem;
  border-radius: 11px;
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 500;
  line-height: 1;
  color: var(--text);
  transition: color 240ms var(--ease-out), background-color 240ms var(--ease-out);
}
.nav__account--out { color: var(--text-dim); }
.nav__account--out:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }
[data-theme="light"] .nav__account--out:hover { background: rgba(15, 27, 42, 0.06); }
/* a clean gap to the CTA whether Sign in sits before it (home) or after it (other pages) */
.nav__account + .nav__cta { margin-left: 0.5rem; }
.nav__account--in { padding: 0.2rem; }     /* avatar variant: tight box around the circle */
.nav__avatar {
  width: 34px; height: 34px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  font-family: var(--font-display);
  font-size: 0.85rem; font-weight: 600;
  color: var(--ink);
  background: var(--aether);
  border: 1px solid var(--aether-dim);
  transition: box-shadow 240ms var(--ease-out), transform 240ms var(--ease-out);
}
.nav__account--in:hover .nav__avatar {
  box-shadow: 0 0 22px rgba(111, 227, 255, 0.35);
  transform: translateY(-1px);
}
@media (max-width: 860px) { .nav__account { margin-left: auto; } .nav__account + .nav__theme { margin-left: 0.4rem; } }

/* ---- subscription tier badge beside the logo (console) ---- */
.nav__tier {
  display: inline-flex; align-items: center; flex: none; margin-left: 0.6rem;
  font-family: var(--font-mono); font-size: 0.6rem; font-weight: 600; letter-spacing: 0.16em;
  text-transform: uppercase; line-height: 1; padding: 0.26rem 0.52rem; border-radius: 6px;
  color: var(--aether); border: 1px solid var(--aether-dim); background: var(--aether-faint);
}
.nav__tier--ultra { color: var(--verify); border-color: rgba(233, 199, 123, 0.5); background: rgba(233, 199, 123, 0.1); }
[data-theme="light"] .nav__tier--ultra { color: #9A6B12; border-color: rgba(154, 107, 18, 0.5); background: rgba(154, 107, 18, 0.09); }

/* ---- signed-in account menu (avatar dropdown in the nav) ---- */
.nav__acct { position: relative; flex: none; margin-left: 0.5rem; display: inline-flex; align-items: center; }
.nav__acct + .nav__cta { margin-left: 0.5rem; }
.nav__avatar-btn { background: none; border: none; padding: 2px; line-height: 0; cursor: pointer; border-radius: 50%; }
.nav__avatar-btn:hover .nav__avatar { box-shadow: 0 0 22px rgba(111, 227, 255, 0.35); transform: translateY(-1px); }
.nav__avatar-btn:focus-visible { outline: 2px solid var(--aether); outline-offset: 2px; }
.nav__menu {
  position: absolute; top: calc(100% + 10px); right: 0; min-width: 236px; z-index: 1200;
  background: var(--ink-raised); border: 1px solid var(--glass-border); border-radius: 14px;
  padding: 6px; box-shadow: 0 20px 54px rgba(0, 0, 0, 0.42); display: flex; flex-direction: column;
}
.nav__menu[hidden] { display: none; }
.nav__menu-id { display: flex; flex-direction: column; gap: 2px; padding: 9px 12px 11px; }
.nav__menu-name { font-family: var(--font-display); font-weight: 600; font-size: 0.92rem; }
.nav__menu-email { font-family: var(--font-mono); font-size: 0.74rem; color: var(--text-dim); word-break: break-all; }
.nav__menu-sep { height: 1px; background: var(--glass-border); margin: 5px 6px; }
.nav__menu-item {
  display: block; width: 100%; text-align: left; background: none; border: none; cursor: pointer;
  color: var(--text); font-family: var(--font-body); font-size: 0.9rem; padding: 9px 12px; border-radius: 9px;
  transition: background-color 0.16s var(--ease-out), color 0.16s var(--ease-out);
}
.nav__menu-item:hover { background: var(--aether-faint); color: var(--aether); }
.nav__menu-item--danger { color: #ff8a8a; }
.nav__menu-item--danger:hover { background: rgba(255, 138, 138, 0.12); color: #ff8a8a; }
[data-theme="light"] .nav__menu-item--danger { color: #c0392b; }
[data-theme="light"] .nav__menu-item--danger:hover { background: rgba(192, 57, 43, 0.08); color: #c0392b; }

/* ---- destructive button (delete account) ---- */
.btn--danger { color: #ff8a8a; border: 1px solid rgba(255, 138, 138, 0.42); background: transparent; }
.btn--danger:hover { color: #ff8a8a; border-color: #ff8a8a; background: rgba(255, 138, 138, 0.1); }
[data-theme="light"] .btn--danger { color: #c0392b; border-color: rgba(192, 57, 43, 0.4); }
[data-theme="light"] .btn--danger:hover { border-color: #c0392b; background: rgba(192, 57, 43, 0.08); }

/* ---- sign in / sign up page — fixed photo (left) · scrollable form (right) ---- */
.page--auth { padding: 0; --auth-visual-w: 52vw; }

/* Sign-in header: the transparent bar sits over the fixed dark hero, so keep the brand
   luminous (don't invert it in light theme) and trim to a minimal, legible auth header.
   Scoped with :not(.is-scrolled) so the mobile scrolled state (which gets a backdrop)
   still falls back to the normal themed colours. Desktop never scrolls the body. */
body.page-signin .nav:not(.is-scrolled) .nav__logo { filter: none; }
@media (min-width: 861px) {
  /* hide the centre links so none straddle the dark-image / light-form seam */
  body.page-signin .nav__links { display: none; }
  /* clean auth header: just the brand (left) and the theme toggle (right) */
  body.page-signin .nav__cta { display: none; }
  body.page-signin .nav__theme { margin-left: auto; }
}
@media (max-width: 860px) {
  body.page-signin .nav:not(.is-scrolled) .nav__theme { color: #EAF1F6; }
  body.page-signin .nav:not(.is-scrolled) .nav__toggle span { background: #EAF1F6; }
}

/* LEFT: fixed, full-height hero photo with the AETHER mark; stays put while the form scrolls.
   The seam is a luminous hairline on the dark image edge plus a soft shadow cast onto the
   form — reads cleanly in both themes (a flat border vanished against the photo). */
.auth-split__visual {
  position: fixed;
  top: 0; left: 0;
  width: var(--auth-visual-w);
  height: 100vh;
  overflow: hidden;
  background: #04060A;
  border-right: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 8px 0 40px rgba(0, 0, 0, 0.35);
  z-index: 2;
}
[data-theme="light"] .auth-split__visual { box-shadow: 10px 0 44px rgba(15, 27, 42, 0.18); }
.auth-split__photo {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; object-position: 50% 42%;
}

/* RIGHT: the panel is its OWN scroll area (the body never scrolls, so the nav
   stays transparent and doesn't darken). The fixed photo on the left is untouched. */
.auth-split__panel {
  margin-left: var(--auth-visual-w);
  height: 100vh;
  overflow-y: auto;
  display: flex;
  padding: calc(var(--nav-h) + 2.5rem) clamp(1.5rem, 4vw, 3.5rem) 3rem;
}
/* margin:auto (not align-items:center) keeps the card centred yet fully scrollable
   when it's taller than the viewport — the top stays reachable */
.auth-split__panel > .auth__card { margin: auto; }
.auth__card { width: 100%; max-width: 400px; }
.auth__brand { display: block; text-align: center; margin-bottom: 1.5rem; }
.auth__logo { height: 1.7rem; width: auto; display: inline-block; }
[data-theme="light"] .auth__logo { filter: invert(1); }

.auth__tabs {
  display: flex; gap: 0.25rem;
  padding: 0.3rem;
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  background: var(--glass);
  margin-bottom: 1.6rem;
}
.auth__tab {
  flex: 1;
  font-family: var(--font-display);
  font-size: 0.88rem; font-weight: 500;
  color: var(--text-dim);
  padding: 0.5rem 0.6rem;
  border: 0; border-radius: 999px;
  background: transparent; cursor: pointer;
  transition: color 200ms var(--ease-out), background-color 200ms var(--ease-out);
}
.auth__tab:hover { color: var(--text); }
.auth__tab.is-active { background: var(--aether); color: var(--ink); }
/* Match the dark-mode toggle: bright cyan pill + dark ink label in every theme. */
[data-theme="light"] .auth__tab.is-active { background: #6FE3FF; color: #06080C; }
/* light mode: plain white track matching the provider boxes below it */
[data-theme="light"] .auth__tabs {
  background: var(--glass);
  border-color: var(--glass-border);
}

.auth__title {
  font-family: var(--font-display);
  font-size: 1.5rem; font-weight: 600; letter-spacing: -0.01em;
  text-align: center;
}
.auth__sub { color: var(--text-dim); font-size: 0.9rem; line-height: 1.5; text-align: center; margin-top: 0.4rem; margin-bottom: 1.6rem; }

.auth__social { display: flex; flex-direction: column; gap: 0.6rem; }
.auth__provider {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6rem;
  width: 100%;
  font-family: var(--font-display);
  font-size: 0.92rem; font-weight: 500;
  color: var(--text);
  padding: 0.72rem 1rem;
  border: 1px solid var(--glass-border);
  border-radius: 11px;
  background: var(--glass);
  cursor: pointer;
  transition: border-color 200ms var(--ease-out), background-color 200ms var(--ease-out), transform 200ms var(--ease-out);
}
.auth__provider:hover:not(:disabled) { border-color: var(--aether-dim); transform: translateY(-1px); }
.auth__provider:disabled { cursor: not-allowed; opacity: 0.45; transform: none; }
.auth__provider:disabled .auth__provider-icon { filter: grayscale(1); }
.auth__provider-icon { flex: none; }
.auth__provider-soon {
  margin-left: auto; font-family: var(--font-mono); font-size: 0.56rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--text-dim);
  border: 1px solid var(--glass-border); border-radius: 999px; padding: 0.12rem 0.45rem;
}

.auth__or { position: relative; text-align: center; margin: 1.4rem 0; }
.auth__or::before { content: ""; position: absolute; top: 50%; left: 0; right: 0; height: 1px; background: var(--glass-border); }
.auth__or span {
  position: relative; padding: 0 0.8rem; background: var(--ink);
  font-size: 0.66rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-dim);
}
[data-theme="light"] .auth__or span { background: var(--ink); }

.auth__form { display: flex; flex-direction: column; }
.auth__label {
  display: block;
  font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text-dim); margin-bottom: 0.9rem;
}
.auth__input {
  display: block; width: 100%;
  margin-top: 0.4rem;
  padding: 0.78rem 0.9rem;
  font-size: 0.95rem; font-family: var(--font-body);
  color: var(--text);
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  transition: border-color 200ms var(--ease-out), box-shadow 200ms var(--ease-out);
}
.auth__input::placeholder { color: var(--text-dim); opacity: 0.7; }
.auth__input:focus { outline: none; border-color: var(--aether); box-shadow: 0 0 0 1px var(--aether); }
.auth__select { cursor: pointer; appearance: none; -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--text-dim) 50%), linear-gradient(135deg, var(--text-dim) 50%, transparent 50%);
  background-position: right 1rem center, right 0.72rem center; background-size: 6px 6px, 6px 6px; background-repeat: no-repeat;
  padding-right: 2.2rem; }
[data-theme="light"] .account__form .auth__select option { color: #0B1118; }
.auth__submit { margin-top: 0.4rem; }
/* Auth/account pages: keep primary buttons on the bright dark-mode cyan in every
   theme, and drop the glow halo + focus ring so they read as flat, clean fills. */
.page-signin .auth__submit,
.page-signin .btn--primary,
.page-account .btn--primary,
[data-theme="light"] .page-signin .auth__submit,
[data-theme="light"] .page-signin .btn--primary,
[data-theme="light"] .page-account .btn--primary { background: #6FE3FF; color: #06080C; }
.page-signin .auth__submit, .page-signin .btn--primary, .page-account .btn--primary,
.page-signin .auth__submit:hover, .page-signin .btn--primary:hover, .page-account .btn--primary:hover,
.page-signin .auth__submit:focus, .page-signin .btn--primary:focus, .page-account .btn--primary:focus,
.page-signin .auth__submit:focus-visible, .page-signin .btn--primary:focus-visible, .page-account .btn--primary:focus-visible,
.page-signin .auth__submit:active, .page-signin .btn--primary:active, .page-account .btn--primary:active {
  border: none;
  outline: none;
  box-shadow: none;
}
.page-signin .auth__submit:hover, .page-signin .btn--primary:hover, .page-account .btn--primary:hover { transform: translateY(-1px); }
.page-signin .auth__submit::after, .page-signin .btn--primary::after, .page-account .btn--primary::after { display: none; }
.auth__status { font-size: 0.85rem; line-height: 1.5; margin-top: 0.9rem; min-height: 1.1rem; text-align: center; color: var(--text-dim); }
.auth__status.is-error { color: #ff8a8a; }
[data-theme="light"] .auth__status.is-error { color: #c0392b; }
.auth__status.is-ok { color: var(--aether); }

.auth__switch { text-align: center; font-size: 0.88rem; color: var(--text-dim); margin-top: 1.3rem; }
.auth__switch a { color: var(--aether); }
.auth__forgot { text-align: right; font-size: 0.8rem; margin: -0.4rem 0 0.2rem; }
.auth__forgot a { color: var(--text-dim); transition: color 160ms var(--ease-out); }
.auth__forgot a:hover { color: var(--aether); }
.auth__switch a:hover { text-decoration: underline; }
.auth__legal { text-align: center; font-size: 0.74rem; line-height: 1.55; color: var(--text-dim); margin-top: 1.4rem; }
.auth__legal a { color: var(--text-dim); text-decoration: underline; text-underline-offset: 2px; }
.auth__legal a:hover { color: var(--text); }

/* tablet/phone: stack — the photo becomes a static banner above the form */
@media (max-width: 860px) {
  .auth-split__visual {
    position: static;
    width: 100%; height: 38vh; min-height: 220px;
    border-right: 0; border-bottom: 1px solid var(--glass-border);
  }
  .auth-split__panel {
    margin-left: 0;
    height: auto;
    overflow-y: visible;
    display: block;
    padding: 2.4rem 1.4rem 3rem;
  }
  .auth-split__panel > .auth__card { margin: 0 auto; }
}
@media (max-width: 480px) {
  .auth-split__visual { height: 30vh; min-height: 180px; }
  .auth-split__panel { padding: 2rem 1.2rem 2.6rem; }
}

/* ---- account page ---- */
.page--account { padding: clamp(6rem, 13vh, 8.5rem) 0 clamp(4rem, 9vh, 6rem); }
.page--account .container { max-width: 880px; }
.account__head { display: flex; align-items: center; gap: 1.1rem; margin-top: 0.6rem; }
.account__avatar {
  width: 60px; height: 60px; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  font-family: var(--font-display);
  font-size: 1.5rem; font-weight: 600;
  color: var(--ink); background: var(--aether);
}
.account__name { font-family: var(--font-display); font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 600; letter-spacing: -0.01em; line-height: 1.1; }
.account__email { color: var(--text-dim); font-size: 0.95rem; margin-top: 0.2rem; }

.account__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.4rem;
  margin-top: 2.4rem;
}
/* card surface comes from .glass (matches the main-page cards); we only add padding */
.account__panel { padding: 1.7rem 1.6rem; }
.account__panel--wide { margin-top: 1.4rem; }
.account__privacy-actions { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 1.1rem; }
/* unverified-email banner */
.account__verify {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  margin: 1.6rem 0 0; padding: 0.85rem 1.1rem; border-radius: 12px;
  font-size: 0.9rem; color: var(--text);
  border: 1px solid rgba(233, 199, 123, 0.42); background: rgba(233, 199, 123, 0.09);
}
[data-theme="light"] .account__verify { border-color: rgba(154, 107, 18, 0.4); background: rgba(154, 107, 18, 0.08); }
.account__verify-btn {
  flex: none; cursor: pointer; font-family: var(--font-mono); font-size: 0.76rem; letter-spacing: 0.04em;
  color: var(--verify); background: transparent; border: 1px solid rgba(233, 199, 123, 0.45);
  border-radius: 8px; padding: 0.42rem 0.85rem;
}
.account__verify-btn:hover { background: rgba(233, 199, 123, 0.14); }
[data-theme="light"] .account__verify-btn { border-color: rgba(154, 107, 18, 0.45); }
.account__panel-head { font-size: 0.62rem; letter-spacing: 0.18em; color: var(--text-dim); margin-bottom: 1.2rem; }
.account__form { display: flex; flex-direction: column; gap: 0; }
.account__form .btn { align-self: flex-start; margin-top: 0.2rem; }
.account__meta { margin-top: 1.5rem; border-top: 1px solid var(--glass-border); padding-top: 1.1rem; }
.account__meta-row { display: flex; justify-content: space-between; gap: 1rem; padding: 0.45rem 0; font-size: 0.88rem; }
.account__meta-row dt { color: var(--text-dim); }
.account__meta-row dd { color: var(--text); text-align: right; }

.account__plan { font-family: var(--font-display); font-size: 1.2rem; font-weight: 600; }
.account__plan-note { color: var(--text-dim); font-size: 0.9rem; line-height: 1.6; margin: 0.6rem 0 1.3rem; }
.account__manage { font-size: 0.6rem; letter-spacing: 0.1em; color: var(--text-dim); margin-top: 1.2rem; opacity: 0.7; }

.account__foot { margin-top: 2rem; }
.account__signout {
  font-family: var(--font-display);
  font-size: 0.9rem; font-weight: 500;
  color: var(--text-dim);
  background: transparent; border: 0; cursor: pointer;
  padding: 0.4rem 0;
  transition: color 200ms var(--ease-out);
}
.account__signout:hover { color: #ff8a8a; }
[data-theme="light"] .account__signout:hover { color: #c0392b; }

@media (max-width: 680px) { .account__grid { grid-template-columns: 1fr; } }
