/* =========================================================
   Little Night Light Books — site styles
   Palette
     navy   #1B2A4E
     cream  #F8EFE0
     gold   #E8B958
     rose   #D88B8B
   Type
     display: Fraunces (serif)
     body:    Nunito (sans)
   ========================================================= */

:root {
  --navy: #1b2a4e;
  --navy-2: #243760;
  --navy-3: #0f1a36;
  --cream: #f8efe0;
  --cream-2: #fdf7ec;
  --paper: #fbf3e3;
  --gold: #e8b958;
  --gold-soft: #ffd98a;
  --rose: #d88b8b;
  --ink: #1b2a4e;
  --ink-soft: #4a5677;
  --line: rgba(27, 42, 78, 0.14);
  --shadow-sm: 0 1px 2px rgba(15, 26, 54, 0.06), 0 2px 6px rgba(15, 26, 54, 0.06);
  --shadow-md: 0 6px 18px rgba(15, 26, 54, 0.08), 0 2px 6px rgba(15, 26, 54, 0.06);
  --shadow-lg: 0 22px 48px rgba(15, 26, 54, 0.12);
  --radius: 14px;
  --radius-lg: 22px;
  --max: 1140px;
  --max-narrow: 760px;
  --easing: cubic-bezier(0.22, 0.61, 0.36, 1);
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img,
svg {
  max-width: 100%;
  display: block;
}

a {
  color: var(--ink);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
a:hover {
  color: var(--navy-2);
}

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--navy);
  color: var(--cream);
  padding: 10px 14px;
  border-radius: 0 0 8px 0;
  z-index: 100;
}
.skip:focus {
  left: 0;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}
.wrap-narrow {
  max-width: var(--max-narrow);
  margin: 0 auto;
}
.center {
  text-align: center;
}

/* ---------- Typography ---------- */

.display,
h1,
h2,
h3 {
  font-family: "Fraunces", "Georgia", serif;
  color: var(--ink);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.12;
  margin: 0;
}
h1.display {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 600;
}
h2.display {
  font-size: clamp(1.8rem, 3.6vw, 2.6rem);
}
h3 {
  font-family: "Fraunces", "Georgia", serif;
  font-size: 1.25rem;
  margin-bottom: 0.4em;
}
em {
  font-style: italic;
  color: var(--navy-2);
}

p {
  margin: 0 0 1em;
  max-width: 65ch;
}

.eyebrow {
  font-family: "Nunito", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--rose);
  margin: 0 0 12px;
}
.eyebrow-light {
  color: var(--gold);
}

.lede {
  font-size: clamp(1.05rem, 1.4vw, 1.18rem);
  color: var(--ink-soft);
  max-width: 38em;
}

.section-sub {
  color: var(--ink-soft);
  max-width: 38em;
  margin-left: auto;
  margin-right: auto;
}
.section-sub-light {
  color: rgba(248, 239, 224, 0.78);
}

.fineprint {
  font-size: 0.85rem;
  color: var(--ink-soft);
  text-align: center;
  margin-top: 24px;
}
.fineprint-light {
  color: rgba(248, 239, 224, 0.65);
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(248, 239, 224, 0.85);
  backdrop-filter: saturate(140%) blur(8px);
  -webkit-backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.logo-mark {
  width: 36px;
  height: 36px;
  flex: none;
}
.logo-words {
  display: flex;
  flex-direction: column;
  line-height: 1;
}
.logo-line-1 {
  font-family: "Fraunces", serif;
  font-style: italic;
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--ink);
  letter-spacing: 0.02em;
}
.logo-line-2 {
  font-family: "Fraunces", serif;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--ink);
  letter-spacing: 0.04em;
  margin-top: 1px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 28px;
}
.nav a {
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
}
.nav a:not(.btn) {
  color: var(--ink);
  position: relative;
}
.nav a:not(.btn)::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 2px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 220ms var(--easing);
}
.nav a:not(.btn):hover::after {
  transform: scaleX(1);
}
.nav-cta {
  margin-left: 4px;
}

@media (max-width: 720px) {
  .nav a:not(.btn) {
    display: none;
  }
  .header-row {
    height: 64px;
  }
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: "Nunito", sans-serif;
  font-weight: 700;
  font-size: 0.98rem;
  padding: 12px 20px;
  border-radius: 999px;
  border: 1.5px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background 200ms var(--easing), color 200ms var(--easing),
    border-color 200ms var(--easing), box-shadow 200ms var(--easing),
    transform 200ms var(--easing);
  min-height: 44px;
}
.btn-lg {
  padding: 16px 28px;
  font-size: 1.02rem;
}
.btn-primary {
  background: var(--gold);
  color: var(--navy);
  border-color: var(--gold);
  box-shadow: 0 4px 14px rgba(232, 185, 88, 0.35);
}
.btn-primary:hover {
  background: var(--gold-soft);
  border-color: var(--gold-soft);
  color: var(--navy);
}
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.btn-ghost:hover {
  background: rgba(27, 42, 78, 0.06);
  border-color: rgba(27, 42, 78, 0.28);
}
.btn-quiet {
  background: rgba(27, 42, 78, 0.06);
  color: var(--ink);
  border-color: transparent;
}
.btn-quiet:hover {
  background: rgba(27, 42, 78, 0.1);
}
.btn-icon {
  width: 18px;
  height: 18px;
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  isolation: isolate;
  background: linear-gradient(180deg, #0f1a36 0%, #1b2a4e 60%, #2a3d6c 100%);
  color: var(--cream);
  overflow: hidden;
  padding: clamp(80px, 12vw, 140px) 0 clamp(96px, 14vw, 160px);
}
.hero-sky {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-stars {
  width: 100%;
  height: 100%;
}
.hero-horizon {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 30%;
  background: linear-gradient(180deg, rgba(15, 26, 54, 0) 0%, rgba(248, 239, 224, 0.06) 100%);
  pointer-events: none;
}
.lumi {
  transform-origin: center;
  animation: lumi-pulse 6s ease-in-out infinite;
}
@keyframes lumi-pulse {
  0%, 100% { opacity: 0.92; transform: translate(260px, 360px) scale(1); }
  50% { opacity: 1; transform: translate(260px, 360px) scale(1.06); }
}

.hero-inner {
  position: relative;
  z-index: 1;
  text-align: left;
  max-width: 760px;
}
.hero .display,
.hero .display em,
.hero .lede,
.hero .trust,
.hero .eyebrow {
  color: var(--cream);
}
.hero .eyebrow {
  color: var(--gold);
}
.hero .display em {
  color: var(--gold-soft);
  font-style: italic;
}
.hero .lede {
  color: rgba(248, 239, 224, 0.86);
}
.cta-row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 28px;
}
.hero .btn-ghost {
  color: var(--cream);
  border-color: rgba(248, 239, 224, 0.32);
}
.hero .btn-ghost:hover {
  background: rgba(248, 239, 224, 0.08);
  border-color: rgba(248, 239, 224, 0.55);
  color: var(--cream);
}
.trust {
  margin-top: 22px;
  font-size: 0.9rem;
  color: rgba(248, 239, 224, 0.7);
}

/* ---------- Sections ---------- */

.section {
  padding: clamp(72px, 9vw, 112px) 0;
}
.section-cream {
  background: var(--cream);
}
.section-paper {
  background: var(--paper);
  background-image:
    radial-gradient(rgba(27, 42, 78, 0.045) 1px, transparent 1px);
  background-size: 22px 22px;
}
.section-night {
  background: linear-gradient(180deg, #1b2a4e 0%, #0f1a36 100%);
  color: var(--cream);
}
.section-night h2,
.section-night h3,
.section-night p,
.section-night .display em {
  color: var(--cream);
}
.section-night .display em {
  color: var(--gold-soft);
}

.section-head {
  text-align: center;
  margin-bottom: 56px;
}
.section-head .display {
  margin: 0 auto 14px;
  max-width: 22ch;
}
.section-head-light .eyebrow {
  color: var(--gold);
}

/* ---------- Cards / grids ---------- */

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
@media (max-width: 880px) {
  .grid-3 {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  max-width: 820px;
  margin: 0 auto;
}
@media (max-width: 720px) {
  .grid-2 {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

.card {
  background: var(--cream-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px 26px;
  box-shadow: var(--shadow-sm);
  transition: transform 250ms var(--easing), box-shadow 250ms var(--easing);
}
.card:hover {
  box-shadow: var(--shadow-md);
}
.card p {
  color: var(--ink-soft);
  margin: 0;
}
.card-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(232, 185, 88, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}
.card-icon svg {
  width: 26px;
  height: 26px;
}

/* ---------- Steps ---------- */

.steps {
  list-style: none;
  margin: 0 0 40px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
@media (max-width: 880px) {
  .steps {
    grid-template-columns: 1fr;
  }
}
.steps li {
  background: rgba(248, 239, 224, 0.05);
  border: 1px solid rgba(248, 239, 224, 0.14);
  border-radius: var(--radius-lg);
  padding: 28px 26px;
}
.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--navy);
  font-family: "Fraunces", serif;
  font-weight: 700;
  font-size: 1.05rem;
  margin-bottom: 14px;
}
.steps p {
  color: rgba(248, 239, 224, 0.78);
  margin: 0;
}

/* ---------- Tiers ---------- */

.grid-3-tiers {
  align-items: stretch;
}
.tier {
  background: var(--cream-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 32px 26px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  position: relative;
}
.tier-feature {
  border-color: var(--gold);
  box-shadow: var(--shadow-md), 0 0 0 4px rgba(232, 185, 88, 0.18);
  transform: translateY(-4px);
}
.tier-tag {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 12px;
}
.tier-tag-feature {
  color: var(--rose);
}
.tier h3 {
  margin-bottom: 12px;
}
.tier-price {
  font-family: "Fraunces", serif;
  font-size: 2.2rem;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 16px;
  line-height: 1;
}
.tier-price span {
  display: block;
  font-size: 0.78rem;
  font-family: "Nunito", sans-serif;
  font-weight: 600;
  color: var(--ink-soft);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.tier ul {
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}
.tier ul li {
  position: relative;
  padding-left: 24px;
  color: var(--ink-soft);
}
.tier ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.65em;
  width: 14px;
  height: 14px;
  background: var(--gold);
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}
.tier .btn {
  margin-top: auto;
  align-self: flex-start;
}

/* ---------- Sample pages ---------- */

.sample-grid {
  align-items: stretch;
}
.sample {
  margin: 0;
}
.sample-page {
  aspect-ratio: 4 / 5;
  background: linear-gradient(180deg, #fff9ec 0%, #f6e9c8 100%);
  border: 1px solid rgba(27, 42, 78, 0.12);
  border-radius: var(--radius-lg);
  padding: 28px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
  box-shadow: var(--shadow-md);
  overflow: hidden;
}
.sample-page::before,
.sample-page::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0.45;
}
.sample-page::before {
  width: 220px;
  height: 220px;
  top: -80px;
  right: -60px;
  background: rgba(232, 185, 88, 0.6);
}
.sample-page::after {
  width: 180px;
  height: 180px;
  bottom: -70px;
  left: -50px;
  background: rgba(216, 139, 139, 0.5);
}
.sample-num {
  font-family: "Nunito", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.7rem;
  font-weight: 700;
  color: rgba(27, 42, 78, 0.55);
  margin: 0 0 14px;
  position: relative;
}
.sample-text {
  font-family: "Fraunces", serif;
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  color: var(--ink);
  line-height: 1.45;
  margin: 0;
  position: relative;
  max-width: 100%;
}
.sample-text strong {
  color: var(--rose);
  font-weight: 600;
}
.sample figcaption {
  margin-top: 14px;
  font-size: 0.92rem;
  color: var(--ink-soft);
  text-align: center;
}

/* ---------- Quotes ---------- */

.quote {
  background: var(--cream-2);
  border: 1px solid var(--line);
  border-left: 4px solid var(--gold);
  border-radius: var(--radius);
  margin: 0;
  padding: 24px 24px;
  box-shadow: var(--shadow-sm);
}
.quote p {
  font-family: "Fraunces", serif;
  font-size: 1.08rem;
  line-height: 1.55;
  margin: 0 0 12px;
  color: var(--ink);
}
.quote cite {
  font-style: normal;
  font-size: 0.9rem;
  color: var(--ink-soft);
  font-weight: 600;
}

/* ---------- FAQ ---------- */

.faq {
  display: grid;
  gap: 12px;
}
details {
  background: var(--cream-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 22px;
  transition: box-shadow 200ms var(--easing);
}
details[open] {
  box-shadow: var(--shadow-sm);
}
summary {
  cursor: pointer;
  font-family: "Fraunces", serif;
  font-size: 1.08rem;
  font-weight: 600;
  color: var(--ink);
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
summary::-webkit-details-marker {
  display: none;
}
summary::after {
  content: "";
  width: 12px;
  height: 12px;
  border-right: 2px solid var(--ink-soft);
  border-bottom: 2px solid var(--ink-soft);
  transform: rotate(45deg);
  transition: transform 220ms var(--easing);
  flex: none;
}
details[open] summary::after {
  transform: rotate(225deg);
}
details p {
  color: var(--ink-soft);
  margin: 12px 0 0;
  max-width: none;
}

/* ---------- Email form ---------- */

.email-form {
  display: flex;
  gap: 10px;
  margin: 28px auto 0;
  max-width: 520px;
}
.email-form input[type="email"] {
  flex: 1;
  font-family: "Nunito", sans-serif;
  font-size: 1rem;
  padding: 14px 18px;
  border-radius: 999px;
  border: 1.5px solid rgba(248, 239, 224, 0.4);
  background: rgba(248, 239, 224, 0.08);
  color: var(--cream);
  min-height: 44px;
}
.email-form input[type="email"]::placeholder {
  color: rgba(248, 239, 224, 0.5);
}
.email-form input[type="email"]:focus {
  background: rgba(248, 239, 224, 0.14);
  border-color: var(--gold);
  outline: none;
}
.hp {
  position: absolute;
  left: -9999px;
  top: -9999px;
}
@media (max-width: 580px) {
  .email-form {
    flex-direction: column;
  }
}

/* ---------- Footer ---------- */

.footer {
  background: var(--navy-3);
  color: rgba(248, 239, 224, 0.78);
  padding: 56px 0 32px;
}
.footer-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: start;
}
@media (max-width: 720px) {
  .footer-row {
    grid-template-columns: 1fr;
  }
}
.logo-footer .logo-line-1,
.logo-footer .logo-line-2 {
  color: var(--cream);
}
.footer-tag {
  margin-top: 10px;
  color: rgba(248, 239, 224, 0.6);
}
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 22px;
  justify-content: flex-end;
}
@media (max-width: 720px) {
  .footer-nav {
    justify-content: flex-start;
  }
}
.footer-nav a {
  color: rgba(248, 239, 224, 0.85);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
}
.footer-nav a:hover {
  color: var(--gold-soft);
}
.footer-fine {
  margin-top: 36px;
  border-top: 1px solid rgba(248, 239, 224, 0.12);
  padding-top: 18px;
  color: rgba(248, 239, 224, 0.55);
  font-size: 0.85rem;
}

/* ---------- Reveal motion ---------- */

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 700ms var(--easing), transform 700ms var(--easing);
  will-change: opacity, transform;
}
.reveal.in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
  html {
    scroll-behavior: auto;
  }
}
