/* ==========================================================================
   EmpireMail — Design System
   Brand: royal purple #552978 + imperial gold #FCBF02 (approved, from logo)
   No Bootstrap. No jQuery. No icon fonts. One stylesheet.
   ========================================================================== */

/* ---------- 1. Tokens ---------- */
:root {
  /* Type (scheme-agnostic) */
  --display: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  --body: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
          "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  /* Rhythm (scheme-agnostic) */
  --r-sm: 12px;
  --r-md: 18px;
  --r-lg: 26px;
  --r-pill: 999px;
  --gut: clamp(20px, 4vw, 40px);
  --section: clamp(72px, 10vw, 132px);
  --shell: 1200px;

  /* Motion (scheme-agnostic) */
  --ease: cubic-bezier(.2, .8, .2, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);

  /* Brand (constant across both) */
  --royal:   #552978;
  --royal-2: #7B3FB0;
  --violet:  #A96BE8;

  /* Signals (constant across both) */
  --ok:   #3DDC97;
  --warn: #FFB020;
  --bad:  #FF6B6B;
}

/* Dark mode (default) */
:root,
[data-theme="dark"] {
  /* Canvas — deep space with a violet cast, so the purple never looks muddy */
  --ink-900: #07040E;
  --ink-800: #0D0718;
  --ink-700: #150D26;

  /* Gold for dark */
  --gold:    #FCBF02;
  --gold-2:  #E4B55B;

  /* Text */
  --paper: #F4F0FA;
  --mute:  #9C8FB4;
  --dim:   #6E6383;

  /* Surfaces */
  --glass:      rgba(255, 255, 255, .045);
  --glass-hi:   rgba(255, 255, 255, .075);
  --line:       rgba(255, 255, 255, .09);
  --line-hi:    rgba(255, 255, 255, .16);
  --gold-line:  rgba(252, 191, 2, .32);
}

/* Light mode (when user hasn't explicitly chosen dark) */
@media (prefers-color-scheme: light) {
  :root {
    /* Canvas — crisp light with warmth */
    --ink-900: #FEFCF9;
    --ink-800: #F8F6F2;
    --ink-700: #F0EEEA;

    /* Gold for light (darker to contrast) */
    --gold:    #D4A500;
    --gold-2:  #8A5D00;

    /* Text */
    --paper: #2A2025;
    --mute:  #6B6370;
    --dim:   #9B9399;

    /* Surfaces */
    --glass:      rgba(85, 41, 120, .06);
    --glass-hi:   rgba(85, 41, 120, .09);
    --line:       rgba(85, 41, 120, .14);
    --line-hi:    rgba(85, 41, 120, .22);
    --gold-line:  rgba(212, 165, 0, .32);
  }
}

/* Force light theme when user chooses it */
[data-theme="light"] {
  /* Canvas — crisp light with warmth */
  --ink-900: #FEFCF9;
  --ink-800: #F8F6F2;
  --ink-700: #F0EEEA;

  /* Gold for light (darker to contrast) */
  --gold:    #D4A500;
  --gold-2:  #8A5D00;

  /* Text */
  --paper: #2A2025;
  --mute:  #6B6370;
  --dim:   #9B9399;

  /* Surfaces */
  --glass:      rgba(85, 41, 120, .06);
  --glass-hi:   rgba(85, 41, 120, .09);
  --line:       rgba(85, 41, 120, .14);
  --line-hi:    rgba(85, 41, 120, .22);
  --gold-line:  rgba(212, 165, 0, .32);
  color-scheme: light;
}

/* ---------- 2. Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ink-900);
  color: var(--paper);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.62;
  letter-spacing: -.005em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
h1, h2, h3, h4, p, ul, ol, figure { margin: 0; }
ul { list-style: none; padding: 0; }

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

::selection { background: var(--royal-2); color: #fff; }

/* ---------- 3. Ambient background (CSS only — no images) ---------- */
.aurora {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(58vw 46vw at 12% -8%,  rgba(123, 63, 176, .42), transparent 62%),
    radial-gradient(46vw 40vw at 96% 4%,   rgba(252, 191, 2,  .12), transparent 60%),
    radial-gradient(70vw 60vw at 50% 108%, rgba(85,  41, 120, .34), transparent 66%);
  animation: drift 26s var(--ease) infinite alternate;
}

/* Faint grid so the dark canvas reads as a product surface, not a void */
.aurora::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 68px 68px;
  opacity: .28;
  mask-image: radial-gradient(72% 62% at 50% 34%, #000 20%, transparent 78%);
  -webkit-mask-image: radial-gradient(72% 62% at 50% 34%, #000 20%, transparent 78%);
}

@keyframes drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(0, -3%, 0) scale(1.07); }
}

/* ---------- 4. Shell & sections ---------- */
.shell {
  width: min(100% - (var(--gut) * 2), var(--shell));
  margin-inline: auto;
}

.band { padding-block: var(--section); position: relative; }
.band--tight { padding-block: clamp(48px, 6vw, 76px); }
.band--lazy { content-visibility: auto; contain-intrinsic-size: auto 700px; }

.rule {
  border: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line-hi), transparent);
  margin: 0;
}

/* ---------- 5. Typography ---------- */
.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--gold-2);
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

/* Structural device: the crown hairline from the logo marks every section.
   It encodes brand hierarchy — used only as a section marker, nowhere else. */
.eyebrow::before {
  content: "";
  width: 16px;
  height: 10px;
  flex: none;
  background: var(--gold);
  -webkit-mask: var(--crown) center / contain no-repeat;
  mask: var(--crown) center / contain no-repeat;
  --crown: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 20'%3E%3Cpath d='M2 18h28l2-16-9 7-7-9-7 9-9-7z'/%3E%3C/svg%3E");
}

.h1 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2.6rem, 7.2vw, 5.1rem);
  line-height: .96;
  letter-spacing: -.035em;
}

.h2 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.9rem, 4.2vw, 3.1rem);
  line-height: 1.04;
  letter-spacing: -.03em;
}

.h3 {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(1.15rem, 2vw, 1.4rem);
  line-height: 1.24;
  letter-spacing: -.02em;
}

.lede {
  font-size: clamp(1.02rem, 1.5vw, 1.2rem);
  color: var(--mute);
  max-width: 56ch;
}

.small { font-size: .875rem; color: var(--mute); }
.tiny  { font-size: .78rem; color: var(--dim); }

.gild {
  background: linear-gradient(96deg, var(--gold) 8%, #FFE58A 48%, var(--gold-2) 92%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.data { font-family: var(--mono); font-variant-numeric: tabular-nums; }

/* ---------- 6. Glass surfaces ---------- */
.pane {
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  position: relative;
}

/* Top sheen — sells the glass without another blurred layer */
.pane::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  border-radius: inherit;
  background: linear-gradient(90deg, transparent, var(--line-hi) 22%, var(--gold-line) 50%, var(--line-hi) 78%, transparent);
}

.pane--pad { padding: clamp(22px, 3vw, 34px); }

.pane--lift {
  transition: transform .5s var(--ease-out), border-color .5s var(--ease-out), background .5s var(--ease-out);
}
.pane--lift:hover {
  transform: translateY(-6px);
  border-color: var(--line-hi);
  background: var(--glass-hi);
}

/* ---------- 7. Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 24px;
  border-radius: var(--r-pill);
  border: 1px solid transparent;
  font-family: var(--display);
  font-weight: 500;
  font-size: .95rem;
  letter-spacing: -.01em;
  cursor: pointer;
  background: none;
  transition: transform .18s var(--ease), box-shadow .3s var(--ease), background .3s var(--ease), border-color .3s var(--ease);
}
.btn:active { transform: translateY(1px) scale(.985); }

.btn--gold {
  background: linear-gradient(180deg, #FFD64A, var(--gold));
  color: #1A1204;
  box-shadow: 0 8px 26px -10px rgba(252, 191, 2, .7);
}
.btn--gold:hover { box-shadow: 0 14px 38px -10px rgba(252, 191, 2, .85); transform: translateY(-2px); }

.btn--glass {
  background: var(--glass);
  border-color: var(--line-hi);
  color: var(--paper);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.btn--glass:hover { background: var(--glass-hi); border-color: var(--gold-line); transform: translateY(-2px); }

.btn--ghost { color: var(--mute); padding-inline: 6px; }
.btn--ghost:hover { color: var(--paper); }

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

/* ---------- 8. Chips & pills ---------- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 13px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line);
  background: var(--glass);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .06em;
  color: var(--mute);
}
.chip--gold { border-color: var(--gold-line); color: var(--gold-2); }
.chip--ok   { border-color: rgba(61,220,151,.3); color: var(--ok); }

.dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--ok);
  flex: none;
  box-shadow: 0 0 0 0 rgba(61, 220, 151, .55);
  animation: pulse 2.4s var(--ease) infinite;
}
@keyframes pulse {
  70%  { box-shadow: 0 0 0 8px rgba(61, 220, 151, 0); }
  100% { box-shadow: 0 0 0 0 rgba(61, 220, 151, 0); }
}

/* ---------- 9. Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid transparent;
  transition: background .35s var(--ease), border-color .35s var(--ease), backdrop-filter .35s var(--ease);
}
.nav.is-stuck {
  background: rgba(7, 4, 14, .72);
  border-bottom-color: var(--line);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
}

.nav__in {
  display: flex;
  align-items: center;
  gap: 18px;
  height: 72px;
}

.nav__brand { display: flex; align-items: center; gap: 10px; margin-right: auto; }
.nav__brand img { height: 34px; width: auto; }
.nav__word {
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: -.03em;
  font-size: 1.06rem;
}

.nav__links { display: flex; align-items: center; gap: 4px; }

.nav__link {
  position: relative;
  padding: 9px 14px;
  border-radius: var(--r-pill);
  font-size: .92rem;
  color: var(--mute);
  transition: color .25s var(--ease), background .25s var(--ease);
}
.nav__link:hover { color: var(--paper); background: var(--glass); }

.nav__link.active { color: var(--paper); }
.nav__link.active::after {
  content: "";
  position: absolute;
  left: 14px; right: 14px; bottom: 2px;
  height: 2px;
  border-radius: 2px;
  background: var(--gold);
}

.nav__cta { display: flex; align-items: center; gap: 8px; }

.theme-toggle {
  width: 42px; height: 42px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  background: var(--glass);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--paper);
  transition: background .3s var(--ease), border-color .3s var(--ease);
}
.theme-toggle:hover { background: var(--glass-hi); border-color: var(--gold-line); }
.theme-toggle svg { width: 18px; height: 18px; position: absolute; opacity: 1; transition: opacity .4s var(--ease-out); }
.theme-toggle .theme-moon { opacity: 0; }
[data-theme="light"] .theme-toggle .theme-sun { opacity: 0; }
[data-theme="light"] .theme-toggle .theme-moon { opacity: 1; }

.burger {
  display: none;
  width: 42px; height: 42px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  background: var(--glass);
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.burger span {
  display: block;
  width: 17px; height: 1.5px;
  background: var(--paper);
  border-radius: 2px;
  transition: transform .3s var(--ease), opacity .2s var(--ease);
}
.burger span + span { margin-top: 4px; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }

/* ---------- 10. Hero ---------- */
.hero { padding-block: clamp(56px, 8vw, 96px) var(--section); }

.hero__grid {
  display: grid;
  grid-template-columns: 1.02fr .98fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}

.hero__copy > * + * { margin-top: 22px; }

.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

.hero__proof {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
  padding-top: 8px;
}

/* ---------- 11. SIGNATURE: the live send console ---------- */
.console { padding: 18px; overflow: hidden; }

.console__bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.console__title {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--mute);
  margin-right: auto;
}

.console__body {
  display: grid;
  grid-template-columns: 1fr 132px;
  gap: 18px;
  padding-top: 16px;
}

.stream {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 232px;
}

.evt {
  display: grid;
  grid-template-columns: 22px 1fr auto;
  align-items: center;
  gap: 11px;
  padding: 9px 12px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .028);
  animation: slotIn .5s var(--ease-out) both;
}
@keyframes slotIn {
  from { opacity: 0; transform: translateY(10px) scale(.985); }
  to   { opacity: 1; transform: none; }
}

.evt__ico {
  width: 22px; height: 22px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  background: rgba(169, 107, 232, .16);
  color: var(--violet);
}
.evt__ico svg { width: 12px; height: 12px; }

.evt__to {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--mute);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.evt__tag {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .09em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: var(--r-pill);
}
.evt__tag[data-s="delivered"] { color: var(--ok);     background: rgba(61, 220, 151, .12); }
.evt__tag[data-s="opened"]    { color: var(--gold);   background: rgba(252, 191, 2, .12); }
.evt__tag[data-s="clicked"]   { color: var(--violet); background: rgba(169, 107, 232, .14); }

.gauge { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.gauge__ring { position: relative; width: 116px; height: 116px; flex: none; }
.gauge svg { width: 116px; height: 116px; transform: rotate(-90deg); }
.gauge__track { fill: none; stroke: var(--line); stroke-width: 7; }
.gauge__fill {
  fill: none;
  stroke: url(#goldline);
  stroke-width: 7;
  stroke-linecap: round;
  stroke-dasharray: 314;
  stroke-dashoffset: 314;
  transition: stroke-dashoffset 1.9s var(--ease-out);
}
.gauge__num {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.42rem;
  letter-spacing: -.03em;
}
.gauge__lbl {
  font-family: var(--mono);
  font-size: 9.5px;
  line-height: 1.6;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--dim);
  text-align: center;
  max-width: 120px;
}

/* ---------- 12. Stats ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.stat {
  background: rgba(13, 7, 24, .55);
  padding: 26px 22px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.stat__n {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.7rem, 3.4vw, 2.5rem);
  letter-spacing: -.035em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.stat__l {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--dim);
  margin-top: 10px;
}

/* ---------- 13. Grids ---------- */
.grid { display: grid; gap: 18px; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

.head { max-width: 62ch; }
.head > * + * { margin-top: 14px; }
.head--mid { margin-inline: auto; text-align: center; }
.head + .grid, .head + .stats, .head + .rail, .head + .tiers { margin-top: clamp(34px, 4vw, 52px); }

/* ---------- 14. Feature card ---------- */
.card > * + * { margin-top: 13px; }

.card__ico {
  width: 44px; height: 44px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  border: 1px solid var(--gold-line);
  background: linear-gradient(160deg, rgba(252, 191, 2, .16), rgba(85, 41, 120, .22));
  color: var(--gold);
}
.card__ico svg { width: 20px; height: 20px; }

.card__body { color: var(--mute); font-size: .94rem; }

.list { display: flex; flex-direction: column; gap: 9px; }
.list li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: .91rem;
  color: var(--mute);
}
.list svg { width: 15px; height: 15px; flex: none; margin-top: 4px; color: var(--gold); }
.list li[data-off] { opacity: .4; }
.list li[data-off] svg { color: var(--dim); }

/* ---------- 15. Marquee (trust rail) ---------- */
.rail {
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.rail__track {
  display: flex;
  gap: 46px;
  width: max-content;
  animation: slide 34s linear infinite;
}
.rail:hover .rail__track { animation-play-state: paused; }
.rail__item {
  font-family: var(--display);
  font-weight: 500;
  font-size: 1.02rem;
  letter-spacing: -.02em;
  color: var(--dim);
  white-space: nowrap;
  transition: color .3s var(--ease);
}
.rail__item:hover { color: var(--paper); }
@keyframes slide { to { transform: translateX(-50%); } }

/* ---------- 16. Pricing ---------- */
.tiers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; align-items: start; }

.tier { padding: 28px; display: flex; flex-direction: column; gap: 20px; }

.tier--hero {
  border-color: var(--gold-line);
  background: linear-gradient(170deg, rgba(252, 191, 2, .07), rgba(85, 41, 120, .16));
}

.tier__flag {
  position: absolute;
  top: -11px; left: 50%;
  transform: translateX(-50%);
  padding: 4px 14px;
  border-radius: var(--r-pill);
  background: var(--gold);
  color: #1A1204;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
  white-space: nowrap;
}

.tier__price {
  display: flex;
  align-items: baseline;
  gap: 4px;
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: -.04em;
}
.tier__cur { font-size: 1.25rem; color: var(--mute); }
.tier__amt { font-size: clamp(2.4rem, 4.6vw, 3.2rem); line-height: 1; }
.tier__per { font-family: var(--mono); font-size: 11px; color: var(--dim); letter-spacing: .08em; }

.toggle {
  display: inline-flex;
  gap: 3px;
  padding: 4px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line);
  background: var(--glass);
}
.toggle button {
  border: 0;
  background: none;
  padding: 8px 18px;
  border-radius: var(--r-pill);
  font-size: .86rem;
  color: var(--mute);
  cursor: pointer;
  transition: background .28s var(--ease), color .28s var(--ease);
}
.toggle button[aria-pressed="true"] { background: var(--gold); color: #1A1204; }

/* ---------- 17. Comparison ---------- */
.vs { width: 100%; border-collapse: collapse; font-size: .9rem; }
.vs th, .vs td { padding: 15px 16px; text-align: left; border-bottom: 1px solid var(--line); }
.vs thead th {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--dim);
  font-weight: 400;
}
.vs tbody th { font-weight: 500; color: var(--paper); }
.vs td { color: var(--mute); }
.vs .col-us { background: rgba(252, 191, 2, .05); color: var(--paper); }
.vs thead .col-us { color: var(--gold); }
.vs tbody tr:last-child th, .vs tbody tr:last-child td { border-bottom: 0; }

/* ---------- 18. Forms ---------- */
.field { display: flex; flex-direction: column; gap: 7px; }
.field label {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--dim);
}
.field input, .field textarea, .field select {
  padding: 13px 15px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .035);
  color: var(--paper);
  font-size: .95rem;
  transition: border-color .25s var(--ease), background .25s var(--ease);
}
.field input::placeholder, .field textarea::placeholder { color: var(--dim); }
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none;
  border-color: var(--gold-line);
  background: rgba(255, 255, 255, .06);
}
.field textarea { resize: vertical; min-height: 128px; }

/* ---------- 19. Quotes ---------- */
.quote > * + * { margin-top: 16px; }
.quote__txt { font-size: 1rem; line-height: 1.6; }
.quote__by { display: flex; align-items: center; gap: 11px; }
.quote__av {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(150deg, var(--royal-2), var(--royal));
  font-family: var(--display);
  font-weight: 700;
  font-size: .8rem;
  flex: none;
}

/* ---------- 20. Closing CTA ---------- */
.close {
  text-align: center;
  padding: clamp(48px, 7vw, 84px) var(--gut);
  border-radius: var(--r-lg);
  border: 1px solid var(--gold-line);
  background:
    radial-gradient(60% 100% at 50% 0%, rgba(252, 191, 2, .12), transparent 68%),
    var(--glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.close > * + * { margin-top: 18px; }
.close .lede { margin-inline: auto; }
.close .hero__actions { justify-content: center; }

/* ---------- 21. Footer ---------- */
.foot { border-top: 1px solid var(--line); padding-block: 40px 34px; }

/* Powered by AI — prominent badge above the footer grid */
.foot__pwr {
  display: flex;
  justify-content: center;
  margin-bottom: 40px;
}
.pwr-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: var(--r-pill);
  border: 1px solid var(--gold-line);
  background: linear-gradient(135deg, rgba(252,191,2,.14), rgba(252,191,2,.04));
  color: var(--gold);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .04em;
}
.pwr-badge svg { width: 15px; height: 15px; flex: none; }
.pwr-badge--sm { padding: 7px 14px; font-size: 11px; }
.pwr-badge--sm svg { width: 13px; height: 13px; }

/* Compact footer for auth pages (login/register) — badge + legal only, no marketing grid */
.foot--auth { padding-block: 34px 30px; }
.foot--auth .foot__pwr { margin-bottom: 22px; }
.foot__legal--center {
  align-items: center;
  text-align: center;
}
.foot__legal--center .foot__legal-line { text-align: center; }

.foot__grid {
  display: grid;
  grid-template-columns: 1.6fr repeat(3, 1fr);
  gap: 36px;
}
.foot__h {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 14px;
}
.foot__links { display: flex; flex-direction: column; gap: 10px; }
.foot__links a { font-size: .9rem; color: var(--mute); transition: color .22s var(--ease); }
.foot__links a:hover { color: var(--gold-2); }
.foot__base {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  margin-top: 40px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

/* Legal / entity disclosure line — sits below foot__base */
.foot__legal {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.foot__legal-line {
  color: var(--dim);
  line-height: 1.6;
}
.foot__legal-line a {
  color: var(--mute);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color .22s var(--ease);
}
.foot__legal-line a:hover { color: var(--gold-2); }

.social { display: flex; gap: 8px; }
.social a {
  width: 34px; height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  background: var(--glass);
  color: var(--mute);
  transition: color .25s var(--ease), border-color .25s var(--ease), transform .25s var(--ease);
}
.social a:hover { color: var(--gold); border-color: var(--gold-line); transform: translateY(-2px); }
.social svg { width: 15px; height: 15px; }

/* ---------- 22. Reveal on scroll ---------- */
.rise {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .8s var(--ease-out), transform .8s var(--ease-out);
  transition-delay: var(--d, 0ms);
}
.rise.in { opacity: 1; transform: none; }

/* ---------- 23. Helpers ---------- */
.stack   { display: flex; flex-direction: column; }
.row     { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.mt-s    { margin-top: 14px; }
.mt-m    { margin-top: 26px; }
.mt-l    { margin-top: clamp(34px, 4vw, 52px); }
.center  { text-align: center; }
.sr {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- 24. Responsive ---------- */
@media (max-width: 1024px) {
  .hero__grid { grid-template-columns: 1fr; }
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .foot__grid { grid-template-columns: 1fr 1fr; }
  .tiers { grid-template-columns: 1fr; max-width: 480px; margin-inline: auto; }
}

@media (max-width: 860px) {
  .nav__links {
    position: absolute;
    inset: 72px 0 auto;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 14px var(--gut) 22px;
    background: rgba(7, 4, 14, .95);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    clip-path: inset(0 0 100% 0);
    transition: clip-path .42s var(--ease-out);
  }
  .nav__links.open { clip-path: inset(0 0 0 0); }
  .nav__link { padding: 13px 14px; border-radius: var(--r-sm); }
  .nav__link.active::after { display: none; }
  .burger { display: flex; }
  .nav__cta .btn--ghost { display: none; }
  .grid--3, .grid--2 { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .console__body { grid-template-columns: 1fr; }
  .gauge { flex-direction: row; align-items: center; gap: 18px; }
  .gauge__lbl { text-align: left; max-width: none; }
  .vs { font-size: .82rem; }
  .vs th, .vs td { padding: 12px 10px; }
}

@media (max-width: 560px) {
  .grid--4 { grid-template-columns: 1fr; }
  .foot__grid { grid-template-columns: 1fr; gap: 26px; }
  .hero__actions .btn { width: 100%; }
  .foot__base { justify-content: center; text-align: center; }
  .foot__legal { text-align: center; align-items: center; }
}

/* ---------- 25. Motion & contrast preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .rise { opacity: 1; transform: none; }
  .gauge__fill { transition: none; }
}

/* Fallback for browsers without backdrop-filter (older Firefox, low-power modes) */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .pane, .nav.is-stuck, .close, .stat { background: rgba(21, 13, 38, .9); }
}

@media print {
  .aurora, .nav, .rail { display: none; }
  body { background: #fff; color: #000; }
}
