/* ============================================================================
   SOLVEPOP SUITE HUB v2.0 — VISUAL STUDIO LANDING STYLESHEET (3 THEMES)
   Copyright (c) 2026 SolvePop. All rights reserved.
   Zero external CDNs, zero inline styles (strict CSP), WCAG AA verified.
   ============================================================================ */
@font-face {
  font-family: "CalcClue Sans";
  src: url("fonts/lato-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "CalcClue Sans";
  src: url("fonts/lato-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "CalcClue Sans";
  src: url("fonts/lato-900.woff2") format("woff2");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

/* Theme 1 (Default): Studio Color Wash Light */
:root,
body[data-skin="studio"] {
  --bg-page: #d8e7fa;
  --bg-card: #ffffff;
  --bg-subtle: #eef4fc;
  --hero-bg: linear-gradient(135deg, #ffffff 0%, #eff6ff 48%, #ecfeff 78%, #f5f3ff 100%);
  --text-main: #0f172a;
  --text-muted: #334155;
  --border: #94b4d8;
  --kids-accent: #1d4ed8;
  --words-accent: #047857;
  --sci-accent: #0e7490;
  --arcade-accent: #6d28d9;
  --ok-text: #047857;
  --ok-bg: #ecfdf5;
  --glow-1: rgba(29, 78, 216, 0.26);
  --glow-2: rgba(14, 116, 144, 0.24);
  --glow-3: rgba(109, 40, 217, 0.20);
  --glow-4: rgba(4, 120, 87, 0.18);
  --grid-line: rgba(15, 23, 42, 0.06);
  --shadow-soft: rgba(15, 23, 42, 0.10);
  --font-main: "CalcClue Sans", system-ui, -apple-system, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* Theme 2: Ocean */
body[data-skin="ocean"] {
  --bg-page: #d4f4f9;
  --bg-card: #ffffff;
  --bg-subtle: #edf9ff;
  --hero-bg: linear-gradient(135deg, #ffffff 0%, #e0f7fa 55%, #ecfeff 100%);
  --text-main: #083344;
  --text-muted: #155e75;
  --border: #67e8f9;
  --ok-text: #065f46;
  --ok-bg: #d1fae5;
  --glow-1: rgba(6, 182, 212, 0.26);
  --glow-2: rgba(14, 116, 144, 0.22);
  --glow-3: rgba(2, 132, 199, 0.18);
  --glow-4: rgba(16, 185, 129, 0.14);
  --grid-line: rgba(8, 51, 68, 0.06);
  --shadow-soft: rgba(8, 51, 68, 0.11);
}

/* Theme 3: Night Lab (WCAG AA Dark) */
body[data-skin="night"] {
  color-scheme: dark;
  --bg-page: #0b1120;
  --bg-card: #111c33;
  --bg-subtle: #182542;
  --hero-bg: linear-gradient(135deg, #111c33 0%, #152544 55%, #1b2042 100%);
  --text-main: #f8fafc;
  --text-muted: #cbd5e1;
  --border: #334155;
  --ok-text: #a7f3d0;
  --ok-bg: #064e3b;
  --glow-1: rgba(56, 189, 248, 0.20);
  --glow-2: rgba(109, 40, 217, 0.26);
  --glow-3: rgba(16, 185, 129, 0.16);
  --glow-4: rgba(29, 78, 216, 0.18);
  --grid-line: rgba(148, 163, 184, 0.07);
  --shadow-soft: rgba(0, 0, 0, 0.36);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
.skip-link {
  position: fixed;
  top: -80px;
  left: 12px;
  z-index: 9999;
  background: var(--sci-accent, #0e7490);
  color: #ffffff;
  padding: 8px 14px;
  border-radius: 10px;
  font-weight: 900;
  font-size: 0.85rem;
  text-decoration: none;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}
.skip-link:focus {
  top: 12px;
}

.hidden { display: none !important; }

:focus-visible {
  outline: 3px solid var(--sci-accent);
  outline-offset: 2px;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-page);
  background-image:
    radial-gradient(circle at 8% 6%, var(--glow-1), transparent 42%),
    radial-gradient(circle at 92% 8%, var(--glow-2), transparent 44%),
    radial-gradient(circle at 50% 46%, var(--glow-3), transparent 48%),
    radial-gradient(circle at 14% 88%, var(--glow-4), transparent 44%),
    linear-gradient(to right, var(--grid-line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-line) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 100% 100%, 100% 100%, 28px 28px, 28px 28px;
  color: var(--text-main);
  line-height: 1.55;
  padding: 16px;
}

.hub-shell {
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Top Navigation */
.hub-nav {
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: 18px;
  padding: 10px 16px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  box-shadow: 0 8px 24px var(--shadow-soft);
}

.hub-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-main);
}

.hub-brand-icon { width: 38px; height: 38px; display: block; }
.hub-brand-name { font-size: 1.22rem; font-weight: 900; letter-spacing: -0.02em; }

.hub-nav-links,
.hub-nav-utils {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
}

.nav-pill {
  text-decoration: none;
  color: var(--text-main);
  background: var(--bg-subtle);
  border: 1.5px solid var(--border);
  border-radius: 999px;
  padding: 6px 13px;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
}

.nav-pill:hover { border-color: var(--sci-accent); }

/* Cohesive 4-App Solid Nav Pills (all >= 5.0:1 with white text) */
.nav-pill-kids   { background: var(--kids-accent);   color: #ffffff; border-color: var(--kids-accent); }
.nav-pill-words  { background: var(--words-accent);  color: #ffffff; border-color: var(--words-accent); }
.nav-pill-sci    { background: var(--sci-accent);    color: #ffffff; border-color: var(--sci-accent); }
.nav-pill-arcade { background: var(--arcade-accent); color: #ffffff; border-color: var(--arcade-accent); }
.nav-pill-kids:hover, .nav-pill-words:hover, .nav-pill-sci:hover, .nav-pill-arcade:hover { filter: brightness(1.08); }

.hub-skin-pills {
  display: inline-flex;
  background: var(--bg-subtle);
  border: 1.5px solid var(--border);
  border-radius: 999px;
  padding: 2px;
  gap: 2px;
}

.hub-skin-btn {
  background: transparent;
  border: none;
  border-radius: 999px;
  width: 34px;
  height: 34px;
  font-size: 0.96rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.hub-skin-btn.active {
  background: var(--sci-accent);
  color: #ffffff;
}

.hub-main {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Split Hero (2-Column Visual Showcase) */
.hub-hero-split {
  background: var(--hero-bg);
  border: 2px solid var(--border);
  border-radius: 22px;
  padding: 22px 24px;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 22px;
  align-items: center;
  box-shadow: 0 12px 30px var(--shadow-soft);
}

.hero-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}

.beta-pill {
  display: inline-block;
  background: var(--ok-bg);
  color: var(--ok-text);
  border: 1.5px solid var(--ok-text);
  border-radius: 999px;
  padding: 3px 12px;
  font-size: 0.78rem;
  font-weight: 900;
}

.hero-copy h1 {
  font-size: clamp(1.75rem, 3.2vw, 2.45rem);
  font-weight: 900;
  line-height: 1.12;
  letter-spacing: -0.025em;
}

.hero-copy h1 em {
  font-style: italic;
  color: var(--sci-accent);
}
body[data-skin="night"] .hero-copy h1 em { color: #38bdf8; }

.hub-hero-sub {
  font-size: 0.98rem;
  color: var(--text-muted);
  max-width: 560px;
}

.hero-quick-launch {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-btn {
  text-decoration: none;
  color: #ffffff;
  border-radius: 12px;
  padding: 9px 14px;
  min-height: 40px;
  font-size: 0.86rem;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  border-bottom: 3px solid rgba(15, 23, 42, 0.25);
}
.hero-btn:hover { filter: brightness(1.08); }
.hero-btn-kids   { background: var(--kids-accent); }
.hero-btn-words  { background: var(--words-accent); }
.hero-btn-sci    { background: var(--sci-accent); }
.hero-btn-arcade { background: var(--arcade-accent); }

.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.trust-chip {
  background: var(--bg-subtle);
  border: 1.5px solid var(--border);
  border-radius: 999px;
  padding: 4px 11px;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--text-main);
}

.trust-chip-btn {
  font-family: inherit;
  cursor: pointer;
  border-color: var(--sci-accent);
}

/* Pure-SVG Hero Showcase Stage */
.hero-stage {
  background: #0b1120;
  border: 3px solid #334155;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.22);
}

.stage-chrome {
  background: #16223d;
  border-bottom: 1.5px solid #334155;
  padding: 7px 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.stage-dot { width: 9px; height: 9px; border-radius: 999px; display: inline-block; }
.dot-r { background: #fb7185; }
.dot-y { background: #fbbf24; }
.dot-g { background: #34d399; }
.stage-title {
  margin-left: 6px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  color: #cbd5e1;
}

.hero-showcase-svg { display: block; width: 100%; height: auto; }
.hs-panel { fill: #111c33; stroke: #334155; stroke-width: 1.5; }
.hs-tag { font-family: var(--font-mono); font-size: 9px; font-weight: 900; letter-spacing: 0.06em; }
.hs-tag-kids  { fill: #93c5fd; }
.hs-tag-sci   { fill: #67e8f9; }
.hs-tag-words { fill: #6ee7b7; }
.hs-axis { stroke: #475569; stroke-width: 1.8; }
.hs-arc { fill: none; stroke-width: 2.8; stroke-linecap: round; }
.hs-arc-blue    { stroke: #60a5fa; }
.hs-arc-emerald { stroke: #34d399; }
.hs-arc-purple  { stroke: #c084fc; }
.hs-lbl-blue    { fill: #93c5fd; font-family: var(--font-mono); font-size: 10px; font-weight: 900; }
.hs-lbl-emerald { fill: #6ee7b7; font-family: var(--font-mono); font-size: 10px; font-weight: 900; }
.hs-lbl-amber   { fill: #fbbf24; font-family: var(--font-mono); font-size: 10px; font-weight: 900; }
.hs-dot-blue    { fill: #60a5fa; }
.hs-dot-emerald { fill: #34d399; }
.hs-dot-amber   { fill: #fbbf24; }
.hs-num    { fill: #cbd5e1; font-family: var(--font-mono); font-size: 10px; font-weight: 800; }
.hs-num-hi { fill: #34d399; font-family: var(--font-mono); font-size: 11px; font-weight: 900; }
.hs-area-teal  { fill: rgba(56, 189, 248, 0.24); }
.hs-curve-teal { fill: none; stroke: #38bdf8; stroke-width: 3; stroke-linecap: round; }
.hs-blk-art  { fill: #334155; }
.hs-blk-adj  { fill: #047857; }
.hs-blk-noun { fill: #1d4ed8; }
.hs-blk-verb { fill: #b91c1c; }
.hs-blk-adv  { fill: #6d28d9; }
.hs-blk-txt  { fill: #ffffff; font-family: var(--font-main); font-size: 12px; font-weight: 900; }
.hs-role-blue { fill: #93c5fd; font-family: var(--font-mono); font-size: 8.5px; font-weight: 900; }
.hs-role-red  { fill: #fca5a5; font-family: var(--font-mono); font-size: 8.5px; font-weight: 900; }

/* 3 Core Editions Grid */
.editions-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.edition-card {
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-top-width: 6px;
  border-radius: 20px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 10px 24px var(--shadow-soft);
}

.edition-kids  { border-top-color: var(--kids-accent); }
.edition-words { border-top-color: var(--words-accent); }
.edition-sci   { border-top-color: var(--sci-accent); }

.edition-head { display: flex; align-items: center; gap: 12px; }
.edition-icon { width: 50px; height: 50px; border-radius: 12px; display: block; flex-shrink: 0; }
.edition-card h2 { font-size: 1.24rem; font-weight: 900; line-height: 1.2; }

.edition-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 900;
  border-radius: 999px;
  padding: 2px 9px;
  margin-bottom: 3px;
}
.badge-kids   { background: #dbeafe; color: #1e3a8a; }
.badge-words  { background: #d1fae5; color: #065f46; }
.badge-sci    { background: #cffafe; color: #155e75; }
.badge-arcade { background: #4c1d95; color: #ede9fe; border: 1px solid #a78bfa; }

.edition-desc { font-size: 0.9rem; color: var(--text-muted); }

.feature-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 0.86rem;
}

.feature-list li { padding-left: 20px; position: relative; }
.feature-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  font-weight: 900;
  color: var(--ok-text);
}

.edition-actions { margin-top: auto; padding-top: 6px; }

.launch-btn {
  display: flex;
  justify-content: center;
  align-items: center;
  text-decoration: none;
  border-radius: 13px;
  padding: 11px 16px;
  min-height: 44px;
  font-size: 0.94rem;
  font-weight: 900;
  color: #ffffff;
  border-bottom: 4px solid rgba(15, 23, 42, 0.25);
}
.launch-btn:hover { filter: brightness(1.08); }
.launch-kids   { background: var(--kids-accent); }
.launch-words  { background: var(--words-accent); }
.launch-sci    { background: var(--sci-accent); }
.launch-arcade { background: var(--arcade-accent); white-space: nowrap; }

/* SolvePop Arcade Showcase Band */
.arcade-hub-banner {
  background: linear-gradient(135deg, #1e1b4b 0%, #0f172a 55%, #164e63 100%);
  color: #f8fafc;
  border: 2px solid #4c1d95;
  border-radius: 22px;
  padding: 20px 24px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.24);
}
.arcade-hub-left { display: flex; align-items: center; gap: 14px; flex: 1 1 420px; }
.arcade-hub-banner h2 { font-size: 1.32rem; font-weight: 900; margin: 3px 0; }
.arcade-hub-banner p { font-size: 0.9rem; color: #cbd5e1; max-width: 680px; }

/* Comparison & FAQ Sections */
.hub-section {
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: 20px;
  padding: 20px 22px;
  box-shadow: 0 8px 20px var(--shadow-soft);
}
.hub-section h2 { font-size: 1.24rem; font-weight: 900; margin-bottom: 12px; }

.compare-wrap { overflow-x: auto; }
.compare-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.compare-table th, .compare-table td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.compare-table th { background: var(--bg-subtle); font-weight: 900; }

.faq-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
.faq-item {
  background: var(--bg-subtle);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 14px;
}
.faq-item h3 { font-size: 0.96rem; font-weight: 900; margin-bottom: 5px; }
.faq-item p  { font-size: 0.86rem; color: var(--text-muted); }

/* Privacy & Policy Cards (used by privacy.html & 404.html) */
.hub-hero {
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: 22px;
  padding: 26px 24px;
  text-align: center;
  box-shadow: 0 10px 26px var(--shadow-soft);
}
.hub-hero h1 { font-size: 2rem; font-weight: 900; margin: 10px 0; }
.policy-stack { display: flex; flex-direction: column; gap: 12px; }
.policy-card {
  background: var(--bg-subtle);
  border: 1.5px solid var(--border);
  border-left: 5px solid var(--sci-accent);
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 0.92rem;
}
.policy-card strong { display: block; margin-bottom: 4px; }

/* Footer */
.hub-footer {
  text-align: center;
  font-size: 0.84rem;
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  padding: 4px 0 14px;
}
.hub-footer a { color: var(--text-main); font-weight: 800; }

/* Offline Setup Guide Modal */
.hub-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.66);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
  z-index: 120;
}
.hub-modal-card {
  width: 100%;
  max-width: 720px;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--bg-card);
  color: var(--text-main);
  border: 2px solid var(--border);
  border-radius: 20px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.36);
}
.hub-modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  border-bottom: 1.5px solid var(--border);
  padding-bottom: 8px;
}
.hub-modal-head h2 { font-size: 1.12rem; font-weight: 900; }
.hub-modal-close {
  background: var(--bg-subtle);
  color: var(--text-main);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  width: 34px;
  height: 34px;
  font-weight: 900;
  cursor: pointer;
}
.hub-modal-sub { font-size: 0.88rem; color: var(--text-muted); }
.offline-steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.offline-step-card {
  background: var(--bg-subtle);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 12px;
  font-size: 0.84rem;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.offline-step-card ol { padding-left: 18px; display: flex; flex-direction: column; gap: 5px; }

/* Responsive Breakpoints */
@media (max-width: 960px) {
  .hub-hero-split { grid-template-columns: 1fr; }
  .editions-grid  { grid-template-columns: 1fr; }
  .offline-steps-grid { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  body { padding: 10px; }
  .hub-hero-split { padding: 16px; }
  .faq-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
