/* ===========================================================
   A Mommy's Love — "Rooted in Light"
   Palette: amber, sky, sage, umber, cream, lavender, terracotta
   Type: Playfair Display (display/refrain) + EB Garamond (body) + Jost (ui)
   =========================================================== */

:root {
  --amber: #c98a3e;
  --amber-deep: #b3762f;
  --sky: #bfe1ee;
  --sage: #7c9473;
  --sage-deep: #5c7154;
  --umber: #3e2a1e;
  --umber-deep: #2b1c13;
  --cream: #fbf3e7;
  --cream-deep: #f3e6d3;
  --lavender: #b6a0c4;
  --terracotta: #c17755;
  --ink: #2e2016;

  --font-display: "Playfair Display", Georgia, "Times New Roman", serif;
  --font-body: "EB Garamond", Georgia, "Times New Roman", serif;
  --font-ui: "Jost", "Helvetica Neue", Arial, sans-serif;

  --max-width: 1240px;
  --pad-inline: 40px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

.container {
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--pad-inline);
}

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

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--umber);
  color: var(--cream);
  padding: 12px 20px;
  z-index: 200;
  font-family: var(--font-ui);
}
.skip-link:focus {
  left: 12px;
  top: 12px;
}

a { color: inherit; }

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

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  margin: 0 0 0.5em;
  color: var(--umber);
}

h2 { font-size: clamp(1.9rem, 3.2vw, 2.6rem); line-height: 1.2; }

p { margin: 0 0 1.1em; }

.eyebrow {
  font-family: var(--font-ui);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--sage-deep);
  margin-bottom: 0.9em;
}
.eyebrow--light { color: var(--cream); opacity: 0.85; }

.section-head { max-width: 680px; margin-bottom: 3rem; }
.section-sub { font-size: 1.05rem; color: var(--umber); opacity: 0.75; max-width: 46ch; }

.pull-line {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.3rem;
  color: var(--amber-deep);
  margin: 1.4em 0;
}
.pull-line--light { color: var(--amber); }

.tag-row { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.6rem; }
.tag {
  font-family: var(--font-ui);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.45em 0.9em;
  border: 1px solid rgba(62,42,30,0.25);
  border-radius: 999px;
  color: var(--umber);
  opacity: 0.85;
}
.tag--accent { background: var(--terracotta); color: var(--cream); border-color: var(--terracotta); opacity: 1; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-ui);
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.95em 1.9em;
  border-radius: 3px;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), background 0.35s var(--ease);
  border: 1px solid transparent;
}
.btn--primary {
  background: var(--umber);
  color: var(--cream);
}
.btn--primary:hover {
  background: var(--umber-deep);
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(43,28,19,0.25);
}
.btn--ghost {
  border-color: rgba(46,32,22,0.4);
  color: var(--umber);
  background: transparent;
}
.btn--ghost:hover {
  border-color: var(--umber);
  transform: translateY(-2px);
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(251,243,231,0.88);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(62,42,30,0.08);
}
.header-inner {
  max-width: var(--max-width);
  margin-inline: auto;
  padding: 1.1rem var(--pad-inline);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.wordmark {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 600;
  font-size: 1.25rem;
  text-decoration: none;
  color: var(--umber);
}
.primary-nav {
  display: flex;
  align-items: center;
  gap: 1.9rem;
  font-family: var(--font-ui);
  font-size: 0.82rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.primary-nav a {
  text-decoration: none;
  color: var(--umber);
  opacity: 0.8;
  transition: opacity 0.25s;
  margin-left: 1.9rem; /* fallback for browsers without flexbox gap support */
}
.primary-nav a:first-child { margin-left: 0; }
.primary-nav a:hover { opacity: 1; }
.nav-cta {
  background: var(--terracotta);
  color: var(--cream) !important;
  padding: 0.55em 1.1em;
  border-radius: 999px;
  opacity: 1 !important;
}
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  width: 22px; height: 2px;
  background: var(--umber);
  display: block;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background-size: cover;
  background-position: center 58%;
  text-align: center;
  overflow: hidden;
}
.hero-scrim {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(251,243,231,0.15) 0%, rgba(251,243,231,0.55) 62%, rgba(251,243,231,0.92) 100%);
}
.hero-content {
  position: relative;
  max-width: 680px;
  padding: 0 1.5rem;
}
.hero-title {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 600;
  font-size: clamp(3rem, 8vw, 5rem);
  margin-bottom: 0.15em;
}
.hero-subtitle {
  font-family: var(--font-ui);
  font-size: 0.95rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--sage-deep);
  margin-bottom: 1.4em;
}
.hero-blurb {
  font-size: 1.15rem;
  max-width: 52ch;
  margin-inline: auto;
  margin-bottom: 2em;
}
.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}
.hero-actions .btn { margin: 0 0.5rem; }
.scroll-cue {
  position: absolute;
  bottom: 2.2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--umber);
  text-decoration: none;
  font-family: var(--font-ui);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0.7;
  animation: floatCue 2.6s ease-in-out infinite;
}
@keyframes floatCue {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(6px); }
}

/* ---------- Divider (signature cross-section motif) ---------- */
.divider { line-height: 0; background: var(--cream); }
.divider-svg { width: 100%; height: 60px; display: block; }
.divider-fill { fill: var(--cream-deep); }
.divider-root { fill: none; stroke: var(--sage-deep); stroke-width: 1.5; opacity: 0.35; }
.divider--flip svg { transform: scaleY(-1); }
.divider--flip .divider-fill { fill: var(--cream); }

/* ---------- Sections (generic) ---------- */
.section { padding: 6rem 0; }

/* ---------- About the Book ---------- */
.about { background: var(--cream-deep); }
.about-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 4.5rem;
  align-items: center;
}
.about-media { position: relative; }
.about-cover {
  border-radius: 4px;
  box-shadow: 0 30px 60px rgba(46,32,22,0.22);
  width: 78%;
}
.mockup-wrap {
  position: absolute;
  right: -6%;
  bottom: -8%;
  width: 55%;
}
.mockup-wrap img { border-radius: 4px; }
.floaty { animation: floatMockup 6s ease-in-out infinite; }
@keyframes floatMockup {
  0%, 100% { transform: translateY(0) rotate(-1.2deg); }
  50% { transform: translateY(-14px) rotate(-1.2deg); }
}
.asset-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0.3em;
  padding: 1.5em;
  border: 1.5px dashed rgba(62,42,30,0.35);
  border-radius: 4px;
  background: rgba(251,243,231,0.6);
  font-family: var(--font-ui);
  font-size: 0.78rem;
  color: var(--umber);
  min-height: 140px;
}
/* The [hidden] attribute is how JS marks a placeholder as "not needed" once
   its real image has loaded successfully. But `.asset-placeholder` above
   sets `display: flex` with the same specificity as the browser's default
   `[hidden] { display: none }` rule — and author styles always win that
   tie, so the placeholder was staying visible even when hidden was set.
   This rule adds the extra specificity needed for `hidden` to actually win. */
.asset-placeholder[hidden] { display: none; }
.asset-placeholder small { opacity: 0.6; font-size: 0.68rem; }
.asset-placeholder--inline { min-height: 60px; padding: 0.8em 1.2em; }

.about-copy .tag-row { margin-top: 1.8rem; }

/* ---------- Many Forms of Love ---------- */
.forms { background: var(--cream); }
.forms-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1.4rem;
}
.form-card {
  position: relative;
  border-radius: 6px;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  box-shadow: 0 12px 28px rgba(46,32,22,0.12);
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.form-card img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center;
}
.form-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 36px rgba(46,32,22,0.2);
}
.form-card-label {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 0.9em 1em 0.8em;
  background: linear-gradient(0deg, rgba(43,28,19,0.82) 0%, rgba(43,28,19,0) 100%);
  color: var(--cream);
  display: flex;
  flex-direction: column;
}
.form-card-label span {
  font-family: var(--font-ui);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.85;
}
.form-card-label small {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.02rem;
}

/* ---------- Excerpt ---------- */
.excerpt { background: var(--cream-deep); }
.excerpt-spread {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem;
  box-shadow: 0 30px 70px rgba(46,32,22,0.22);
  border-radius: 6px;
  overflow: hidden;
}
.excerpt-spread img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Meet the Author ---------- */
.author {
  position: relative;
  background-size: cover;
  background-position: center;
  color: var(--cream);
}
.author-scrim {
  position: absolute; inset: 0;
  background: linear-gradient(100deg, rgba(43,28,19,0.86) 0%, rgba(43,28,19,0.72) 45%, rgba(43,28,19,0.55) 100%);
}
.author-grid {
  position: relative;
  display: grid;
  grid-template-columns: 0.6fr 1.4fr;
  gap: 4rem;
  align-items: center;
}
.author-photo-wrap img {
  border-radius: 6px;
  box-shadow: 0 30px 60px rgba(0,0,0,0.35);
  aspect-ratio: 4/5;
  object-fit: cover;
  width: 100%;
}
.author-photo-wrap .asset-placeholder {
  aspect-ratio: 4/5;
  border-color: rgba(251,243,231,0.35);
  background: rgba(251,243,231,0.08);
  color: var(--cream);
}
.light-heading { color: var(--cream); }
.light-text { color: var(--cream); opacity: 0.92; }
.social-note { font-family: var(--font-ui); font-size: 0.78rem; letter-spacing: 0.05em; opacity: 0.6; margin-top: 1.5rem; }

/* ---------- Journal ---------- */
.journal { background: var(--cream); }
.journal-frame {
  max-width: 640px;
  margin-inline: auto;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 30px 60px rgba(46,32,22,0.2);
}

/* ---------- Closing Banner ---------- */
.banner {
  position: relative;
  background: var(--umber);
  color: var(--cream);
  text-align: center;
  padding: 5.5rem 0;
}
.banner h2 { color: var(--cream); }
.banner p { opacity: 0.82; max-width: 46ch; margin-inline: auto; margin-bottom: 2em; }
.banner .btn--primary {
  background: var(--terracotta);
  color: var(--cream);
}
.banner .btn--primary:hover {
  background: var(--amber);
  box-shadow: 0 10px 24px rgba(0,0,0,0.35);
}
.banner-divider-top, .banner-divider-bottom { line-height: 0; }
.banner-divider-top .divider-fill { fill: var(--umber); }
.banner-divider-top .divider-root { stroke: var(--cream); opacity: 0.25; }
.banner-divider-bottom svg { transform: scaleY(-1); }
.banner-divider-bottom .divider-fill { fill: var(--cream-deep); }
.banner-divider-bottom .divider-root { stroke: var(--umber); opacity: 0.2; }

/* ---------- Get Publication Updates ---------- */
.updates { background: var(--cream-deep); text-align: center; }
.updates-inner { max-width: 620px; }
.updates-form {
  display: flex;
  gap: 0.7rem;
  margin: 2rem 0 1rem;
  flex-wrap: wrap;
  justify-content: center;
}
.updates-form input {
  flex: 1 1 280px;
  font-family: var(--font-body);
  font-size: 1.05rem;
  padding: 0.85em 1.1em;
  border: 1px solid rgba(62,42,30,0.3);
  border-radius: 3px;
  background: var(--cream);
  color: var(--ink);
}
.updates-form input:focus { outline: 2px solid var(--terracotta); outline-offset: 2px; }
.fine-print { font-family: var(--font-ui); font-size: 0.75rem; opacity: 0.6; }

.retailer-row { margin-top: 3.5rem; padding-top: 2.5rem; border-top: 1px solid rgba(62,42,30,0.15); }
.retailer-label {
  font-family: var(--font-ui);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.55;
  margin-bottom: 1.2rem;
}
.retailer-logos {
  display: flex;
  justify-content: center;
  gap: 2.4rem;
  flex-wrap: wrap;
}
.retailer-logo {
  filter: grayscale(1);
  opacity: 0.45;
  height: 32px;
  display: flex;
  align-items: center;
}
.retailer-logo img { max-height: 28px; }
.retailer-logo .asset-placeholder--inline {
  border: none;
  min-height: auto;
  padding: 0;
  font-family: var(--font-ui);
  font-size: 0.85rem;
  letter-spacing: 0.04em;
}

/* ---------- Footer ---------- */
.site-footer { background: var(--umber-deep); color: var(--cream); padding-top: 4rem; }
.footer-inner {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 2rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(251,243,231,0.15);
}
.wordmark--footer {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.3rem;
  margin: 0 0 0.3em;
}
.footer-tagline { font-size: 0.9rem; opacity: 0.7; margin: 0; }
.footer-nav {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  font-family: var(--font-ui);
  font-size: 0.85rem;
  letter-spacing: 0.03em;
}
.footer-nav a { text-decoration: none; opacity: 0.75; }
.footer-nav a:hover { opacity: 1; }
.footer-social { display: flex; align-items: center; gap: 1rem; justify-content: flex-end; }
.footer-social img { width: 20px; height: 20px; filter: invert(1); opacity: 0.75; }
.social-note--footer { font-family: var(--font-ui); font-size: 0.75rem; opacity: 0.5; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem var(--pad-inline);
  font-family: var(--font-ui);
  font-size: 0.78rem;
  opacity: 0.6;
}
.return-top { text-decoration: none; opacity: 0.8; }

/* ---------- Scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 900px) {
  :root { --pad-inline: 24px; }

  .primary-nav {
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--cream);
    flex-direction: column;
    align-items: flex-start;
    gap: 1.2rem;
    padding: 1.5rem 24px 2rem;
    border-bottom: 1px solid rgba(62,42,30,0.08);
    display: none;
  }
  .primary-nav.open { display: flex; }
  .nav-toggle { display: flex; }

  .about-grid, .author-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .about-cover { width: 60%; margin-inline: auto; }
  .mockup-wrap { position: static; width: 60%; margin: 1.5rem auto 0; }

  .forms-grid { grid-template-columns: repeat(2, 1fr); }
  .excerpt-spread { grid-template-columns: 1fr; }

  .footer-inner { grid-template-columns: 1fr; text-align: left; }
  .footer-social { justify-content: flex-start; }
}

@media (max-width: 560px) {
  .section { padding: 4rem 0; }
  .hero-actions { flex-direction: column; width: 100%; }
  .hero-actions .btn { width: 100%; text-align: center; }
  .forms-grid { grid-template-columns: repeat(2, 1fr); gap: 0.9rem; }
  .updates-form { flex-direction: column; }
  .footer-bottom { flex-direction: column; gap: 0.8rem; text-align: center; }
}
