@font-face { font-family: "Montserrat"; src: url("/assets/fonts/Montserrat.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Nunito"; src: url("/assets/fonts/Nunito.woff2") format("woff2"); font-weight: 200 1000; font-style: normal; font-display: swap; }
@font-face { font-family: "Nunito"; src: url("/assets/fonts/Nunito-Italic.woff2") format("woff2"); font-weight: 200 1000; font-style: italic; font-display: swap; }

/* Sparkle Bay Books — site styles
   Palette lifted from the books and the pin set: plum ink, coral action,
   gold sparkle, and the four pastel grounds. */
:root {
  --plum: #3a2054;
  --plum-2: #4e2e6e;
  --ink: #2a1d38;
  --muted: #6b5f7a;
  --coral: #e2688c;
  --coral-dark: #c94f74;
  --gold: #ffd166;
  --cream: #fffbf7;
  --paper: #ffffff;
  --lilac: #d6e7f8;
  --pink: #f7e0f0;
  --aqua: #cdebf4;
  --peach: #fceabf;
  --line: #eadff0;
  --radius: 18px;
  --shadow: 0 10px 30px rgba(58, 32, 84, 0.10), 0 2px 6px rgba(58, 32, 84, 0.06);
  --shadow-lg: 0 24px 60px rgba(58, 32, 84, 0.18);
  --font-head: "Montserrat", "Nunito", system-ui, sans-serif;
  --font-body: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  --wrap: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--cream);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--plum); }
h1, h2, h3 { font-family: var(--font-head); font-weight: 800; color: var(--plum); line-height: 1.12; margin: 0 0 .5em; text-wrap: balance; letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 4.5vw, 3.2rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
.wrap { width: min(var(--wrap), 100% - 2.5rem); margin-inline: auto; }
.narrow { max-width: 720px; }
.center { text-align: center; }
.lede { font-size: 1.15rem; color: var(--muted); max-width: 62ch; }
.center .lede { margin-inline: auto; }
.eyebrow { font-family: var(--font-head); font-weight: 700; font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; color: var(--coral); margin-bottom: .8rem; }
.skip { position: absolute; left: -999px; top: 0; background: var(--plum); color: #fff; padding: .5rem 1rem; z-index: 100; }
.skip:focus { left: 1rem; top: 1rem; }
:focus-visible { outline: 3px solid var(--coral); outline-offset: 3px; border-radius: 6px; }

/* ---------- buttons */
.btn {
  display: inline-block; font-family: var(--font-head); font-weight: 700; font-size: .95rem;
  padding: .7rem 1.25rem; border-radius: 999px; text-decoration: none; border: 2px solid transparent;
  cursor: pointer; line-height: 1.2; transition: transform .12s ease, background .15s ease, box-shadow .15s ease;
}
.btn-lg { padding: .95rem 1.6rem; font-size: 1.02rem; }
.btn-block { width: 100%; text-align: center; }
.btn-primary { background: var(--coral); color: #fff; box-shadow: 0 6px 18px rgba(226, 104, 140, .35); }
.btn-primary:hover { background: var(--coral-dark); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--plum); border-color: var(--plum); }
.btn-ghost:hover { background: var(--plum); color: #fff; }
.btn-soon { background: var(--line); color: var(--muted); cursor: default; }
.text-link { font-weight: 700; text-decoration: none; }
.text-link:hover { text-decoration: underline; }

/* ---------- header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255, 251, 247, .92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; }
.brand-mark { width: 36px; height: 36px; }
.brand-name { font-family: var(--font-head); font-weight: 800; font-size: 1.15rem; color: var(--plum); letter-spacing: -.01em; }
.brand-name span { color: var(--coral); }
.site-nav { display: flex; align-items: center; gap: 1.5rem; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: .25rem; }
.site-nav a { text-decoration: none; font-weight: 700; padding: .5rem .8rem; border-radius: 999px; color: var(--plum); }
.site-nav a:hover { background: var(--pink); }
.site-nav a[aria-current="page"] { background: var(--plum); color: #fff; }
.region { display: inline-flex; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.region button { font-family: var(--font-head); font-weight: 700; font-size: .78rem; border: 0; background: transparent; color: var(--muted); padding: .35rem .7rem; border-radius: 999px; cursor: pointer; }
.region button[aria-pressed="true"] { background: var(--plum); color: #fff; }
.nav-toggle { display: none; width: 44px; height: 44px; border: 0; background: transparent; padding: 10px; cursor: pointer; flex-direction: column; justify-content: center; gap: 5px; }
.nav-toggle span { display: block; height: 3px; background: var(--plum); border-radius: 2px; transition: transform .2s, opacity .2s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

@media (max-width: 760px) {
  .nav-toggle { display: flex; }
  .site-nav { display: none; position: absolute; left: 0; right: 0; top: 68px; background: var(--cream); border-bottom: 1px solid var(--line); padding: 1rem 1.25rem 1.25rem; flex-direction: column; align-items: stretch; gap: 1rem; box-shadow: var(--shadow); }
  .site-nav.open { display: flex; }
  .site-nav ul { flex-direction: column; }
  .site-nav a { display: block; }
  .region { align-self: flex-start; }
}

/* ---------- hero */
.hero { background: linear-gradient(135deg, var(--lilac) 0%, var(--pink) 60%, var(--peach) 100%); overflow: hidden; }
.hero-inner { display: grid; grid-template-columns: 1.1fr .9fr; gap: 2rem; align-items: center; padding: clamp(2.5rem, 6vw, 5rem) 0; }
.hero-title { font-size: clamp(2.6rem, 6vw, 4.4rem); line-height: 1.02; margin-bottom: 1rem; }
.outline { color: #fff; -webkit-text-stroke: 2.5px var(--plum); paint-order: stroke fill; text-shadow: 3px 3px 0 rgba(58, 32, 84, .18); }
.hero .lede { color: var(--plum-2); }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; }
.hero-fan { position: relative; height: 420px; }
.hero-fan img { position: absolute; width: 230px; border-radius: 8px; box-shadow: var(--shadow-lg); top: 50%; left: 50%; transform-origin: center bottom; }
.hero-fan .fan-a { transform: translate(-110%, -50%) rotate(-10deg); }
.hero-fan .fan-b { transform: translate(-50%, -54%); z-index: 2; }
.hero-fan .fan-c { transform: translate(10%, -50%) rotate(10deg); }
@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr; text-align: center; }
  .hero-actions { justify-content: center; }
  .hero .lede { margin-inline: auto; }
  .hero-fan { height: 280px; }
  .hero-fan img { width: 150px; }
  .hero-fan .fan-a { transform: translate(-100%, -50%) rotate(-10deg); }
  .hero-fan .fan-c { transform: translate(0%, -50%) rotate(10deg); }
}

/* ---------- sections */
.section { padding: clamp(2.5rem, 5vw, 4.5rem) 0; }
.section-tint { background: linear-gradient(180deg, #fff 0%, var(--aqua) 100%); }
.section-strip { padding-top: 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; }
.section-head h2 { margin: 0; }
.page-head { background: linear-gradient(135deg, var(--pink), var(--lilac)); padding: clamp(2rem, 5vw, 3.5rem) 0 clamp(1.5rem, 4vw, 2.5rem); }
.page-head h1 { margin-bottom: .4em; }
.region-hint { font-weight: 700; color: var(--plum-2); margin: 0; }
.region-hint:empty { display: none; }

/* ---------- book cards */
.book-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; }
.book-card { background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; }
.cover-link { background: var(--pink); display: block; padding: 1.25rem 1.25rem 0; }
.cover-link img { width: 100%; max-width: 260px; margin: 0 auto; border-radius: 6px 6px 0 0; box-shadow: 0 -4px 20px rgba(58, 32, 84, .15); }
.book-body { padding: 1.25rem 1.4rem 1.5rem; display: flex; flex-direction: column; flex: 1; }
.book-title { font-size: 1.15rem; margin-bottom: .2em; }
.book-sub { color: var(--muted); font-weight: 600; margin-bottom: .6rem; }
.book-meta { list-style: none; padding: 0; margin: 0 0 .8rem; display: flex; flex-wrap: wrap; gap: .4rem .8rem; font-size: .9rem; color: var(--plum-2); }
.book-meta li { background: var(--cream); border: 1px solid var(--line); border-radius: 999px; padding: .15rem .7rem; }
.book-blurb { flex: 1; font-size: .98rem; }
.book-actions { margin: .25rem 0 .35rem; }
.book-note { font-size: .85rem; color: var(--muted); margin: 0; }
.book-note:empty { display: none; }

/* books page: bigger horizontal cards */
.book-list { display: grid; gap: 1.5rem; }
.anchor-wrap { scroll-margin-top: 90px; }
.book-card--big { flex-direction: row; }
.book-card--big .cover-link { flex: 0 0 300px; padding: 1.5rem; display: flex; align-items: center; }
.book-card--big .cover-link img { max-width: 100%; border-radius: 6px; box-shadow: var(--shadow); }
.book-card--big .book-body { padding: 1.75rem 2rem; }
.book-card--big .book-title { font-size: 1.45rem; }
@media (max-width: 700px) {
  .book-card--big { flex-direction: column; }
  .book-card--big .cover-link { flex-basis: auto; padding-bottom: 0; }
  .book-card--big .cover-link img { max-width: 240px; margin: 0 auto; border-radius: 6px 6px 0 0; }
}

/* ---------- why */
.why-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1.5rem; margin-top: 2rem; }
.why { background: #fff; border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow); }
.why-icon { width: 56px; height: 56px; border-radius: 14px; background: var(--peach); display: grid; place-items: center; margin-bottom: 1rem; }
.why-icon svg { width: 36px; height: 36px; }
.why h3 { font-size: 1.05rem; }
.why p { margin: 0; font-size: .95rem; color: var(--muted); }

/* ---------- cta band */
.cta-band { background: var(--plum); color: #fff; border-radius: 28px; padding: clamp(1.75rem, 4vw, 3rem); display: grid; grid-template-columns: 1.2fr 1fr; gap: 2rem; align-items: center; }
.cta-band h2 { color: #fff; }
.cta-band p { color: #e9dcf5; }
.cta-pages { display: flex; justify-content: center; gap: .75rem; }
.cta-pages img { width: 31%; border-radius: 6px; box-shadow: 0 8px 24px rgba(0, 0, 0, .3); transform: rotate(-3deg); }
.cta-pages img:nth-child(2) { transform: rotate(2deg) translateY(-8px); }
.cta-pages img:nth-child(3) { transform: rotate(5deg); }
@media (max-width: 760px) { .cta-band { grid-template-columns: 1fr; } }

/* ---------- strip */
.strip-label { font-family: var(--font-head); font-weight: 700; font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); text-align: center; margin-bottom: 1rem; }
.strip { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.strip-item img { width: 120px; border-radius: 6px; box-shadow: var(--shadow); transition: transform .15s; }
.strip-item:hover img { transform: translateY(-4px); }

/* ---------- free pages */
.free-layout { display: grid; grid-template-columns: 1.2fr .8fr; gap: 2.5rem; align-items: start; }
.previews { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 1rem; }
.preview { margin: 0; }
.preview img { border-radius: 6px; box-shadow: var(--shadow); border: 1px solid var(--line); }
.preview figcaption { font-size: .85rem; font-weight: 700; color: var(--plum-2); margin-top: .4rem; text-align: center; }
.form-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.75rem; position: sticky; top: 90px; }
.form-card h2 { font-size: 1.4rem; }
.form-card > p { color: var(--muted); font-size: .95rem; }
@media (max-width: 860px) { .free-layout { grid-template-columns: 1fr; } .form-card { position: static; } }

/* ---------- forms */
.field { margin-bottom: 1rem; }
.field label { display: block; font-weight: 700; font-size: .92rem; margin-bottom: .3rem; color: var(--plum); }
.field .opt { font-weight: 400; color: var(--muted); }
.field input, .field textarea { width: 100%; font: inherit; padding: .7rem .9rem; border: 2px solid var(--line); border-radius: 12px; background: var(--cream); color: var(--ink); }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--plum); background: #fff; }
.field.invalid input, .field.invalid textarea { border-color: var(--coral-dark); }
.error { color: var(--coral-dark); font-size: .88rem; font-weight: 600; margin: .35rem 0 0; }
.hidden-field { position: absolute; left: -9999px; }
.fine { font-size: .8rem; color: var(--muted); margin: .8rem 0 0; }
.form.form-card { position: static; }

/* ---------- prose */
.prose p { max-width: 65ch; }
.prose h2 { margin-top: 1.5em; }
.thanks-pages { display: flex; gap: .6rem; justify-content: center; margin: 1.5rem 0 2.5rem; flex-wrap: wrap; }
.thanks-pages img { width: 110px; border-radius: 6px; box-shadow: var(--shadow); }

/* ---------- footer */
.site-footer { background: var(--plum); color: #d9c9ea; padding: 2.5rem 0 2rem; margin-top: 2rem; }
.footer-inner { display: grid; grid-template-columns: 1fr auto; gap: 1.5rem 3rem; align-items: start; }
.footer-brand { font-family: var(--font-head); font-weight: 800; color: #fff; font-size: 1.2rem; margin: 0 0 .25rem; }
.footer-tag { margin: 0; font-size: .95rem; }
.footer-links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; }
.footer-links a { color: #fff; text-decoration: none; font-weight: 700; }
.footer-links a:hover { text-decoration: underline; }
.footer-legal { grid-column: 1 / -1; font-size: .8rem; margin: 1rem 0 0; opacity: .8; }
@media (max-width: 700px) { .footer-inner { grid-template-columns: 1fr; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .strip-item img, .nav-toggle span { transition: none; }
}
