/* Palette taken from the inspiration picture:
   cobalt night sky, cream moonlight, navy silhouettes */
:root {
  --sky: #0b3a9e;
  --sky-deep: #082c7a;
  --sea: #1f55b8;
  --navy: #071a4a;
  --cream: #f6e2bb;
  --cream-soft: #fbf1dc;
  --mist: #a9c0ea;
  --radius: 14px;
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--sans);
  background: var(--sky);
  color: var(--cream-soft);
  line-height: 1.65;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
main { flex: 1; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; letter-spacing: 0.01em; }

.container { width: min(1100px, 92%); margin: 0 auto; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(8, 44, 122, 0.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(246, 226, 187, 0.15);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
}
.logo {
  font-family: var(--serif);
  font-size: 1.6rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--cream);
  display: flex;
  align-items: center;
  gap: 10px;
}
.logo::before {
  /* tiny crescent */
  content: "";
  width: 18px;
  height: 18px;
  border-radius: 50%;
  box-shadow: -4px 2px 0 0 var(--cream);
  transform: translateX(4px);
}
.nav { display: flex; gap: 6px; }
.nav a {
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  padding: 8px 16px;
  border-radius: 999px;
  color: var(--mist);
  transition: color 0.2s, background 0.2s;
}
.nav a:hover { color: var(--cream); }
.nav a.active { color: var(--navy); background: var(--cream); }
.menu-toggle {
  display: none;
  background: none;
  border: 0;
  color: var(--cream);
  font-size: 1.6rem;
  cursor: pointer;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, var(--sky-deep) 0%, var(--sky) 70%, var(--sea) 100%);
  padding: 140px 0 220px;
}
.hero .container { position: relative; z-index: 2; }
.moon {
  position: absolute;
  top: -40px;
  right: 8%;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  box-shadow: -14px 10px 0 0 var(--cream);
  transform: rotate(-20deg);
  filter: drop-shadow(0 0 18px rgba(246, 226, 187, 0.35));
  z-index: 1;
}
.waves {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 170px;
  z-index: 1;
}
.hero h1 {
  font-size: clamp(3rem, 8vw, 6rem);
  line-height: 1;
  color: var(--cream);
  max-width: 12ch;
}
.hero p {
  font-size: 1.2rem;
  color: var(--mist);
  margin: 22px 0 36px;
  max-width: 38ch;
}
.hero-buttons { display: flex; gap: 14px; flex-wrap: wrap; }

.page-hero { padding: 110px 0 170px; }
.page-hero .moon { width: 240px; height: 240px; top: -30px; }
.page-hero h1 { font-size: clamp(2.6rem, 7vw, 4.6rem); }
.page-hero p { margin-bottom: 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  background: var(--cream);
  color: var(--navy);
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 14px 28px;
  border-radius: 999px;
  border: 1px solid var(--cream);
  transition: background 0.2s, color 0.2s, transform 0.2s;
}
.btn:hover { transform: translateY(-2px); background: #fff; }
.btn-ghost { background: transparent; color: var(--cream); }
.btn-ghost:hover { background: rgba(246, 226, 187, 0.12); }

/* ---------- Sections ---------- */
section { padding: 90px 0; }
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}
.section-head h2 { font-size: 2.8rem; color: var(--cream); }
.section-head a {
  color: var(--mist);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  text-decoration: none;
}
.section-head a:hover { color: var(--cream); }
.alt-bg { background: var(--sky-deep); }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 26px;
}

/* ---------- Cards ---------- */
.card {
  display: block;
  position: relative;
  background: rgba(7, 26, 74, 0.45);
  border: 1px solid rgba(246, 226, 187, 0.18);
  border-radius: var(--radius);
  padding: 30px;
  text-decoration: none;
  transition: transform 0.25s, border-color 0.25s, background 0.25s;
}
.card:hover {
  transform: translateY(-4px);
  border-color: var(--cream);
  background: rgba(7, 26, 74, 0.7);
}
.card h3 { font-size: 1.7rem; color: var(--cream); margin: 10px 0 6px; line-height: 1.2; }
.card p { color: var(--mist); }

.chapter-num {
  font-family: var(--serif);
  font-size: 3.2rem;
  font-style: italic;
  line-height: 1;
  color: var(--cream);
  opacity: 0.55;
}
.read-more {
  display: inline-block;
  margin-top: 18px;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--cream);
}

.inv-icon {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  font-size: 1.5rem;
  border-radius: 50%;
  background: var(--cream);
  color: var(--navy);
  margin-bottom: 16px;
}
.badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid rgba(246, 226, 187, 0.5);
  color: var(--cream);
}

/* ---------- Chapter reader ---------- */
.reader-page { background: linear-gradient(180deg, var(--sky-deep), var(--sky)); }
.reader { max-width: 700px; margin: 0 auto; padding: 90px 0; }
.eyebrow {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--mist);
}
.reader h1 {
  font-size: clamp(2.6rem, 7vw, 4.2rem);
  line-height: 1.05;
  color: var(--cream);
  margin: 10px 0 36px;
}
.chapter-body p {
  font-family: var(--serif);
  font-size: 1.35rem;
  line-height: 1.75;
  margin-bottom: 1.2em;
  color: var(--cream-soft);
}
.chapter-nav {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 60px;
  padding-top: 32px;
  border-top: 1px solid rgba(246, 226, 187, 0.25);
}

/* ---------- Footer (About) ---------- */
.site-footer {
  background: var(--navy);
  color: var(--mist);
  padding: 70px 0 28px;
  border-top: 1px solid rgba(246, 226, 187, 0.2);
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 48px; }
.site-footer h3 { color: var(--cream); margin-bottom: 12px; font-size: 1.8rem; }
.site-footer a { color: var(--cream); text-underline-offset: 4px; }
.footer-links { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 8px; }
.copyright { margin-top: 48px; font-size: 0.8rem; opacity: 0.6; }

/* ---------- Mobile ---------- */
@media (max-width: 720px) {
  .menu-toggle { display: block; }
  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--sky-deep);
    padding: 12px 4%;
  }
  .nav.open { display: flex; }
  .footer-grid { grid-template-columns: 1fr; }
  .moon, .page-hero .moon { width: 160px; height: 160px; top: -50px; right: -30px; }
  .hero { padding: 110px 0 180px; }
  section { padding: 64px 0; }
}

/* =========================================================
   Lighter theme: blue only in header, hero & footer;
   content sits on warm cream "sand".
   ========================================================= */
:root { --sand: #f8ecd4; --sand-deep: #f1dfbd; --ink: #0a2361; --ink-soft: #3d4f7c; }

body, .reader-page { background: var(--sand); color: var(--ink); }
.alt-bg { background: var(--sand-deep); }
.section-head h2 { color: var(--ink); }
.section-head a { color: var(--ink-soft); }
.section-head a:hover { color: var(--sky); }

.card {
  background: #fffaf0;
  border: 1px solid rgba(10, 35, 97, 0.15);
  box-shadow: 0 10px 30px -18px rgba(10, 35, 97, 0.45);
}
.card:hover { background: #fff; border-color: var(--sky); }
.card h3 { color: var(--ink); }
.card p { color: var(--ink-soft); }
.chapter-num { color: var(--sky); opacity: 0.8; }
.read-more { color: var(--sky); }
.inv-icon { background: var(--sky); color: var(--cream); }
.badge { border-color: rgba(10, 35, 97, 0.35); color: var(--ink); }

.eyebrow { color: var(--sky); }
.reader h1 { color: var(--ink); }
.chapter-body p { color: #1c2a4f; }
.chapter-nav { border-top-color: rgba(10, 35, 97, 0.2); }
.reader .btn { background: var(--sky); color: var(--cream); border-color: var(--sky); }
.reader .btn:hover { background: var(--navy); }
.reader .btn-ghost { background: transparent; color: var(--sky); }
.reader .btn-ghost:hover { background: rgba(11, 58, 158, 0.08); }

/* soften the hero so it reads as night, not bright blue */
.hero { background: linear-gradient(180deg, #0a2361 0%, #0b3a9e 85%); }
.site-header { background: rgba(10, 35, 97, 0.92); }
