/* ─── unscriptED Landing - Base ────────────────────────────────────────── */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=DM+Sans:wght@400;500;700&display=swap');

:root {
  --bg: #f7f5f0;
  --surface: #ffffff;
  --surface-hover: #f0eeea;
  --border: #e2dfd8;
  --text: #2c2a25;
  --text-muted: #5a5550;
  --accent: #6366f1;
  --accent-hover: #4f46e5;
  --accent-light: rgba(99, 102, 241, 0.08);
  --success: #16a34a;
  --error: #dc2626;
  --radius: 14px;
  --font: 'DM Sans', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', ui-monospace, monospace;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.06), 0 1px 3px rgba(0,0,0,0.04);
  --shadow-lg: 0 10px 30px rgba(0,0,0,0.08), 0 2px 8px rgba(0,0,0,0.04);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

/* ─── Nav ──────────────────────────────────────────────────────────────── */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 32px;
  background: rgba(247, 245, 240, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
}

.logo-ed {
  font-weight: 800;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-links {
  display: flex;
  gap: 24px;
  align-items: center;
}

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
}

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

.nav-link-accent {
  color: var(--accent);
  font-weight: 600;
}

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

/* ─── Hero ─────────────────────────────────────────────────────────────── */

.hero {
  text-align: center;
  padding: 100px 24px 80px;
  background: linear-gradient(160deg, #f7f5f0 0%, #eeecf5 50%, #f0eff8 100%);
  position: relative;
  overflow: hidden;
}

.hero-geo-wrap {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.hero-geo {
  width: 100%;
  height: 100%;
}

.hero-title {
  font-size: 4rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
  color: var(--text);
  -webkit-text-fill-color: var(--text);
}

.hero-title .logo-ed {
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-muted);
  max-width: 580px;
  margin: 0 auto 32px;
  line-height: 1.6;
}

.hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.stat-num {
  font-weight: 700;
  color: var(--text);
}

.stat-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--border);
}

/* ─── Sections ─────────────────────────────────────────────────────────── */

.section {
  padding: 80px 24px;
}

.section-alt {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.section-head {
  text-align: center;
  margin-bottom: 48px;
}

.section-head h2 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.section-desc {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ─── Subject Filter Tabs ──────────────────────────────────────────────── */

.subject-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
}

.subject-filter {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 7px 16px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.subject-filter:hover {
  background: var(--surface-hover);
  color: var(--text);
}

.subject-filter.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* ─── Game Cards Grid ──────────────────────────────────────────────────── */

.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

.game-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  text-decoration: none;
  color: var(--text);
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}

.game-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--card-primary, var(--accent));
}

/* Card visual - top 2/3 */
.card-visual {
  position: relative;
  height: 180px;
  background: var(--card-bg, #f5f2ed);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.card-scene {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.card-scene svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* Card body - bottom 1/3 */
.card-body {
  padding: 20px 22px 22px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.card-tagline {
  color: var(--text-muted);
  font-size: 0.88rem;
  margin-bottom: 14px;
  font-style: italic;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
}

.meta-pill {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 3px 10px;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  white-space: nowrap;
}

/* ─── Social Classroom Section ─────────────────────────────────────────── */

.product-feature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.product-info h2 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.product-info .section-desc {
  margin: 0 0 20px;
  text-align: left;
}

.product-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.pill {
  background: var(--accent-light);
  color: var(--accent);
  border-radius: 20px;
  padding: 5px 14px;
  font-size: 0.82rem;
  font-weight: 600;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: white;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 12px 28px;
  border-radius: 10px;
  transition: background 0.2s, transform 0.1s, box-shadow 0.2s;
  box-shadow: 0 1px 3px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(99, 102, 241, 0.3);
}

.section-cta {
  margin-top: 16px;
}

/* Social preview mock */
.social-preview {
  background: #1a1625;
  border-radius: 16px;
  padding: 24px;
  box-shadow: var(--shadow-lg);
}

.social-mock {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.social-post {
  display: flex;
  gap: 12px;
  background: rgba(255,255,255,0.06);
  border-radius: 12px;
  padding: 14px;
}

.social-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  flex-shrink: 0;
}

.social-content { flex: 1; min-width: 0; }

.social-name {
  color: #e2e0f0;
  font-weight: 600;
  font-size: 0.85rem;
  margin-bottom: 4px;
}

.social-text {
  color: #d0cce0;
  font-size: 0.82rem;
  line-height: 1.5;
}

/* ─── Social Classroom - How It Works ─────────────────────────────────── */

.sc-how-it-works {
  display: flex;
  gap: 32px;
  margin-top: 56px;
}

.sc-step {
  flex: 1;
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.sc-step-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  font-weight: 800;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

.sc-step strong {
  display: block;
  font-size: 0.95rem;
  margin-bottom: 4px;
}

.sc-step p {
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.55;
  margin: 0;
}

/* ─── Social Classroom - Pack Samples ─────────────────────────────────── */

.sc-packs-preview {
  margin-top: 56px;
}

.sc-packs-preview h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 20px;
  text-align: center;
}

.sc-packs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.sc-pack-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  text-align: center;
  transition: border-color 0.2s, transform 0.15s;
}

.sc-pack-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.sc-pack-name {
  font-weight: 700;
  font-size: 0.88rem;
  margin-bottom: 3px;
}

.sc-pack-meta {
  color: var(--text-muted);
  font-size: 0.75rem;
}

.sc-packs-more {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.88rem;
  margin-top: 16px;
}

.sc-packs-more a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.sc-packs-more a:hover {
  text-decoration: underline;
}

/* ─── Clickable Game Cards ─────────────────────────────────────────────── */

.game-card-link {
  cursor: pointer;
}

/* ─── Teacher Access Section ───────────────────────────────────────────── */

.access-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

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

.access-card h2 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.access-card p {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.65;
  margin-bottom: 24px;
  max-width: 440px;
  margin-left: auto;
  margin-right: auto;
}

.access-btn {
  font-size: 1.05rem;
  padding: 16px 32px;
  border-radius: 12px;
}

.access-note {
  font-size: 0.82rem !important;
  color: var(--text-muted);
  margin-top: 12px !important;
  margin-bottom: 0 !important;
}

.access-features {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding-top: 8px;
}

.access-feature {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.access-feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--accent-light);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.access-feature strong {
  display: block;
  margin-bottom: 2px;
  font-size: 0.95rem;
}

.access-feature p {
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.5;
  margin: 0;
}

.hidden { display: none; }

/* ─── Hero CTA ────────────────────────────────────────────────────────── */

.hero-cta {
  margin-top: 28px;
}

/* ─── Section Accent Divider ──────────────────────────────────────────── */

.section-accent {
  width: 48px;
  height: 3px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  border-radius: 2px;
  margin: 0 auto 40px;
}

/* ─── Staff Pick Badge ────────────────────────────────────────────────── */

.staff-pick {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: white;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  letter-spacing: 0.02em;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.25);
  display: flex;
  align-items: center;
  gap: 4px;
}

.under-construction {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  background: linear-gradient(135deg, #f59e0b, #dc2626);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  letter-spacing: 0.02em;
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.25);
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ─── Social Mock Improvements ────────────────────────────────────────── */

.social-mock-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  margin-bottom: 12px;
}

.social-mock-prompt {
  background: linear-gradient(135deg, rgba(99,102,241,0.15), rgba(139,92,246,0.1));
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 12px;
}

.social-post-head {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 4px;
}

.social-handle {
  color: #dcd9f0;
  font-size: 0.78rem;
}

.social-time {
  color: #6b6680;
  font-size: 0.75rem;
  margin-left: auto;
}

.social-actions {
  display: flex;
  gap: 16px;
  margin-top: 8px;
  color: #6b6680;
  font-size: 0.78rem;
}

/* ─── Why This Exists ─────────────────────────────────────────────────── */

.why-section {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 56px;
  align-items: start;
}

.why-content h2 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 20px;
}

.why-content p {
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.75;
  margin-bottom: 16px;
}

.why-content p:last-child {
  margin-bottom: 0;
  font-weight: 600;
}

.why-principles {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding-top: 8px;
}

.why-principle {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.why-principle-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--accent-light);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.why-principle strong {
  display: block;
  margin-bottom: 4px;
  font-size: 0.95rem;
}

.why-principle p {
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.55;
  margin: 0;
}

/* ─── Footer ───────────────────────────────────────────────────────────── */

.site-footer {
  padding: 48px 24px;
  border-top: 1px solid var(--border);
  text-align: center;
}

.footer-inner {
  max-width: 600px;
  margin: 0 auto;
}

.footer-brand {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
  -webkit-text-fill-color: var(--text);
}

.footer-brand .logo-ed {
  -webkit-text-fill-color: transparent;
}

.footer-tagline {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 16px;
}

.footer-links {
  display: flex;
  gap: 20px;
  justify-content: center;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
}

.footer-links a:hover { color: var(--text); }

.footer-copyright {
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-top: 16px;
}

/* ─── Responsive ───────────────────────────────────────────────────────── */

@media (max-width: 768px) {
  .site-nav { padding: 14px 16px; }
  .nav-links { gap: 14px; }
  .nav-link { font-size: 0.82rem; }
  .hero { padding: 60px 16px 50px; }
  .hero-geo-wrap { display: none; }
  .hero-title { font-size: 2.6rem; }
  .hero-subtitle { font-size: 1.05rem; }
  .hero-stats { flex-wrap: wrap; gap: 8px; }
  .section { padding: 48px 16px; }
  .section-head h2 { font-size: 1.5rem; }
  .games-grid { grid-template-columns: 1fr; gap: 16px; }
  .product-feature {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .product-info .section-desc { text-align: center; }
  .product-info { text-align: center; }
  .product-stats { justify-content: center; }
  .sc-how-it-works { flex-direction: column; gap: 20px; }
  .sc-packs-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .why-section {
    grid-template-columns: 1fr;
    gap: 36px;
  }
  .access-section {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .access-card { text-align: center; }
}

@media (max-width: 480px) {
  .hero-title { font-size: 2rem; }
  .card-visual { height: 140px; }
  .nav-links { gap: 10px; }
}

/* ─── Focus Visible ───────────────────────────────────────────────────── */

:focus-visible {
  outline: 2px solid #6366f1;
  outline-offset: 2px;
}

/* ─── Skip Link ───────────────────────────────────────────────────────── */

.skip-link:focus {
  top: 0;
}

/* ─── Reduced Motion ──────────────────────────────────────────────────── */

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

/* ═══════════════════════════════════════════════════════════════════════
   Hero: two-column with product-in-motion device frame
   ═══════════════════════════════════════════════════════════════════════ */

.hero-grid {
  position: relative;
  z-index: 1;
  max-width: 1140px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  align-items: center;
  text-align: center;
}

@media (min-width: 920px) {
  .hero { padding: 88px 24px 80px; }
  .hero-grid { grid-template-columns: 1.05fr 1fr; gap: 56px; text-align: left; }
  .hero-grid .hero-subtitle { margin-left: 0; margin-right: 0; }
  .hero-grid .hero-stats { justify-content: flex-start; }
  .hero-grid .hero-cta { justify-content: flex-start; }
}

.hero-cta {
  flex-wrap: wrap;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 22px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

/* Device frame ─────────────────────────────────────────────────────────── */
.hero-stage {
  display: flex;
  justify-content: center;
  perspective: 1400px;
}

.device-frame {
  width: 100%;
  max-width: 540px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

@media (min-width: 920px) {
  .device-frame { transform: rotateY(-7deg) rotateX(2deg); transform-origin: left center; }
  .device-frame:hover, .device-frame:focus-within { transform: rotateY(0deg) rotateX(0deg); box-shadow: 0 22px 50px rgba(60,50,120,0.18), 0 4px 12px rgba(0,0,0,0.06); }
}

.device-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 14px;
  background: linear-gradient(180deg, #f4f2ee, #eceae4);
  border-bottom: 1px solid var(--border);
}

.device-bar .dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.device-bar .dot.r { background: #f87171; }
.device-bar .dot.y { background: #fbbf24; }
.device-bar .dot.g { background: #34d399; }

.device-url {
  margin-left: 10px;
  flex: 1;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 4px 12px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: left;
}

.device-screen {
  position: relative;
  aspect-ratio: 16 / 10;
  background: #0d0b18;
  overflow: hidden;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.9s ease;
}
.hero-slide.active { opacity: 1; }
.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
  z-index: 3;
}
.hero-video.playing { opacity: 1; }

.slide-caption {
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: rgba(13, 11, 24, 0.72);
  backdrop-filter: blur(6px);
  border-radius: 999px;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.1;
}
.slide-caption .cap-subject {
  font-weight: 500;
  font-size: 0.7rem;
  color: #c7c3f0;
  padding-left: 8px;
  border-left: 1px solid rgba(255,255,255,0.25);
}

.device-hint {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  background: rgba(255,255,255,0.92);
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text);
  box-shadow: var(--shadow-sm);
}
.device-frame:hover .device-hint, .device-frame:focus-within .device-hint { opacity: 0; }
.device-hint { transition: opacity 0.3s; }

.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(13, 11, 24, 0.55);
  color: #fff;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.25s, background 0.2s, transform 0.2s;
  backdrop-filter: blur(4px);
}
.carousel-arrow svg { width: 18px; height: 18px; }
.carousel-arrow.prev { left: 10px; }
.carousel-arrow.next { right: 10px; }
.carousel-arrow:hover { background: rgba(99, 102, 241, 0.92); }
.device-frame:hover .carousel-arrow,
.device-frame:focus-within .carousel-arrow { opacity: 1; }
/* Touch / no-hover devices: keep the arrows visible since there's no hover state. */
@media (hover: none), (pointer: coarse) {
  .carousel-arrow { opacity: 1; background: rgba(13, 11, 24, 0.45); }
}

.carousel-counter {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 4;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(13, 11, 24, 0.6);
  backdrop-filter: blur(4px);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.carousel-dots {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 4;
  display: flex;
  gap: 6px;
}
.carousel-dots button {
  width: 7px; height: 7px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255,255,255,0.45);
  cursor: pointer;
  transition: background 0.3s, transform 0.3s;
}
.carousel-dots button.active { background: #fff; transform: scale(1.35); }

/* ═══════════════════════════════════════════════════════════════════════
   Hero background: animated decorative SVG
   ═══════════════════════════════════════════════════════════════════════ */
.hero-geo-wrap { transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1); will-change: transform; }

/* Per-element transforms need a local box + centre origin on SVG nodes. */
.hero-geo g,
.hero-geo polygon,
.hero-geo circle[fill] {
  transform-box: fill-box;
  transform-origin: center;
}

@keyframes heroFloat   { 0%, 100% { transform: translateY(0); }    50% { transform: translateY(-9px); } }
@keyframes heroFloatB  { 0%, 100% { transform: translateY(0); }    50% { transform: translateY(7px); } }
@keyframes heroSpin    { from { transform: rotate(0deg); }          to { transform: rotate(360deg); } }
@keyframes heroSpinRev { from { transform: rotate(0deg); }          to { transform: rotate(-360deg); } }
@keyframes heroTwinkle { 0%, 100% { opacity: 0.2; }                 50% { opacity: 0.04; } }

/* Icon vignettes (lock, gavel, speech bubbles, cards, magnifier...) drift gently, staggered. */
.hero-geo g { animation: heroFloat 9s ease-in-out infinite; }
.hero-geo g:nth-of-type(2n)   { animation-name: heroFloatB; animation-duration: 11s; }
.hero-geo g:nth-of-type(3n)   { animation-duration: 13s; animation-delay: -4s; }
.hero-geo g:nth-of-type(4n+1) { animation-duration: 10s; animation-delay: -2s; }

/* Geometry rotates almost imperceptibly slowly. */
.hero-geo polygon:nth-of-type(odd)  { animation: heroSpin 70s linear infinite; }
.hero-geo polygon:nth-of-type(even) { animation: heroSpinRev 90s linear infinite; }

/* Accent dots breathe. */
.hero-geo circle[fill] { animation: heroTwinkle 6s ease-in-out infinite; }
.hero-geo circle[fill]:nth-of-type(2n) { animation-duration: 8s; animation-delay: -2s; }
.hero-geo circle[fill]:nth-of-type(3n) { animation-duration: 7s; animation-delay: -3s; }

/* ═══════════════════════════════════════════════════════════════════════
   Trust bar (standards-alignment chips)
   ═══════════════════════════════════════════════════════════════════════ */
.trust-bar {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.trust-inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 22px 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px 28px;
}
.trust-label {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.trust-chips { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.trust-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
}
.trust-chip svg { width: 14px; height: 14px; color: var(--accent); flex: none; }

/* ═══════════════════════════════════════════════════════════════════════
   "How it works" band
   ═══════════════════════════════════════════════════════════════════════ */
.how-band { background: var(--bg); padding-top: 64px; padding-bottom: 56px; }
/* The Simulations section follows the How-it-works band directly; trim the doubled gap. */
#simulations { padding-top: 44px; }
.how-steps {
  max-width: 1040px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  counter-reset: how;
}
.how-step {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px 26px;
  box-shadow: var(--shadow-sm);
}
.how-step::before {
  counter-increment: how;
  content: counter(how);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  margin-bottom: 16px;
  border-radius: 12px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff;
  font-weight: 700;
  font-size: 1.1rem;
}
.how-step h3 { font-size: 1.08rem; margin-bottom: 6px; }
.how-step p { color: var(--text-muted); font-size: 0.92rem; line-height: 1.55; }
.how-step .how-icon { position: absolute; top: 26px; right: 24px; color: var(--accent); opacity: 0.5; }
.how-step .how-icon svg { width: 22px; height: 22px; }

@media (max-width: 768px) {
  .how-steps { grid-template-columns: 1fr; gap: 16px; }
  .trust-inner { padding: 18px 16px; gap: 10px 18px; }
}

/* ═══════════════════════════════════════════════════════════════════════
   Game card enhancements: NEW badge + subject accent
   ═══════════════════════════════════════════════════════════════════════ */
.card-visual::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--card-primary, var(--accent)), var(--card-secondary, var(--accent)));
  opacity: 0;
  transform: scaleX(0.2);
  transform-origin: left;
  transition: opacity 0.25s, transform 0.25s;
  z-index: 2;
}
.game-card:hover .card-visual::after { opacity: 1; transform: scaleX(1); }
.game-card:hover .card-scene svg { transform: scale(1.05); }
.card-scene svg { transition: transform 0.4s ease; }

.new-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  box-shadow: 0 2px 8px rgba(99,102,241,0.35);
}

.meta-pill.meta-subject {
  background: var(--bg);
  border-color: var(--card-primary, var(--border));
  color: var(--text);
  font-weight: 600;
}

/* Unit-placement pill ("Geometry Unit 1 - reasoning and proof"). Longest
   phrases run ~44 chars, so this one wraps instead of overflowing the card.
   Text stays --text-muted on --bg like the base pill (AA in the light card
   context); only the border picks up the game's accent. */
.meta-pill.meta-unit {
  white-space: normal;
  line-height: 1.4;
  border-color: var(--card-secondary, var(--border));
}

/* ═══════════════════════════════════════════════════════════════════════
   Seasonal shelf - curated picks above the A-Z catalog
   ═══════════════════════════════════════════════════════════════════════ */
.season-shelf {
  background: var(--accent-light);
  border: 1px solid rgba(99, 102, 241, 0.18);
  border-radius: 20px;
  padding: 26px 26px 28px;
  margin-bottom: 44px;
}

.season-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.season-title {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.season-desc {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-top: 4px;
}

.season-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

/* Denser than a catalog card: the scene reads at a glance, the reason carries it. */
.season-card .card-visual { height: 118px; }
.season-card .card-body { padding: 14px 16px 16px; }
.season-card .card-title { font-size: 1rem; margin-bottom: 5px; }

.season-why {
  font-size: 0.83rem;
  line-height: 1.45;
  color: var(--text);
  font-weight: 600;
  margin-bottom: 12px;
}

.grid-label {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 14px;
}

/* ═══════════════════════════════════════════════════════════════════════
   Catalog controls - search + subject row + grade row
   ═══════════════════════════════════════════════════════════════════════ */
.catalog-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin-bottom: 18px;
}

/* The rows carry their own margin from .subject-filters; neutralise it here
   so the three controls sit on one baseline. */
.catalog-controls .subject-filters { margin-bottom: 0; }

.catalog-search {
  position: relative;
  flex: 1 1 300px;
  min-width: 240px;
  max-width: 420px;
}

.catalog-search input {
  width: 100%;
  font-family: inherit;
  font-size: 0.9rem;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 9px 36px 9px 38px;
  transition: border-color 0.15s, box-shadow 0.15s;
  appearance: none;
}

.catalog-search input::-webkit-search-cancel-button { display: none; }

.catalog-search input::placeholder { color: var(--text-muted); }

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

.catalog-search-icon {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  width: 15px;
  height: 15px;
  color: var(--text-muted);
  pointer-events: none;
}

.catalog-search-clear {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: var(--surface-hover);
  color: var(--text-muted);
  cursor: pointer;
}

.catalog-search-clear:hover { color: var(--text); }
.catalog-search-clear svg { width: 12px; height: 12px; }

/* An author `display` beats the UA `[hidden] { display: none }` rule, so any
   element we toggle with the hidden attribute AND give a display value needs
   this back explicitly. Without it the clear button shows on an empty box. */
.catalog-search-clear[hidden],
.catalog-controls[hidden],
.season-shelf[hidden],
.catalog-status[hidden] { display: none; }

.catalog-status {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: -6px 0 14px;
}

@media (max-width: 720px) {
  .catalog-search { max-width: none; flex-basis: 100%; }
}

@media (max-width: 720px) {
  .season-shelf { padding: 20px 16px 22px; border-radius: 16px; }
  .season-grid { grid-template-columns: 1fr; }
  .season-card .card-visual { height: 140px; }
}

/* ═══════════════════════════════════════════════════════════════════════
   Footer: multi-column
   ═══════════════════════════════════════════════════════════════════════ */
.footer-cols {
  max-width: 1140px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 36px;
  text-align: left;
  padding-bottom: 36px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
.footer-col h4 {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 14px;
  opacity: 0.7;
}
.footer-col a {
  display: block;
  margin-bottom: 9px;
  font-size: 0.9rem;
  text-decoration: none;
  opacity: 0.82;
  transition: opacity 0.2s;
}
.footer-col a:hover { opacity: 1; }
.footer-col .footer-blurb { font-size: 0.9rem; line-height: 1.6; opacity: 0.7; max-width: 280px; }

@media (max-width: 768px) {
  .footer-cols { grid-template-columns: 1fr 1fr; gap: 28px 20px; }
  .footer-col.footer-col-brand { grid-column: 1 / -1; }
}
@media (max-width: 480px) {
  .footer-cols { grid-template-columns: 1fr; }
  .hero-cta { justify-content: center; }
}
