/* Histropedia Root Site — Design System & Styles */

/* =========================================
   Design Tokens (aligned with HistropediaJS)
   ========================================= */
:root {
  --primary-gradient: linear-gradient(135deg, #1d4ed8 0%, #0ea5e9 100%);
  --secondary-gradient: linear-gradient(135deg, #60a5fa 0%, #0ea5e9 100%);
  --accent-gradient: linear-gradient(135deg, #0ea5e9 0%, #67e8f9 100%);
  --primary-gradient-soft: linear-gradient(135deg, #1d4ed8 0%, #2563eb 100%);
  --title-accent-gradient: linear-gradient(135deg, #5eead4 0%, #14b8a6 100%);
  --title-accent-color: #5eead4;
  --dark-gradient: linear-gradient(135deg, #0c0c0c 0%, #1a1a1a 100%);

  --color-primary: #1d4ed8;
  --color-secondary: #0ea5e9;
  --color-accent: #38bdf8;
  --primary-rgb: 29, 78, 216;
  --secondary-rgb: 14, 165, 233;
  --accent-rgb: 56, 189, 248;
  --color-success: #10b981;
  --color-warning: #f59e0b;
  --color-error: #ef4444;

  --neutral-0: #ffffff;
  --neutral-50: #fafafa;
  --neutral-100: #f5f5f5;
  --neutral-200: #e5e5e5;
  --neutral-300: #d4d4d4;
  --neutral-400: #a3a3a3;
  --neutral-500: #737373;
  --neutral-600: #525252;
  --neutral-700: #404040;
  --neutral-800: #262626;
  --neutral-900: #171717;
  --neutral-950: #0a0a0a;

  --font-display: 'Playfair Display', serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  --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;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;
  --radius-3xl: 2rem;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);

  --ease-out-cubic: cubic-bezier(0.33, 1, 0.68, 1);
  --ease-in-out-cubic: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-elastic: cubic-bezier(0.68, -0.55, 0.265, 1.55);
  --hero-parallax-scale: 1.1;
  --hero-parallax-distance: 35vh;
  --education-parallax-scale: 1.14;

  --z-dropdown: 1000;
  --z-sticky: 1020;
  --z-fixed: 1030;
  --z-modal-backdrop: 1040;
  --z-modal: 1050;
  --z-popover: 1060;
  --z-tooltip: 1070;
  --z-toast: 1080;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

/* Keep anchor targets clear of the fixed nav */
section[id] {
  scroll-margin-top: 90px;
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.6;
  color: var(--neutral-800);
  background: var(--neutral-0);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color 0.3s var(--ease-out-cubic);
}

a:hover {
  color: var(--color-secondary);
}

ul, ol {
  padding-left: var(--space-6);
  margin-bottom: var(--space-4);
  list-style-position: outside;
}

li {
  margin-bottom: var(--space-2);
}

/* =========================================
   Navigation (matching HistropediaJS)
   ========================================= */
.nav-immersive {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-fixed);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.3s var(--ease-out-cubic);
}

.nav-immersive.scrolled {
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow-lg);
}

.nav-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: var(--space-4) var(--space-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
  color: var(--neutral-900);
}

.nav-logo {
  transform: translateY(4px);
  height: 52px;
  width: auto;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-8);
}

.nav-link {
  position: relative;
  color: var(--neutral-700);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.3s var(--ease-out-cubic);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary-gradient);
  transition: width 0.3s var(--ease-out-cubic);
}

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

.nav-link:hover::after {
  width: 100%;
}

.nav-link.active {
  color: var(--color-primary);
}

.nav-link.active::after {
  width: 100%;
}

.nav-cta {
  padding: var(--space-3) var(--space-6);
  background: var(--primary-gradient-soft);
  color: white;
  text-decoration: none;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.3s var(--ease-out-cubic);
  box-shadow: var(--shadow-md);
}

.nav-cta:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-xl);
  color: white;
}

.nav-mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-2);
}

.nav-mobile-toggle span {
  width: 24px;
  height: 2px;
  background: var(--neutral-700);
  transition: all 0.3s var(--ease-out-cubic);
  transform-origin: center;
}

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

/* =========================================
   Buttons (matching HistropediaJS)
   ========================================= */
.btn-primary,
.btn-secondary,
.btn-primary-large {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-4) var(--space-6);
  border: none;
  border-radius: var(--radius-full);
  font-family: inherit;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s var(--ease-out-cubic);
  overflow: hidden;
}

.btn-primary {
  background: var(--primary-gradient-soft);
  color: white;
  box-shadow: var(--shadow-lg);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-2xl);
  color: white;
}

.btn-secondary {
  background: rgba(7, 20, 42, 0.24);
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
}

.btn-secondary:hover {
  background: rgba(7, 20, 42, 0.34);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
  color: white;
}

.btn-primary-large {
  padding: var(--space-5) var(--space-10);
  font-size: 1.125rem;
  background: var(--primary-gradient-soft);
  color: white;
  box-shadow: var(--shadow-xl);
}

.btn-primary-large:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-2xl);
  color: white;
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-4) var(--space-6);
  border: 2px solid var(--color-primary);
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 1rem;
  color: var(--color-primary);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s var(--ease-out-cubic);
  background: transparent;
}

.btn-outline:hover {
  background: var(--color-primary);
  color: white;
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-ripple {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn-primary:active .btn-ripple,
.btn-primary-large:active .btn-ripple {
  width: 300px;
  height: 300px;
}

.btn-icon {
  width: 16px;
  height: 16px;
  transition: transform 0.3s var(--ease-out-cubic);
}

.btn-secondary:hover .btn-icon {
  transform: translateX(2px);
}

/* =========================================
   Shared Section Styles
   ========================================= */
.section-header-immersive {
  margin-bottom: var(--space-12);
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  color: var(--neutral-900);
  margin: 0 0 var(--space-4);
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-subtitle {
  font-size: 1.125rem;
  color: var(--neutral-600);
  margin: 0;
  line-height: 1.6;
}

.container-immersive {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 var(--space-6);
}

.title-line {
  display: block;
  opacity: 0;
  transform: translateY(50px);
  animation: slideInUp 1s var(--ease-out-cubic) forwards;
}

.title-line:nth-child(1) { animation-delay: 0.2s; }
.title-line:nth-child(2) { animation-delay: 0.4s; }
.title-line:nth-child(3) { animation-delay: 0.6s; }

.title-accent {
  background: var(--title-accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* =========================================
   Hero Section — Cinematic Cover
   ========================================= */
.hero-cover {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-cover-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-cover-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: translateY(0) scale(var(--hero-parallax-scale));
  will-change: transform;
}

@supports ((animation-timeline: scroll()) and (animation-range: 0 100vh)) {
  .hero-cover-bg img {
    animation: hero-cover-parallax 1s linear both;
    animation-timeline: scroll(root block);
    animation-range: 0 100vh;
  }
}

@keyframes hero-cover-parallax {
  from {
    transform: translateY(0) scale(var(--hero-parallax-scale));
  }

  to {
    transform: translateY(var(--hero-parallax-distance)) scale(var(--hero-parallax-scale));
  }
}

.hero-cover-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg,
      rgba(10, 10, 10, 0.35) 0%,
      rgba(10, 10, 10, 0.15) 40%,
      rgba(10, 10, 10, 0.55) 75%,
      rgba(10, 10, 10, 0.85) 100%),
    linear-gradient(135deg,
      rgba(var(--primary-rgb), 0.3) 0%,
      rgba(var(--secondary-rgb), 0.15) 100%);
  z-index: 1;
}

.hero-cover-content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: white;
  max-width: 900px;
  padding: var(--space-6);
  padding-top: calc(var(--space-24) + var(--space-6));
}

.hero-cover-title {
  font-family: var(--font-display);
  font-size: clamp(3rem, 8vw, 6.5rem);
  font-weight: 900;
  line-height: 0.96;
  margin-bottom: var(--space-6);
  text-wrap: balance;
}

.hero-cover-title .title-line + .title-line {
  margin-top: 0.04em;
}

.hero-cover-subtitle {
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  line-height: 1.7;
  opacity: 0.92;
  max-width: 640px;
  margin: 0 auto var(--space-8);
  opacity: 0;
  transform: translateY(30px);
  animation: slideInUp 1s var(--ease-out-cubic) 0.8s forwards;
  text-wrap: pretty;
}

.hero-cover-subtitle-line {
  display: block;
}

.hero-cover-actions {
  display: flex;
  gap: var(--space-4);
  justify-content: center;
  flex-wrap: wrap;
  opacity: 0;
  transform: translateY(30px);
  animation: slideInUp 1s var(--ease-out-cubic) 1s forwards;
}

.hero-scroll-indicator {
  position: absolute;
  bottom: var(--space-8);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  color: rgba(255, 255, 255, 0.8);
  z-index: 2;
}

.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, 0.8), transparent);
  animation: scrollIndicator 2s ease-in-out infinite;
}

.scroll-text {
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.15em;
}

/* =========================================
   Product Section — Timeline of Everything
   ========================================= */
.product-toe {
  padding: var(--space-32) 0;
  background: var(--neutral-900);
  color: white;
  position: relative;
  overflow: hidden;
}

.product-toe::before {
  content: '';
  position: absolute;
  top: -200px;
  right: -200px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(var(--secondary-rgb), 0.1) 0%, transparent 70%);
  pointer-events: none;
}

.product-toe::after {
  content: '';
  position: absolute;
  bottom: -200px;
  left: -200px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(var(--primary-rgb), 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.product-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-6);
  position: relative;
  z-index: 1;
}

.product-header {
  text-align: center;
  margin-bottom: var(--space-16);
}

.coming-soon-badge {
  display: inline-block;
  padding: var(--space-2) var(--space-6);
  background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.2) 0%, rgba(var(--secondary-rgb), 0.2) 100%);
  border: 1px solid rgba(var(--accent-rgb), 0.4);
  border-radius: var(--radius-full);
  color: var(--title-accent-color);
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: var(--space-6);
  animation: badgePulse 3s ease-in-out infinite;
}

.product-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 900;
  margin-bottom: var(--space-4);
  line-height: 1;
}

.product-title .title-accent {
  display: inline;
}

.product-description {
  font-size: 1.15rem;
  color: var(--neutral-300);
  max-width: 700px;
  margin: 0 auto var(--space-16);
  line-height: 1.8;
}

.legacy-banner {
  max-width: 760px;
  margin: 0 auto var(--space-10);
  padding: var(--space-4) var(--space-6);
  border: 1px solid rgba(var(--accent-rgb), 0.32);
  border-radius: var(--radius-2xl);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow-lg);
}

.legacy-banner.is-hidden {
  display: none;
}

.legacy-banner p {
  margin: 0;
  color: var(--neutral-100);
  line-height: 1.7;
  text-align: center;
}

.legacy-banner-link {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: var(--title-accent-color);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  transition: color 0.3s var(--ease-out-cubic);
}

.legacy-banner-link:hover {
  color: var(--color-accent);
}

.question-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-6);
  margin-bottom: var(--space-12);
}

.question-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-2xl);
  padding: var(--space-6) var(--space-8);
  transition: all 0.4s var(--ease-out-cubic);
  cursor: default;
}

.question-card:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(var(--accent-rgb), 0.3);
  transform: translateY(-6px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.question-card-icon {
  display: block;
  margin-bottom: var(--space-4);
  color: var(--title-accent-color);
}

.question-card-icon svg {
  width: 32px;
  height: 32px;
}

.question-card p {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 500;
  font-style: italic;
  line-height: 1.6;
  color: var(--neutral-200);
}

.product-cta {
  text-align: center;
}

.product-cta .btn-primary {
  background: var(--accent-gradient);
  color: var(--neutral-900);
  font-weight: 700;
}

.product-cta .btn-primary:hover {
  box-shadow: 0 0 40px rgba(var(--accent-rgb), 0.4);
}

.education-pilot-section {
  position: relative;
  padding: var(--space-24) 0 var(--space-32);
  background: rgb(255, 252, 246);
  overflow: hidden;
}

.education-pilot-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.education-pilot-bg-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  transform: translateY(0) scale(var(--education-parallax-scale));
  will-change: transform;
  filter: saturate(0.95) contrast(1.04);
}

.education-pilot-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg,
      rgba(255, 252, 246, 0.58) 0%,
      rgba(255, 250, 242, 0.72) 18%,
      rgba(255, 249, 241, 0.86) 46%,
      rgba(255, 252, 246, 0.97) 100%),
    linear-gradient(135deg,
      rgba(10, 10, 10, 0.16) 0%,
      rgba(var(--primary-rgb), 0.12) 28%,
      rgba(var(--secondary-rgb), 0.1) 52%,
      rgba(255, 255, 255, 0.08) 100%);
}

.education-pilot-section::before {
  content: '';
  position: absolute;
  top: -180px;
  right: -120px;
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(var(--accent-rgb), 0.18) 0%, transparent 72%);
  pointer-events: none;
}

.education-pilot-section::after {
  content: '';
  position: absolute;
  bottom: -220px;
  left: -160px;
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, rgba(var(--primary-rgb), 0.12) 0%, transparent 72%);
  pointer-events: none;
}

.education-pilot-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-6);
  position: relative;
  z-index: 2;
}

.education-pilot-intro {
  max-width: 780px;
  margin: 0 auto var(--space-12);
  text-align: center;
}

.education-section-kicker {
  display: inline-block;
  margin-bottom: var(--space-4);
  padding: var(--space-2) var(--space-5);
  border-radius: var(--radius-full);
  background: rgba(var(--secondary-rgb), 0.1);
  border: 1px solid rgba(var(--secondary-rgb), 0.18);
  color: var(--color-primary);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.education-section-title {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5vw, 4rem);
  font-weight: 800;
  line-height: 1.05;
  margin-bottom: var(--space-5);
  color: var(--neutral-900);
  text-wrap: balance;
}

.education-section-description {
  font-size: 1.12rem;
  line-height: 1.8;
  color: var(--neutral-700);
  text-wrap: pretty;
}

.education-spotlight {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: var(--space-8);
  align-items: center;
  margin: 0 auto var(--space-10);
  padding: var(--space-10);
  border-radius: var(--radius-3xl);
  border: 1px solid rgba(var(--accent-rgb), 0.26);
  background: linear-gradient(135deg, rgba(12, 18, 34, 0.98) 0%, rgba(17, 33, 63, 0.96) 58%, rgba(10, 10, 10, 0.98) 100%);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.28);
  position: relative;
  overflow: hidden;
}

.education-spotlight::before {
  content: '';
  position: absolute;
  inset: auto auto -90px -90px;
  width: 260px;
  height: 260px;
  background: radial-gradient(circle, rgba(var(--accent-rgb), 0.2) 0%, transparent 72%);
  pointer-events: none;
}

.education-spotlight::after {
  content: '';
  position: absolute;
  inset: -100px -100px auto auto;
  width: 280px;
  height: 280px;
  background: radial-gradient(circle, rgba(var(--secondary-rgb), 0.18) 0%, transparent 72%);
  pointer-events: none;
}

.education-spotlight-copy,
.education-spotlight-benefits {
  position: relative;
  z-index: 1;
}

.education-spotlight-copy {
  min-width: 0;
  max-width: 640px;
}

.education-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1.08;
  margin-bottom: var(--space-5);
  color: var(--neutral-0);
  text-wrap: balance;
}

.education-description,
.education-invite {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--neutral-200);
}

.education-description {
  margin-bottom: var(--space-5);
}

.education-invite {
  margin-bottom: 0;
  color: var(--neutral-100);
}

.education-spotlight-benefits {
  display: grid;
  min-width: 0;
  gap: var(--space-4);
}

.education-benefit {
  padding: var(--space-5) var(--space-6);
  border-radius: var(--radius-2xl);
  background: rgba(12, 12, 12, 0.34);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(8px);
}

.education-benefit-label {
  display: inline-block;
  margin-bottom: var(--space-2);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--title-accent-color);
}

.education-benefit p {
  margin: 0;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--neutral-200);
}

.education-pilot-actions {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}

.education-pilot-note {
  margin-bottom: var(--space-6);
  font-size: 1.02rem;
  line-height: 1.8;
  color: var(--neutral-700);
}

.education-cta {
  background: var(--primary-gradient-soft);
  color: white;
  font-weight: 700;
}

.education-cta:hover {
  color: white;
  box-shadow: 0 0 40px rgba(var(--secondary-rgb), 0.24);
}

/* =========================================
   Product Section — HistropediaJS
   ========================================= */
.product-hjs {
  padding: var(--space-32) 0;
  background: var(--neutral-50);
}

.product-hjs .product-container {
  max-width: 1400px;
}

.product-hjs .product-header {
  text-align: center;
}

.hjs-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 800;
  color: var(--neutral-900);
  margin-bottom: var(--space-4);
}

.hjs-subtitle {
  font-size: 1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-secondary);
  margin-bottom: var(--space-6);
}

.hjs-description {
  font-size: 1.15rem;
  color: var(--neutral-600);
  max-width: 700px;
  margin: 0 auto var(--space-16);
  line-height: 1.8;
}

.showcase-mini-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
  margin-bottom: var(--space-12);
}

.showcase-mini-card {
  display: block;
  background: var(--neutral-0);
  border-radius: var(--radius-2xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  transition: all 0.5s var(--ease-out-cubic);
  text-decoration: none;
  color: inherit;
}

.showcase-mini-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-2xl);
  color: inherit;
}

.showcase-mini-card-image {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.showcase-mini-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease-out-cubic);
}

.showcase-mini-card:hover .showcase-mini-card-image img {
  transform: scale(1.06);
}

.showcase-mini-card-body {
  padding: var(--space-5) var(--space-6);
}

.showcase-mini-card-body .logo-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

.showcase-mini-card-body .logo-row img {
  height: 32px;
  width: auto;
}

.showcase-mini-card-body h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--neutral-900);
  margin-bottom: var(--space-2);
}

.showcase-mini-card-body p {
  font-size: 0.92rem;
  color: var(--neutral-600);
  line-height: 1.6;
}

.hjs-cta {
  text-align: center;
}

/* =========================================
   Founders Section
   ========================================= */
.founders-section {
  padding: var(--space-32) 0;
  background: var(--neutral-0);
}

.founders-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 var(--space-6);
}

.founders-header {
  text-align: center;
  margin-bottom: var(--space-16);
}

.founders-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 800;
  color: var(--neutral-900);
  margin-bottom: var(--space-4);
}

.founders-tagline {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-style: italic;
  color: var(--neutral-500);
}

.founders-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-10);
  margin-bottom: var(--space-12);
}

.founder-card {
  text-align: center;
}

.founder-portrait {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  overflow: hidden;
  margin: 0 auto var(--space-6);
  box-shadow: var(--shadow-xl);
  border: 4px solid rgba(var(--primary-rgb), 0.15);
  transition: all 0.4s var(--ease-out-cubic);
}

.founder-portrait:hover {
  transform: scale(1.05);
  border-color: rgba(var(--accent-rgb), 0.4);
  box-shadow: 0 0 30px rgba(var(--primary-rgb), 0.2);
}

.founder-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.founder-name {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--neutral-900);
  margin-bottom: var(--space-2);
}

.founder-role {
  font-size: 0.9rem;
  color: var(--color-secondary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.founders-mission {
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
}

.founders-mission p {
  font-size: 1.15rem;
  color: var(--neutral-600);
  line-height: 1.8;
}

.founders-mission p + p {
  margin-top: var(--space-4);
}

/* =========================================
   Contact CTA Section
   ========================================= */
.contact-cta-section {
  padding: var(--space-20) 0;
  background: var(--primary-gradient);
  color: white;
  position: relative;
  overflow: hidden;
}

.contact-cta-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 80% 50%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
  pointer-events: none;
}

.contact-cta-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 var(--space-6);
  text-align: center;
  position: relative;
  z-index: 1;
}

.contact-cta-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 800;
  margin-bottom: var(--space-6);
}

.contact-cta-subtitle {
  font-size: 1.2rem;
  opacity: 0.92;
  margin-bottom: var(--space-10);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.7;
}

.contact-cta-actions {
  display: flex;
  gap: var(--space-4);
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: var(--space-8);
}

.contact-cta-actions .btn-primary {
  background: white;
  color: var(--color-primary);
  font-weight: 700;
}

.contact-cta-actions .btn-primary:hover {
  background: var(--neutral-50);
  box-shadow: var(--shadow-2xl);
}

.contact-email {
  font-size: 1rem;
  opacity: 0.85;
}

.contact-email a {
  color: white;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.contact-email a:hover {
  opacity: 1;
  color: white;
}

/* =========================================
   Footer (matching HistropediaJS)
   ========================================= */
.footer-immersive {
  background: var(--neutral-950);
  color: var(--neutral-300);
  padding: var(--space-20) 0 var(--space-8);
}

.footer-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--space-6);
}

.footer-content {
  display: grid;
  gap: var(--space-12);
  margin-bottom: var(--space-12);
  grid-template-columns: minmax(220px, 1fr) minmax(0, 2fr);
  align-items: start;
}

.footer-links {
  display: grid;
  gap: var(--space-8);
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.footer-brand {
  grid-column: span 1;
}

.footer-logo {
  height: 40px;
  width: auto;
  margin-bottom: var(--space-4);
}

.footer-tagline {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--neutral-400);
  margin: 0;
}

.footer-section h4 {
  color: white;
  font-weight: 700;
  margin-bottom: var(--space-4);
}

.footer-section a,
.footer-link-button {
  display: block;
  color: var(--neutral-400);
  text-decoration: none;
  margin-bottom: var(--space-2);
  transition: color 0.3s var(--ease-out-cubic);
}

.footer-link-button {
  width: fit-content;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.footer-section a:hover,
.footer-link-button:hover {
  color: var(--color-accent);
}

.footer-bottom {
  border-top: 1px solid var(--neutral-800);
  padding-top: var(--space-8);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-bottom p {
  margin: 0;
  font-size: 0.9rem;
}

.footer-social {
  display: flex;
  gap: var(--space-4);
}

.footer-social a {
  width: 40px;
  height: 40px;
  background: var(--neutral-800);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--neutral-400);
  transition: all 0.3s var(--ease-out-cubic);
}

.footer-social a:hover {
  background: var(--color-primary);
  color: white;
  transform: translateY(-2px);
}

.footer-social svg {
  width: 18px;
  height: 18px;
}

/* =========================================
   Inner Page Hero (contact, terms)
   ========================================= */
.page-hero {
  padding: calc(var(--space-32) + var(--space-8)) 0 var(--space-16);
  background: var(--primary-gradient);
  color: white;
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 70% 80%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
  pointer-events: none;
}

.page-hero-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 var(--space-6);
  position: relative;
  z-index: 1;
}

.page-hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 900;
  line-height: 1;
  margin-bottom: var(--space-4);
}

.page-hero-subtitle {
  font-size: 1.15rem;
  opacity: 0.92;
  max-width: 540px;
  line-height: 1.7;
}

.page-section {
  padding: var(--space-20) 0;
}

.page-section-soft {
  background: var(--neutral-50);
}

.page-section h2 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  color: var(--neutral-900);
  margin-bottom: var(--space-6);
}

.page-section h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--neutral-900);
  margin-top: var(--space-8);
  margin-bottom: var(--space-3);
}

.page-section p {
  color: var(--neutral-600);
  line-height: 1.8;
  margin-bottom: var(--space-4);
}

.page-section a {
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.page-section a:hover {
  color: var(--color-secondary);
}

.info-grid,
.contact-methods {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-6);
  margin-top: var(--space-10);
}

.info-card,
.contact-card,
.faq-item {
  background: var(--neutral-0);
  border: 1px solid rgba(var(--primary-rgb), 0.08);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-lg);
}

.info-card,
.contact-card {
  padding: var(--space-6);
}

.info-card h3,
.contact-card h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--neutral-900);
  margin: 0 0 var(--space-3);
}

.info-card p,
.contact-card p {
  margin: 0;
  color: var(--neutral-600);
}

.info-card p + p,
.contact-card p + p {
  margin-top: var(--space-3);
}

.faq-list {
  display: grid;
  gap: var(--space-4);
  margin-top: var(--space-8);
}

.faq-item {
  overflow: hidden;
  padding: 0 var(--space-6);
  transition: border-color 0.3s var(--ease-out-cubic), box-shadow 0.3s var(--ease-out-cubic);
}

.faq-item[open] {
  border-color: rgba(var(--primary-rgb), 0.24);
  box-shadow: var(--shadow-xl);
}

.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: var(--space-5) 0;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--neutral-900);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: '+';
  font-family: var(--font-body);
  font-size: 1.5rem;
  color: var(--color-primary);
  flex: 0 0 auto;
}

.faq-item[open] summary::after {
  content: '\2212';
}

.faq-item p {
  margin: 0 0 var(--space-5);
  color: var(--neutral-600);
}

.faq-inline-link {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  transition: color 0.3s var(--ease-out-cubic);
}

.faq-inline-link:hover {
  color: var(--color-secondary);
}

.contact-page-note {
  margin-top: var(--space-8);
  text-align: center;
}

/* Legal / Terms page body content */
.legal-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 var(--space-6);
}

.legal-content h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--neutral-900);
  margin-top: var(--space-10);
  margin-bottom: var(--space-4);
}

.legal-content p,
.legal-content li {
  color: var(--neutral-600);
  line-height: 1.8;
}

/* =========================================
   Animations
   ========================================= */
@keyframes slideInUp {
  from { opacity: 0; transform: translateY(50px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes scrollIndicator {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

@keyframes badgePulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(var(--accent-rgb), 0.4);
  }
  50% {
    box-shadow: 0 0 20px 4px rgba(var(--accent-rgb), 0.2);
  }
}

/* Scroll-triggered reveal */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s var(--ease-out-cubic), transform 0.8s var(--ease-out-cubic);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* =========================================
   Responsive Design
   ========================================= */
@media (max-width: 1024px) {
  .showcase-mini-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .education-spotlight {
    grid-template-columns: 1fr;
  }

  .founders-grid {
    gap: var(--space-8);
  }
}

@media (max-width: 768px) {
  .nav-container {
    padding: var(--space-3) var(--space-6);
  }

  .nav-logo {
    height: 44px;
  }

  .nav-links {
    display: none;
  }

  .nav-mobile-toggle {
    display: flex;
  }

  .nav-links.active {
    display: flex;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: var(--space-4);
    background: rgba(255, 255, 255, 0.98);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: var(--shadow-lg);
    padding: var(--space-4) var(--space-6);
  }

  .nav-links.active .nav-link,
  .nav-links.active .nav-cta {
    padding: var(--space-3) var(--space-6);
  }

  .hero-cover-title {
    font-size: clamp(2.2rem, 9vw, 4rem);
    line-height: 1;
  }

  .hero-cover-content {
    max-width: 42rem;
    padding-top: calc(var(--space-20) + var(--space-6));
    transform: translateY(-60px);
  }

  .hero-cover-subtitle {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: var(--space-6);
  }

  .hero-cover-actions .btn-primary-large {
    padding: var(--space-4) var(--space-8);
    font-size: 1rem;
  }

  .hero-scroll-indicator {
    bottom: var(--space-4);
  }

  .scroll-line {
    height: 28px;
  }

  .scroll-text {
    font-size: 0.68rem;
    letter-spacing: 0.12em;
  }

  .showcase-mini-grid {
    grid-template-columns: 1fr;
  }

  .founders-grid {
    grid-template-columns: 1fr;
    gap: var(--space-12);
  }

  .founder-portrait {
    width: 150px;
    height: 150px;
  }

  .question-cards {
    grid-template-columns: 1fr;
  }

  .education-spotlight {
    padding: var(--space-8);
  }

  .education-pilot-section {
    padding-top: var(--space-20);
  }

  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .footer-links {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    flex-direction: column;
    gap: var(--space-4);
    text-align: center;
  }
}

@media (max-width: 520px) {
  .hero-cover-actions {
    flex-direction: column;
    align-items: center;
  }

  .hero-cover-actions .btn-primary-large,
  .hero-cover-actions .btn-secondary {
    width: min(100%, 20rem);
    justify-content: center;
  }

  .contact-cta-actions {
    flex-direction: column;
    align-items: center;
  }

  .education-cta {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  :root {
    --space-6: 1rem;
    --space-8: 1.5rem;
    --space-12: 2rem;
    --space-16: 2.5rem;
    --space-20: 3rem;
    --space-24: 3.5rem;
    --space-32: 4rem;
  }

  .nav-logo {
    height: 35px;
  }

  .nav-container {
    padding: var(--space-3) var(--space-4);
  }

  .hero-cover-content {
    padding-top: calc(var(--space-20) + var(--space-4));
  }
}

@media (max-height: 700px) {
  .hero-cover-content {
    padding-top: calc(var(--space-20) + var(--space-4));
  }

  .hero-cover-title {
    margin-bottom: var(--space-4);
  }

  .hero-cover-subtitle {
    margin-bottom: var(--space-6);
  }

  .hero-scroll-indicator {
    display: none;
  }
}
