/* ==================== SHARED SITE STYLESHEET ====================
   Extracted from index.html's formerly-inline <style> block so every page
   on parqwish.com (homepage, blog, guide) shares the same nav, footer, and
   day/night theme system. Linked absolutely as /site.css from every page.

   Bridge section (near the bottom) adds alias custom properties matching
   the PWA app's own token names (--color-gold, --radius-lg, --text-sm,
   etc.) so blog/guide content ported from the PWA's JSX can keep its
   `var(--color-*)` references verbatim — no per-property renaming needed
   during the port. See marketing/content/ for that ported content.
*/

:root {
  --bg: #1e1b4b;
  --bg-deep: #0f0c2e;
  --surface: #2a2660;
  --surface2: #1a1740;
  --gold: #FFD700;
  --gold-dim: rgba(255,215,0,0.15);
  --gold-mid: rgba(255,215,0,0.4);
  --text: #f0ecff;
  --text-dim: rgba(240,236,255,0.6);
  --text-muted: rgba(240,236,255,0.35);
  --border: rgba(255,215,0,0.2);
  --road: #FFD700;
  --phase-plan: #FFD700;
  --phase-preview: #f97316;
  --phase-prepare: #c4a35a;
  --phase-play: #a78bfa;
  --phase-publish: #60a5fa;
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Plus Jakarta Sans', system-ui, sans-serif;
}
[data-theme="day"] {
  --bg: #F7F5F2;
  --bg-deep: #ece8e1;
  --surface: #ffffff;
  --surface2: #f0ede8;
  --gold: #996515;
  --gold-dim: rgba(153,101,21,0.1);
  --gold-mid: rgba(153,101,21,0.3);
  --text: #1C1C28;
  --text-dim: rgba(28,28,40,0.65);
  --text-muted: rgba(28,28,40,0.35);
  --border: rgba(153,101,21,0.25);
  --road: #996515;

  /* Re-declared here, not just in the bridge block below: a custom property
     that references another one via var() (e.g. --color-text-primary: var(--text))
     is resolved once, using the value of --text at the SAME element the
     reference lives on. The bridge block lives on bare :root (<html>), which
     never carries [data-theme="day"] (only <body> does) — so without this
     duplicate, every --color-* alias stays frozen to its night-mode value
     forever, even after the toggle switches <body> to day. Redeclaring the
     aliases here, on the same selector as the day overrides above, makes
     them resolve against day's --text/--gold/etc. instead. */
  --color-gold: var(--gold);
  --color-text-primary: var(--text);
  --color-text-secondary: var(--text-dim);
  --color-text-dim: var(--text-muted);
  --color-text-muted: var(--text-muted);
  --color-heading: var(--text);
  --color-bg-card: var(--surface);
  --color-bg-deep: var(--bg-deep);
  --color-nav-bg: var(--bg-deep);
  --color-surface-base: var(--surface);
  --color-surface-raised: var(--surface);
  --color-surface-sunken: var(--surface2);
  --color-surface-hover: var(--surface2);
  --color-surface-overlay: var(--surface2);
  --color-border-subtle: var(--border);
  --color-border-default: var(--border);
  --color-border-strong: var(--gold-mid);
  --color-border-input: var(--border);
  --color-overlay: rgba(0,0,0,0.35);
  --color-accent-plan: var(--phase-plan);
  --color-accent-preview: var(--phase-preview);
  --color-accent-prepare: var(--phase-prepare);
  --color-accent-play: var(--phase-play);
  --color-accent-publish: var(--phase-publish);
  --color-accent-catalog: var(--phase-prepare);
  --color-accent-sync: var(--phase-play);
  --color-warning: var(--gold);
  --color-info: var(--phase-publish);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--bg-deep);
  color: var(--text);
  overflow-x: hidden;
  transition: background 0.4s, color 0.4s;
}

/* ─── ROAD CANVAS (homepage only) ─── */
#road-canvas {
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 100%;
  pointer-events: none;
  z-index: 0;
  max-width: 1200px;
}

/* ─── PAGE WRAPPER ─── */
.page-wrap {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* ─── STARS (homepage only) ─── */
#stars {
  position: fixed; inset: 0;
  pointer-events: none; z-index: 0;
  overflow: hidden;
  opacity: 1;
  transition: opacity 0.5s;
}
[data-theme="day"] #stars { opacity: 0; }
.star {
  position: absolute;
  background: #fff;
  border-radius: 50%;
  animation: twinkle var(--d, 3s) ease-in-out infinite alternate;
}
@keyframes twinkle { from { opacity: 0.2; } to { opacity: 0.9; } }

/* ─── NAV ─── */
nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 1rem 2rem;
  display: flex; align-items: center; justify-content: space-between;
  background: linear-gradient(to bottom, var(--bg-deep) 0%, transparent 100%);
  transition: background 0.4s;
}
nav.nav-solid {
  background: var(--bg-deep);
  border-bottom: 1px solid var(--border);
}
.nav-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}
.nav-logo img {
  height: 28px;
  width: auto;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,0.4));
}
.nav-right { display: flex; gap: 1.5rem; align-items: center; }
.nav-link { color: var(--text-dim); text-decoration: none; font-size: 0.875rem; font-weight: 500; transition: color 0.2s; }
.nav-link:hover { color: var(--gold); }
.nav-link.is-active { color: var(--gold); }
.nav-cta {
  background: var(--gold); color: var(--bg-deep);
  padding: 0.45rem 1.1rem; border-radius: 100px;
  font-size: 0.8rem; font-weight: 700; text-decoration: none;
  letter-spacing: 0.04em; text-transform: uppercase;
  transition: opacity 0.2s;
}
.nav-cta:hover { opacity: 0.85; }
.theme-toggle {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-dim);
  width: 2rem; height: 2rem;
  border-radius: 50%;
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: border-color 0.2s, color 0.2s;
}
.theme-toggle:hover { border-color: var(--gold); color: var(--gold); }

/* ─── HERO (homepage only) ─── */
#hero {
  position: relative; z-index: 1;
  min-height: 100vh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
  padding: 8rem 2rem 4rem;
  gap: 1.5rem;
}
.hero-eyebrow {
  font-family: var(--font-body);
  font-size: 0.7rem; font-weight: 600;
  letter-spacing: 0.25em; text-transform: uppercase;
  color: var(--gold);
  opacity: 0.8;
}
.hero-logo {
  display: block;
  width: clamp(280px, 60vw, 560px);
  height: auto;
  max-width: 100%;
  filter: drop-shadow(0 0 60px rgba(255,215,0,0.25));
}
.hero-tagline {
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  font-weight: 300;
  color: var(--text-dim);
  max-width: 520px;
  line-height: 1.5;
  font-family: var(--font-display);
  font-style: italic;
}
.hero-sub {
  font-size: 0.875rem; color: var(--text-muted);
  max-width: 400px; line-height: 1.6;
}
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; justify-content: center; margin-top: 0.5rem; }
.btn-primary {
  background: var(--gold); color: var(--bg-deep);
  padding: 0.8rem 2rem; border-radius: 100px;
  font-weight: 700; font-size: 0.9rem; text-decoration: none;
  letter-spacing: 0.05em; text-transform: uppercase;
  transition: opacity 0.2s, transform 0.2s;
  display: inline-flex; align-items: center; gap: 0.5rem;
}
.btn-primary:hover { opacity: 0.9; transform: translateY(-1px); }
.btn-secondary {
  border: 1px solid var(--border);
  color: var(--text-dim);
  padding: 0.8rem 2rem; border-radius: 100px;
  font-weight: 500; font-size: 0.9rem; text-decoration: none;
  transition: border-color 0.2s, color 0.2s;
}
.btn-secondary:hover { border-color: var(--gold); color: var(--gold); }
.scroll-hint {
  position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 0.5rem;
  color: var(--text-muted); font-size: 0.7rem; letter-spacing: 0.15em; text-transform: uppercase;
  animation: bob 2s ease-in-out infinite;
}
@keyframes bob { 0%,100%{transform:translateX(-50%) translateY(0)} 50%{transform:translateX(-50%) translateY(6px)} }
.scroll-hint svg { animation: none; }

/* ─── SECTION BASE (homepage only) ─── */
.journey-section {
  position: relative; z-index: 1;
  padding: 5rem 0;
}

/* ─── STOP MARKER (homepage only) ─── */
.stop-marker {
  position: absolute; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center;
  gap: 0.3rem; z-index: 10;
}
.stop-dot {
  width: 2.5rem; height: 2.5rem;
  border: 2px solid var(--gold);
  background: var(--bg-deep);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-size: 0.8rem; font-weight: 700;
  color: var(--gold);
  box-shadow: 0 0 20px rgba(255,215,0,0.3);
  transition: box-shadow 0.3s;
}
.stop-dot.active { box-shadow: 0 0 30px rgba(255,215,0,0.6); }
.stop-label {
  font-size: 0.6rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--text-muted); white-space: nowrap;
}

/* ─── CONTENT CARD (homepage only) ─── */
.content-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2.5rem;
  max-width: 420px;
  position: relative;
  opacity: 0; transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.content-card.visible { opacity: 1; transform: translateY(0); }
.content-card.left { margin-right: auto; margin-left: 0; }
.content-card.right { margin-left: auto; margin-right: 0; }

.phase-tag {
  display: inline-block;
  font-size: 0.6rem; letter-spacing: 0.25em; text-transform: uppercase;
  font-weight: 700;
  padding: 0.25rem 0.75rem;
  border-radius: 100px;
  margin-bottom: 1rem;
  border: 1px solid currentColor;
  opacity: 0.9;
}
.card-title {
  font-family: var(--font-display);
  font-size: 1.8rem; font-weight: 700;
  line-height: 1.2;
  margin-bottom: 0.75rem;
  color: var(--text);
}
.card-subtitle {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.05rem;
  color: var(--gold);
  margin-bottom: 1rem;
  opacity: 0.9;
}
.card-body {
  font-size: 0.9rem; line-height: 1.7;
  color: var(--text-dim);
}
.feature-list {
  list-style: none;
  margin-top: 1rem;
  display: flex; flex-direction: column; gap: 0.4rem;
}
.feature-list li {
  font-size: 0.85rem; color: var(--text-dim);
  display: flex; align-items: center; gap: 0.6rem;
}
.feature-list li::before {
  content: '◆';
  font-size: 0.4rem;
  color: var(--gold); flex-shrink: 0;
}

/* ─── SCREENSHOT PLACEHOLDER (homepage only) ─── */
.screenshot-ph {
  position: relative;
  background: var(--surface2);
  border: 1px dashed var(--border);
  border-radius: 10px;
  margin-top: 1.25rem;
  aspect-ratio: 16/10;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 0.5rem;
  font-size: 0.7rem;
  color: var(--text-muted);
  font-family: 'Courier New', monospace;
  letter-spacing: 0.05em;
  padding: 1rem;
  text-align: center;
  overflow: hidden;
}
.screenshot-ph svg { opacity: 0.3; }
.screenshot-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: inherit;
  z-index: 1;
}

/* ─── LANDMARK SVG (homepage only) ─── */
.landmark {
  position: absolute;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.8s ease, transform 0.8s ease;
  transform: translateY(20px) scale(0.9);
}
.landmark.visible { opacity: 1; transform: translateY(0) scale(1); }

/* ─── FORK SECTION (homepage only) ─── */
.fork-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 1.5rem; margin-top: 2rem;
}
.fork-card {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
}
.fork-card-title {
  font-family: var(--font-display);
  font-size: 1rem; font-weight: 700;
  color: var(--text);
  margin-bottom: 0.4rem;
}
.fork-card-desc { font-size: 0.8rem; color: var(--text-dim); line-height: 1.5; }

/* ─── PRICING (homepage only) ─── */
.pricing-line {
  margin-top: 1.25rem;
  padding: 0.9rem 1.2rem;
  background: var(--gold-dim);
  border: 1px solid var(--gold-mid);
  border-radius: 8px;
  font-size: 0.85rem;
  color: var(--text);
  line-height: 1.6;
}
.pricing-line strong { color: var(--gold); }

/* ─── APP STORE BADGE (homepage only) ─── */
.badge-row { display: flex; gap: 0.75rem; margin-top: 1rem; flex-wrap: wrap; }
.app-badge {
  display: inline-flex; align-items: center; gap: 0.5rem;
  border: 1px solid var(--border);
  padding: 0.5rem 1rem; border-radius: 8px;
  color: var(--text); font-size: 0.8rem;
  text-decoration: none;
  transition: border-color 0.2s;
}
.app-badge:hover { border-color: var(--gold); }
.app-badge-label { display: flex; flex-direction: column; line-height: 1.2; }
.app-badge-label span:first-child { font-size: 0.65rem; opacity: 0.6; }
.app-badge-label span:last-child { font-weight: 600; }

/* ─── COMING SOON (homepage only, pre-launch stubs) ─── */
.coming-soon {
  position: relative;
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: auto;
}
.coming-soon::after {
  content: 'Coming soon';
  position: absolute;
  top: -0.5rem; right: -0.5rem;
  background: var(--gold);
  color: var(--bg-deep);
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.15rem 0.5rem;
  border-radius: 100px;
  white-space: nowrap;
}
.coming-soon:hover { border-color: var(--border); color: inherit; opacity: 0.7; }

/* ─── SIDE ROAD DETOUR (homepage only) ─── */
.detour-card {
  border: 1px dashed var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  max-width: 300px;
  opacity: 0; transform: translateX(-20px);
  transition: opacity 0.6s, transform 0.6s;
  background: var(--surface2);
  margin-top: -2rem;
}
.detour-card.visible { opacity: 1; transform: translateX(0); }
.detour-tag {
  font-size: 0.6rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--text-muted); margin-bottom: 0.5rem;
  display: flex; align-items: center; gap: 0.4rem;
}
.detour-tag::before { content: '⤷'; }

/* ─── STATS GRID (homepage only) ─── */
.stats-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem; margin-top: 1.25rem;
}
.stat-box {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.75rem;
  text-align: center;
}
.stat-val { font-family: var(--font-display); font-size: 1.4rem; font-weight: 700; color: var(--gold); }
.stat-lbl { font-size: 0.65rem; color: var(--text-muted); letter-spacing: 0.05em; }

/* ─── CTA BLOCK (homepage only) ─── */
#cta {
  position: relative; z-index: 1;
  text-align: center;
  padding: 6rem 2rem;
}
.cta-inner {
  max-width: 600px; margin: 0 auto;
  padding: 3.5rem 3rem;
  background: linear-gradient(135deg, var(--surface) 0%, var(--surface2) 100%);
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: 0 0 60px rgba(255,215,0,0.08);
}
.cta-eyebrow { font-size: 0.65rem; letter-spacing: 0.25em; text-transform: uppercase; color: var(--gold); margin-bottom: 1rem; opacity: 0.8; }
.cta-title { font-family: var(--font-display); font-size: clamp(1.8rem, 3.5vw, 2.8rem); font-weight: 900; margin-bottom: 0.75rem; }
.cta-sub { font-size: 1rem; color: var(--text-dim); font-family: var(--font-display); font-style: italic; margin-bottom: 2rem; }

/* ─── FOOTER ─── */
footer {
  position: relative; z-index: 1;
  padding: 2.5rem 2rem 3rem;
  border-top: 1px solid var(--border);
  text-align: center;
}
.footer-inner { max-width: 700px; margin: 0 auto; }
.footer-logo { margin-bottom: 0.75rem; }
.footer-logo img { height: 22px; width: auto; filter: drop-shadow(0 1px 2px rgba(0,0,0,0.5)); }
.footer-disclaimer { font-size: 0.75rem; color: var(--text-muted); line-height: 1.6; max-width: 500px; margin: 0 auto 1.25rem; }
.footer-links { display: flex; gap: 1.5rem; justify-content: center; flex-wrap: wrap; }
.footer-links a { color: var(--text-muted); font-size: 0.75rem; text-decoration: none; transition: color 0.2s; }
.footer-links a:hover { color: var(--gold); }

/* ─── CONTENT PAGE LAYOUT (blog + guide) ─── */
.content-main {
  position: relative; z-index: 1;
  padding-top: 6rem;
  min-height: 60vh;
}

/* ─── REDUCED MOTION ─── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .scroll-hint { animation: none; }
}

/* ─── RESPONSIVE ─── */
@media (max-width: 768px) {
  .content-card { max-width: 100%; }
  .content-card.left, .content-card.right { margin: 0; }
  .fork-grid { grid-template-columns: 1fr; }
  nav .nav-link { display: none; }
  .stats-grid { grid-template-columns: repeat(2,1fr); }
}

/* ==================== PWA TOKEN BRIDGE ====================
   Aliases so content ported verbatim from the PWA app's JSX (which uses
   these --color, --radius, --text, --font, and --leading token names)
   resolves correctly without renaming every value during the port.
*/
:root {
  --color-gold: var(--gold);
  --color-text-primary: var(--text);
  --color-text-secondary: var(--text-dim);
  --color-text-dim: var(--text-muted);
  --color-text-muted: var(--text-muted);
  --color-heading: var(--text);
  --color-bg-card: var(--surface);
  --color-bg-deep: var(--bg-deep);
  --color-nav-bg: var(--bg-deep);
  --color-surface-base: var(--surface);
  --color-surface-raised: var(--surface);
  --color-surface-sunken: var(--surface2);
  --color-surface-hover: var(--surface2);
  --color-surface-overlay: var(--surface2);
  --color-border-subtle: var(--border);
  --color-border-default: var(--border);
  --color-border-strong: var(--gold-mid);
  --color-border-input: var(--border);
  --color-overlay: rgba(0,0,0,0.5);
  --color-accent-plan: var(--phase-plan);
  --color-accent-preview: var(--phase-preview);
  --color-accent-prepare: var(--phase-prepare);
  --color-accent-play: var(--phase-play);
  --color-accent-publish: var(--phase-publish);
  --color-accent-catalog: var(--phase-prepare);
  --color-accent-sync: var(--phase-play);
  --color-success: #2ecc71;
  --color-error: #E5484D;
  --color-warning: var(--gold);
  --color-info: var(--phase-publish);

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;

  --text-2xs: 0.6875rem;
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-md: 0.9375rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;

  --font-normal: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;

  --leading-snug: 1.3;
  --leading-normal: 1.5;
  --leading-relaxed: 1.7;

  --space-1: 0.25rem; --space-2: 0.5rem; --space-3: 0.75rem; --space-4: 1rem;
  --space-5: 1.25rem; --space-6: 1.5rem; --space-8: 2rem; --space-10: 2.5rem;

  --motion-fast: 0.15s ease;
}
