/* ==========================================================================
   QUAD — THE ACADEMIC COMMAND CENTER
   Brandbook-Compliant Style Architecture (docs/BRANDBOOK.md)
   ========================================================================== */

:root {
  /* Brandbook §3.2 Day Palette */
  --paper: #F6F1E9;
  --paper-raised: #FCFAF6;
  --paper-sunken: #EDE6DA;
  --ink: #101828;
  --ink-muted: #5B6270;
  --ink-faint: #6E7681;
  --rule: #E3DBCD;
  --rule-strong: #C8BEAD;
  --accent: #BF3B1B;
  --accent-soft: #F9E6DE;
  --on-accent: #FFFFFC;

  --success: #2E6B3F;
  --success-soft: #DDEBDF;
  --warning: #845A05;
  --warning-soft: #F6E8C6;
  --danger: #A32D1C;
  --danger-soft: #F4DCD8;
  --info: #2F5D8A;
  --info-soft: #DCE6F1;

  /* Course Hues (Brandbook §3.4) */
  --hue-clay: #B5563A;
  --hue-ochre: #B88A2B;
  --hue-moss: #6E7F3A;
  --hue-teal: #2F7F7A;
  --hue-slate: #4A6B9C;
  --hue-plum: #7A4E8A;
  --hue-rose: #B0506B;
  --hue-fern: #4E7A5A;

  /* Typography */
  --font-display: 'Fraunces', Georgia, serif;
  --font-text: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', Consolas, monospace;

  /* Layout & Sizing */
  --max-width: 1200px;
  --max-width-narrow: 840px;
  --max-width-content: 680px;

  /* Spacing */
  --s-xxs: 2px;
  --s-xs: 4px;
  --s-sm: 8px;
  --s-md: 12px;
  --s-lg: 16px;
  --s-xl: 24px;
  --s-2xl: 32px;
  --s-3xl: 48px;
  --s-4xl: 64px;
  --s-5xl: 96px;

  /* Radii */
  --r-xs: 4px;
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-pill: 9999px;

  /* Motion */
  --m-quick: 120ms cubic-bezier(0, 0, 0.2, 1);
  --m-standard: 200ms cubic-bezier(0, 0, 0.2, 1);
  --m-deliberate: 320ms cubic-bezier(0, 0, 0.2, 1);

  /* Shadows (Minimal hairline focus) */
  --shadow-subtle: 0 1px 2px rgba(16, 24, 40, 0.05);
  --shadow-raised: 0 4px 16px rgba(16, 24, 40, 0.06), 0 1px 3px rgba(16, 24, 40, 0.04);
  --shadow-modal: 0 12px 40px rgba(16, 24, 40, 0.12), 0 2px 6px rgba(16, 24, 40, 0.06);
}

[data-theme="night"] {
  /* Brandbook §3.2 Night Palette */
  --paper: #0E1220;
  --paper-raised: #161B2C;
  --paper-sunken: #090C16;
  --ink: #F1EADF;
  --ink-muted: #B3AC9F;
  --ink-faint: #858078;
  --rule: #262C3E;
  --rule-strong: #3A4157;
  --accent: #E2603C;
  --accent-soft: #2B1614;
  --on-accent: #FFFFFC;

  --success: #4E9B63;
  --success-soft: #12281A;
  --warning: #D49D26;
  --warning-soft: #2D2311;
  --danger: #DF513D;
  --danger-soft: #2E1513;
  --info: #5B92C9;
  --info-soft: #162433;

  --shadow-subtle: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-raised: 0 4px 20px rgba(0, 0, 0, 0.4), 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-modal: 0 16px 48px rgba(0, 0, 0, 0.6), 0 2px 8px rgba(0, 0, 0, 0.4);
}

/* Base Reset & Setup */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: var(--font-text);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background-color: var(--paper);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
  font-feature-settings: "cv02", "cv03", "cv04", "cv11";
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
  background-color: var(--paper);
  transition: background-color var(--m-deliberate), color var(--m-deliberate);
}

/* Background Subtle Paper Grid */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: 
    linear-gradient(to right, var(--rule) 1px, transparent 1px),
    linear-gradient(to bottom, var(--rule) 1px, transparent 1px);
  background-size: 80px 80px;
  opacity: 0.25;
  pointer-events: none;
  z-index: 0;
}

/* Links & Buttons */
a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

input, select, textarea {
  font-family: inherit;
  font-size: 1rem;
}

/* Tabular Numerals for all metrics, dates, grades */
.tnum, [data-tnum] {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
}

/* Container */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--s-xl);
  padding-right: var(--s-xl);
  position: relative;
  z-index: 1;
}

.container-narrow {
  max-width: var(--max-width-narrow);
}

/* Typography Hierarchy (Brandbook §4.1) */
.display-hero {
  font-family: var(--font-display);
  font-size: clamp(2.75rem, 6vw, 4.75rem);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.025em;
  color: var(--ink);
  font-variation-settings: 'opsz' 144, 'SOFT' 0, 'WONK' 0;
}

.display-section {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--ink);
  font-variation-settings: 'opsz' 72, 'SOFT' 0, 'WONK' 0;
}

.display-sub {
  font-family: var(--font-display);
  font-size: 1.625rem;
  font-weight: 600;
  line-height: 1.25;
  color: var(--ink);
}

.lead-text {
  font-size: clamp(1.125rem, 2vw, 1.25rem);
  line-height: 1.6;
  color: var(--ink-muted);
  max-width: 640px;
}

.eyebrow {
  font-family: var(--font-text);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: var(--s-xs);
  margin-bottom: var(--s-md);
}

.eyebrow-pill {
  background: var(--accent-soft);
  color: var(--accent);
  padding: 4px 10px;
  border-radius: var(--r-pill);
  border: 1px solid rgba(191, 59, 27, 0.15);
}

/* ==========================================================================
   NAVIGATION
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--paper);
  border-bottom: 1px solid var(--rule);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  background-color: rgba(246, 241, 233, 0.92);
  transition: background-color var(--m-deliberate), border-color var(--m-deliberate);
}

[data-theme="night"] .site-header {
  background-color: rgba(14, 18, 32, 0.92);
}

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

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: var(--s-md);
  user-select: none;
}

.brand-mark {
  width: 28px;
  height: 28px;
  color: var(--ink);
}

.brand-wordmark {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1;
}

.brand-wordmark span {
  color: var(--accent);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--s-xl);
  list-style: none;
}

.nav-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink-muted);
  transition: color var(--m-quick);
  padding: var(--s-xs) var(--s-sm);
}

.nav-link:hover {
  color: var(--ink);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: var(--s-md);
}

/* Language Switcher Toggle */
.lang-switch-group {
  display: inline-flex;
  align-items: center;
  padding: 3px 4px;
  background-color: var(--paper-sunken);
  border: 1px solid var(--rule);
  border-radius: var(--r-sm);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
}

.lang-btn {
  background: transparent;
  border: none;
  padding: 3px 7px;
  border-radius: 3px;
  font-weight: 500;
  color: var(--ink-muted);
  cursor: pointer;
  transition: all var(--m-quick);
  line-height: 1;
}

.lang-btn:hover {
  color: var(--ink);
}

.lang-btn.active {
  background-color: var(--paper-raised);
  color: var(--ink);
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.lang-sep {
  color: var(--rule-strong);
  font-size: 0.6875rem;
  user-select: none;
  padding: 0 1px;
}

/* Command Palette Trigger in Header */
.cmd-trigger {
  display: inline-flex;
  align-items: center;
  gap: var(--s-sm);
  padding: 6px 12px;
  background-color: var(--paper-sunken);
  border: 1px solid var(--rule);
  border-radius: var(--r-sm);
  color: var(--ink-muted);
  font-size: 0.8125rem;
  transition: border-color var(--m-quick), color var(--m-quick);
}

.cmd-trigger:hover {
  border-color: var(--rule-strong);
  color: var(--ink);
}

.cmd-kbd {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 1px 4px;
  background: var(--paper-raised);
  border: 1px solid var(--rule);
  border-radius: 3px;
  color: var(--ink);
}

/* Theme Toggle Button */
.theme-toggle-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--r-sm);
  border: 1px solid var(--rule);
  background-color: var(--paper-raised);
  color: var(--ink-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color var(--m-quick), color var(--m-quick);
}

.theme-toggle-btn:hover {
  border-color: var(--rule-strong);
  color: var(--ink);
}

/* Action Buttons (Brandbook §7.1) */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-sm);
  font-family: var(--font-text);
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1;
  padding: 12px 20px;
  border-radius: var(--r-sm);
  transition: all var(--m-quick);
  white-space: nowrap;
}

.btn-primary {
  background-color: var(--accent);
  color: var(--on-accent);
  border: 1px solid transparent;
}

.btn-primary:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background-color: var(--paper-raised);
  color: var(--ink);
  border: 1px solid var(--rule-strong);
}

.btn-secondary:hover {
  background-color: var(--paper-sunken);
  border-color: var(--ink-muted);
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  padding: 8px 12px;
}

.btn-ghost:hover {
  background: var(--paper-sunken);
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero-section {
  padding-top: var(--s-5xl);
  padding-bottom: var(--s-4xl);
  position: relative;
  border-bottom: 1px solid var(--rule);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: var(--s-4xl);
  align-items: center;
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.hero-title {
  margin-top: var(--s-xs);
  margin-bottom: var(--s-xl);
}

.hero-subhead {
  margin-bottom: var(--s-2xl);
}

/* Waitlist Form Container */
.hero-waitlist-box {
  width: 100%;
  max-width: 520px;
  background: var(--paper-raised);
  border: 1px solid var(--rule-strong);
  border-radius: var(--r-md);
  padding: var(--s-xl);
  box-shadow: var(--shadow-raised);
  margin-bottom: var(--s-xl);
}

.waitlist-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: var(--s-md);
}

.waitlist-header-title {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--ink);
}

.waitlist-header-cohort {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.waitlist-form {
  display: flex;
  flex-direction: column;
  gap: var(--s-md);
}

.input-group {
  position: relative;
  display: flex;
  flex-direction: column;
}

.email-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.email-input {
  width: 100%;
  height: 48px;
  padding: 0 var(--s-lg);
  padding-left: 42px;
  background: var(--paper);
  border: 1.5px solid var(--rule-strong);
  border-radius: var(--r-sm);
  color: var(--ink);
  font-size: 0.9375rem;
  transition: border-color var(--m-quick), box-shadow var(--m-quick);
}

.email-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.email-input-icon {
  position: absolute;
  left: 14px;
  color: var(--ink-faint);
  pointer-events: none;
}

/* University Detection Pill */
.detected-uni-pill {
  position: absolute;
  right: 10px;
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--accent-soft);
  color: var(--accent);
  padding: 3px 8px;
  border-radius: var(--r-xs);
  display: none;
  align-items: center;
  gap: 4px;
  animation: fadeIn var(--m-standard) forwards;
}

.detected-uni-pill.active {
  display: inline-flex;
}

/* Email Input Error & Validation States */
.email-input.has-error {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px var(--danger-soft);
}

.email-input-wrapper.shake {
  animation: inputShake 0.4s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

@keyframes inputShake {
  10%, 90% { transform: translateX(-2px); }
  20%, 80% { transform: translateX(3px); }
  30%, 50%, 70% { transform: translateX(-4px); }
  40%, 60% { transform: translateX(4px); }
}

/* Email Quality & Pre-Filter Banner */
.email-feedback-banner {
  margin-top: 8px;
  padding: 8px 12px;
  border-radius: var(--r-xs);
  font-size: 0.8125rem;
  line-height: 1.4;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  animation: fadeIn 0.15s ease-out forwards;
}

.email-feedback-banner.disposable,
.email-feedback-banner.fake,
.email-feedback-banner.syntax {
  background: var(--danger-soft);
  color: var(--danger);
  border: 1px solid rgba(163, 45, 28, 0.25);
}

.email-feedback-banner.typo {
  background: var(--warning-soft);
  color: var(--warning);
  border: 1px solid rgba(132, 90, 5, 0.25);
}

.email-feedback-content {
  flex: 1;
}

.email-suggestion-btn {
  background: var(--paper-raised);
  border: 1px solid var(--rule-strong);
  color: var(--ink);
  font-weight: 600;
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 4px;
  margin-left: 6px;
  cursor: pointer;
  transition: all var(--m-quick);
}

.email-suggestion-btn:hover {
  background: var(--paper);
  border-color: var(--accent);
  color: var(--accent);
}

.waitlist-submit-btn {
  height: 48px;
  font-size: 0.9375rem;
  width: 100%;
}

.waitlist-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: var(--s-sm);
  font-size: 0.75rem;
  color: var(--ink-muted);
}

.waitlist-counter {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.live-dot {
  width: 8px;
  height: 8px;
  background-color: var(--success);
  border-radius: 50%;
  display: inline-block;
  position: relative;
}

.live-dot::after {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 1px solid var(--success);
  opacity: 0.6;
  animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
  0% { transform: scale(0.9); opacity: 0.8; }
  50% { transform: scale(1.6); opacity: 0; }
  100% { transform: scale(0.9); opacity: 0; }
}

.hero-stats-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s-xl);
  width: 100%;
  border-top: 1px solid var(--rule);
  padding-top: var(--s-xl);
}

.stat-item {
  display: flex;
  flex-direction: column;
}

.stat-num {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--ink);
}

.stat-label {
  font-size: 0.75rem;
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 2px;
}

/* ==========================================================================
   HERO CONSOLIDATION HUB (The Universal Academic Hub)
   ========================================================================== */
.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-hub-wrapper {
  width: 100%;
  max-width: 520px;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.hero-hub-canvas {
  width: 100%;
  aspect-ratio: 1 / 1;
  position: relative;
  border-radius: 50%;
  background: radial-gradient(circle at center, var(--paper-raised) 0%, var(--paper) 70%, transparent 100%);
  border: 1px solid var(--rule);
  box-shadow: var(--shadow-modal);
  overflow: visible;
}

/* Ambient glow & concentric guides */
.hub-orbit-aura {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 250px;
  height: 250px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(191, 59, 27, 0.18) 0%, rgba(191, 59, 27, 0.04) 60%, transparent 80%);
  pointer-events: none;
  animation: hubAuraPulse 4s ease-in-out infinite alternate;
}

@keyframes hubAuraPulse {
  0% { transform: translate(-50%, -50%) scale(0.9); opacity: 0.6; }
  100% { transform: translate(-50%, -50%) scale(1.15); opacity: 1; }
}

.hub-orbit-guides,
.hub-flow-svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.hub-pointer-path {
  stroke: var(--accent);
  stroke-width: 1.8;
  stroke-dasharray: 4 4;
  opacity: 0.55;
  transition: opacity 0.25s ease, stroke-width 0.25s ease, stroke 0.25s ease;
  animation: hubDashStream 1.8s linear infinite;
}

@keyframes hubDashStream {
  to {
    stroke-dashoffset: -16;
  }
}

.hub-pointer-path.active {
  opacity: 1;
  stroke-width: 2.75;
  filter: drop-shadow(0 0 4px var(--accent));
}

/* Center: Babilim Academic Operating System App Icon */
.hub-center-node {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  transition: transform 0.3s cubic-bezier(0.2, 0.9, 0.3, 1);
}

.hub-center-node:hover {
  transform: translate(-50%, -50%) scale(1.06);
}

.hub-center-pulse {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 108px;
  height: 108px;
  border-radius: 26px;
  border: 2px solid var(--accent);
  opacity: 0.4;
  animation: hubCenterPulse 2.5s ease-out infinite;
  pointer-events: none;
}

@keyframes hubCenterPulse {
  0% { transform: translate(-50%, -50%) scale(1); opacity: 0.5; }
  100% { transform: translate(-50%, -50%) scale(1.35); opacity: 0; }
}

.hub-center-icon-card {
  width: 86px;
  height: 86px;
  background: var(--paper-raised);
  border: 2px solid var(--accent);
  border-radius: 24px;
  box-shadow: 0 12px 32px rgba(191, 59, 27, 0.22), 0 2px 8px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8px 6px;
  position: relative;
  background-image: linear-gradient(135deg, var(--paper-raised) 0%, var(--paper-sunken) 100%);
}

.hub-center-mark {
  width: 38px;
  height: 38px;
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
}

.hub-center-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.875rem;
  letter-spacing: -0.01em;
  color: var(--ink);
  line-height: 1.1;
  margin-top: 3px;
  text-align: center;
  width: 100%;
}

.hub-center-sub {
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  line-height: 1;
  margin-top: 2px;
  text-align: center;
  width: 100%;
  display: block;
}

/* Surrounding Satellite App Nodes */
.hub-sat-node {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--paper-raised);
  border: 1.5px solid var(--rule-strong);
  padding: 6px 14px 6px 7px;
  border-radius: var(--r-pill);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.05);
  cursor: pointer;
  transition: transform 0.25s cubic-bezier(0.2, 0.9, 0.3, 1), box-shadow 0.25s ease, border-color 0.25s ease;
  z-index: 5;
  user-select: none;
}

.hub-sat-node:hover {
  transform: translate(-50%, -50%) scale(1.08) !important;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.16);
  border-color: var(--accent);
  z-index: 15;
}

/* Orbital Placement Coordinates */
.pos-top {
  top: 5%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.pos-top-right {
  top: 15%;
  left: 85%;
  transform: translate(-50%, -50%);
}

.pos-right {
  top: 50%;
  left: 93%;
  transform: translate(-50%, -50%);
}

.pos-bottom-right {
  top: 85%;
  left: 85%;
  transform: translate(-50%, -50%);
}

.pos-bottom {
  top: 95%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.pos-bottom-left {
  top: 85%;
  left: 15%;
  transform: translate(-50%, -50%);
}

.pos-left {
  top: 50%;
  left: 7%;
  transform: translate(-50%, -50%);
}

.pos-top-left {
  top: 15%;
  left: 15%;
  transform: translate(-50%, -50%);
}

/* Satellite Node App Icons */
.hub-node-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
  overflow: hidden;
  position: relative;
}

.hub-node-icon svg {
  width: 24px;
  height: 24px;
  display: block;
}

.moodle-bg { 
  background: #F98012; 
}
.goodnotes-bg { 
  background: linear-gradient(135deg, #00C7E5 0%, #009FB9 100%); 
}
.calendar-bg { 
  background: #FFFFFF; 
  border: 1px solid rgba(0, 0, 0, 0.12);
}
.calendar-bg svg {
  width: 100%;
  height: 100%;
}
.mail-bg { 
  background: linear-gradient(135deg, #0078D4 0%, #005A9E 100%); 
}
.notion-bg { 
  background: #191919; 
  color: #FFFFFF; 
}
.anki-bg { 
  background: linear-gradient(135deg, #2563EB 0%, #0D6EFD 100%); 
}
.reminders-bg { 
  background: #FFFFFF; 
  border: 1px solid rgba(0, 0, 0, 0.12);
}
.reminders-bg svg {
  width: 26px;
  height: 26px;
}
.gpa-bg { 
  background: linear-gradient(135deg, #107C41 0%, #0A5A2E 100%); 
}

.hub-node-label {
  display: flex;
  flex-direction: column;
  text-align: left;
  line-height: 1.15;
}

.hub-node-name {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
}

.hub-node-meta {
  font-size: 0.6875rem;
  color: var(--ink-muted);
  white-space: nowrap;
}

/* Hub Caption Strip */
.hub-caption-strip {
  margin-top: var(--s-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  max-width: 440px;
}

.hub-badge-unified {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 4px 12px;
  border-radius: var(--r-pill);
  border: 1px solid rgba(191, 59, 27, 0.2);
}

.hub-caption-text {
  font-size: 0.8125rem;
  color: var(--ink-muted);
  line-height: 1.5;
  margin: 0;
}

/* ==========================================================================
   INTERACTIVE APP DEMO SECTION ("Try Quad in your browser")
   ========================================================================== */
.demo-section {
  padding-top: var(--s-5xl);
  padding-bottom: var(--s-5xl);
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
  position: relative;
}

.section-head {
  text-align: center;
  max-width: var(--max-width-narrow);
  margin-left: auto;
  margin-right: auto;
  margin-bottom: var(--s-3xl);
}

.section-head .lead-text {
  margin-left: auto;
  margin-right: auto;
  margin-top: var(--s-md);
}

/* Demo Nav Tabs */
.demo-tabs-container {
  display: flex;
  justify-content: center;
  margin-bottom: var(--s-2xl);
}

.demo-tabs-track {
  background: var(--paper-sunken);
  border: 1px solid var(--rule);
  padding: 4px;
  border-radius: var(--r-md);
  display: inline-flex;
  gap: 4px;
}

.demo-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: var(--r-sm);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink-muted);
  transition: all var(--m-quick);
}

.demo-tab-btn:hover {
  color: var(--ink);
}

.demo-tab-btn.active {
  background: var(--paper-raised);
  color: var(--ink);
  box-shadow: var(--shadow-subtle);
  border: 1px solid var(--rule);
}

.demo-tab-icon {
  width: 16px;
  height: 16px;
}

/* Demo Console Stage */
.demo-stage-card {
  background: var(--paper-raised);
  border: 1px solid var(--rule-strong);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-modal);
  overflow: hidden;
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 580px;
}

/* Demo Sidebar (Courses / Navigation) */
.demo-sidebar {
  background: var(--paper-sunken);
  border-right: 1px solid var(--rule);
  padding: var(--s-lg);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.sidebar-group-title {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-faint);
  margin-bottom: var(--s-md);
}

.course-nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--s-xs);
}

.course-nav-item {
  display: flex;
  align-items: center;
  gap: var(--s-sm);
  padding: 8px 10px;
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: background-color var(--m-quick);
}

.course-nav-item:hover {
  background-color: var(--paper);
}

.course-nav-item.active {
  background-color: var(--paper-raised);
  border: 1px solid var(--rule);
}

.course-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.course-nav-code {
  font-weight: 600;
  font-size: 0.8125rem;
  color: var(--ink);
}

.course-nav-name {
  font-size: 0.75rem;
  color: var(--ink-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

/* Demo Main Pane */
.demo-main-pane {
  padding: var(--s-xl);
  display: flex;
  flex-direction: column;
  background: var(--paper-raised);
  position: relative;
  overflow: hidden;
}

/* View panels: Only one is active */
.demo-view {
  display: none;
  flex-direction: column;
  height: 100%;
}

.demo-view.active {
  display: flex;
  animation: fadeIn var(--m-standard) forwards;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   FEATURES GRID (THE 4 PILLARS)
   ========================================================================== */
.features-section {
  padding-top: var(--s-5xl);
  padding-bottom: var(--s-5xl);
  border-bottom: 1px solid var(--rule);
}

.pillars-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--s-2xl);
  margin-top: var(--s-3xl);
}

.pillar-card {
  background: var(--paper-raised);
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
  padding: var(--s-2xl);
  transition: border-color var(--m-quick), transform var(--m-quick);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.pillar-card:hover {
  border-color: var(--rule-strong);
  transform: translateY(-2px);
}

.pillar-top {
  margin-bottom: var(--s-xl);
}

.pillar-icon-box {
  width: 44px;
  height: 44px;
  border-radius: var(--r-sm);
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--s-lg);
}

.pillar-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: var(--s-sm);
  color: var(--ink);
}

.pillar-body {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--ink-muted);
}

.pillar-detail-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--s-sm);
  border-top: 1px solid var(--rule);
  padding-top: var(--s-lg);
  margin-top: var(--s-lg);
}

.pillar-detail-item {
  display: flex;
  align-items: flex-start;
  gap: var(--s-sm);
  font-size: 0.8125rem;
  color: var(--ink);
}

.pillar-check {
  color: var(--accent);
  font-weight: 700;
}

/* ==========================================================================
   COMPARISON MATRIX (Quad vs Generic Tools)
   ========================================================================== */
.compare-section {
  padding-top: var(--s-5xl);
  padding-bottom: var(--s-5xl);
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
}

.table-wrapper {
  overflow-x: auto;
  margin-top: var(--s-3xl);
  border: 1px solid var(--rule-strong);
  border-radius: var(--r-md);
  background: var(--paper-raised);
}

.compare-table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.875rem;
}

.compare-table th,
.compare-table td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--rule);
}

.compare-table th {
  background: var(--paper-sunken);
  font-family: var(--font-text);
  font-weight: 600;
  color: var(--ink);
  font-size: 0.8125rem;
}

/* Sticky first column */
.compare-table th:first-child,
.compare-table td:first-child {
  position: sticky;
  left: 0;
  background: var(--paper-raised);
  z-index: 2;
  box-shadow: 2px 0 6px rgba(0, 0, 0, 0.04);
}

.compare-table th:first-child {
  background: var(--paper-sunken);
  z-index: 3;
}

.compare-table th.col-quad {
  background: var(--accent-soft);
  color: var(--accent);
  border-left: 2px solid var(--accent);
  border-right: 2px solid var(--accent);
  font-weight: 700;
}

.compare-table td.col-quad {
  background: rgba(191, 59, 27, 0.04);
  border-left: 2px solid var(--accent);
  border-right: 2px solid var(--accent);
  font-weight: 600;
}

.badge-yes {
  color: var(--success);
  font-weight: 600;
}

.badge-no {
  color: var(--ink-faint);
}

.badge-partial {
  color: var(--warning);
}

/* ==========================================================================
   TRACTION & AD CONVERSION BANNER
   ========================================================================== */
.cta-banner-section {
  padding: var(--s-5xl) 0;
  border-bottom: 1px solid var(--rule);
  background: var(--paper-raised);
  text-align: center;
}

.cta-banner-card {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
  padding-top: var(--s-4xl);
  padding-bottom: var(--s-4xl);
  background: var(--paper);
  border-top: 1px solid var(--rule);
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: var(--s-3xl);
  margin-bottom: var(--s-3xl);
}

.footer-brand {
  max-width: 320px;
}

.footer-desc {
  font-size: 0.875rem;
  color: var(--ink-muted);
  margin-top: var(--s-md);
  line-height: 1.5;
}

.footer-links-grid {
  display: flex;
  gap: var(--s-4xl);
}

.footer-col-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink);
  margin-bottom: var(--s-md);
}

.footer-link-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--s-sm);
}

.footer-link {
  font-size: 0.8125rem;
  color: var(--ink-muted);
  transition: color var(--m-quick);
}

.footer-link:hover {
  color: var(--ink);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: var(--s-xl);
  border-top: 1px solid var(--rule);
  font-size: 0.75rem;
  color: var(--ink-faint);
}

/* ==========================================================================
   RESPONSIVE QUERIES
   ========================================================================== */
@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: var(--s-2xl);
  }

  .demo-stage-card {
    grid-template-columns: 1fr;
  }

  .demo-sidebar {
    display: none;
  }

  .pillars-grid {
    grid-template-columns: 1fr;
  }

  .nav-links {
    display: none;
  }

  .cmd-trigger {
    display: none;
  }
}

@media (max-width: 600px) {
  .hero-hub-canvas {
    max-width: 350px;
  }

  .hub-sat-node {
    padding: 4px 8px 4px 4px;
    gap: 6px;
  }

  .hub-node-meta {
    display: none;
  }

  .hub-node-name {
    font-size: 0.75rem;
  }

  .hub-node-icon {
    width: 28px;
    height: 28px;
    border-radius: 7px;
  }

  .hub-node-icon svg {
    width: 18px;
    height: 18px;
  }

  .calendar-bg svg {
    width: 100%;
    height: 100%;
  }

  .reminders-bg svg {
    width: 19px;
    height: 19px;
  }

  .hub-center-icon-card {
    width: 74px;
    height: 74px;
    padding: 4px;
    border-radius: 18px;
  }

  .hub-center-mark {
    width: 30px;
    height: 30px;
  }

  .hub-center-title {
    font-size: 0.75rem;
  }

  .hub-center-sub {
    font-size: 0.5rem;
  }
}
