/* ============================================================
   KripsaVerse Design System
   Palette: Deep Space Navy + Warm Amber/Gold + Clean White
   Fonts: Fraunces (display) + DM Sans (body)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300;0,9..144,400;0,9..144,600;0,9..144,700;1,9..144,400&family=DM+Sans:wght@300;400;500;600&display=swap');

/* ── Tokens ── */
:root {
  --navy:       #0B1F3A;
  --navy-mid:   #132A4E;
  --navy-light: #1E3A5F;
  --amber:      #F5A623;
  --amber-dark: #D4891A;
  --amber-pale: #FEF3DC;
  --white:      #FFFFFF;
  --off-white:  #F8F7F4;
  --text-dark:  #1A1A2E;
  --text-mid:   #4A5568;
  --text-light: #718096;
  --border:     #E2E8F0;

  --font-display: 'Fraunces', Georgia, serif;
  --font-body:    'DM Sans', system-ui, sans-serif;

  --radius-sm:  8px;
  --radius-md:  16px;
  --radius-lg:  24px;
  --radius-xl:  40px;

  --shadow-sm:  0 2px 8px rgba(11,31,58,0.08);
  --shadow-md:  0 8px 32px rgba(11,31,58,0.12);
  --shadow-lg:  0 20px 60px rgba(11,31,58,0.18);

  --transition: 0.25s ease;
  --max-width:  1200px;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-body);
  color: var(--text-dark);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* ── Typography ── */
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.2; font-weight: 600; }

h1 { font-size: clamp(1.8rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.4rem); }
h3 { font-size: clamp(1.1rem, 2.5vw, 1.6rem); }
h4 { font-size: 1rem; }

p { font-size: 1.05rem; line-height: 1.75; color: var(--text-mid); }

.lead { font-size: 1.2rem; color: var(--text-mid); max-width: 640px; }

/* ── Layout ── */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }

section { padding: 64px 0; }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: var(--radius-xl);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
  text-decoration: none;
}

.btn-primary {
  background: var(--amber);
  color: var(--navy);
}
.btn-primary:hover {
  background: var(--amber-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border: 2px solid rgba(255,255,255,0.5);
}
.btn-outline:hover {
  border-color: var(--amber);
  color: var(--amber);
  transform: translateY(-2px);
}

.btn-dark {
  background: var(--navy);
  color: var(--white);
}
.btn-dark:hover {
  background: var(--navy-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* ── Navigation ── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 0 24px;
  height: 68px;
  display: flex;
  align-items: center;
  transition: background var(--transition), box-shadow var(--transition);
}

.nav.scrolled {
  background: rgba(11,31,58,0.96);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-md);
}

.nav-inner {
  max-width: var(--max-width);
  width: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: -0.5px;
}
.nav-logo span { color: var(--amber); }

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

.nav-links a {
  color: rgba(255,255,255,0.8);
  font-size: 0.95rem;
  font-weight: 500;
  transition: color var(--transition);
}
.nav-links a:hover { color: var(--amber); }

.nav-cta {
  background: var(--amber);
  color: var(--navy) !important;
  padding: 8px 22px;
  border-radius: var(--radius-xl);
  font-weight: 600 !important;
}
.nav-cta:hover { background: var(--amber-dark) !important; color: var(--navy) !important; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: var(--transition);
}

/* ── Hero ── */
.hero {
  min-height: 80vh;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 60%, #0F2952 100%);
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding-top: 68px;
}

.stars-canvas {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 48px 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(245,166,35,0.15);
  border: 1px solid rgba(245,166,35,0.3);
  border-radius: var(--radius-xl);
  padding: 6px 16px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--amber);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 24px;
}

.hero-title {
  color: var(--white);
  margin-bottom: 24px;
}
.hero-title .accent { color: var(--amber); font-style: italic; }

.hero-desc {
  color: rgba(255,255,255,0.75);
  font-size: 1.1rem;
  margin-bottom: 40px;
  max-width: 480px;
}

.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }

.hero-image-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
}

.book-float {
  position: relative;
  animation: float 6s ease-in-out infinite;
}

.book-float img {
  width: 280px;
  max-width: 100%;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
}

.book-badge {
  position: absolute;
  top: -16px;
  right: -16px;
  background: var(--amber);
  color: var(--navy);
  border-radius: 50%;
  width: 88px;
  height: 88px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 0.65rem;
  font-weight: 700;
  text-align: center;
  line-height: 1.3;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: var(--shadow-md);
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-16px); }
}

/* ── Section headers ── */
.section-header { text-align: center; margin-bottom: 56px; }
.section-header h2 { margin-bottom: 16px; }
.section-eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--amber);
  margin-bottom: 12px;
}

/* ── Cards ── */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
  border: 1px solid var(--border);
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
}

/* ── Email opt-in band ── */
.optin-band {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 100%);
  padding: 80px 24px;
  text-align: center;
}
.optin-band h2 { color: var(--white); margin-bottom: 16px; }
.optin-band p  { color: rgba(255,255,255,0.75); margin-bottom: 40px; }

.optin-form {
  display: flex;
  gap: 12px;
  max-width: 480px;
  margin: 0 auto;
  flex-wrap: wrap;
  justify-content: center;
}
.optin-form input {
  flex: 1;
  min-width: 240px;
  padding: 14px 20px;
  border-radius: var(--radius-xl);
  border: none;
  font-family: var(--font-body);
  font-size: 1rem;
  outline: none;
}

/* ── Footer ── */
.footer {
  background: var(--navy);
  color: rgba(255,255,255,0.6);
  padding: 56px 24px 32px;
}
.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.footer-brand h3 {
  font-family: var(--font-display);
  color: var(--white);
  font-size: 1.4rem;
  margin-bottom: 12px;
}
.footer-brand h3 span { color: var(--amber); }
.footer-brand p { font-size: 0.9rem; max-width: 280px; }

.footer-col h4 { color: var(--white); font-size: 0.9rem; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 16px; }
.footer-col a { display: block; font-size: 0.9rem; color: rgba(255,255,255,0.6); margin-bottom: 10px; transition: color var(--transition); }
.footer-col a:hover { color: var(--amber); }

.footer-bottom {
  max-width: var(--max-width);
  margin: 32px auto 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  flex-wrap: wrap;
  gap: 12px;
}

/* ── Page hero (inner pages) ── */
.page-hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 100%);
  padding: 110px 24px 56px;
  text-align: center;
}
.page-hero h1 { color: var(--white); margin-bottom: 16px; }
.page-hero p  { color: rgba(255,255,255,0.75); max-width: 560px; margin: 0 auto; }

/* ── Diagonal divider ── */
.divider-wave {
  height: 60px;
  background: var(--off-white);
  clip-path: ellipse(100% 100% at 50% 100%);
}

/* ── Utility ── */
.bg-offwhite { background: var(--off-white); }
.bg-navy     { background: var(--navy); }
.text-center { text-align: center; }
.text-amber  { color: var(--amber); }
.text-white  { color: var(--white); }
.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-40 { margin-top: 40px; }
.mb-8  { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-40 { margin-bottom: 40px; }

/* ── Grid helpers ── */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }

/* ── Responsive ── */
@media (max-width: 900px) {
  .hero-inner        { grid-template-columns: 1fr; text-align: center; gap: 32px; }
  .hero-desc         { margin: 0 auto 32px; }
  .hero-actions      { justify-content: center; }
  .hero-image-wrap   { order: -1; }
  .book-float img    { width: 200px; }
  .footer-inner      { grid-template-columns: 1fr 1fr; }
  .grid-3            { grid-template-columns: repeat(2, 1fr); }
  .grid-4            { grid-template-columns: repeat(2, 1fr); }

  /* Collapse all inline grids on tablet/mobile */
  [style*="grid-template-columns:1fr 1fr"],
  [style*="grid-template-columns: 1fr 1fr"],
  [style*="grid-template-columns:auto 1fr"],
  [style*="grid-template-columns: auto 1fr"] {
    grid-template-columns: 1fr !important;
    gap: 32px !important;
  }
}

@media (max-width: 640px) {
  section            { padding: 40px 0; }
  .hero              { min-height: auto; }
  .hero-inner        { padding: 32px 20px; gap: 24px; }
  .book-float img    { width: 160px; }
  .page-hero         { padding: 96px 20px 40px; }
  .optin-band        { padding: 48px 20px; }
  .nav-links         { display: none; }
  .nav-links.open    { display: flex; flex-direction: column; position: fixed; inset: 68px 0 0; background: #060F1D; border-top: 2px solid var(--amber); padding: 40px 24px; gap: 24px; z-index: 99; }
  .nav-toggle        { display: flex; }
  .footer-inner      { grid-template-columns: 1fr; gap: 32px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .footer-bottom     { flex-direction: column; text-align: center; }
  .optin-form input  { min-width: 100%; }
  .btn               { padding: 12px 24px; font-size: 0.95rem; }

  /* Collapse ALL inline grids on mobile */
  [style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
    gap: 24px !important;
  }

  /* Fix overflowing images */
  img { max-width: 100% !important; width: auto !important; }
  .book-float img { width: 160px !important; }
  [style*="width:280px"] { width: 100% !important; }
}
