/* ============================================================
   AESOP AI Academy — Shared Theme
   academy-theme.css v1.0.2 | April 2026
   PlayAGame.ai™ | AesopAcademy.org
   
   Usage: <link rel="stylesheet" href="/assets/css/academy-theme.css?v=1.0.0">
   ============================================================ */

/* ─── GOOGLE FONTS IMPORT ─────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;0,900;1,400;1,600&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;1,9..40,300;1,9..40,400&display=swap');

/* ─── DESIGN TOKENS ──────────────────────────────────────── */
:root {
  /* Colors */
  --navy:         #0d1b2a;
  --navy-mid:     #16293d;
  --navy-light:   #1e3a52;
  --gold:         #c9a05a;
  --gold-light:   #dbb87a;
  --gold-pale:    #f5e9d0;
  --cream:        #faf8f4;
  --white:        #ffffff;
  --ink:          #1a1a2e;
  --ink-mid:      #2c3e50;
  --ink-light:    #4a5568;
  --ink-muted:    #718096;
  --border:       #e2d9cc;
  --border-light: #ede8df;
  --teal:         #3dd6c0;
  --teal-dark:    #2ba898;
  --green:        #4caf82;
  --amber:        #e6a817;
  --red:          #e05c5c;

  /* Typography */
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    'DM Sans', system-ui, sans-serif;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(13,27,42,0.08), 0 1px 2px rgba(13,27,42,0.06);
  --shadow-md: 0 4px 16px rgba(13,27,42,0.10), 0 2px 6px rgba(13,27,42,0.07);
  --shadow-lg: 0 12px 40px rgba(13,27,42,0.14), 0 4px 16px rgba(13,27,42,0.08);
  --shadow-gold: 0 4px 24px rgba(201,160,90,0.18);

  /* Shape */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;

  /* Layout — 75vw means 12.5% side padding on desktops, capped at
     1600px so ultrawide monitors don't stretch line lengths past
     readable. min() floor at 1120px keeps tablets/small laptops
     comfortable. */
  --max-w: min(1600px, max(1120px, 75vw));
  --transition: 0.22s ease;
}

/* ─── RESET ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: clamp(16px, 1.25vw + 0.5rem, 24px); scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--cream);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* ─── NAV ────────────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250,248,244,0.96);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 2rem;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.nav-brand-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}
.nav-brand-primary {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  color: var(--navy);
  letter-spacing: -0.01em;
  transition: color var(--transition);
}
.nav-brand-primary:hover { color: var(--gold); }
.nav-divider {
  width: 1px;
  height: 18px;
  background: var(--border);
}
.nav-brand-secondary {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.85rem;
  color: var(--green);
  letter-spacing: 0.01em;
  transition: opacity var(--transition);
}
.nav-brand-secondary:hover { opacity: 0.75; }
.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-left: auto;
}
.nav-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink-light);
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-sm);
  transition: background var(--transition), color var(--transition);
}
.nav-link:hover {
  background: var(--border-light);
  color: var(--ink);
}
.nav-btn {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.45rem 1rem;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  flex-shrink: 0;
  white-space: nowrap;
}
.nav-btn--forums {
  background: transparent;
  color: var(--teal-dark);
  border: 1.5px solid var(--teal-dark);
}
.nav-btn--forums:hover {
  background: var(--teal-dark);
  color: var(--white);
}
.nav-btn--primary {
  background: var(--navy);
  color: var(--gold-light);
  border: 1.5px solid var(--navy);
}
.nav-btn--primary:hover {
  background: var(--navy-mid);
  box-shadow: var(--shadow-md);
}

/* ─── FOOTER ─────────────────────────────────────────────── */
.footer {
  background: var(--navy);
  color: rgba(255,255,255,0.5);
  padding: 3rem 2rem 2rem;
  font-size: 0.82rem;
}
.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  padding-bottom: 1.75rem;
  margin-bottom: 1.25rem;
}
.footer-brand {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 0.5rem;
}
.footer-tagline {
  font-style: italic;
  line-height: 1.5;
}
.footer-nav {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: flex-end;
}
.footer-link {
  color: rgba(255,255,255,0.5);
  transition: color var(--transition);
  font-size: 0.82rem;
}
.footer-link:hover { color: var(--gold-light); }
.footer-bottom {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.75rem;
}
.footer-tm   { color: rgba(255,255,255,0.3); }
.footer-patent { color: var(--gold); opacity: 0.6; }

/* ─── SHARED BUTTONS ─────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--font-body);
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  cursor: pointer;
  text-decoration: none;
  border: none;
  font-size: 0.9rem;
}
.btn--primary {
  background: var(--navy);
  color: var(--gold-light);
  padding: 0.75rem 1.5rem;
  box-shadow: var(--shadow-sm);
}
.btn--primary:hover {
  background: var(--navy-mid);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}
.btn--gold {
  background: var(--gold);
  color: var(--navy);
  padding: 0.85rem 1.8rem;
  box-shadow: var(--shadow-gold);
}
.btn--gold:hover {
  background: var(--gold-light);
  transform: translateY(-1px);
  box-shadow: 0 6px 28px rgba(201,160,90,0.35);
}
.btn--ghost {
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.85);
  padding: 0.85rem 1.5rem;
  border: 1px solid rgba(255,255,255,0.18);
}
.btn--ghost:hover {
  background: rgba(255,255,255,0.14);
  color: var(--white);
}
.btn--outline-teal {
  background: transparent;
  color: var(--teal-dark);
  border: 1.5px solid var(--teal-dark);
  padding: 0.65rem 1.25rem;
}
.btn--outline-teal:hover {
  background: var(--teal-dark);
  color: var(--white);
}

/* ─── SECTION SHELLS ─────────────────────────────────────── */
.section { padding: 5rem 2rem; }
.section--alt  { background: var(--white); }
.section--dark { background: var(--navy); color: var(--white); }
.section--cream { background: var(--cream); }
.section-inner {
  max-width: var(--max-w);
  margin: 0 auto;
}
.section-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.6rem;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--navy);
  line-height: 1.15;
  margin-bottom: 0.9rem;
}
.section--dark .section-title { color: var(--white); }
.section-lead {
  font-size: 1.05rem;
  color: var(--ink-light);
  max-width: 580px;
  line-height: 1.7;
}
.section--dark .section-lead { color: rgba(255,255,255,0.65); }
.section-header { margin-bottom: 3rem; }

/* ─── CARDS ──────────────────────────────────────────────── */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.25rem;
  box-shadow: var(--shadow-md);
  transition: box-shadow var(--transition), transform var(--transition);
}
.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}
.card--gold-top::before {
  content: '';
  display: block;
  height: 3px;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  margin: -2.25rem -2.25rem 1.75rem -2.25rem;
}
.card--teal-top::before {
  content: '';
  display: block;
  height: 3px;
  background: linear-gradient(90deg, var(--teal), var(--teal-dark));
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  margin: -2.25rem -2.25rem 1.75rem -2.25rem;
}
.card-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}
.card-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

/* ─── BADGES ─────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.28rem 0.7rem;
  border-radius: 99px;
}
.badge--dev {
  background: rgba(230,168,23,0.12);
  color: var(--amber);
  border: 1px solid rgba(230,168,23,0.25);
}
.badge--live {
  background: rgba(76,175,130,0.12);
  color: var(--green);
  border: 1px solid rgba(76,175,130,0.25);
}
.badge--pending {
  background: rgba(224,92,92,0.10);
  color: var(--red);
  border: 1px solid rgba(224,92,92,0.2);
}
.badge--gold {
  background: rgba(201,160,90,0.12);
  color: var(--gold);
  border: 1px solid rgba(201,160,90,0.25);
}

/* ─── STATUS LIST ────────────────────────────────────────── */
.status-list {
  list-style: none;
  display: flex;
  flex-direction: column;
}
.status-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--border-light);
  gap: 1rem;
}
.status-item:last-child { border-bottom: none; }
.status-item-left {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.status-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.status-dot--live    { background: var(--green); box-shadow: 0 0 0 2px rgba(76,175,130,0.2); }
.status-dot--dev     { background: var(--amber); box-shadow: 0 0 0 2px rgba(230,168,23,0.2); }
.status-dot--pending { background: var(--red);   box-shadow: 0 0 0 2px rgba(224,92,92,0.2); }
.status-name {
  font-size: 0.83rem;
  font-weight: 500;
  color: var(--ink-mid);
}
.status-tag {
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.18rem 0.5rem;
  border-radius: 99px;
  flex-shrink: 0;
}
.status-tag--live    { color: var(--green); background: rgba(76,175,130,0.1); }
.status-tag--dev     { color: var(--amber); background: rgba(230,168,23,0.1); }
.status-tag--pending { color: var(--red);   background: rgba(224,92,92,0.1); }

/* ─── EYEBROW / KICKER TEXT ──────────────────────────────── */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.25rem;
  padding: 0.3rem 0.75rem;
  border: 1px solid rgba(201,160,90,0.3);
  border-radius: 99px;
  background: rgba(201,160,90,0.07);
}
.eyebrow-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--gold);
  animation: dot-pulse 2.4s ease-in-out infinite;
}
@keyframes dot-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}

/* ─── HERO (shared dark hero shell) ─────────────────────── */
.hero {
  background: var(--navy);
  color: var(--white);
  overflow: hidden;
  position: relative;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 65% 40%, rgba(201,160,90,0.10) 0%, transparent 60%),
    radial-gradient(ellipse 60% 80% at 10% 80%, rgba(61,214,192,0.07) 0%, transparent 55%),
    linear-gradient(175deg, #0d1b2a 0%, #16293d 60%, #0d1b2a 100%);
}
.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  opacity: 0.35;
  pointer-events: none;
}
.hero-inner {
  position: relative;
  z-index: 1;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 5rem 2rem 4.5rem;
}
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 6vw, 4.2rem);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--white);
  margin-bottom: 0.4rem;
}
.hero-title em {
  font-style: italic;
  color: var(--gold-light);
}
.hero-subtitle {
  font-family: var(--font-display);
  font-size: clamp(1rem, 2.2vw, 1.3rem);
  font-weight: 400;
  font-style: italic;
  color: rgba(255,255,255,0.65);
  margin-bottom: 1.75rem;
  line-height: 1.4;
}
.hero-desc {
  font-size: 1rem;
  color: rgba(255,255,255,0.75);
  line-height: 1.7;
  margin-bottom: 2.25rem;
}
.hero-desc strong { color: rgba(255,255,255,0.95); font-weight: 500; }
.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.85rem;
}

/* ─── PAGE ENTER ANIMATION ───────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.animate-fade-up { animation: fadeUp 0.65s ease both; }
.animate-fade-up-delay { animation: fadeUp 0.65s 0.15s ease both; }

/* ─── BANNER STRIP ───────────────────────────────────────── */
.banner-strip {
  background: var(--gold);
  color: var(--navy);
  padding: 0.6rem 2rem;
  text-align: center;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}

/* ─── QUOTE BLOCK ────────────────────────────────────────── */
.quote-section {
  background: var(--navy);
  padding: 4.5rem 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.quote-section::before {
  content: '\201C';
  position: absolute;
  top: -0.5rem; left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-display);
  font-size: 18rem;
  color: rgba(201,160,90,0.05);
  line-height: 1;
  pointer-events: none;
  user-select: none;
}
.quote-inner { position: relative; z-index: 1; max-width: 800px; margin: 0 auto; }
.quote-text {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3vw, 2.1rem);
  font-style: italic;
  font-weight: 600;
  color: var(--white);
  line-height: 1.45;
  margin-bottom: 1.25rem;
}
.quote-text em { color: var(--gold-light); font-style: normal; }
.quote-source {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
}

/* ─── STATS STRIP ────────────────────────────────────────── */
.stats-strip {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.stat-item {
  padding: 2.5rem 2rem;
  border-right: 1px solid var(--border);
  text-align: center;
}
.stat-item:last-child { border-right: none; }
.stat-number {
  font-family: var(--font-display);
  font-size: 2.8rem;
  font-weight: 900;
  color: var(--gold);
  line-height: 1;
  margin-bottom: 0.3rem;
}
.stat-label {
  font-size: 0.82rem;
  color: var(--ink-light);
  font-weight: 400;
  line-height: 1.4;
}

/* ─── PAGE HEADER (for inner pages) ─────────────────────── */
.page-header {
  background: var(--navy);
  color: var(--white);
  padding: 3rem 2rem;
  position: relative;
  overflow: hidden;
}
.page-header-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #0d1b2a 0%, #16293d 100%);
  opacity: 0.95;
}
.page-header-inner {
  position: relative;
  z-index: 1;
  max-width: var(--max-w);
  margin: 0 auto;
}
.page-header-back {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: rgba(255,255,255,0.5);
  margin-bottom: 1.25rem;
  transition: color var(--transition);
}
.page-header-back:hover { color: var(--gold-light); }
.page-header-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--white);
  margin-bottom: 0.6rem;
}
.page-header-title em { color: var(--gold-light); font-style: italic; }
.page-header-sub {
  font-size: 1rem;
  color: rgba(255,255,255,0.6);
  font-style: italic;
  font-family: var(--font-display);
}

/* ─── RESPONSIVE ─────────────────────────────────────────── */
@media (max-width: 900px) {
  .hero-inner { padding: 3.5rem 1.5rem 3rem; }
  .section { padding: 3.5rem 1.5rem; }
  .card-grid-2,
  .card-grid-3 { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
  .footer-nav { align-items: flex-start; }
}
@media (max-width: 600px) {
  .nav-inner { padding: 0 1rem; gap: 0.75rem; }
  .hero-title { font-size: 2.2rem; }
  .stats-strip { border: none; }
  .stat-item {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    margin: 0.25rem;
  }
  .stat-item:last-child { border-right: 1px solid var(--border); }
}

/* ============================================================
   DARK MODE — v1.0.0
   Applied via data-theme="dark" on <html>.
   Uses !important to beat any page-embedded :root blocks.
   Toggle script + pill CSS also live here so ALL pages
   get dark mode just by linking academy-theme.css.
   ============================================================ */

/* Smooth transitions on theme switch */
body, .nav, .card, .footer, .section--alt, .section--cream, .section--dark, .hero {
  transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}

/* ─── DARK MODE TOGGLE (pill switch) ─────────────────────── */
/* Add <button class="dark-mode-toggle" id="darkToggle">
        <span class="dark-mode-toggle__icon" id="darkIcon">☀️</span>
        <span class="dark-mode-toggle__track">
          <span class="dark-mode-toggle__thumb"></span>
        </span>
   </button>
   anywhere in your nav-links div. */
.dark-mode-toggle {
  display: inline-flex; align-items: center; gap: 0.5rem;
  cursor: pointer; background: none; border: none;
  padding: 0.35rem 0.6rem; border-radius: var(--radius-sm);
  font-family: var(--font-body); font-size: 0.8rem; font-weight: 500;
  color: var(--ink-light); transition: background var(--transition), color var(--transition);
  user-select: none; flex-shrink: 0;
}
.dark-mode-toggle:hover            { background: var(--border-light); color: var(--ink); }
.dark-mode-toggle__track {
  position: relative; width: 34px; height: 19px; border-radius: 99px;
  background: var(--border); border: 1.5px solid var(--border);
  transition: background var(--transition), border-color var(--transition); flex-shrink: 0;
}
.dark-mode-toggle__thumb {
  position: absolute; top: 1.5px; left: 1.5px;
  width: 13px; height: 13px; border-radius: 50%;
  background: var(--ink-muted);
  transition: transform var(--transition), background var(--transition);
}
[data-theme="dark"] .dark-mode-toggle__track  { background: #c9a05a; border-color: #c9a05a; }
[data-theme="dark"] .dark-mode-toggle__thumb  { transform: translateX(15px); background: #0f1923; }
[data-theme="dark"] .dark-mode-toggle:hover   { background: #2a3a4a; color: #e8e3db; }

/* ─── MODULE LESSON CONTENT PADDING ─────────────────────── */
.lesson-section { padding-left: 5%; padding-right: 5%; }
.story-scene { margin-left: 5%; margin-right: 5%; }
.section-divider { margin-left: 5%; margin-right: 5%; }

/* ─── LEARNER OUTCOMES BLOCK (intro page, under narrative) ── */
/* Injected by .github/scripts/add_course_outcomes.py at the end of the
   intro p-intro story-scene.  Re-uses .story-scene framing so it
   shares left/right margins with the surrounding narrative.            */
.story-scene.learner-outcomes {
  background: rgba(13, 27, 42, 0.04);
  border-left: 3px solid var(--gold);
  padding: 1.4rem 1.75rem 1.6rem;
  border-radius: 6px;
  margin-top: 1.5rem;
}
.learner-outcomes-lead {
  margin-bottom: 0.85rem;
  font-size: 1.02rem;
}
.learner-outcomes-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.learner-outcomes-item {
  position: relative;
  padding-left: 1.5rem;
  padding-bottom: 0.55rem;
  line-height: 1.55;
  font-size: 1rem;
}
.learner-outcomes-item:last-child { padding-bottom: 0; }
.learner-outcomes-item::before {
  content: "→";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--gold);
  font-weight: 600;
}
[data-theme="dark"] .story-scene.learner-outcomes {
  background: rgba(255, 255, 255, 0.04);
}
