/* Aerolite public site — shared styling.
 *
 * Matched to the approved homepage rendering (2026-08-28). Two notes on colour:
 *
 * 1. The rendering introduces a MAGENTA accent (eyebrows, "DIFFERENTLY", the
 *    lockup's "CREATOR NETWORK" rule) that is not in Reference/brand.md's
 *    palette. It is in the approved comp, so it ships — recorded here as a
 *    deliberate divergence rather than a drift, and flagged to Corey.
 * 2. brand.md's two measured-contrast rules still hold and are honoured:
 *    Orbital Violet is never body-text colour on navy, and text on a violet
 *    button is Aerolite Black — the gradient CTA is light enough that its label
 *    stays white in the comp, so that one keeps the comp's treatment.
 */
:root {
  --black: #08080F;          /* page ground, slightly deeper than brand black */
  --ink: #090A10;            /* Aerolite Black */
  --navy: #11182B;           /* Atmosphere Navy */
  --card: #0D0E1C;           /* the bordered panels in the comp */
  --card-2: #101124;
  --violet: #7667F2;         /* Orbital Violet */
  --blue: #61A7FF;           /* Ion Blue */
  --magenta: #E23FC4;        /* comp accent — eyebrows, DIFFERENTLY */
  --star: #F3F0E8;           /* Starlight */
  --gray: #A7A9B5;           /* Lunar Gray */
  --faint: #6E7385;
  --line: rgba(167, 169, 181, 0.13);
  --line-strong: rgba(167, 169, 181, 0.24);
  --grad: linear-gradient(100deg, #7C4DF5, #5B7FF5 55%, #4E9BF0);
}

* { box-sizing: border-box; margin: 0; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

body {
  background: var(--black);
  color: var(--star);
  font-family: "Poppins", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-weight: 300;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
  overflow-x: hidden;
}

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 2px solid var(--violet); outline-offset: 3px; border-radius: 4px;
}
img { max-width: 100%; }

/* ── Lockup ─────────────────────────────────────────────────────────────── */
.lockup { display: flex; align-items: center; gap: 11px; color: var(--star); }
.lockup:hover { text-decoration: none; }
.lockup img { width: 34px; height: 34px; flex-shrink: 0; }
.lockup .wm { display: flex; flex-direction: column; line-height: 1; }
.lockup .wm .n { font-weight: 400; letter-spacing: 0.30em; font-size: 1.02rem; }
.lockup .wm .s {
  display: flex; align-items: center; gap: 6px; margin-top: 5px;
  color: var(--magenta); font-size: 0.44rem; letter-spacing: 0.30em; font-weight: 500;
}
.lockup .wm .s::before, .lockup .wm .s::after {
  content: ""; height: 1px; width: 12px; background: var(--magenta); opacity: 0.85;
}

/* ── Header ─────────────────────────────────────────────────────────────── */
.sitehead {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 22px;
  padding: 22px clamp(16px, 3.4vw, 46px);
  background: rgba(8, 8, 15, 0.86);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}
.sitenav { display: flex; align-items: center; gap: clamp(14px, 2.1vw, 30px); margin-left: auto; }
.sitenav a {
  color: var(--gray); font-size: 0.7rem; font-weight: 400;
  letter-spacing: 0.11em; text-transform: uppercase; white-space: nowrap;
}
.sitenav a:hover { color: var(--star); text-decoration: none; }
.sitenav a[aria-current="page"] { color: var(--star); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 26px; border-radius: 9px;
  font-size: 0.72rem; font-weight: 500; font-family: inherit;
  letter-spacing: 0.13em; text-transform: uppercase;
  border: 1px solid transparent; cursor: pointer; white-space: nowrap;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.btn.primary { background: var(--grad); color: #fff; box-shadow: 0 6px 22px rgba(118, 103, 242, 0.32); }
.btn.primary:hover { transform: translateY(-1px); box-shadow: 0 10px 30px rgba(118, 103, 242, 0.45); text-decoration: none; }
.btn.ghost { border-color: var(--line-strong); color: var(--star); background: transparent; }
.btn.ghost:hover { border-color: var(--star); text-decoration: none; }
.btn.sm { padding: 10px 20px; font-size: 0.66rem; }

/* ── Shared section furniture ───────────────────────────────────────────── */
.wrap { max-width: 1180px; margin: 0 auto; padding-inline: clamp(16px, 3.4vw, 46px); }
.eyebrow {
  color: var(--magenta); font-weight: 500; font-size: 0.68rem;
  letter-spacing: 0.24em; text-transform: uppercase; margin-bottom: 16px;
}
h2.big {
  font-weight: 400; font-size: clamp(1.5rem, 3.2vw, 2.05rem);
  letter-spacing: 0.10em; text-transform: uppercase; line-height: 1.3;
}
.panel {
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
}

/* ── Long-form document pages (terms, privacy) ──────────────────────────── */
.doc { max-width: 74ch; margin: 0 auto; padding: clamp(40px, 7vw, 84px) clamp(20px, 5vw, 32px) 96px; }
.doc .eyebrow { margin-bottom: 14px; }
.doc h1 { font-weight: 600; font-size: clamp(1.9rem, 5vw, 2.7rem); letter-spacing: -0.02em; line-height: 1.12; text-wrap: balance; }
.doc .updated { color: var(--gray); font-size: 0.82rem; margin-top: 12px; }
.doc .lede { font-size: 1.02rem; color: var(--star); margin-top: 22px; padding-left: 18px; border-left: 2px solid var(--violet); }
.doc h2 { font-weight: 600; font-size: 1.16rem; letter-spacing: -0.01em; margin: 46px 0 12px; padding-top: 26px; border-top: 1px solid var(--line); }
.doc h3 { font-weight: 500; font-size: 0.98rem; margin: 26px 0 8px; color: var(--star); }
.doc p { margin: 12px 0; color: var(--star); }
.doc p.muted { color: var(--gray); font-size: 0.92rem; }
.doc ul, .doc ol { margin: 12px 0 12px 22px; color: var(--star); }
.doc li { margin: 7px 0; }
.doc strong { font-weight: 600; }
.doc code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.88em; background: var(--navy); padding: 2px 6px; border-radius: 5px; color: var(--blue); }
.callout { background: var(--navy); border: 1px solid var(--line); border-left: 2px solid var(--violet); border-radius: 12px; padding: 18px 20px; margin: 22px 0; }
.callout .t { font-weight: 600; font-size: 0.94rem; margin-bottom: 6px; color: var(--star); }
.callout p { margin: 6px 0; font-size: 0.93rem; }
.callout p:last-child { margin-bottom: 0; }
.doc table { width: 100%; border-collapse: collapse; margin: 18px 0; font-size: 0.9rem; }
.doc thead th { text-align: left; color: var(--gray); font-weight: 500; font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase; padding: 0 12px 9px 0; border-bottom: 1px solid var(--line-strong); }
.doc tbody td { padding: 11px 12px 11px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.doc tbody tr:last-child td { border-bottom: none; }
.tablewrap { overflow-x: auto; }
.toc { background: var(--card-2); border: 1px solid var(--line); border-radius: 12px; padding: 16px 20px; margin: 30px 0; }
.toc .t { font-size: 0.66rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gray); margin-bottom: 9px; }
.toc ol { margin: 0 0 0 18px; }
.toc li { margin: 4px 0; font-size: 0.9rem; }

/* ── Footer ─────────────────────────────────────────────────────────────── */
.sitefoot { border-top: 1px solid var(--line); padding-top: 68px; margin-top: 34px; }
.footgrid {
  display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr 1.5fr;
  gap: clamp(24px, 3vw, 46px); padding-bottom: 62px;
}
.footbrand p { color: var(--gray); font-size: 0.78rem; line-height: 1.8; margin-top: 22px; max-width: 30ch; }
.socials { display: flex; gap: 16px; margin-top: 26px; }
.socials a { color: var(--gray); display: grid; place-items: center; }
.socials a:hover { color: var(--star); }
.socials svg { width: 17px; height: 17px; fill: currentColor; }
.foothead {
  color: var(--magenta); font-size: 0.68rem; font-weight: 500;
  letter-spacing: 0.18em; text-transform: uppercase; margin-bottom: 22px;
}
.footcol ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 14px; }
.footcol a { color: var(--gray); font-size: 0.81rem; }
.footcol a:hover { color: var(--star); text-decoration: none; }
.footnote { color: var(--gray); font-size: 0.78rem; line-height: 1.7; margin-bottom: 16px; max-width: 32ch; }
.subscribe { display: flex; gap: 0; max-width: 280px; }
.subscribe input {
  flex: 1; min-width: 0; background: var(--card); color: var(--star);
  border: 1px solid var(--line-strong); border-right: none;
  border-radius: 9px 0 0 9px; padding: 11px 14px; font: inherit; font-size: 0.78rem;
}
.subscribe input::placeholder { color: var(--faint); }
.subscribe button {
  border: none; border-radius: 0 9px 9px 0; padding: 0 16px;
  background: var(--grad); color: #fff; cursor: pointer; font-size: 1rem;
}
.footbar {
  border-top: 1px solid var(--line); padding: 28px 0 52px;
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  color: var(--faint); font-size: 0.72rem;
}
.footbar .mid {
  margin-inline: auto; letter-spacing: 0.42em; text-transform: uppercase;
  color: var(--gray); font-size: 0.66rem;
}
.footbar .heart { color: var(--magenta); }

@media (max-width: 1000px) {
  .footgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footbrand, .footsub { grid-column: span 2; }
}
@media (max-width: 720px) {
  .sitenav a.hideonphone { display: none; }
  /* Sign in lives in the phone MENU from here down (site-nav.js opts it in).
     Keeping it in the bar as well pushed the primary CTA clean off the screen
     — x320-439 on a 320px phone, invisible, and body's overflow-x:hidden hid
     that from the scrollWidth gate. Measure element rects, not just scroll. */
  .sitenav a.btn.signin { display: none; }
}
/* The header budget at 320: 288px usable vs 338px of content (lockup 155 +
   burger 42 + CTA 119 + gaps). The hamburger added 42px the row never had, so
   the CTA fell off the edge. Two staged trims rather than one blunt one. */
@media (max-width: 400px) {
  .ctalong { display: none; }          /* CTA reads "Apply" */
}
@media (max-width: 360px) {
  .lockup .wm { display: none; }       /* mark only; wordmark returns above 360 */
  /* The 7px micro sub-lockup has no business on a phone: it wraps
     "CREATOR / NETWORK" mid-word when squeezed (seen at SE width AND at
     402-440 on pages with wider navs), and where it does fit it is an
     illegible pink smudge. Mark + AEROLITE carry the brand; the homepage
     heromark restates the full lockup anyway. */
  .lockup .wm .s { display: none; }
  /* 17px social icons are sub-thumb tap targets. */
  .socials { gap: 6px; }
  .socials a { width: 40px; height: 40px; }
  .socials svg { width: 20px; height: 20px; }
}
@media (max-width: 560px) {
  /* Pages that keep self/cross links visible (About on /about, Terms and
     Privacy on the legal pages) push the header's minimum width past narrow
     screens — the CTA pill was amputated mid-word at 320-390 ("APPLY TO",
     "SIGN I"). On phones the header is lockup + CTA, nothing else; the
     hidden links all remain reachable from page content and the footer. */
  .sitenav a:not(.btn) { display: none; }
  .sitehead { gap: 12px; }
  .sitenav { gap: 10px; }
}
@media (max-width: 400px) {
  .btn.sm { padding: 10px 14px; }
}
@media (max-width: 560px) {
  .footgrid { grid-template-columns: 1fr; }
  .footbrand, .footsub { grid-column: span 1; }
  .footbar { flex-direction: column; align-items: flex-start; gap: 10px; }
  .footbar .mid { margin-inline: 0; }
}

/* ── Phone menu (hamburger) ─────────────────────────────────────────────────
   Built by /site-nav.js from the page's own nav links. Desktop never sees it. */
.navburger { display: none; }
.phonemenu { display: none; }
@media (max-width: 720px) {
  .navburger {
    /* Flex column with a FIXED gap: the open-state X needs the outer lines to
       translate exactly one line-pitch to the middle line's center. A grid
       stretched its rows across the whole button, the ±6px translates fell
       short, and the "X" rendered as a chevron. */
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
    width: 42px; height: 42px; padding: 0;
    background: none; border: 1px solid var(--line); border-radius: 10px;
    cursor: pointer; flex-shrink: 0;
  }
  .navburger span {
    display: block; width: 16px; height: 1.6px; border-radius: 2px;
    background: var(--star);
    transition: transform 0.22s ease, opacity 0.18s ease;
  }
  .navburger.open span:nth-child(1) { transform: translateY(5.6px) rotate(45deg); }
  .navburger.open span:nth-child(2) { opacity: 0; }
  .navburger.open span:nth-child(3) { transform: translateY(-5.6px) rotate(-45deg); }

  .phonemenu {
    display: flex; flex-direction: column;
    position: absolute; top: 100%; left: 0; right: 0;
    background: rgba(8, 8, 15, 0.97);
    -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--line);
    padding: 8px 0 14px;
    opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  }
  .phonemenu.open { opacity: 1; visibility: visible; transform: translateY(0); }
  .phonemenu a {
    padding: 14px clamp(20px, 6vw, 30px);
    color: var(--gray); font-size: 0.78rem; font-weight: 400;
    letter-spacing: 0.13em; text-transform: uppercase;
  }
  .phonemenu a:hover { color: var(--star); text-decoration: none; background: rgba(118, 103, 242, 0.08); }
  .phonemenu a[aria-current="page"] { color: var(--star); }
}
