/* PerkNudge.com — shared site styles (theme, nav, footer, type) */

/* Fonts are bundled locally (latin-subset woff2), never hot-linked from Google Fonts —
   a runtime fonts.gstatic.com request would leak every visitor to a third party, which
   contradicts the product's privacy posture (esp. on /privacy). See docs/decisions.md.
   Geist + Geist Mono are variable (cover weights 400–800); Instrument Serif is the 400
   display face (italic headings synthesize from it, matching the bundled extension set). */
@font-face {
  font-family: 'Instrument Serif';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/instrument-serif-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('fonts/geist-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'Geist Mono';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('fonts/geist-mono-latin.woff2') format('woff2');
}

:root {
  /* DARK theme (default) — matches the product */
  --page-bg:      #07060a;
  --page-bg-soft: #0c0a08;
  --panel:        #15120d;
  --panel-2:      #1d1913;
  --line:         rgba(255, 236, 200, 0.10);
  --line-2:       rgba(255, 236, 200, 0.16);
  --ink:          #f2ede1;
  --ink-2:        #c2bba9;
  --ink-3:        #8a8270;
  --ink-faint:    #5c5648;

  --gold:        #c9a86a;
  --gold-bright: #e6c581;
  --gold-deep:   #8a7548;
  --gold-tint:   rgba(201, 168, 106, 0.12);
  --gold-tint-2: rgba(201, 168, 106, 0.20);
  --gold-line:   rgba(201, 168, 106, 0.28);

  --serif: 'Instrument Serif', 'Iowan Old Style', Georgia, serif;
  --sans:  'Geist', -apple-system, system-ui, sans-serif;
  --mono:  'Geist Mono', 'SF Mono', ui-monospace, monospace;

  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 24px;
  --r-xl: 34px;

  --maxw: 1180px;
  --gutter: clamp(20px, 5vw, 56px);

  --hero-glow: radial-gradient(ellipse 80% 60% at 50% -6%, rgba(201,168,106,0.13), transparent 60%),
               radial-gradient(ellipse 50% 40% at 88% 8%, rgba(201,168,106,0.06), transparent 55%);
  --page-grad: var(--page-bg);
}

[data-theme="light"] {
  --page-bg:      #f6f1e7;
  --page-bg-soft: #fbf8f1;
  --panel:        #fffdf8;
  --panel-2:      #f3ecdd;
  --line:         rgba(40, 30, 12, 0.10);
  --line-2:       rgba(40, 30, 12, 0.16);
  --ink:          #1e1810;
  --ink-2:        #5a5142;
  --ink-3:        #877c66;
  --ink-faint:    #a89c83;

  --gold:        #9c7b35;
  --gold-bright: #b8923f;
  --gold-deep:   #c9a86a;
  --gold-tint:   rgba(156, 123, 53, 0.10);
  --gold-tint-2: rgba(156, 123, 53, 0.16);
  --gold-line:   rgba(156, 123, 53, 0.30);

  --hero-glow: radial-gradient(ellipse 80% 60% at 50% -6%, rgba(156,123,53,0.10), transparent 60%),
               radial-gradient(ellipse 50% 40% at 88% 8%, rgba(156,123,53,0.05), transparent 55%);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
html, body { margin: 0; padding: 0; }
body {
  background: var(--page-grad);
  color: var(--ink);
  font-family: var(--sans);
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.6;
}

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

.wrap { max-width: var(--maxw); margin: 0 auto; padding-inline: var(--gutter); }

.eyebrow {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.26em;
  text-transform: uppercase; color: var(--gold); margin: 0;
}
.mono { font-family: var(--mono); font-feature-settings: "tnum","zero"; }
.serif { font-family: var(--serif); }

h1, h2, h3 { font-family: var(--serif); font-weight: 400; letter-spacing: -0.015em; line-height: 1.04; margin: 0; }

/* ── Buttons ─────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--sans); font-size: 15px; font-weight: 600;
  padding: 13px 22px; border-radius: 999px; border: 1px solid transparent;
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}
.btn-gold {
  background: linear-gradient(180deg, var(--gold-bright), var(--gold));
  color: #1a1305;
  box-shadow: 0 1px 0 rgba(255,245,215,0.5) inset, 0 10px 30px -8px rgba(201,168,106,0.5);
}
.btn-gold:hover { transform: translateY(-2px); box-shadow: 0 1px 0 rgba(255,245,215,0.6) inset, 0 16px 38px -8px rgba(201,168,106,0.6); }
/* "Coming soon" CTA — keeps the gold prominence but is non-interactive (extension not yet published) */
.btn-soon { cursor: default; }
.btn-soon:hover { transform: none; box-shadow: 0 1px 0 rgba(255,245,215,0.5) inset, 0 10px 30px -8px rgba(201,168,106,0.5); }
.btn-soon .soon-tag { font-family: var(--mono); font-size: 0.82em; font-weight: 600; opacity: 0.75; }
.btn-ghost {
  background: transparent; color: var(--ink);
  border-color: var(--line-2);
}
.btn-ghost:hover { border-color: var(--gold-line); background: var(--gold-tint); }
.btn svg { display: block; }

/* ── Nav ─────────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(14px) saturate(140%);
  background: color-mix(in srgb, var(--page-bg) 78%, transparent);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, background-color 0.3s ease;
}
.nav.scrolled { border-bottom-color: var(--line); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 70px; gap: 24px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand .wm { font-family: var(--serif); font-size: 23px; color: var(--ink); letter-spacing: -0.005em; }
.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a { text-decoration: none; color: var(--ink-2); font-size: 14px; font-weight: 500; transition: color 0.15s ease; }
.nav-links a:hover { color: var(--ink); }
.nav-right { display: flex; align-items: center; gap: 14px; }

.theme-toggle {
  width: 38px; height: 38px; border-radius: 999px; flex-shrink: 0;
  border: 1px solid var(--line-2); background: transparent; color: var(--ink-2);
  cursor: pointer; display: grid; place-items: center; padding: 0;
  transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease;
}
.theme-toggle:hover { border-color: var(--gold-line); color: var(--gold); background: var(--gold-tint); }
.theme-toggle .moon { display: none; }
.theme-toggle .sun  { display: block; }
[data-theme="light"] .theme-toggle .moon { display: block; }
[data-theme="light"] .theme-toggle .sun  { display: none; }

@media (max-width: 820px) {
  .nav-links { display: none; }
}
/* Phone widths: brand + theme toggle + the nowrap "Add to Chrome" CTA overflow .wrap
   and clip the header. Drop the nav CTA here — Chrome extensions can't be installed on
   a phone anyway, and the hero + footer still carry the call to action. */
@media (max-width: 600px) {
  .nav .nav-right .btn { display: none; }
}

/* P· mark (inline SVG sizing helper) */
.pn-mark { display: block; flex-shrink: 0; border-radius: 24%; }

/* ── Footer ──────────────────────────────────────────── */
.footer { border-top: 1px solid var(--line); margin-top: 8px; background: var(--page-bg-soft); }
.footer-inner { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; padding: 64px 0 40px; }
.footer-col h4 { font-family: var(--sans); font-weight: 600; font-size: 12px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--ink-3); margin: 0 0 16px; }
.footer-col a { display: block; text-decoration: none; color: var(--ink-2); font-size: 14px; margin-bottom: 11px; transition: color 0.15s ease; }
.footer-col a:hover { color: var(--gold); }
.footer-col .soon-link { display: block; color: var(--ink-3); font-size: 14px; margin-bottom: 11px; cursor: default; }
.footer-col .soon-link .soon-tag { font-family: var(--mono); font-size: 11px; color: var(--ink-faint); }
.footer-col .footer-contact { display: block; font-size: 14px; margin-bottom: 11px; white-space: nowrap; }
.footer-col .footer-contact a { display: inline; margin-bottom: 0; }
.footer-col .footer-contact .footer-email { font-family: var(--mono); font-size: 10.5px; color: var(--ink-3); -webkit-user-select: all; user-select: all; }
.footer-col .footer-contact .footer-paren { font-family: var(--mono); font-size: 10.5px; color: var(--ink-3); }
.footer-blurb { color: var(--ink-3); font-size: 13.5px; line-height: 1.7; max-width: 280px; margin: 16px 0 0; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 14px;
  padding: 22px 0 40px; border-top: 1px solid var(--line); }
.footer-bottom p { margin: 0; color: var(--ink-faint); font-size: 12.5px; }
.footer-bottom .mono { font-size: 11px; letter-spacing: 0.08em; color: var(--ink-faint); }
@media (max-width: 760px) { .footer-inner { grid-template-columns: 1fr 1fr; gap: 32px; } }
/* On narrow phones the 2-col footer is too tight for "Contact (email)" on one
   line — let it wrap gracefully there while staying one line on desktop. */
@media (max-width: 480px) { .footer-col .footer-contact { white-space: normal; } }

/* ── Legal pages (privacy / terms) ──────────────────── */
.legal-hero { padding: 60px 0 24px; position: relative; }
.legal-hero::before { content:""; position:absolute; inset:-40px 0 auto 0; height:300px; background: var(--hero-glow); z-index:0; pointer-events:none; }
.legal-hero > * { position: relative; z-index: 1; }
.legal-hero .eyebrow { margin-bottom: 14px; }
.legal-hero h1 { font-size: clamp(34px, 5vw, 56px); }
.legal-hero .updated { font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em; color: var(--ink-3); margin-top: 18px; }
.legal-intro { font-size: 17px; color: var(--ink-2); max-width: 640px; margin: 18px 0 0; line-height: 1.7; }

.legal-grid { display: grid; grid-template-columns: 230px 1fr; gap: 56px; padding: 40px 0 110px; align-items: start; }
.toc { position: sticky; top: 92px; }
.toc h4 { font-family: var(--sans); font-weight: 600; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 14px; }
.toc a { display: block; text-decoration: none; color: var(--ink-2); font-size: 13.5px; padding: 7px 0; border-left: 2px solid transparent; padding-left: 14px; margin-left: -2px; transition: color 0.15s ease, border-color 0.15s ease; }
.toc a:hover, .toc a.active { color: var(--gold); border-color: var(--gold-line); }

.legal-body { max-width: 720px; }
.legal-body section { padding-top: 12px; margin-bottom: 44px; scroll-margin-top: 92px; }
.legal-body h2 { font-family: var(--serif); font-weight: 400; font-size: 26px; letter-spacing: -0.01em; margin: 0 0 16px; display: flex; align-items: baseline; gap: 12px; }
.legal-body h2 .num { font-family: var(--mono); font-size: 13px; color: var(--gold); }
.legal-body h3 { font-family: var(--sans); font-weight: 600; font-size: 16px; color: var(--ink); margin: 24px 0 8px; }
.legal-body p { color: var(--ink-2); font-size: 15px; line-height: 1.75; margin: 0 0 14px; }
.legal-body ul { margin: 0 0 14px; padding-left: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.legal-body li { color: var(--ink-2); font-size: 15px; line-height: 1.65; display: flex; gap: 11px; }
.legal-body li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); flex-shrink: 0; margin-top: 9px; }
.legal-body a { color: var(--gold); text-decoration: none; border-bottom: 1px solid var(--gold-line); }
.legal-body b { color: var(--ink); font-weight: 600; }
.callout { background: var(--gold-tint); border: 1px solid var(--gold-line); border-radius: var(--r-md); padding: 20px 22px; margin: 0 0 18px; }
.callout p { margin: 0; color: var(--ink); font-size: 14.5px; }
.callout p b { color: var(--gold-bright); }
[data-theme="light"] .callout p b { color: var(--gold); }
@media (max-width: 880px){ .legal-grid { grid-template-columns: 1fr; gap: 8px; } .toc { display: none; } }

/* legal vendor table + effective banner */
.eff-banner { display: inline-flex; align-items: center; gap: 10px; font-family: var(--mono); font-size: 12px; letter-spacing: 0.04em; color: var(--ink-2);
  background: var(--gold-tint); border: 1px solid var(--gold-line); border-radius: 999px; padding: 7px 16px; margin: 4px 0 0; }
.eff-banner b { color: var(--gold); font-weight: 600; }
.vendor-table { display: grid; grid-template-columns: 200px 1fr; border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; margin: 4px 0 14px; }
.vendor-table .vt-h { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); padding: 11px 16px; background: var(--panel-2); }
.vendor-table .vt-c { padding: 13px 16px; border-top: 1px solid var(--line); font-size: 14px; color: var(--ink-2); }
.vendor-table .vt-c.vt-name { color: var(--ink); font-weight: 600; }
@media (max-width: 540px){ .vendor-table { grid-template-columns: 130px 1fr; } }

/* shared reveal */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s cubic-bezier(.2,.7,.2,1), transform 0.7s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1 !important; transform: none !important; } }
