/* Zero Social's shared web base, loaded first by every page except the legal ones: the design
   tokens, the canvas, and the parts every page repeats (skip link, wordmark, top nav and its
   phone menu, buttons, questions, footer). Values come from the app:
   zero-social-app/docs/design-system.md and theme/depth.ts (the shipped "lifted" dark scheme).

   Page stylesheets add only what is theirs: /landing/site.css (site, door, public, wedge and link
   pages), /landing/c.css with the film's e, f and g sheets (homepage and /vision), and the blog's
   own styles in src/content-template.js. Change a shared part here, never in a page's sheet. */
:root {
  color-scheme: dark;
  --canvas: #0d0d11;
  --chrome: #16161b;
  --card: #1a1a1f;
  --tile: #141419;
  --floating: #26262d;
  --ink: #e8e8e8;
  --ink-bright: #ededef;
  --muted: #b3b3b3;
  --tertiary: #8c8c8c;
  --secondary: #5c5c5c;
  --edge: rgba(255, 255, 255, 0.07);
  --edge-strong: rgba(255, 255, 255, 0.14);
  --fill: rgba(255, 255, 255, 0.05);
  --tint: rgba(255, 255, 255, 0.1);
  --wash: linear-gradient(180deg, #ececec 6%, #8a8a8a 70%, #666 100%);
  /* The app's blue, as it ships (constants/settingsRowIcons.ts, constants/constant.ts). White stays
     the web's interface accent; the web uses blue only where the app does and the site shows it:
     the verified tick. */
  --verified: #3965ff;
  --accent-blue: #5c82ff;
  --sans: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --press: cubic-bezier(0.33, 1, 0.68, 1);
  --gutter: clamp(16px, 5vw, 40px);
}

* { box-sizing: border-box; }
html { background: var(--canvas); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--canvas); color: var(--ink);
  font-family: var(--sans); font-size: 15px; line-height: 22px;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
::selection { background: rgba(232, 232, 232, 0.9); color: #121212; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 8px; }

/* ── wordmark: "Zero" flat, "Social" in the grey wash, as in the app ──────── */
.wordmark { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; letter-spacing: -0.4px; color: var(--ink-bright); }
.wordmark img { width: 26px; height: 26px; }
.wordmark .wm { white-space: nowrap; }
.wordmark .washed { background: var(--wash); -webkit-background-clip: text; background-clip: text; color: transparent; padding-bottom: 0.12em; }

/* ── skip link: a keyboard's first stop, jumping past the nav to <main id="main">; hidden until focused ── */
.skip {
  position: fixed; z-index: 100; top: calc(16px + env(safe-area-inset-top, 0px)); left: max(16px, env(safe-area-inset-left, 0px));
  display: inline-flex; align-items: center; height: 44px; padding: 0 18px; border-radius: 9999px;
  background: var(--ink); color: #121212; font: 700 14px/20px var(--sans);
}
.skip:not(:focus) { width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ── the top nav ──────────────────────────────────────────────────────────── */
.nav {
  position: fixed; top: calc(16px + env(safe-area-inset-top, 0px)); left: 50%; transform: translateX(-50%); z-index: 30;
  display: flex; align-items: center; gap: 6px; padding: 6px 6px 6px 14px; border-radius: 9999px;
  background: rgba(22, 22, 27, 0.72); border: 1px solid var(--edge);
  -webkit-backdrop-filter: blur(18px) saturate(140%); backdrop-filter: blur(18px) saturate(140%);
  white-space: nowrap;
}
.nav .wordmark { margin-right: 8px; padding: 7px 14px 7px 0; border-right: 1px solid var(--edge); font-size: 16px; }
.nav-links { display: flex; gap: 2px; }
.nav-links a { padding: 9px 14px; border-radius: 9999px; font-weight: 600; font-size: 14px; color: var(--tertiary); transition: color 0.2s, background 0.2s; }
.nav-links a:hover { color: var(--ink); background: var(--fill); }
.nav-links a[aria-current] { color: var(--ink); }

/* The phone menu. Under 760px the pill has no room for its links, so they move into a sheet
   behind a menu disc; /landing/nav.js closes it on an outside tap and on Escape. Values from the
   app: the tinted disc (rgba(255,255,255,0.1)), the floating fill (#26262D), the 0.12 hairline. */
.nav-menu { display: none; }
.nav-menu > summary {
  list-style: none; cursor: pointer; flex: none;
  width: 40px; height: 40px; border-radius: 9999px;
  display: flex; align-items: center; justify-content: center;
  color: var(--ink); background: var(--tint);
  transition: background 0.2s, color 0.2s;
}
.nav-menu > summary::-webkit-details-marker { display: none; }
.nav-menu > summary svg { width: 18px; height: 18px; }
.nav-menu[open] > summary { background: var(--ink); color: #121212; }
.nav-sheet {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0;
  display: grid; padding: 8px; border-radius: 20px;
  background: var(--floating); border: 0.5px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.3);
}
.nav-sheet a { padding: 13px 16px; border-radius: 12px; font-size: 15px; line-height: 22px; font-weight: 600; color: var(--ink); }
.nav-sheet a:hover { background: rgba(255, 255, 255, 0.07); }
.nav-sheet a[aria-current] { background: rgba(232, 232, 232, 0.12); }

/* ── buttons: one shape, three levels (the app's Button) ──────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 56px; padding: 0 24px; border-radius: 9999px; border: 0;
  font: 700 15px/22px var(--sans); cursor: pointer; white-space: nowrap;
  transition: transform 0.14s var(--press), background 0.2s, box-shadow 0.3s;
}
.btn:active { transform: scale(0.985); }
.btn-primary { background: var(--ink); color: #121212; }
.btn-primary:hover { box-shadow: 0 0 0 6px rgba(232, 232, 232, 0.08); }
/* The app's secondary since 28 Oct 2026: a 10% white fill, no outline. */
.btn-secondary { background: var(--tint); color: var(--ink); font-weight: 600; }
.btn-secondary:hover { background: rgba(255, 255, 255, 0.14); }
.btn-md { height: 40px; padding: 0 16px; font-size: 14px; }
.btn svg { width: 20px; height: 20px; flex: none; }
/* Whole-pixel lines, and room under them, because both labels have descenders: the letters themselves sit centred. */
.btn .two { display: flex; flex-direction: column; align-items: flex-start; padding-bottom: 2px; }
.btn .two small { font-size: 10.5px; line-height: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; opacity: 0.7; }
.btn .two b { font-size: 16px; line-height: 18px; }

/* ── store buttons (Yash's decision, 21 Nov 2026) ─────────────────────────────
   A phone sees one white "Get the app" pill for its own store. A computer sees the site's own two
   round buttons, one per store, with the store's mark and two lines of words (.btn and .two above),
   never Apple's and Google's rectangular badge artwork. .store-badges is the row that holds them.
   OS_SCRIPT sets data-os on <html> before the body paints, and it stays "desktop" without script.
   These rules come after .btn so that .os wins. storeChoice() in src/app-links.js writes the markup. */
.store-badges { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.os { display: none; }
html[data-os="ios"] .os-ios, html[data-os="android"] .os-android, html[data-os="desktop"] .os-desktop { display: inline-flex; }

/* ── questions: one FAQ on every page, rows in a card (the app's grouped list) ──
   The homepage gives this card the film's glass in e.css; nothing else restyles it. */
.faq { padding: 4px 24px; background: var(--card); border: 1px solid var(--edge); border-radius: 16px; }
.faq details + details { border-top: 1px solid var(--edge); }
.faq summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 0; font-size: 15px; line-height: 22px; font-weight: 600; color: var(--ink); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ''; flex: none; width: 8px; height: 8px; margin-right: 4px; border-right: 1.5px solid var(--tertiary); border-bottom: 1.5px solid var(--tertiary); transform: rotate(45deg) translateY(-2px); transition: transform 0.2s var(--ease); }
.faq details[open] summary::after { transform: rotate(-135deg) translateY(-2px); }
.faq details p { margin: -6px 0 18px; max-width: 72ch; font-size: 15px; line-height: 22px; color: var(--muted); }
.faq a { color: var(--ink); text-decoration: underline; text-decoration-color: rgba(232, 232, 232, 0.35); text-underline-offset: 3px; }
.faq a:hover { text-decoration-color: var(--ink); }

/* ── footer ───────────────────────────────────────────────────────────────── */
.foot { padding: 36px var(--gutter) 40px; border-top: 0.5px solid var(--edge); }
.foot-in { max-width: 1080px; margin: 0 auto; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 28px; }
/* Each link is a 44px-tall tap target (the app's minimum); the nav's negative margin keeps one row
   where it was, and rows that wrap on a phone sit 44px apart instead of overlapping. */
.foot nav { display: flex; flex-wrap: wrap; gap: 0 22px; margin: -11px 0; font-size: 14px; font-weight: 500; color: var(--tertiary); }
.foot nav a { padding: 11px 0; }
.foot nav a:hover { color: var(--ink); }
.foot small { width: 100%; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; color: var(--tertiary); font-size: 12px; }

@media (prefers-reduced-motion: reduce) {
  .btn, .nav-links a, .nav-menu > summary, .faq summary::after { transition: none; }
}

/* ── phone ────────────────────────────────────────────────────────────────── */
@media (max-width: 760px) {
  .nav {
    top: calc(10px + env(safe-area-inset-top, 0px));
    left: max(12px, env(safe-area-inset-left, 0px)); right: max(12px, env(safe-area-inset-right, 0px));
    transform: none; justify-content: space-between;
  }
  .nav-links { display: none; }
  .nav-menu { display: block; margin-left: auto; }
  .faq { padding: 4px 20px; }
}
/* The smallest phones. */
@media (max-width: 359px) {
  .nav .wordmark { margin-right: 2px; padding-right: 0; border-right: 0; font-size: 15px; gap: 7px; }
  .nav .btn-md { padding: 0 12px; }
}
