/* ============================================================
   LEADERS OF THE COSMOS — Production Stylesheet
   Animate My Storybook · Country Mungrel TV
   ============================================================ */

/* -- DESIGN TOKENS ------------------------------------------ */
:root {
  --cream: #FAF4E5;
  --cream-deep: #F2E8CC;
  --cream-shadow: #EADEC1;
  --gold: #C8841A;
  --gold-light: #E8A53D;
  --gold-soft: #F4C430;
  --ink: #1A1408;
  --ink-soft: #2A2010;
  --soft: #6B5D4F;
  --sunflower: #F4C430;
  --paris: #4A6B8A;
  --carib: #5BB8A8;
  --lavender: #C8B6D9;
  --rose: #D89B9B;
  --sage: #A4B494;
  --line: #EADEC1;
  --white: #FFFFFF;
  --shadow-sm: 0 2px 8px rgba(26, 20, 8, 0.04);
  --shadow-md: 0 10px 30px rgba(26, 20, 8, 0.06);
  --shadow-lg: 0 20px 50px rgba(26, 20, 8, 0.1);
  --shadow-xl: 0 30px 60px rgba(26, 20, 8, 0.15), 0 10px 30px rgba(200, 132, 26, 0.2);
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-sans: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-script: 'Caveat', cursive;
  --container: 1240px;
  --container-narrow: 920px;
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-pill: 40px;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body {
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--cream);
  background-image:
    radial-gradient(circle at 20% 10%, rgba(244, 196, 48, 0.06) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(216, 155, 155, 0.05) 0%, transparent 50%),
    radial-gradient(circle at 50% 50%, rgba(91, 184, 168, 0.03) 0%, transparent 60%);
  background-attachment: fixed;
  line-height: 1.6;
  overflow-x: hidden;
}
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' /%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.06' /%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 1;
  opacity: 0.5;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--gold); text-decoration: none; transition: color 0.2s var(--ease); }
a:hover { color: var(--ink); }
button { font-family: inherit; cursor: pointer; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 40px; position: relative; z-index: 2; }
.container-narrow { max-width: var(--container-narrow); margin: 0 auto; padding: 0 40px; position: relative; z-index: 2; }
section { padding: 100px 0; position: relative; z-index: 2; }
.section-soft { background: linear-gradient(180deg, transparent, rgba(244, 196, 48, 0.04) 50%, transparent); }
.section-tint-rose { background: linear-gradient(180deg, transparent, rgba(216, 155, 155, 0.05)); }
.section-tint-carib { background: linear-gradient(180deg, transparent, rgba(91, 184, 168, 0.04), transparent); }

.eyebrow { font-family: var(--font-script); font-size: 24px; color: var(--gold); margin-bottom: 8px; font-weight: 500; }
.eyebrow-lg { font-size: 28px; margin-bottom: 12px; }

h1, h2, h3, h4 { font-family: var(--font-serif); font-weight: 600; line-height: 1.1; color: var(--ink); }
.h-hero { font-size: clamp(48px, 8vw, 96px); font-weight: 700; letter-spacing: -1px; line-height: 1.05; }
.h-hero em { color: var(--gold); font-style: italic; font-weight: 600; }
.h-section { font-size: clamp(36px, 5vw, 56px); letter-spacing: -0.5px; margin-bottom: 16px; }
.h-card { font-size: 22px; font-weight: 600; margin-bottom: 8px; }
.h-small { font-size: 18px; font-weight: 700; margin-bottom: 4px; font-family: var(--font-serif); }

.tagline { font-family: var(--font-serif); font-style: italic; font-size: 22px; color: var(--soft); font-weight: 400; }
.lead { font-size: 18px; color: var(--soft); max-width: 720px; margin-bottom: 60px; font-weight: 300; line-height: 1.7; }
.lead-center { margin: 0 auto 60px; text-align: center; }

.btn { display: inline-flex; align-items: center; gap: 10px; padding: 16px 36px; border-radius: var(--radius-pill); font-weight: 600; font-size: 15px; letter-spacing: 0.5px; transition: all 0.2s var(--ease); border: 2px solid transparent; cursor: pointer; text-decoration: none; font-family: inherit; }
.btn-primary { background: var(--gold); color: var(--cream); border-color: var(--gold); }
.btn-primary:hover { background: var(--ink); border-color: var(--ink); color: var(--cream); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn-secondary { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-secondary:hover { background: var(--ink); color: var(--cream); }
.btn-lg { padding: 20px 44px; font-size: 16px; }
.btn-sm { padding: 12px 24px; font-size: 13px; }

.nav { position: sticky; top: 0; z-index: 100; background: rgba(250, 244, 229, 0.92); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); padding: 20px 0; }
.nav-inner { display: flex; justify-content: space-between; align-items: center; }
.logo { font-family: var(--font-serif); font-size: 22px; font-weight: 700; color: var(--gold); letter-spacing: 0.5px; text-decoration: none; }
.logo span { color: var(--ink); font-style: italic; font-weight: 400; }
.logo:hover { color: var(--gold); }
.nav ul { list-style: none; display: flex; gap: 36px; align-items: center; }
.nav a { color: var(--ink); font-size: 14px; font-weight: 500; letter-spacing: 0.5px; }
.nav a:hover { color: var(--gold); }
.nav a.active { color: var(--gold); }
.nav-cta { background: var(--gold); color: var(--cream) !important; padding: 10px 22px; border-radius: 30px; transition: all 0.2s var(--ease); }
.nav-cta:hover { background: var(--ink); color: var(--cream) !important; }
.nav-toggle { display: none; background: none; border: none; padding: 8px; cursor: pointer; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--ink); margin: 5px 0; transition: all 0.2s var(--ease); }

.hero { min-height: 90vh; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding: 80px 40px; position: relative; overflow: hidden; }
.hero::before { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse at 30% 30%, rgba(244, 196, 48, 0.15) 0%, transparent 50%), radial-gradient(ellipse at 70% 60%, rgba(91, 184, 168, 0.1) 0%, transparent 50%), radial-gradient(ellipse at 50% 90%, rgba(216, 155, 155, 0.12) 0%, transparent 50%); z-index: 0; }
.hero-content { position: relative; z-index: 2; max-width: 900px; margin-bottom: 60px; }
.hero-buttons { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin-top: 40px; }
.hero-art { width: 100%; max-width: 760px; margin: 0 auto; position: relative; z-index: 2; }
.hero-art-frame { background: linear-gradient(135deg, var(--gold-soft) 0%, var(--gold-light) 50%, var(--rose) 100%); border-radius: 20px; padding: 4px; box-shadow: var(--shadow-xl); transform: rotate(-0.5deg); }
.hero-art-inner { background: linear-gradient(135deg, var(--cream), var(--cream-deep)); border-radius: 18px; aspect-ratio: 16 / 9; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px; text-align: center; position: relative; overflow: hidden; }
.hero-art-inner::after { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 25% 30%, rgba(91, 184, 168, 0.15) 0%, transparent 40%), radial-gradient(circle at 75% 25%, rgba(244, 196, 48, 0.2) 0%, transparent 40%), radial-gradient(circle at 50% 70%, rgba(74, 107, 138, 0.12) 0%, transparent 45%), radial-gradient(circle at 20% 80%, rgba(216, 155, 155, 0.18) 0%, transparent 40%); }
.placeholder-label { position: relative; z-index: 2; font-family: var(--font-script); font-size: 24px; color: var(--gold); margin-bottom: 8px; }
.placeholder-sub { position: relative; z-index: 2; font-style: italic; color: var(--soft); font-size: 14px; max-width: 400px; }

.page-header { padding: 100px 0 60px; text-align: center; position: relative; }
.page-header h1 { font-size: clamp(40px, 6vw, 72px); margin-bottom: 16px; }
.page-header .lead { margin: 0 auto; }

.invitation { text-align: center; padding: 120px 40px; }
.invitation-text { font-family: var(--font-serif); font-style: italic; font-size: clamp(24px, 3.5vw, 38px); font-weight: 400; color: var(--ink); line-height: 1.5; max-width: 800px; margin: 0 auto 40px; }
.invitation-text strong { color: var(--gold); font-weight: 600; font-style: normal; font-family: var(--font-serif); }

.email-signup { display: flex; max-width: 480px; margin: 0 auto; background: var(--white); border-radius: var(--radius-pill); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow-md); }
.email-signup input { flex: 1; border: none; padding: 18px 24px; font-family: var(--font-sans); font-size: 15px; background: transparent; color: var(--ink); outline: none; min-width: 0; }
.email-signup button { background: var(--gold); color: var(--white); border: none; padding: 0 32px; font-weight: 600; font-size: 14px; letter-spacing: 0.5px; transition: background 0.2s var(--ease); }
.email-signup button:hover { background: var(--ink); }

.characters-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 24px; margin-top: 60px; }
.character-card { text-align: center; cursor: pointer; transition: transform 0.3s var(--ease); }
.character-card:hover { transform: translateY(-6px); }
.character-portrait { aspect-ratio: 1; border-radius: 50%; margin-bottom: 16px; display: flex; align-items: center; justify-content: center; font-family: var(--font-script); color: var(--ink); font-size: 18px; box-shadow: var(--shadow-md); border: 3px solid var(--white); overflow: hidden; }
.character-portrait img { width: 100%; height: 100%; object-fit: cover; }
.character-name { font-family: var(--font-serif); font-weight: 700; font-size: 18px; color: var(--ink); margin-bottom: 4px; }
.character-tag { font-size: 12px; color: var(--soft); font-style: italic; letter-spacing: 0.3px; }

.episodes-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; margin-top: 60px; }
.episode-card { background: var(--white); border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-md); border: 1px solid var(--line); transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease); }
.episode-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.episode-image { aspect-ratio: 16 / 10; display: flex; align-items: center; justify-content: center; font-family: var(--font-script); color: var(--white); font-size: 22px; text-align: center; padding: 20px; }
.ep-1 { background: linear-gradient(135deg, var(--sunflower), var(--gold)); color: var(--ink); }
.ep-2 { background: linear-gradient(135deg, var(--paris), var(--lavender)); }
.ep-3 { background: linear-gradient(135deg, var(--carib), var(--sage)); }
.ep-4 { background: linear-gradient(135deg, var(--lavender), var(--rose)); }
.ep-5 { background: linear-gradient(135deg, var(--rose), var(--paris)); }
.ep-6 { background: linear-gradient(135deg, var(--gold), var(--rose), var(--paris)); }
.episode-body { padding: 28px; }
.episode-num { font-family: var(--font-script); font-size: 18px; color: var(--gold); margin-bottom: 4px; }
.episode-title { font-family: var(--font-serif); font-size: 22px; font-weight: 600; color: var(--ink); margin-bottom: 8px; }
.episode-desc { font-size: 14px; color: var(--soft); line-height: 1.6; }

.books-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; margin-top: 60px; align-items: stretch; }
.book-card { background: var(--white); border-radius: var(--radius-md); padding: 40px; box-shadow: var(--shadow-lg); border: 1px solid var(--line); display: flex; flex-direction: column; }
.book-cover-mock { width: 200px; height: 280px; margin: 0 auto 24px; border-radius: 4px; display: flex; align-items: center; justify-content: center; text-align: center; padding: 24px; font-family: var(--font-serif); color: var(--cream); font-weight: 600; font-size: 18px; box-shadow: 0 15px 35px rgba(26, 20, 8, 0.2); line-height: 1.3; }
.book-1 { background: linear-gradient(135deg, var(--sunflower), var(--gold-light)); color: var(--ink); }
.book-2 { background: linear-gradient(135deg, var(--paris), var(--lavender)); }
.book-title { font-family: var(--font-serif); font-size: 24px; font-weight: 700; text-align: center; margin-bottom: 8px; color: var(--ink); }
.book-meta { text-align: center; font-size: 13px; color: var(--soft); font-style: italic; margin-bottom: 16px; }
.book-desc { font-size: 15px; color: var(--ink); line-height: 1.7; margin-bottom: 24px; flex: 1; }
.book-link { display: block; text-align: center; color: var(--gold); font-weight: 600; font-size: 14px; padding-top: 16px; border-top: 1px solid var(--line); }

.art-story { background: linear-gradient(135deg, var(--cream-deep), var(--cream)); border-radius: var(--radius-lg); padding: 80px 60px; margin-top: 80px; text-align: center; border: 1px solid var(--line); position: relative; overflow: hidden; }
.art-story::before { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 10% 20%, rgba(244, 196, 48, 0.1) 0%, transparent 40%), radial-gradient(circle at 90% 80%, rgba(216, 155, 155, 0.1) 0%, transparent 40%); }
.art-story > * { position: relative; z-index: 2; }
.art-story h3 { font-size: clamp(28px, 4vw, 42px); color: var(--ink); margin-bottom: 24px; font-weight: 600; font-style: italic; }
.art-story p { font-size: 17px; color: var(--soft); max-width: 700px; margin: 0 auto 16px; line-height: 1.8; }
.art-story em { color: var(--gold); font-weight: 600; font-style: italic; }
.three-gen { display: inline-flex; gap: 24px; margin: 30px auto 10px; flex-wrap: wrap; justify-content: center; }
.gen-card { background: var(--white); padding: 16px 24px; border-radius: var(--radius-pill); font-size: 14px; color: var(--ink); box-shadow: var(--shadow-sm); }
.gen-card strong { color: var(--gold); font-weight: 700; }

.endorsement-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 32px; margin-top: 60px; }
.endorsement-card { background: var(--white); padding: 40px; border-radius: var(--radius-md); border-left: 4px solid var(--gold); box-shadow: var(--shadow-md); }
.endorsement-quote { font-family: var(--font-serif); font-style: italic; font-size: 17px; color: var(--ink); line-height: 1.6; margin-bottom: 20px; }
.endorsement-attr { font-size: 13px; color: var(--soft); letter-spacing: 0.5px; }
.endorsement-attr strong { color: var(--gold); font-style: normal; font-size: 14px; }

.educators-cta { background: linear-gradient(135deg, var(--ink), var(--ink-soft)); color: var(--cream); padding: 100px 0; text-align: center; }
.educators-cta h2 { color: var(--cream); font-size: clamp(36px, 5vw, 56px); margin-bottom: 24px; font-weight: 600; }
.educators-cta p { color: var(--cream-deep); font-size: 18px; max-width: 700px; margin: 0 auto 40px; line-height: 1.7; }
.educators-cta .btn-primary { background: var(--gold); border-color: var(--gold); }
.educators-cta .btn-primary:hover { background: var(--cream); color: var(--ink); border-color: var(--cream); }

.ala-banner { background: linear-gradient(90deg, var(--gold), var(--gold-light)); color: var(--white); text-align: center; padding: 12px 20px; font-size: 13px; font-weight: 500; letter-spacing: 0.5px; }
.ala-banner a { color: var(--white); text-decoration: underline; font-weight: 700; }
.ala-banner a:hover { color: var(--cream); }

.footer { background: var(--cream-deep); padding: 60px 0 30px; text-align: center; border-top: 1px solid var(--line); margin-top: 60px; }
.footer-tagline { font-family: var(--font-serif); font-style: italic; font-size: 20px; color: var(--gold); margin-bottom: 24px; }
.footer-links { display: flex; justify-content: center; gap: 36px; margin-bottom: 32px; list-style: none; flex-wrap: wrap; }
.footer-links a { color: var(--soft); font-size: 14px; }
.footer-links a:hover { color: var(--gold); }
.footer-meta { font-size: 12px; color: var(--soft); letter-spacing: 0.5px; max-width: 700px; margin: 0 auto; line-height: 1.6; }
.footer-meta strong { color: var(--ink); }
.footer-credits { font-size: 11px; color: var(--soft); margin-top: 16px; line-height: 1.6; }
.footer-credits strong { color: var(--gold); }

.form-grid { display: grid; gap: 16px; max-width: 600px; margin: 0 auto; }
.form-grid label { display: block; font-size: 13px; color: var(--soft); margin-bottom: 6px; letter-spacing: 0.3px; }
.form-grid input, .form-grid select, .form-grid textarea { width: 100%; padding: 14px 18px; border: 1px solid var(--line); border-radius: var(--radius-sm); font-family: var(--font-sans); font-size: 15px; background: var(--white); color: var(--ink); outline: none; transition: border-color 0.2s var(--ease); }
.form-grid input:focus, .form-grid select:focus, .form-grid textarea:focus { border-color: var(--gold); }
.form-grid textarea { min-height: 120px; resize: vertical; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.press-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; margin-top: 40px; }
.press-card { background: var(--white); padding: 32px; border-radius: var(--radius-md); box-shadow: var(--shadow-sm); border: 1px solid var(--line); text-align: center; transition: all 0.2s var(--ease); }
.press-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.press-card-icon { font-size: 36px; margin-bottom: 12px; }
.press-card h4 { font-size: 16px; margin-bottom: 6px; }
.press-card p { font-size: 13px; color: var(--soft); margin-bottom: 16px; }

.lessons-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; margin-top: 40px; }
.lesson-card { background: var(--white); padding: 32px; border-radius: var(--radius-md); box-shadow: var(--shadow-sm); border: 1px solid var(--line); border-top: 4px solid var(--gold); }
.lesson-grade { font-size: 12px; color: var(--gold); font-weight: 700; letter-spacing: 1px; margin-bottom: 8px; }

.tribute-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; margin: 30px 0; }
.tribute-card { background: var(--white); padding: 24px; border-radius: var(--radius-md); text-align: center; border: 1px solid var(--line); }
.tribute-card-role { font-family: var(--font-script); color: var(--gold); font-size: 18px; margin-bottom: 4px; }
.tribute-card-name { font-family: var(--font-serif); font-weight: 700; color: var(--ink); margin-bottom: 6px; }
.tribute-card-detail { font-size: 13px; color: var(--soft); line-height: 1.5; }

.text-center { text-align: center; }
.text-gold { color: var(--gold); }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; } .mt-4 { margin-top: 32px; } .mt-5 { margin-top: 48px; }
.mb-0 { margin-bottom: 0; }

@media (prefers-reduced-motion: no-preference) {
  .fade-in { animation: fadeIn 0.8s var(--ease); }
  @keyframes fadeIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
}

@media (max-width: 900px) {
  .nav-toggle { display: block; z-index: 102; }
  .nav ul { position: fixed; top: 0; right: 0; bottom: 0; width: 280px; background: var(--cream); border-left: 1px solid var(--line); flex-direction: column; align-items: flex-start; padding: 100px 32px 32px; gap: 24px; transform: translateX(100%); transition: transform 0.3s var(--ease); box-shadow: var(--shadow-xl); }
  .nav ul.open { transform: translateX(0); }
  .books-grid { grid-template-columns: 1fr; gap: 32px; }
  .art-story { padding: 50px 30px; }
  .container, .container-narrow { padding: 0 24px; }
  section { padding: 60px 0; }
  .hero { padding: 60px 24px; min-height: auto; }
  .invitation { padding: 60px 24px; }
  .form-row { grid-template-columns: 1fr; }
  .footer-links { gap: 20px; }
}

@media (max-width: 600px) {
  .characters-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .character-portrait { font-size: 14px; }
  .hero-buttons { flex-direction: column; align-items: stretch; }
  .btn { justify-content: center; }
  .email-signup { flex-direction: column; border-radius: var(--radius-md); }
  .email-signup button { padding: 16px; }
}
