/* ==========================================================================
   Shared stylesheet — copied into css/style.css for every site (main + 4 apps)
   Override --accent (and --accent-dark) per app for a distinct feel while
   keeping one system.

   The palette, type and shapes come from the VocoGogo help page. Every colour
   is a token, so light and dark are two sets of values rather than two sets of
   rules, and a per-app accent override still flows through everything derived
   from it (soft fills, links, focus rings).
   ========================================================================== */

@import url("https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,600;12..96,700;12..96,800&family=Instrument+Sans:wght@400;500;600&family=DM+Mono:wght@400;500&display=swap");

:root {
  color-scheme: light dark;

  --bg: #FBFCF6;
  --bg-alt: #EEF6F0;
  --card-bg: #FFFFFF;
  --border: #E1EBE2;

  --text: #0F211A;
  --text-muted: color-mix(in srgb, var(--text) 62%, var(--bg) 38%);
  --text-faint: color-mix(in srgb, var(--text) 40%, var(--bg) 60%);

  /* Fills. --accent-ink stays white in both themes so an app that overrides
     --accent to any mid-dark colour keeps readable button text. */
  --accent: #0C7D5D;
  --accent-dark: #0A6249;
  --accent-ink: #FFFFFF;
  --accent-soft: color-mix(in srgb, var(--accent) 12%, var(--card-bg) 88%);
  --link: var(--accent-dark);

  /* Secondary accent, used for notes and the warm half of the background wash. */
  --zest: #F07319;
  --zest-soft: color-mix(in srgb, var(--zest) 16%, var(--card-bg) 84%);

  /* Semantic. Fixed meaning, so these never follow a per-app accent. */
  --good: #2F6F4E;
  --bad: #B3261E;
  --bad-soft: color-mix(in srgb, var(--bad) 10%, var(--card-bg) 90%);

  --wash-mint: color-mix(in srgb, var(--accent) 13%, transparent);
  --wash-zest: color-mix(in srgb, var(--zest) 12%, transparent);
  --lift: 0 1px 1px color-mix(in srgb, var(--text) 5%, transparent),
          0 12px 28px -18px color-mix(in srgb, var(--text) 55%, transparent);

  --radius: 18px;
  --radius-sm: 12px;
  --radius-pill: 999px;
  --max-width: 1080px;

  --font: "Instrument Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --display: "Bricolage Grotesque", var(--font);
  --mono: "DM Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #08130F;
    --bg-alt: #172C24;
    --card-bg: #0F1E19;
    --border: #223A31;

    --text: #E9F4EC;

    /* Deep enough that white button text still passes contrast, while links
       brighten automatically from whatever accent an app has set. */
    --accent: #1E9E76;
    --accent-dark: #178A66;
    --link: color-mix(in srgb, var(--accent) 60%, #FFFFFF 40%);

    --zest: #FFA24D;
    --good: #46DDA3;
    --bad: #FF7A5C;
  }
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Soft colour wash behind every page. Fixed and non-interactive, so it costs
   nothing but stops large light areas reading as flat white. */
body::before {
  content: "";
  position: fixed;
  inset: -20vh -10vw auto;
  height: 90vh;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(46vw 46vw at 12% 22%, var(--wash-mint), transparent 62%),
    radial-gradient(40vw 40vw at 92% 6%, var(--wash-zest), transparent 60%);
}

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: -0.025em;
}
h1 { letter-spacing: -0.035em; font-weight: 800; }

a { color: var(--link); text-decoration: none; text-underline-offset: 2px; text-decoration-thickness: 1.5px; }
a:hover { text-decoration: underline; }

img { max-width: 100%; display: block; }

.logo-container {
  display: flex;
  justify-content: center;
  align-items: center;
}

.google-container {
  display: flex;
  justify-content: left;
  align-items: left;
}

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Nav ---------- */
header.site-nav {
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--card-bg) 88%, transparent);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 10;
}

header.site-nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand {
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: -0.035em;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 9px;
}
.brand:hover { text-decoration: none; }

/* The brand dot picks up the app's accent — the one mark that differs per site. */
.brand .dot {
  width: 22px;
  height: 22px;
  border-radius: 8px;
  background: linear-gradient(140deg, var(--accent), var(--zest));
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.brand .dot::after {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--card-bg);
}

nav.links {
  display: flex;
  gap: 24px;
  font-size: 0.95rem;
  font-weight: 600;
}

nav.links a { color: var(--text-muted); }
nav.links a:hover, nav.links a.active { color: var(--accent); text-decoration: none; }

.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  padding: 8px;
  margin: -8px;
  color: var(--text);
  cursor: pointer;
}
.menu-toggle svg { display: block; }

@media (max-width: 640px) {
  .menu-toggle { display: flex; }

  header.site-nav .wrap { position: relative; }

  nav.links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--card-bg);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--lift);
  }
  nav.links.open { display: flex; }
  nav.links a { padding: 14px 24px; border-top: 1px solid var(--border); }
  nav.links a:first-child { border-top: none; }
}

/* ---------- Hero ---------- */
.hero {
  padding: 88px 0 64px;
  text-align: center;
}

.hero h1 {
  font-size: clamp(2.1rem, 6vw, 3.4rem);
  line-height: 1.05;
  margin: 0 0 16px;
}

.hero p.lead {
  font-size: 1.2rem;
  color: var(--text-muted);
  max-width: 620px;
  margin: 0 auto 32px;
}

.cta-row {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: var(--radius-pill);
  font-family: var(--font);
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
}
.btn-primary:hover { background: var(--accent-dark); text-decoration: none; }

.btn-secondary {
  background: var(--card-bg);
  color: var(--text);
  border-color: var(--border);
}
.btn-secondary:hover { background: var(--accent-soft); border-color: var(--accent); text-decoration: none; }

/* ---------- Sections ---------- */
section { padding: 56px 0; }
section.alt { background: var(--bg-alt); }

h2.section-title {
  font-size: clamp(1.6rem, 3.4vw, 2rem);
  margin: 0 0 8px;
}

p.section-sub {
  color: var(--text-muted);
  margin: 0 0 36px;
  max-width: 560px;
}

/* ---------- Cards (app grid on main site) ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 20px;
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--lift);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.card:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--accent) 35%, var(--border));
  box-shadow: 0 2px 2px color-mix(in srgb, var(--text) 6%, transparent),
              0 18px 36px -20px color-mix(in srgb, var(--text) 60%, transparent);
}

.card h3 { margin: 12px 0 6px; font-size: 1.2rem; }
.card p { color: var(--text-muted); font-size: 0.95rem; margin: 0 0 14px; }
.card .app-icon {
  width: 44px; height: 44px;
  border-radius: 14px;
  background: linear-gradient(140deg, var(--accent), var(--zest));
  display: flex; align-items: center; justify-content: center;
  color: var(--accent-ink);
  font-family: var(--display);
  font-weight: 700; font-size: 1.1rem;
}

/* ---------- Feature list ---------- */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 28px;
}
.feature h4 { margin: 0 0 6px; font-size: 1.08rem; }
.feature p { color: var(--text-muted); margin: 0; font-size: 0.93rem; }

/* ---------- Screenshot gallery ---------- */
.screenshots {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
}
.screenshot-placeholder {
  aspect-ratio: 9 / 16;
  background: linear-gradient(160deg, var(--bg-alt), var(--border));
  border-radius: var(--radius);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  text-align: center;
  padding: 12px;
}

/* ---------- Docs page ---------- */
.docs-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 48px;
  align-items: start;
}
.docs-toc {
  position: sticky;
  top: 88px;
  font-size: 0.9rem;
}
.docs-toc a {
  display: block;
  padding: 6px 0;
  color: var(--text-muted);
}
.docs-toc a:hover { color: var(--accent); text-decoration: none; }
.docs-content h2:first-child { margin-top: 0; }
.docs-content code {
  font-family: var(--mono);
  background: var(--bg-alt);
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 0.9em;
}
.docs-content pre {
  font-family: var(--mono);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  overflow-x: auto;
}

.docs-content h2 {
  margin-top: 48px;
  font-size: clamp(1.5rem, 3vw, 1.8rem);
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  /* Matches .docs-toc's own sticky offset (top: 88px) — without this, clicking
     a sidebar link scrolls the heading flush to the viewport top, which is
     right under the 64px sticky nav bar, hiding the heading itself. */
  scroll-margin-top: 88px;
}

.docs-content h3 {
  margin: 32px 0 10px;
  font-size: 1.18rem;
  scroll-margin-top: 88px;
}

.docs-content ul,
.docs-content ol {
  padding-left: 1.3em;
  margin: 0 0 20px;
}

.docs-content li {
  margin-bottom: 10px;
}

/* Tables (field lists, theme table, key-restriction values) */
.docs-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 0.95rem;
}

.docs-content th,
.docs-content td {
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.docs-content th {
  font-family: var(--mono);
  color: var(--text-faint);
  font-weight: 400;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.docs-content tr:last-child td {
  border-bottom: none;
}

/* Callout cards (tip / warn). These reuse the site-wide .card rule, so strip
   the marketing-grid hover lift and muted body text — a callout isn't a link
   and its text is the important part, not secondary. Colors come from the
   semantic tokens, so tip/warn stay distinct from whichever --accent is set. */
.docs-content .card {
  padding: 16px 20px;
  margin: 20px 0;
  border-left-width: 4px;
  border-left-style: solid;
}
.docs-content .card:hover {
  transform: none;
  border-color: var(--border);
  box-shadow: var(--lift);
}
.docs-content .card p {
  color: var(--text);
  font-size: 1rem;
  margin: 0;
}
.docs-content .card p + p { margin-top: 8px; }

.docs-content .card.tip { border-left-color: var(--good); }
.docs-content .card.warn { border-left-color: var(--bad); }

.docs-content .card .label {
  display: block;
  font-family: var(--mono);
  font-weight: 500;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}
.docs-content .card.tip .label { color: var(--good); }
.docs-content .card.warn .label { color: var(--bad); }

@media (max-width: 720px) {
  .docs-layout { grid-template-columns: 1fr; }
  .docs-toc { position: static; margin-bottom: 24px; }
}

/* ---------- Blog ---------- */
.post-list { display: flex; flex-direction: column; gap: 24px; }
.post-item {
  border-bottom: 1px solid var(--border);
  padding-bottom: 24px;
}
.post-item .post-date { font-family: var(--mono); color: var(--text-faint); font-size: 0.8rem; }
.post-item h3 { margin: 6px 0; }
.post-item p { color: var(--text-muted); margin: 0; }

article.post-body { max-width: 680px; margin: 0 auto; }
article.post-body h1 { margin-bottom: 4px; }
article.post-body .post-meta { font-family: var(--mono); color: var(--text-faint); font-size: 0.85rem; margin-bottom: 32px; }

/* ---------- Comments ---------- */
.comments-section {
  border-top: 1px solid var(--border);
  padding-top: 40px;
  margin-top: 16px;
}

/* ---------- Footer ---------- */
footer.site-footer {
  border-top: 1px solid var(--border);
  padding: 40px 0;
  color: var(--text-faint);
  font-size: 0.88rem;
}
footer.site-footer .wrap {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
footer.site-footer a { color: var(--text-muted); font-weight: 600; }
footer.site-footer a:hover { color: var(--accent); }

/* ---------- Contact form ---------- */
.contact-form { max-width: 480px; }

.form-row { margin-bottom: 20px; }
.form-row label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 6px;
}
.form-row input[type="text"],
.form-row input[type="email"],
.form-row textarea {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--card-bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 0.95rem;
}
.form-row input:focus,
.form-row textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
.form-row textarea { resize: vertical; min-height: 120px; }

/* Honeypot field — hidden off-screen (not display:none, which some bots
   skip) so sighted users and screen readers never see or fill it. Any
   value here means whatever submitted the form isn't a person. */
.hp-field {
  position: absolute;
  left: -9999px;
  top: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.contact-form .btn { margin-top: 4px; cursor: pointer; }
.contact-form .btn:disabled { opacity: 0.6; cursor: default; }

.form-status { margin: 14px 0 0; font-size: 0.9rem; min-height: 1.3em; }
.form-status.success { color: var(--good); }
.form-status.error { color: var(--bad); }

/* ==========================================================================
   Docs prose (docs.html, privacy.html)
   Ported from the standalone VocoGogo help page and scoped to .docs-content so
   it cannot reach the site shell — an earlier version of this block redefined
   :root, body and .wrap globally, which pulled every page down to the help
   page's 760px column.
   ========================================================================== */

/* Intro paragraph under a docs heading. (.lead stays the hero's own style.) */
.docs-content .lede {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 60ch;
  margin: 0 0 14px;
}

/* ---------- Numbered steps ---------- */
.docs-content ol.steps {
  list-style: none;
  counter-reset: s;
  padding: 0;
  margin: 22px 0;
}
.docs-content ol.steps li {
  counter-increment: s;
  position: relative;
  padding-left: 52px;
  margin-bottom: 24px;
}
.docs-content ol.steps li::before {
  content: counter(s);
  position: absolute;
  left: 0;
  top: -2px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
  font-family: var(--display);
  font-weight: 700;
  font-size: 1rem;
  display: grid;
  place-items: center;
}
.docs-content ol.steps li strong {
  display: block;
  font-size: 1.05rem;
  margin-bottom: 3px;
}

/* ---------- Answer key (Yes / No / No answer) ---------- */
.docs-content .keyrow {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 16px;
}
.docs-content .pill {
  flex-shrink: 0;
  font-family: var(--display);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 5px 14px;
  border-radius: var(--radius-pill);
}
.docs-content .pill.yes  { background: var(--good); color: #FFFFFF; }
.docs-content .pill.no   { background: var(--bad-soft); color: var(--bad); }
.docs-content .pill.none { background: var(--bg-alt); color: var(--text-muted); }

/* ---------- Inline note ----------
   Same vocabulary as .card.tip / .card.warn, but reads as an aside in the flow
   rather than a boxed card. */
.docs-content .note {
  border-left: 3px solid var(--zest);
  background: var(--zest-soft);
  padding: 14px 18px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 20px 0;
  font-size: 0.95rem;
}
.docs-content .note p:last-child { margin-bottom: 0; }

/* A plain panel doesn't need the coloured edge that marks a tip or warning. */
.docs-content .card:not(.tip):not(.warn) { border-left-width: 1px; }

/* Inline chip for a UI affordance named in prose, e.g. the deck's menu button. */
.docs-content .menu {
  font-family: var(--mono);
  background: var(--bg-alt);
  border-radius: 8px;
  padding: 2px 8px;
  white-space: nowrap;
  font-size: 0.9em;
}

/* Wide tables scroll inside their own box instead of stretching the page. */
.tablewrap { overflow-x: auto; }

/* ---------- FAQ ---------- */
.docs-content dl.faq dt { font-weight: 600; margin-top: 22px; }
.docs-content dl.faq dd { margin: 6px 0 0; color: var(--text-muted); }

/* ---------- Summary panel (top of the privacy policy) ---------- */
.summary {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 26px;
  box-shadow: var(--lift);
  margin: 0 0 20px;
}
.summary h2 { margin-top: 0; font-size: 1.25rem; }
.summary ul { margin-bottom: 0; }
