/* Room for Both — landing page
   Palette pulled from the cover and interior art.
   Fonts are self-hosted in assets/fonts/. */

@font-face {
  font-family: "Fredoka";
  src: url("fonts/Fredoka-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Nunito";
  src: url("fonts/Nunito-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Nunito";
  src: url("fonts/Nunito-ExtraBold.ttf") format("truetype");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Nunito";
  src: url("fonts/Nunito-Italic.ttf") format("truetype");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

:root {
  --cream: #fbf5e9;
  --cream-deep: #f0e4cf;
  --paper: #fffdf8;
  --sky: #8ec8f0;
  --sky-deep: #3fa0e0;
  --sky-pale: #e7f4fc;
  --ink: #3a3a3a;
  --brown: #5c3d24;
  --soft: #8a6a4f;
  --title-red: #c62828;
  --gold: #e8b730;
  --misty: #5f88bd;
  --grass: #5a8c3e;
  --heart: #c41e3a;
  --rule: #d9c8b0;
  --focus: #3fa0e0;
  --shadow: 0 18px 40px rgba(92, 61, 36, 0.18);
  --radius: 1.25rem;
  --max: 70rem;
  --header-h: 4.25rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}

body {
  margin: 0;
  font-family: "Nunito", Georgia, "Times New Roman", serif;
  font-weight: 600;
  font-size: 1.125rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--cream);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--misty);
  text-underline-offset: 0.15em;
}

a:hover {
  color: var(--brown);
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: 0.75rem;
  top: -3.5rem;
  z-index: 100;
  background: var(--brown);
  color: var(--cream);
  padding: 0.5rem 0.9rem;
  border-radius: 0.5rem;
  text-decoration: none;
}

.skip:focus {
  top: 0.75rem;
}

.wrap {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

/* Header
   -------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 245, 233, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
}

.header-inner {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  font-family: "Fredoka", "Trebuchet MS", sans-serif;
  font-size: 1.2rem;
  color: var(--title-red);
  text-decoration: none;
  letter-spacing: -0.01em;
  flex: 0 0 auto;
}

.logo:hover { color: var(--brown); }

.nav-toggle {
  display: none;
}

.nav-btn {
  display: none;
  border: 2px solid var(--brown);
  background: var(--paper);
  color: var(--brown);
  border-radius: 0.6rem;
  padding: 0.4rem 0.7rem;
  font-family: inherit;
  font-weight: 800;
  font-size: 0.9rem;
  cursor: pointer;
}

.nav-btn:hover { background: var(--cream-deep); }

.nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 1.15rem;
  list-style: none;
  margin: 0;
  padding: 0;
  justify-content: flex-end;
}

.nav a {
  color: var(--brown);
  text-decoration: none;
  font-size: 0.98rem;
  font-weight: 800;
  padding: 0.25rem 0;
}

.nav a:hover,
.nav a:focus-visible {
  color: var(--title-red);
  text-decoration: underline;
}

@media (max-width: 860px) {
  .nav-btn { display: inline-flex; align-items: center; }
  .nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: var(--paper);
    border-bottom: 1px solid var(--rule);
    box-shadow: 0 12px 24px rgba(92, 61, 36, 0.12);
    padding: 0.5rem 1rem 1rem;
    display: none;
  }
  .nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }
  .nav a {
    display: block;
    padding: 0.7rem 0.25rem;
    border-bottom: 1px solid var(--rule);
  }
  .nav-toggle:checked ~ .nav { display: block; }
  .nav-toggle:checked ~ .nav-btn { background: var(--cream-deep); }
}

/* Shared headings
   -------------------------------------------------- */
h1, h2, h3 {
  font-family: "Fredoka", "Trebuchet MS", sans-serif;
  font-weight: 600;
  color: var(--brown);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(2.4rem, 7vw, 4.1rem);
  color: var(--title-red);
  margin: 0 0 0.4rem;
}

h2 {
  font-size: clamp(1.85rem, 4.4vw, 2.7rem);
  margin: 0 0 0.8rem;
}

h3 {
  font-size: 1.25rem;
  margin: 0 0 0.4rem;
}

.lede, .section-intro {
  font-size: 1.15rem;
  color: var(--brown);
  max-width: 42rem;
}

.section {
  padding: clamp(3rem, 7vw, 5.5rem) 0;
}

.section-head {
  margin-bottom: 2rem;
}

[id] { scroll-margin-top: calc(var(--header-h) + 0.8rem); }

/* Hero
   -------------------------------------------------- */
.hero {
  position: relative;
  background:
    linear-gradient(180deg, #74cffc 0%, #a8dbf7 52%, var(--cream) 100%);
  overflow: hidden;
  padding: clamp(1.5rem, 4vw, 3rem) 0 0;
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  z-index: 0;
  pointer-events: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
}

.hero::before {
  width: 220px;
  height: 110px;
  top: 1.5rem;
  left: -40px;
  filter: blur(0.5px);
}

.hero::after {
  width: 280px;
  height: 130px;
  top: 3rem;
  right: -60px;
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.15fr);
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center;
  padding-bottom: 2.5rem;
}

.cover-wrap {
  justify-self: center;
  width: min(100%, 28rem);
}

.cover-wrap img {
  width: 100%;
  height: auto;
  display: block;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
}

.hero-card {
  background: var(--paper);
  border-radius: var(--radius);
  padding: clamp(1.25rem, 3vw, 2.1rem);
  box-shadow: var(--shadow);
  border: 1px solid rgba(217, 200, 176, 0.7);
}

.subtitle {
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.1rem, 2.4vw, 1.35rem);
  color: var(--brown);
  margin: 0 0 0.55rem;
}

.byline {
  margin: 0 0 1rem;
  color: var(--brown);
  font-weight: 800;
  font-size: 1.15rem;
}

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 1.1rem;
}

.badge {
  display: inline-block;
  background: var(--cream);
  border: 2px solid var(--soft);
  color: var(--brown);
  border-radius: 999px;
  padding: 0.2rem 0.8rem;
  font-size: 0.95rem;
  font-weight: 800;
}

.hero-promise {
  margin: 0 0 1.25rem;
  color: var(--ink);
}

.quote {
  margin: 0 0 1.35rem;
  padding: 0.85rem 1rem;
  background: var(--sky-pale);
  border-left: 4px solid var(--gold);
  border-radius: 0 0.7rem 0.7rem 0;
  color: var(--brown);
  font-style: italic;
  font-weight: 400;
}

.quote p { margin: 0.15rem 0; }

.coming-label {
  font-family: "Fredoka", "Trebuchet MS", sans-serif;
  color: var(--title-red);
  font-size: 1.2rem;
  margin: 0 0 0.35rem;
}

.coming-note {
  margin: 0 0 0.8rem;
  color: var(--soft);
  font-size: 1rem;
}

/* Signup
   -------------------------------------------------- */
.signup {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
}

.signup label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.signup input[type="email"] {
  flex: 1 1 12rem;
  min-width: 0;
  font: inherit;
  font-size: 1rem;
  padding: 0.7rem 0.9rem;
  border: 2px solid var(--rule);
  border-radius: 0.7rem;
  background: #fff;
  color: var(--ink);
  min-height: 2.85rem;
}

.signup input[type="email"]:focus {
  border-color: var(--sky-deep);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  font-weight: 800;
  font-size: 1rem;
  line-height: 1.2;
  border: 0;
  border-radius: 0.7rem;
  padding: 0.7rem 1.15rem;
  min-height: 2.85rem;
  cursor: pointer;
  text-decoration: none;
  color: #fff;
  background: var(--title-red);
}

.btn:hover { background: #a31f1f; color: #fff; }

.btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.form-status {
  margin: 0.25rem 0 0.5rem;
  font-size: 0.98rem;
  color: var(--brown);
}

.form-status[hidden] { display: none; }

/* Coming-soon buy buttons (no href until a real URL is set) */
.btn.btn-secondary:not(.is-soon) {
  background: var(--brown);
}

.btn.btn-secondary:not(.is-soon):hover {
  background: #3f2918;
  color: #fff;
}

.btn.is-soon,
.btn[aria-disabled="true"] {
  background: var(--cream);
  color: var(--brown);
  border: 1.5px solid var(--rule);
  cursor: not-allowed;
  opacity: 1;
  box-shadow: none;
  pointer-events: none;
}

.btn.is-soon:hover,
.btn[aria-disabled="true"]:hover {
  background: var(--cream);
  color: var(--brown);
}

.soon-tag {
  display: inline-block;
  margin-left: 0.4rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--title-red);
  background: #fff;
  border-radius: 999px;
  padding: 0.15rem 0.5rem;
  line-height: 1.2;
}

/* Get the book
   -------------------------------------------------- */
.get-book {
  background: var(--sky-pale);
}

.buy-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}

.buy-card {
  background: var(--paper);
  border-radius: var(--radius);
  border: 1px solid var(--rule);
  box-shadow: 0 12px 28px rgba(92, 61, 36, 0.08);
  padding: 1.5rem 1.5rem 1.6rem;
}

.buy-card .eyebrow {
  margin: 0 0 0.3rem;
  font-family: "Fredoka", system-ui, sans-serif;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.82rem;
  color: var(--title-red);
}

.buy-card h3 {
  margin: 0 0 0.25rem;
  color: var(--title-red);
  font-size: clamp(1.45rem, 3vw, 1.85rem);
}

.buy-byline {
  margin: 0 0 0.85rem;
  color: var(--brown);
  font-weight: 800;
}

.price {
  margin: 0 0 1.1rem;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 0.75rem;
}

.price-format {
  color: var(--soft);
  font-weight: 800;
  font-size: 1rem;
}

.price-amount {
  font-family: "Fredoka", "Trebuchet MS", sans-serif;
  color: var(--brown);
  font-size: 1.7rem;
  line-height: 1;
}

.buy-card-note {
  margin: -0.35rem 0 1rem;
  color: var(--soft);
  font-size: 0.98rem;
}

.buy-actions {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.buy-actions .btn {
  width: 100%;
  justify-content: center;
  text-align: center;
  flex-wrap: wrap;
  gap: 0.25rem;
}

/* Awareness band under hero
   -------------------------------------------------- */
.awareness-band {
  background: var(--brown);
  color: var(--cream);
  padding: 1.1rem 0;
}

.awareness-band .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
}

.awareness-band p {
  margin: 0;
  font-size: 1.12rem;
  max-width: 46rem;
}

.awareness-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
}

.awareness-band a {
  color: #ffe08a;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.awareness-band a:hover { text-decoration: underline; color: #fff; }

/* Tips
   -------------------------------------------------- */
.tips {
  background: var(--cream);
}

.tips-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.tip {
  background: var(--paper);
  border-radius: var(--radius);
  padding: 1.2rem 1.25rem 1.3rem;
  border: 1px solid var(--rule);
  box-shadow: 0 8px 22px rgba(92, 61, 36, 0.06);
}

.tip-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--gold);
  color: var(--brown);
  font-weight: 800;
  font-size: 0.95rem;
  margin-bottom: 0.55rem;
}

.tip p { margin: 0; color: var(--ink); }

.disclaimer {
  margin: 1.75rem 0 0;
  font-size: 0.98rem;
  color: var(--soft);
  max-width: 46rem;
}

/* Free caregiver guide
   -------------------------------------------------- */
.guide {
  background: var(--cream-deep);
}

.guide-card {
  background: var(--paper);
  border-radius: var(--radius);
  border: 1px solid var(--rule);
  box-shadow: 0 12px 28px rgba(92, 61, 36, 0.08);
  padding: 2rem 2.1rem 2.1rem;
  max-width: 46rem;
}

.guide-copy .eyebrow {
  margin: 0 0 0.35rem;
  font-family: "Fredoka", system-ui, sans-serif;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.82rem;
  color: var(--title-red);
}

.guide-copy h2 {
  margin: 0 0 0.7rem;
  color: var(--title-red);
}

.guide-copy p {
  margin: 0 0 1rem;
  max-width: 40rem;
}

.guide-actions {
  margin: 1.2rem 0 0.7rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.buy-card-guide {
  margin: 0.9rem 0 0;
  font-size: 0.98rem;
  color: var(--soft);
}

.buy-card-guide a {
  font-weight: 800;
  color: var(--title-red);
}

.guide-meta {
  margin: 0;
  font-size: 0.98rem;
  color: var(--soft);
}

/* Support
   -------------------------------------------------- */
.support {
  background: var(--sky-pale);
}

.crisis {
  background: var(--paper);
  border: 2px solid var(--misty);
  border-radius: var(--radius);
  padding: 1.15rem 1.3rem;
  margin-bottom: 1.75rem;
  max-width: 50rem;
}

.crisis h3 {
  color: var(--title-red);
  margin-bottom: 0.35rem;
}

.crisis p { margin: 0; }

.crisis a { font-weight: 800; }

.support-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.support-card {
  background: var(--paper);
  border-radius: var(--radius);
  padding: 1.2rem 1.25rem 1.35rem;
  border: 1px solid var(--rule);
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.support-card h3 { margin: 0; }

.support-card p { margin: 0; font-size: 1.02rem; }

.support-meta {
  color: var(--soft);
  font-size: 0.95rem;
}

.support-card a.org-link {
  font-weight: 800;
  margin-top: auto;
  padding-top: 0.4rem;
}

/* About the book
   -------------------------------------------------- */
.about {
  background: var(--cream);
}

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 2rem;
  align-items: start;
}

.story p { margin: 0 0 1rem; max-width: 40rem; }

.cast {
  background: var(--paper);
  border-radius: var(--radius);
  border: 1px solid var(--rule);
  padding: 1.2rem 1.3rem;
}

.cast dl { margin: 0; }

.cast dt {
  font-family: "Fredoka", "Trebuchet MS", sans-serif;
  color: var(--title-red);
  margin-top: 0.85rem;
}

.cast dt:first-child { margin-top: 0; }

.cast dd { margin: 0.15rem 0 0; }

/* Gallery
   -------------------------------------------------- */
.peek {
  background: linear-gradient(180deg, var(--cream-deep) 0%, var(--cream) 100%);
}

.gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}

.gallery figure {
  margin: 0;
  background: transparent;
  border-radius: 0;
  overflow: visible;
  border: 0;
  box-shadow: none;
}

.gallery img {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 1;
  object-fit: cover;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.gallery figcaption {
  padding: 0.7rem 0.1rem 0;
  font-style: italic;
  font-weight: 400;
  color: var(--brown);
  font-size: 1.02rem;
}

/* Inside the book
   -------------------------------------------------- */
.inside {
  background: var(--cream);
}

.inside-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.inside-card {
  background: var(--paper);
  border-radius: var(--radius);
  padding: 1.2rem 1.25rem;
  border: 1px solid var(--rule);
}

.inside-card h3 { color: var(--brown); }

/* Why this book
   -------------------------------------------------- */
.why {
  background: var(--sky-pale);
}

.why .wrap {
  width: min(100% - 2rem, 44rem);
}

.why-card {
  max-width: none;
  background: var(--paper);
  border-radius: var(--radius);
  padding: clamp(1.4rem, 3vw, 2.2rem);
  border: 1px solid var(--rule);
  box-shadow: var(--shadow);
}

.why-card p { margin: 0 0 1rem; }

.signoff {
  margin: 0;
  font-weight: 800;
  color: var(--brown);
}

/* Footer
   -------------------------------------------------- */
.site-footer {
  background: var(--brown);
  color: #f3e6d0;
  padding: 2.4rem 0 2.6rem;
  font-size: 0.98rem;
}

.site-footer a { color: #ffe08a; }

.site-footer .wrap {
  display: grid;
  gap: 1rem;
}

.site-footer p { margin: 0 0 0.6rem; }

.site-footer small,
.legal {
  color: #e2d0b8;
  font-size: 0.92rem;
}

/* Narrow screens
   -------------------------------------------------- */
@media (max-width: 800px) {
  .hero-grid,
  .about-grid,
  .tips-grid,
  .support-list,
  .gallery,
  .inside-grid,
  .buy-grid {
    grid-template-columns: 1fr;
  }

  .cover-wrap { width: min(100%, 22rem); }
}

@media (max-width: 420px) {
  body { font-size: 1.05rem; }
  .hero-card { padding: 1.1rem 1rem 1.25rem; }
  .tip, .support-card, .inside-card, .buy-card { padding: 1rem; }
}

.support-meta a,
a[href^="tel:"] {
  white-space: nowrap;
}

.site-footer a {
  display: inline-block;
}

.subtitle {
  text-wrap: pretty;
}

@media (max-width: 800px) {
  .hero::before,
  .hero::after {
    opacity: 0.45;
    width: 140px;
    height: 70px;
  }

  .signup {
    flex-direction: column;
    align-items: stretch;
  }

  .signup input[type="email"],
  .signup .btn {
    width: 100%;
    flex: 1 1 auto;
  }

  .awareness-band a {
    white-space: normal;
  }
}