/* ==========================================================================
   SurfaceGPT Per-Route Design Systems
   --------------------------------------------------------------------------
   Every route ships its own adaptive visual identity:
     home          → Neural Glass (default tokens)
     features      → Enterprise SaaS
     how           → Neo-Brutalist
     architecture  → Terminal / Mainframe
     pricing       → Legacy Web 1.0
     testimonials  → Minimal Consumer
     about         → Editorial Luxury
   ========================================================================== */

[hidden] {
  display: none !important;
}

body {
  transition: background-color 400ms ease, color 400ms ease;
}

.nav-links {
  gap: 18px;
  font-size: 13px;
}

.nav-links a {
  white-space: nowrap;
}

/* 🍔 Hamburger toggle — hidden on wide screens */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  padding: 0 10px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  cursor: pointer;
  flex-shrink: 0;
}

.nav-toggle span {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: var(--text);
  transition: transform 250ms var(--ease-out), opacity 200ms;
}

.nav.open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav.open .nav-toggle span:nth-child(2) { opacity: 0; }
.nav.open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 1240px) {
  .nav-links { display: none; }
  .nav-toggle { display: flex; }
  .nav { gap: var(--space-3); }
  .nav .logo { margin-right: auto; }

  .nav.open .nav-links {
    display: flex !important;
    flex-direction: column;
    gap: 2px;
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    padding: var(--space-3);
    background: var(--dropdown-bg, var(--bg));
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
    font-size: var(--fs-md);
    max-height: calc(100vh - 160px);
    overflow-y: auto;
    animation: menu-drop 220ms var(--ease-out);
  }

  .nav.open .nav-links a {
    padding: 12px 14px;
    border-radius: var(--radius-sm);
  }

  .nav.open .nav-links a:hover,
  .nav.open .nav-links a.active {
    background: var(--surface-hover);
  }
}

@keyframes menu-drop {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: none; }
}

body[data-page="pricing"] { --dropdown-bg: #c0c0c0; }
body[data-page="pricing"] .nav-toggle span { background: #000080; }
body[data-page="tictactoe"] .nav.open .nav-links { font-size: var(--fs-md); }

body[data-page="architecture"] .nav-links {
  gap: var(--space-4);
  font-size: var(--fs-xs);
}

body[data-page="pricing"] .nav-links a {
  color: #000080;
  text-decoration: underline;
}

body[data-page="pricing"] .nav-links a.active {
  color: #ff0000;
}

body[data-page="pricing"] .logo-text {
  color: #000080;
}

.nav-links a.active {
  color: var(--text);
  font-weight: 700;
}

body:not([data-page="home"]) .orb,
body:not([data-page="home"]) .grid-overlay {
  display: none;
}

body:not([data-page="home"]) .section {
  min-height: calc(100vh - 260px);
  padding-top: var(--space-8);
}

/* ==========================================================================
   FEATURES — Enterprise SaaS
   ========================================================================== */
/* 🏢 Enterprise theme — for the suits 👔 */
body[data-page="features"] {
  --bg: #f6f8fc;
  --text: #0f172a;
  --text-muted: #475569;
  --text-dim: #94a3b8;
  --surface: #f1f5f9;
  --surface-hover: #e2e8f0;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --glass-bg: #ffffff;
  --glass-blur: none;
  --grad-primary: linear-gradient(#2563eb, #2563eb);
  --grad-secondary: linear-gradient(#0ea5e9, #0ea5e9);
  --grad-text: linear-gradient(90deg, #2563eb, #2563eb);
  --grad-border: linear-gradient(#e2e8f0, #e2e8f0);
  --shadow-card: 0 1px 3px rgba(15, 23, 42, 0.08), 0 1px 2px rgba(15, 23, 42, 0.04);
  --glow-purple: 0 12px 32px rgba(37, 99, 235, 0.14);
  --radius-lg: 10px;
  --radius-xl: 12px;
  --radius-full: 8px;
}

body[data-page="features"] .eyebrow {
  color: #2563eb;
  background: #eff6ff;
  border-color: #bfdbfe;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: var(--fs-xs);
}

body[data-page="features"] .feature-card:hover {
  border-color: #93c5fd;
}

body[data-page="features"] .feature-icon {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
}

body[data-page="features"] h2 {
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* ==========================================================================
   HOW IT WORKS — Neo-Brutalist
   ========================================================================== */
/* 🧱 Brutalist theme — bold choices only 💪 */
body[data-page="how"] {
  --bg: #fff35c;
  --text: #000000;
  --text-muted: #000000;
  --text-dim: #000000;
  --surface: #ffffff;
  --surface-hover: #ffe500;
  --border: #000000;
  --border-strong: #000000;
  --glass-bg: #ffffff;
  --glass-blur: none;
  --grad-primary: linear-gradient(#ff4d00, #ff4d00);
  --grad-secondary: linear-gradient(#000, #000);
  --grad-text: linear-gradient(#ff4d00, #ff4d00);
  --grad-border: linear-gradient(#000, #000);
  --shadow-card: 6px 6px 0 #000000;
  --glow-purple: 10px 10px 0 #000000;
  --radius-sm: 0;
  --radius-md: 0;
  --radius-lg: 0;
  --radius-xl: 0;
  --radius-full: 0;
  --font-sans: "Space Grotesk", "Arial Black", Arial, sans-serif;
}

body[data-page="how"] .glass {
  border-width: 3px;
}

body[data-page="how"] h2,
body[data-page="how"] h3 {
  text-transform: uppercase;
  font-weight: 700;
}

body[data-page="how"] h2 {
  font-size: clamp(40px, 7vw, 84px);
  line-height: 0.95;
}

body[data-page="how"] .eyebrow {
  background: #000;
  color: #fff35c;
  border: none;
  text-transform: uppercase;
  font-weight: 700;
}

body[data-page="how"] .step-num {
  font-size: 72px;
  -webkit-text-stroke: 2px #000;
  color: #ff4d00;
  background: none;
}

body[data-page="how"] .step:nth-of-type(odd) { transform: rotate(-1.5deg); }
body[data-page="how"] .step:nth-of-type(even) { transform: rotate(1deg); }

body[data-page="how"] .step-connector {
  background: #000;
  height: 6px;
  opacity: 1;
}

body[data-page="how"] .btn-primary {
  border: 3px solid #000;
  box-shadow: 4px 4px 0 #000;
}

body[data-page="how"] .footer {
  border-top: 3px solid #000;
}

/* ==========================================================================
   ARCHITECTURE — Terminal / Mainframe
   ========================================================================== */
/* 💻 Hacker theme — I'm in 🕶️ */
body[data-page="architecture"] {
  --bg: #020a02;
  --text: #39ff6a;
  --text-muted: #2bd457;
  --text-dim: #1a8f3a;
  --surface: rgba(57, 255, 106, 0.05);
  --surface-hover: rgba(57, 255, 106, 0.12);
  --border: #1d6b33;
  --border-strong: #39ff6a;
  --glass-bg: rgba(0, 20, 0, 0.85);
  --glass-blur: none;
  --grad-primary: linear-gradient(#39ff6a, #39ff6a);
  --grad-secondary: linear-gradient(#39ff6a, #39ff6a);
  --grad-text: linear-gradient(#39ff6a, #39ff6a);
  --grad-border: linear-gradient(#39ff6a, #39ff6a);
  --shadow-card: 0 0 12px rgba(57, 255, 106, 0.15);
  --glow-purple: 0 0 24px rgba(57, 255, 106, 0.5);
  --radius-sm: 0;
  --radius-md: 0;
  --radius-lg: 0;
  --radius-xl: 0;
  --radius-full: 0;
  --font-sans: "JetBrains Mono", ui-monospace, Consolas, monospace;
}

body[data-page="architecture"] h1,
body[data-page="architecture"] h2,
body[data-page="architecture"] h3 {
  font-weight: 600;
  letter-spacing: 0;
  text-shadow: 0 0 10px rgba(57, 255, 106, 0.7);
}

body[data-page="architecture"] h2::before {
  content: "> ";
}

body[data-page="architecture"] h2::after {
  content: "▋";
  animation: blink 1s step-end infinite;
}

body[data-page="architecture"]::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 300;
  background: repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.25) 0, rgba(0, 0, 0, 0.25) 1px, transparent 1px, transparent 3px);
}

body[data-page="architecture"] .eyebrow,
body[data-page="architecture"] .arch-tag {
  background: transparent;
  border: 1px solid #39ff6a;
  color: #39ff6a;
}

body[data-page="architecture"] .eyebrow::before {
  content: "[SYS] ";
}

body[data-page="architecture"] .btn-primary,
body[data-page="architecture"] .badge {
  color: #020a02;
}

body[data-page="architecture"] .kw,
body[data-page="architecture"] .fn,
body[data-page="architecture"] .str {
  color: #39ff6a;
}

/* ==========================================================================
   PRICING — Legacy Web 1.0
   ========================================================================== */
/* 🦖 Web 1.0 theme — nostalgia overload 📼 */
body[data-page="pricing"] {
  --bg: #000080;
  --text: #ffff00;
  --text-muted: #00ffff;
  --text-dim: #c0c0c0;
  --surface: #c0c0c0;
  --surface-hover: #d4d0c8;
  --border: #ffffff;
  --border-strong: #ffffff;
  --glass-bg: #c0c0c0;
  --glass-blur: none;
  --grad-primary: linear-gradient(#c0c0c0, #c0c0c0);
  --grad-secondary: linear-gradient(#ff0000, #ff0000);
  --grad-text: linear-gradient(90deg, #ff0000, #ff8800, #ffff00, #00ff00, #00ffff, #0088ff, #ff00ff);
  --grad-border: linear-gradient(#fff, #fff);
  --shadow-card: none;
  --glow-purple: none;
  --radius-sm: 0;
  --radius-md: 0;
  --radius-lg: 0;
  --radius-xl: 0;
  --radius-full: 0;
  --font-sans: "Comic Sans MS", "Comic Sans", "Chalkboard SE", cursive;
  background-image: radial-gradient(#ffffff 1px, transparent 1.5px), radial-gradient(#ffff00 1px, transparent 1.5px);
  background-size: 40px 40px, 70px 70px;
  background-position: 0 0, 20px 30px;
}

body[data-page="pricing"] .glass {
  border: 3px outset #ffffff;
}

body[data-page="pricing"] .price-card,
body[data-page="pricing"] .price-card ul,
body[data-page="pricing"] .price-card h3 {
  color: #000000;
}

body[data-page="pricing"] .price span {
  color: #000080;
}

body[data-page="pricing"] .price-card .btn {
  background: #c0c0c0;
  color: #000;
  border: 3px outset #fff;
  box-shadow: none;
  font-family: "MS Sans Serif", Tahoma, sans-serif;
}

body[data-page="pricing"] .price-card .btn:active {
  border-style: inset;
}

body[data-page="pricing"] .price-card.featured {
  border: 4px ridge #ff00ff;
}

body[data-page="pricing"] .gradient-text {
  animation: shimmer 2s linear infinite;
}

body[data-page="pricing"] h2 {
  font-size: 54px;
  text-shadow: 3px 3px 0 #ff00ff;
}

body[data-page="pricing"] #pricing .section-header::before {
  content: "🚧 UNDER CONSTRUCTION 🚧";
  display: block;
  font-weight: 700;
  color: #ffff00;
  background: #ff0000;
  padding: 4px;
  margin-bottom: var(--space-4);
  animation: blink 0.8s step-end infinite;
}

body[data-page="pricing"] #pricing::after {
  content: "👁 You are visitor #000048,213 · Best viewed in Netscape Navigator 4.0 at 800×600";
  display: block;
  text-align: center;
  margin-top: var(--space-7);
  font-size: var(--fs-sm);
  color: #00ff00;
  font-family: "Courier New", monospace;
}

body[data-page="pricing"] .eyebrow {
  background: #ff00ff;
  color: #ffff00;
  border: 2px dashed #ffff00;
}

body[data-page="pricing"] .ribbon {
  background: #ff0000;
  color: #ffff00;
  animation: blink 1s step-end infinite;
}

/* ==========================================================================
   TESTIMONIALS — Minimal Consumer
   ========================================================================== */
/* 🍎 Minimal theme — less is more ✨ */
body[data-page="testimonials"] {
  --bg: #fbfbfd;
  --text: #1d1d1f;
  --text-muted: #6e6e73;
  --text-dim: #86868b;
  --surface: #f5f5f7;
  --surface-hover: #e8e8ed;
  --border: rgba(0, 0, 0, 0.06);
  --border-strong: rgba(0, 0, 0, 0.12);
  --glass-bg: #ffffff;
  --glass-blur: none;
  --grad-primary: linear-gradient(135deg, #1d1d1f, #3a3a3c);
  --grad-text: linear-gradient(90deg, #ff6a00, #ee0979);
  --grad-border: linear-gradient(transparent, transparent);
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.06);
  --glow-purple: 0 12px 40px rgba(0, 0, 0, 0.1);
  --radius-lg: 22px;
  --radius-xl: 28px;
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

body[data-page="testimonials"] h2 {
  font-size: clamp(44px, 7vw, 80px);
  font-weight: 700;
  letter-spacing: -0.045em;
}

body[data-page="testimonials"] .eyebrow {
  background: none;
  border: none;
  color: #6e6e73;
  font-size: var(--fs-md);
  padding: 0;
}

body[data-page="testimonials"] .testimonial blockquote {
  color: #1d1d1f;
}

body[data-page="testimonials"] .testimonial.gold {
  background: #fffdf3;
}

/* ==========================================================================
   ABOUT — Editorial Luxury
   ========================================================================== */
/* 🖤 Luxury theme — fancy! 🥂 */
body[data-page="about"] {
  --bg: #0a0a0a;
  --text: #f3eee4;
  --text-muted: #b5ad9c;
  --text-dim: #6f685b;
  --surface: transparent;
  --surface-hover: rgba(201, 169, 97, 0.08);
  --border: rgba(201, 169, 97, 0.3);
  --border-strong: rgba(201, 169, 97, 0.6);
  --glass-bg: transparent;
  --glass-blur: none;
  --grad-primary: linear-gradient(#c9a961, #c9a961);
  --grad-secondary: linear-gradient(#c9a961, #c9a961);
  --grad-text: linear-gradient(90deg, #b8934a, #f3e2b3, #b8934a);
  --grad-border: linear-gradient(rgba(201, 169, 97, 0.5), rgba(201, 169, 97, 0.5));
  --shadow-card: none;
  --glow-purple: none;
  --radius-sm: 0;
  --radius-md: 0;
  --radius-lg: 0;
  --radius-xl: 0;
  --radius-full: 0;
  --font-sans: "Playfair Display", Georgia, "Times New Roman", serif;
}

body[data-page="about"] h2 {
  font-size: clamp(44px, 7vw, 88px);
  font-weight: 400;
  font-style: italic;
  letter-spacing: -0.02em;
}

body[data-page="about"] .eyebrow {
  background: none;
  border: none;
  border-bottom: 1px solid #c9a961;
  color: #c9a961;
  text-transform: uppercase;
  letter-spacing: 0.35em;
  font-family: "Inter", sans-serif;
  font-size: var(--fs-xs);
  padding: 0 0 8px;
}

body[data-page="about"] .about-lede {
  font-size: 40px !important;
  font-weight: 400;
  font-style: italic;
}

body[data-page="about"] .about-lede + p::first-letter {
  float: left;
  font-size: 84px;
  line-height: 0.8;
  padding: 8px 12px 0 0;
  color: #c9a961;
  font-weight: 900;
}

body[data-page="about"] .founder-avatar {
  background: #0a0a0a;
  border: 1px solid #c9a961;
  color: #c9a961;
  font-weight: 400;
  font-style: italic;
  outline-color: rgba(201, 169, 97, 0.3);
}

body[data-page="about"] .founder-role {
  color: #c9a961;
  font-family: "Inter", sans-serif;
  letter-spacing: 0.2em;
}

body[data-page="about"] .founder h3 {
  font-size: var(--fs-2xl);
  font-weight: 400;
}

body[data-page="about"] .btn-primary {
  color: #0a0a0a;
}
