/* ── Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* ── Surfaces — plum floating deck (mirrors the app's "Slipstream") ──────
       The page canvas is the recessed desk; content floats above it on lifted
       cards separated by a gutter + hairline edge + soft drop. `--bg` is the
       desk; `--card`/`--card-raised` are the surfaces that float on it. ── */
  --bg:           #140d19;              /* recessed page canvas (app `panel`)  */
  --card:         #1e1623;              /* floating card / content (app `bg`)  */
  --card-raised:  #29202f;              /* lifted controls, menus (app `float`)*/
  --control:      #2f2535;              /* inputs, chips                       */
  --control-hi:   #392d40;              /* hover / raised controls             */

  --nav-bg: rgba(20,13,25,0.82);
  --surface: rgba(255,255,255,0.04);
  --surface-hover: rgba(255,255,255,0.07);
  --border: rgba(255,255,255,0.09);
  --border-bright: rgba(255,255,255,0.16);
  --text-primary: #fafafa;
  --text-secondary: #a1a1aa;
  --text-muted: #6b6276;                /* plum-tinted faint — meta, timestamps */

  /* ── Accent scale — Woosh orchid. Velvety, purple-leaning pink (the app's
       default brand): R≈B with a dropped green channel. Solid fills; the
       legacy gradient stops collapse to a single tonal step so embedded
       gradients de-gradient themselves. ── */
  --accent:           #c880c8;          /* orchid strong — buttons, fill       */
  --accent-2:         #d89ad6;          /* orchid light — icon dot, soft fill  */
  --accent-end:       #c880c8;          /* legacy gradient end → collapses     */
  --accent-text:      #d89ad6;          /* text links, icon tint               */

  /* ── Accent rgba helpers (glows toned way down — orchid is paint, not light) ── */
  --accent-glow-sm:   rgba(200,128,200,0.14);
  --accent-glow-md:   rgba(200,128,200,0.16);
  --accent-glow-lg:   rgba(200,128,200,0.20);
  --accent-glow-xl:   rgba(200,128,200,0.24);
  --accent-bg-faint:  rgba(216,154,214,0.07);
  --accent-bg-subtle: rgba(216,154,214,0.12);
  --accent-bg-focus:  rgba(216,154,214,0.04);
  --accent-border:    rgba(216,154,214,0.16);
  --accent-border-md: rgba(216,154,214,0.26);
  --border-focus:     rgba(216,154,214,0.50);
}

/* Self-hosted Geist (same face as the app) — no third-party font host. */
@font-face {
  font-family: "Geist Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("geist-latin.woff2") format("woff2-variations");
}

html { color-scheme: dark; }

body {
  font-family: "Geist Variable", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

/* ── View Transitions ── */
@view-transition { navigation: auto; }

::view-transition-old(root) {
  animation: 180ms ease both fade-out;
}
::view-transition-new(root) {
  animation: 220ms ease both fade-in;
}

@keyframes fade-out {
  from { opacity: 1; }
  to   { opacity: 0; }
}
@keyframes fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ── Nav ── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--nav-bg);
  box-shadow: 0 6px 20px -14px rgba(0,0,0,0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.nav-inner {
  max-width: 60rem;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 3.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-link {
  padding: 0.375rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: 0.5rem;
  transition: color 0.15s, background 0.15s;
}
.nav-link:hover { color: var(--text-primary); background: var(--surface-hover); }
.nav-link[aria-current="page"] { color: var(--text-primary); background: var(--surface-hover); }

.nav-cta {
  margin-left: 0.5rem;
  padding: 0.4rem 1rem;
  font-size: 0.875rem;
  font-weight: 650;
  color: #fff;
  background: var(--accent);
  border-radius: 0.5rem;
  transition: filter 0.15s;
}
.nav-cta:hover { filter: brightness(1.08); }

/* ── Legal dropdown — a floating card menu on the recessed nav ── */
.nav-dropdown { position: relative; }

.nav-drop-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  background: none;
  border: none;
  font-family: inherit;
  cursor: pointer;
}
.nav-drop-trigger.is-active { color: var(--text-primary); background: var(--surface-hover); }

.nav-drop-caret {
  opacity: 0.65;
  transition: transform 0.18s ease;
}
.nav-dropdown.open .nav-drop-caret { transform: rotate(180deg); }

.nav-drop-menu {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  min-width: 11rem;
  padding: 0.375rem;
  background: var(--card-raised);
  border-radius: 0.75rem;
  box-shadow: 0 16px 40px rgba(0,0,0,0.45), 0 4px 12px rgba(0,0,0,0.3);
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  opacity: 0;
  transform: translateY(-4px);
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
  z-index: 200;
}
.nav-dropdown.open .nav-drop-menu {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.nav-drop-item {
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: 0.5rem;
  white-space: nowrap;
  transition: color 0.15s, background 0.15s;
}
.nav-drop-item:hover { color: var(--text-primary); background: var(--surface-hover); }
.nav-drop-item[aria-current="page"] { color: var(--accent-text); background: var(--accent-bg-subtle); }

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.logo-icon {
  width: 2rem; height: 2rem;
  border-radius: 0.5rem;
  background: var(--accent);
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  font-weight: 900;
  font-size: 1.2rem;
  line-height: 1;
}

.logo-name {
  font-size: 1.0625rem;
  font-weight: 800;
  font-style: oblique 8deg;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

/* ── Footer ── */
footer {
  padding: 3rem 1.5rem 2rem;
}

.footer-inner {
  max-width: 60rem;
  margin: 0 auto;
  display: flex;
  gap: 3rem;
  justify-content: space-between;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 16rem;
}

.footer-tagline {
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.footer-cols {
  display: flex;
  gap: 3.5rem;
  flex-wrap: wrap;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  min-width: 8rem;
}

.footer-col h4 {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.footer-col a {
  font-size: 0.875rem;
  color: var(--text-secondary);
  transition: color 0.15s;
}
.footer-col a:hover { color: var(--text-primary); }

.footer-bottom {
  max-width: 60rem;
  margin: 0 auto;
  padding-top: 1.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.footer-bottom p {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.footer-bottom-links {
  display: flex;
  gap: 1.25rem;
}
.footer-bottom-links a {
  font-size: 0.8125rem;
  color: var(--text-muted);
  transition: color 0.15s;
}
.footer-bottom-links a:hover { color: var(--text-secondary); }

@media (max-width: 600px) {
  .nav-links .nav-link,
  .nav-links .nav-dropdown { display: none; }
  .footer-inner { flex-direction: column; gap: 2rem; }
  .footer-cols { gap: 2rem; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}

/* ── The document pages on a phone ─────────────────────────────────────────
     terms, privacy, report, contact and delete-account each carry their own
     page styles, but they're built from the same parts and misbehave the same
     way on a narrow screen — so the responsive layer lives here once, and any
     future page picks it up for free.

     Selectors are element-qualified (`table.data-table`, not `.data-table`)
     on purpose: each page's inline <style> loads after this file, so an
     equally specific rule here would lose the cascade. ── */
@media (max-width: 720px) {

  /* Four columns of prose don't fit a phone. The last one falls off the edge
     and drags the whole document sideways with it, so each row becomes its
     own block and every cell carries its column name. */
  table.data-table {
    display: block;
    overflow: visible;
    font-size: 0.875rem;
  }
  table.data-table thead {
    /* Kept for screen readers — the visible labels come from data-label. */
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
  table.data-table tbody { display: block; }
  table.data-table tr {
    display: block;
    padding: 0.875rem 1rem;
    margin-bottom: 0.5rem;
    border-radius: 0.625rem;
    background: var(--surface);
  }
  table.data-table tbody tr:last-child { margin-bottom: 0; }
  table.data-table td {
    display: block;
    padding: 0;
    background: none;
  }
  table.data-table tbody tr:nth-child(odd) td { background: none; }
  table.data-table td + td { margin-top: 0.625rem; }
  table.data-table td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 0.15rem;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--text-muted);
  }
  /* The first cell is what the row is *about* — it reads as the card's title. */
  table.data-table td:first-child {
    color: var(--text-primary);
    font-weight: 600;
  }
  table.data-table td:first-child::before { display: none; }

  /* Desk-sized padding leaves a phone barely 17rem of usable field width. */
  div.form-card { padding: 1.25rem; border-radius: 1rem; }
  div.page-header { padding-left: 1.25rem; padding-right: 1.25rem; }
  div.content { padding-left: 1.25rem; padding-right: 1.25rem; }

  /* Placeholders and typed answers run to five or six lines this narrow, and
     a 6rem box clips them mid-sentence. */
  div.field textarea { min-height: 9rem; }

  /* Stack rather than squeeze: the note beside a submit button, and the line
     of contact copy beside its button, both lose the room to sit side by side. */
  div.form-footer,
  div.contact-box { flex-direction: column; align-items: stretch; }
  div.form-footer .btn-submit { width: 100%; justify-content: center; }
}
