/* ============================================================
   Summer School Hub — Design System
   Shares brand DNA with the Spelling Bee / Math apps (honey palette,
   Fredoka/Inter/JetBrains Mono) but adds the module grid, social
   cards, and name-capture modal as new signature elements.
   ============================================================ */

:root {
  --cream: #FFF8E7;
  --cream-deep: #FCEFD2;
  --ink: #1A1A2E;
  --ink-soft: #4A4A63;
  --honey: #F4A300;
  --honey-dk: #D98C00;
  --teal: #2D9596;
  --teal-dk: #237677;
  --coral: #E85D4E;
  --coral-dk: #C8483B;
  --sky: #118AB2;
  --sky-dk: #0D6E8F;
  --soft-yl: #FFD166;
  --card-radius: 28px;
  --shadow-soft: 0 12px 32px rgba(26, 26, 46, 0.08);
  --shadow-lift: 0 18px 40px rgba(244, 163, 0, 0.25);
}

[data-bs-theme="dark"] {
  --cream: #15131C;
  --cream-deep: #1D1A26;
  --ink: #F4F1EA;
  --ink-soft: #C7C3D8;
  --shadow-soft: 0 12px 32px rgba(0, 0, 0, 0.4);
  --shadow-lift: 0 18px 40px rgba(244, 163, 0, 0.18);
}

* { box-sizing: border-box; }

body {
  background: var(--cream);
  color: var(--ink);
  font-family: 'Inter', system-ui, sans-serif;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  transition: background-color .35s ease, color .35s ease;
}

.hive-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 12% 18%, rgba(244,163,0,0.10) 0, transparent 38%),
    radial-gradient(circle at 88% 12%, rgba(45,149,150,0.08) 0, transparent 40%),
    radial-gradient(circle at 92% 85%, rgba(244,163,0,0.08) 0, transparent 35%),
    radial-gradient(circle at 6% 80%, rgba(232,93,78,0.06) 0, transparent 35%);
}

.app-shell { position: relative; z-index: 1; }

/* ============================================================
   HEADER
   ============================================================ */
.app-header {
  background: var(--cream-deep);
  border-bottom: 2px solid rgba(244, 163, 0, 0.18);
}

.brand-hex-shape { fill: var(--honey); }
.brand-hex-letter {
  font-family: 'Fredoka', sans-serif;
  font-weight: 700;
  font-size: 42px;
  fill: var(--ink);
}

.brand-title {
  font-family: 'Fredoka', sans-serif;
  font-weight: 700;
  font-size: 1.55rem;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.brand-tagline {
  font-size: 0.85rem;
  color: var(--ink-soft);
  font-weight: 500;
}

.btn-toggle-theme {
  border: 2px solid rgba(244, 163, 0, 0.3);
  background: transparent;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: transform .2s ease, background-color .2s ease;
}
.btn-toggle-theme:hover { background: rgba(244, 163, 0, 0.12); transform: rotate(15deg); }

.btn-switch-view {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink-soft);
  background: var(--cream);
  border: 1px solid rgba(26, 26, 46, 0.1);
  border-radius: 999px;
  padding: 0.4rem 0.9rem;
  text-decoration: none;
}
.btn-switch-view:hover { background: rgba(244, 163, 0, 0.12); color: var(--ink); }

.btn-pwa-install {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: var(--honey);
  color: #ffffff !important;
  border: none;
  border-radius: 999px;
  padding: 0.42rem 0.95rem;
  font-family: 'Fredoka', sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: var(--shadow-soft);
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.btn-pwa-install:hover {
  background: var(--honey-dk);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(244, 163, 0, 0.35);
}
.btn-pwa-install .pwa-install-icon {
  font-size: 1rem;
}


/* ============================================================
   SHARED TEXT STYLES
   ============================================================ */
.eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--honey-dk);
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.setup-heading {
  font-family: 'Fredoka', sans-serif;
  font-weight: 600;
  font-size: 1.9rem;
  color: var(--ink);
  margin-bottom: 0.5rem;
}

.setup-sub {
  color: var(--ink-soft);
  font-size: 0.97rem;
}

/* ============================================================
   GREETING SECTION
   ============================================================ */
.greeting-section { margin-top: 3rem; margin-bottom: 1rem; }

.greeting-heading {
  font-family: 'Fredoka', sans-serif;
  font-weight: 700;
  font-size: 2.2rem;
  color: var(--ink);
  margin-bottom: 0.4rem;
}

.greeting-sub {
  color: var(--ink-soft);
  font-size: 1rem;
}

/* ============================================================
   MODULE GRID
   ============================================================ */
.modules-section { max-width: 920px; margin: 2.5rem auto 0; }

.module-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

.module-card {
  background: var(--cream-deep);
  border-radius: var(--card-radius);
  padding: 1.75rem 1.5rem;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(244, 163, 0, 0.12);
  text-decoration: none;
  color: var(--ink);
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  transition: transform .15s ease, box-shadow .15s ease;
  position: relative;
}
.module-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lift);
  color: var(--ink);
}
.module-card.is-coming-soon {
  opacity: 0.6;
  cursor: default;
  pointer-events: none;
}

.module-emoji {
  font-size: 2.4rem;
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  background: rgba(244, 163, 0, 0.14);
}
.module-card[data-color="teal"] .module-emoji { background: rgba(45, 149, 150, 0.14); }
.module-card[data-color="coral"] .module-emoji { background: rgba(232, 93, 78, 0.14); }
.module-card[data-color="sky"] .module-emoji { background: rgba(17, 138, 178, 0.14); }
.module-card[data-color="emerald"] .module-emoji { background: rgba(5, 150, 105, 0.14); }
.module-card[data-color="emerald"]:hover { border-color: rgba(5, 150, 105, 0.4); box-shadow: 0 18px 40px rgba(5, 150, 105, 0.22); }
.module-card[data-color="purple"] .module-emoji { background: rgba(139, 92, 246, 0.16); }
.module-card[data-color="purple"]:hover { border-color: rgba(139, 92, 246, 0.45); box-shadow: 0 18px 40px rgba(139, 92, 246, 0.22); }
.module-card[data-color="indigo"] .module-emoji { background: rgba(99, 102, 241, 0.16); }
.module-card[data-color="indigo"]:hover { border-color: rgba(99, 102, 241, 0.45); box-shadow: 0 18px 40px rgba(99, 102, 241, 0.22); }

.module-title {
  font-family: 'Fredoka', sans-serif;
  font-weight: 700;
  font-size: 1.15rem;
  margin-bottom: 0.3rem;
}

.module-desc {
  color: var(--ink-soft);
  font-size: 0.88rem;
  margin-bottom: 0;
  line-height: 1.4;
}

.module-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  background: rgba(232, 93, 78, 0.16);
  color: var(--coral-dk);
}

/* ============================================================
   SOCIAL SECTION
   ============================================================ */
.social-section { max-width: 1040px; margin-left: auto; margin-right: auto; }

.social-heading {
  font-family: 'Fredoka', sans-serif;
  font-weight: 700;
  font-size: 1.6rem;
  color: var(--ink);
}

.social-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.social-card {
  background: var(--cream-deep);
  border-radius: var(--card-radius);
  padding: 1.6rem 1.4rem;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(244, 163, 0, 0.15);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  min-height: 220px;
}
.social-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lift);
}

.social-card-top {
  margin-bottom: 1.25rem;
}

.social-card-icon {
  font-size: 2.2rem;
  display: inline-block;
  margin-bottom: 0.5rem;
}

.social-card-title {
  font-family: 'Fredoka', sans-serif;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--ink);
  margin-bottom: 0.4rem;
}

.social-card-desc {
  color: var(--ink-soft);
  font-size: 0.88rem;
  line-height: 1.45;
  margin-bottom: 0;
}

.btn-social-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  width: 100%;
  padding: 0.6rem 1rem;
  border-radius: 999px;
  font-family: 'Fredoka', sans-serif;
  font-weight: 600;
  font-size: 0.92rem;
  text-decoration: none;
  transition: all 0.2s ease;
  border: none;
}
.btn-social-play {
  background: #0F9D58;
  color: #ffffff !important;
}
.btn-social-play:hover {
  background: #0b8043;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(15, 157, 88, 0.35);
}
.btn-social-fb {
  background: #1877F2;
  color: #ffffff !important;
}
.btn-social-fb:hover {
  background: #0d65d9;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(24, 119, 242, 0.35);
}
.btn-social-yt {
  background: #FF0000;
  color: #ffffff !important;
}
.btn-social-yt:hover {
  background: #cc0000;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255, 0, 0, 0.35);
}

/* ============================================================
   GOOGLE PLAY PILL & APP DOWNLOAD BANNER
   ============================================================ */
.btn-google-play-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--cream);
  color: var(--ink) !important;
  border: 1px solid rgba(26, 26, 46, 0.15);
  border-radius: 999px;
  padding: 0.42rem 0.85rem;
  font-family: 'Fredoka', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.btn-google-play-pill:hover {
  background: rgba(244, 163, 0, 0.15);
  border-color: var(--honey);
  transform: translateY(-1px);
}

.app-download-banner {
  max-width: 1040px;
  margin-left: auto;
  margin-right: auto;
}

.app-download-card {
  background: linear-gradient(135deg, rgba(244, 163, 0, 0.12) 0%, rgba(42, 157, 143, 0.1) 100%), var(--cream-deep);
  border: 2px solid rgba(244, 163, 0, 0.25);
  border-radius: var(--card-radius);
  padding: 1.75rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  box-shadow: var(--shadow-soft);
  flex-wrap: wrap;
}

.app-download-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #1b8738;
  background: rgba(52, 168, 83, 0.12);
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  margin-bottom: 0.5rem;
}

.app-download-title {
  font-family: 'Fredoka', sans-serif;
  font-weight: 700;
  font-size: 1.45rem;
  color: var(--ink);
  margin-bottom: 0.35rem;
}

.app-download-desc {
  color: var(--ink-soft);
  font-size: 0.92rem;
  margin-bottom: 0;
  max-width: 580px;
  line-height: 1.5;
}

.btn-google-play-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  background: #000000;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  padding: 0.55rem 1.25rem;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
  white-space: nowrap;
}
.btn-google-play-badge:hover {
  background: #1f1f1f;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
}
.btn-play-text {
  display: flex;
  flex-direction: column;
  text-align: left;
  line-height: 1.15;
}
.btn-play-sub {
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  opacity: 0.85;
  text-transform: uppercase;
  font-family: 'Inter', sans-serif;
}
.btn-play-main {
  font-family: 'Inter', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.footer-social-links a {
  color: var(--ink-soft);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  transition: all 0.2s ease;
}
.footer-social-links a:hover {
  color: var(--honey-dk);
  background: rgba(244, 163, 0, 0.12);
}
.visitor-badge {
  display: inline-block;
  margin-top: 0.75rem;
}


/* ============================================================
   NAME CAPTURE MODAL
   ============================================================ */
.name-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(26, 26, 46, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1.5rem;
  animation: modalFadeIn .2s ease;
}
@keyframes modalFadeIn { from { opacity: 0; } to { opacity: 1; } }

.name-modal {
  background: var(--cream-deep);
  border-radius: var(--card-radius);
  padding: 2.5rem 2rem;
  max-width: 380px;
  width: 100%;
  text-align: center;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
  animation: modalPopIn .25s ease;
}
@keyframes modalPopIn {
  from { opacity: 0; transform: scale(0.92) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.name-modal-emoji { font-size: 2.75rem; display: block; margin-bottom: 0.75rem; }

.name-modal-title {
  font-family: 'Fredoka', sans-serif;
  font-weight: 700;
  font-size: 1.4rem;
  margin-bottom: 0.25rem;
}

.name-modal-sub {
  color: var(--ink-soft);
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
}

.name-modal-skip {
  background: none;
  border: none;
  color: var(--ink-soft);
  font-size: 0.82rem;
  margin-top: 0.9rem;
  text-decoration: underline;
  cursor: pointer;
}
.name-modal-skip:hover { color: var(--ink); }

#nameInput {
  border-radius: 14px;
  border: 2px solid rgba(26, 26, 46, 0.1);
  background-color: var(--cream);
  color: var(--ink);
  padding: 0.65rem 1rem;
}
#nameInput:focus {
  border-color: var(--honey);
  box-shadow: 0 0 0 4px rgba(244, 163, 0, 0.18);
  background-color: var(--cream);
  color: var(--ink);
}

.btn-honey {
  background: var(--honey);
  border: none;
  color: var(--ink);
  font-weight: 700;
  font-family: 'Fredoka', sans-serif;
  border-radius: 16px;
  padding: 0.75rem 1.5rem;
  box-shadow: var(--shadow-lift);
  transition: transform .15s ease, background-color .15s ease, box-shadow .15s ease;
}
.btn-honey:hover:not(:disabled) {
  background: var(--honey-dk);
  transform: translateY(-2px);
  box-shadow: 0 22px 44px rgba(244, 163, 0, 0.32);
  color: var(--ink);
}
.btn-honey:active:not(:disabled) { transform: translateY(0); }

/* ============================================================
   FOOTER
   ============================================================ */
.app-footer { color: var(--ink-soft); font-size: 0.82rem; }
.app-disclaimer { font-size: 0.72rem; opacity: 0.7; max-width: 480px; margin-left: auto; margin-right: auto; line-height: 1.5; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  .social-grid { grid-template-columns: 1fr; }
}

@media (max-width: 576px) {
  .module-grid { grid-template-columns: 1fr; }
  .greeting-heading { font-size: 1.8rem; }
  .brand-title { font-size: 1.25rem; }
  .name-modal { padding: 2rem 1.5rem; }
}

/* ============================================================
   ACCESSIBILITY
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  .name-modal-backdrop, .name-modal, .btn-toggle-theme { animation: none !important; transition: none !important; }
}

a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 2px;
}
