/* ============================================================
   Michael Petitpas Media — Site design system
   Modern editorial style: Playfair Display + Inter
   Indigo (#4338ca) primary · Amber (#f59e0b) accent
   ============================================================ */

:root {
  --paper:        #ffffff;
  --cream:        #fbf9f4;
  --cream-2:      #f5efe2;
  --cream-3:      #ebe2cd;
  --ink-900:      #0b1020;
  --ink-800:      #111827;
  --ink-700:      #1f2937;
  --ink-600:      #334155;
  --ink-500:      #475569;
  --ink-400:      #64748b;
  --ink-300:      #94a3b8;
  --ink-200:      #cbd5e1;
  --ink-100:      #e2e8f0;
  --ink-50:       #f1f5f9;
  --brand-50:     #eef2ff;
  --brand-100:    #e0e7ff;
  --brand-300:    #a5b4fc;
  --brand-500:    #6366f1;
  --brand:        #4338ca;
  --brand-dark:   #312e81;
  --brand-darker: #1e1b4b;
  --accent:       #f59e0b;
  --accent-dark:  #b45309;
  --accent-soft:  #fef3c7;
  --success:      #16a34a;
  --shadow-soft:  0 1px 2px rgba(15,23,42,.04), 0 8px 24px -8px rgba(15,23,42,.08);
  --shadow-lift:  0 12px 32px -12px rgba(15,23,42,.18), 0 2px 6px rgba(15,23,42,.06);
  --radius-sm:    .75rem;
  --radius:       1rem;
  --radius-lg:    1.5rem;
  --radius-xl:    2rem;
}

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Playfair+Display:wght@600;700;800;900&display=swap');

html { scroll-behavior: smooth; }

body {
  background: var(--paper);
  color: var(--ink-800);
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.font-serif      { font-family: 'Playfair Display', Georgia, serif; }
.tracking-tight2 { letter-spacing: -0.025em; }
.text-ink        { color: var(--ink-900); }
.text-muted      { color: var(--ink-500); }

/* ============================================================
   Navigation
   ============================================================ */
.mp-nav {
  background: rgba(255,255,255,0.85);
  backdrop-filter: saturate(150%) blur(14px);
  -webkit-backdrop-filter: saturate(150%) blur(14px);
  border-bottom: 1px solid rgba(15,23,42,0.06);
}
.mp-nav .brand {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 800;
  color: var(--ink-900);
  letter-spacing: -0.01em;
}
.mp-nav .brand .brand-tag {
  color: var(--brand);
  font-style: italic;
  font-weight: 700;
  margin-left: .25rem;
}
.mp-nav a.nav-link {
  color: var(--ink-700);
  font-weight: 600;
  font-size: 0.875rem;
  transition: color .15s ease;
  position: relative;
}
.mp-nav a.nav-link:hover { color: var(--brand); }
.mp-nav a.nav-link.active { color: var(--brand); }
.mp-nav a.nav-link.active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -22px;
  height: 2px; background: var(--brand); border-radius: 2px;
}

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  padding: .85rem 1.5rem;
  font-size: 0.95rem;
  transition: transform .15s ease, box-shadow .2s ease, background-color .2s ease, color .2s ease, border-color .2s ease;
  border: 1.5px solid transparent;
  white-space: nowrap;
  cursor: pointer;
}
.btn-primary {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 6px 14px -4px rgba(67,56,202,.4);
}
.btn-primary:hover { background: var(--brand-dark); transform: translateY(-1px); box-shadow: 0 10px 20px -6px rgba(67,56,202,.5); }
.btn-accent {
  background: var(--accent);
  color: var(--ink-900);
  box-shadow: 0 6px 14px -4px rgba(245,158,11,.45);
}
.btn-accent:hover { background: #d97706; color: #fff; transform: translateY(-1px); box-shadow: 0 10px 20px -6px rgba(245,158,11,.55); }
.btn-outline {
  background: transparent;
  color: var(--brand);
  border-color: var(--brand-300);
}
.btn-outline:hover { background: var(--brand-50); border-color: var(--brand); }
.btn-ghost {
  background: rgba(255,255,255,0.08);
  color: #fff;
  border-color: rgba(255,255,255,0.25);
  backdrop-filter: blur(8px);
}
.btn-ghost:hover { background: rgba(255,255,255,0.15); border-color: rgba(255,255,255,0.5); }
.btn-light {
  background: #fff;
  color: var(--ink-900);
  box-shadow: 0 6px 14px -4px rgba(15,23,42,.18);
}
.btn-light:hover { background: var(--cream); transform: translateY(-1px); }

/* ============================================================
   Eyebrow / kicker pill (section labels)
   ============================================================ */
.kicker {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: .35rem .85rem;
  border-radius: 999px;
  background: var(--brand-50);
  color: var(--brand-dark);
  border: 1px solid var(--brand-100);
}
.kicker-accent { background: var(--accent-soft); color: var(--accent-dark); border-color: rgba(180,83,9,.15); }
.kicker-cream  { background: rgba(255,255,255,0.12); color: #fde68a; border-color: rgba(253,230,138,0.2); }
.kicker-ink    { background: rgba(15,23,42,0.06); color: var(--ink-700); border-color: rgba(15,23,42,0.1); }

/* ============================================================
   Section headings
   ============================================================ */
.section-h1 {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink-900);
  line-height: 1.05;
}
.section-h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 800;
  letter-spacing: -0.015em;
  color: var(--ink-900);
  line-height: 1.1;
}
.section-lead {
  color: var(--ink-500);
  font-size: 1.0625rem;
  line-height: 1.65;
}

/* ============================================================
   Hero
   ============================================================ */
.hero {
  position: relative;
  background: radial-gradient(110% 80% at 80% -10%, rgba(99,102,241,0.25), transparent 55%),
              radial-gradient(80% 60% at 0% 110%, rgba(245,158,11,0.18), transparent 60%),
              linear-gradient(160deg, #0b1020 0%, #1e1b4b 50%, #312e81 100%);
  color: #fff;
  overflow: hidden;
  isolation: isolate;
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    radial-gradient(circle at 20% 20%, rgba(255,255,255,0.05) 0, transparent 1.5px),
    radial-gradient(circle at 70% 60%, rgba(255,255,255,0.04) 0, transparent 1.5px);
  background-size: 4px 4px, 5px 5px;
  background-position: 0 0, 2px 3px;
  opacity: 0.6; z-index: -1;
}
.hero h1 {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.02;
}
.hero .hero-amber { color: #fbbf24; font-style: italic; }

/* ============================================================
   Cards
   ============================================================ */
.card {
  background: #fff;
  border: 1px solid rgba(15,23,42,0.06);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  transition: transform .25s cubic-bezier(.4,0,.2,1), box-shadow .25s ease, border-color .25s ease;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lift);
  border-color: rgba(67,56,202,0.18);
}
.card-cream {
  background: var(--cream);
  border-color: rgba(15,23,42,0.05);
}
.card-link { display: block; text-decoration: none; color: inherit; }
.card-link:hover { color: inherit; }

.book-card .cover {
  background: var(--cream);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 4px 12px -4px rgba(15,23,42,.12);
  transition: transform .3s ease;
}
.book-card:hover .cover { transform: rotate(-1deg) scale(1.02); }

/* ============================================================
   Stats / proof bar
   ============================================================ */
.stat-bar {
  background: linear-gradient(180deg, var(--cream) 0%, var(--cream-2) 100%);
  border-top: 1px solid rgba(15,23,42,0.06);
  border-bottom: 1px solid rgba(15,23,42,0.06);
}
.stat-num {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 800;
  color: var(--brand-dark);
  letter-spacing: -0.02em;
}

/* ============================================================
   Feature icons
   ============================================================ */
.feat-icon {
  width: 56px; height: 56px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--brand-50), #fff);
  border: 1px solid var(--brand-100);
  color: var(--brand);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.35rem;
  box-shadow: inset 0 -2px 0 rgba(67,56,202,0.06);
}
.feat-icon-amber {
  background: linear-gradient(135deg, var(--accent-soft), #fff);
  border-color: rgba(245,158,11,0.25);
  color: var(--accent-dark);
}

/* ============================================================
   Footer
   ============================================================ */
.mp-footer {
  background: var(--ink-900);
  color: #cbd5e1;
}
.mp-footer .brand {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 800;
  color: #fff;
}
.mp-footer h4 {
  font-size: 11px; font-weight: 800; letter-spacing: 0.18em;
  text-transform: uppercase; color: #fbbf24; margin-bottom: 1rem;
}
.mp-footer a {
  color: #cbd5e1; font-size: 0.9rem;
  transition: color .15s ease;
}
.mp-footer a:hover { color: #fff; }
.mp-footer .legal {
  color: #64748b; font-size: 0.78rem;
}

/* ============================================================
   Misc
   ============================================================ */
.divider-ornament {
  display: flex; align-items: center; gap: 1rem;
  color: rgba(67,56,202,0.2);
  font-size: 1rem; letter-spacing: 0.5em;
  text-align: center; justify-content: center;
}
.divider-ornament::before, .divider-ornament::after {
  content: ""; flex: 1; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(67,56,202,0.2), transparent);
}

.prose-mp { color: var(--ink-700); line-height: 1.75; font-size: 1.0625rem; }
.prose-mp h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 800; color: var(--ink-900);
  font-size: 1.5rem; margin-top: 2.25rem; margin-bottom: 0.75rem;
  letter-spacing: -0.015em;
}
.prose-mp h3 {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 700; color: var(--ink-900);
  font-size: 1.2rem; margin-top: 1.75rem; margin-bottom: 0.5rem;
}
.prose-mp p  { margin: 0.85rem 0; }
.prose-mp strong { color: var(--ink-900); font-weight: 700; }
.prose-mp a {
  color: var(--brand); font-weight: 600;
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px;
}
.prose-mp a:hover { color: var(--brand-dark); }
.prose-mp ul { padding-left: 1.25rem; list-style: disc; }
.prose-mp ul li { margin: 0.4rem 0; }
.callout {
  background: var(--brand-50);
  border-left: 4px solid var(--brand);
  padding: 1.25rem 1.5rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 1.75rem 0;
}
.callout-amber {
  background: var(--accent-soft);
  border-left-color: var(--accent);
}

/* Mobile menu */
#mobileMenu.hidden { display: none; }
.mobile-menu-bg {
  background: rgba(255,255,255,0.98);
  backdrop-filter: blur(16px);
  border-top: 1px solid rgba(15,23,42,0.06);
}

/* Back-to-top */
.back-to-top {
  opacity: 0; pointer-events: none; transition: opacity 0.25s;
  background: var(--brand); color: #fff;
}
.back-to-top.visible { opacity: 1; pointer-events: auto; }
.back-to-top:hover { background: var(--brand-dark); }

/* Puzzle modal */
#puzzleModal.hidden { display: none; }
.puzzle-loading { display: flex; align-items: center; justify-content: center; min-height: 200px; background: white; }

/* Form input */
.input {
  width: 100%;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--ink-100);
  background: #fff; color: var(--ink-900);
  font-size: 1rem;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(67,56,202,0.12);
}

/* Floating share */
.share-float {
  position: fixed; bottom: 1rem; left: 1rem; z-index: 30;
  display: flex; flex-direction: column; gap: 0.5rem;
}
.share-float a {
  width: 44px; height: 44px; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--brand); color: #fff;
  box-shadow: var(--shadow-soft);
  transition: transform .15s ease, background .2s ease;
}
.share-float a:hover { background: var(--brand-dark); transform: translateY(-2px); }

/* Pretty link list (footer / sitemap) */
.link-list { display: flex; flex-direction: column; gap: 0.55rem; }
.link-list a { display: inline-flex; align-items: center; gap: 0.4rem; }
.link-list a::before {
  content: ""; width: 4px; height: 4px; border-radius: 999px;
  background: rgba(255,255,255,0.35); display: inline-block;
}

/* Accent strip */
.accent-strip {
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--brand) 20%, var(--accent) 60%, transparent);
}
