/* ---------- Design tokens ---------- */
:root {
  --color-bg: #f9eee7;
  --color-bg-blue: #cbdef1;
  --color-rose: #d7aeae;
  --color-green: #3b6250;
  --color-terracotta: #c57955;
  --color-terracotta-accessible: #a15f3f; /* darkened for AA contrast with white text */
  --color-text: #3b6250;
  --color-text-muted: #5c7d6d;
  --color-white: #ffffff;

  --font-heading: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body: 'Work Sans', -apple-system, Segoe UI, Helvetica, Arial, sans-serif;

  --container-width: 1120px;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(59, 98, 80, 0.12);
}

/* ---------- Reset ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 0.5em;
  color: var(--color-green);
}
h1 { font-size: clamp(2.4rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.8rem, 3.2vw, 2.4rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; }

.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 0.85em 1.8em;
  border-radius: 999px;
  font-weight: 600;
  font-size: 1rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease, color 0.2s ease;
}
.btn-primary {
  background: var(--color-green);
  color: var(--color-white);
}
.btn-primary:hover { background: #2d4d3f; transform: translateY(-1px); }
.btn-outline {
  background: transparent;
  border-color: var(--color-green);
  color: var(--color-green);
}
.btn-outline:hover { background: var(--color-green); color: var(--color-white); }

/* ---------- Header / Nav ---------- */
.site-header {
  background: var(--color-bg);
  border-bottom: 1px solid rgba(59, 98, 80, 0.12);
  position: sticky;
  top: 0;
  z-index: 50;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  padding-bottom: 12px;
  position: relative;
}
.nav-right {
  display: flex;
  align-items: center;
  gap: 1.8rem;
}
.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--color-green);
}
.logo-img {
  height: 40px;
  width: 40px;
}
.nav-links {
  display: flex;
  gap: 1.8rem;
}
.nav-links a {
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  padding-bottom: 3px;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s ease;
}
.nav-links a:hover,
.nav-links a[aria-current="page"] {
  border-color: var(--color-terracotta);
}
.nav-social {
  display: flex;
  gap: 1rem;
  align-items: center;
}
.nav-social a {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--color-rose);
  color: var(--color-green);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 700;
}
.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.6rem;
  color: var(--color-green);
  cursor: pointer;
}

@media (max-width: 780px) {
  .nav-toggle { display: block; }
  .nav-links {
    display: none;
    flex-direction: column;
    gap: 1.2rem;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-bg);
    padding: 1.5rem 24px 2rem;
    border-bottom: 1px solid rgba(59, 98, 80, 0.12);
  }
  .nav-links.is-open { display: flex; }
  .nav-social { display: none; }
}

/* ---------- Hero (home) ---------- */
.hero {
  position: relative;
  background: var(--color-rose);
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: stretch;
  min-height: 640px;
}
.hero::before,
.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.7' numOctaves='4' stitchTiles='stitch' result='noise'/%3E%3CfeColorMatrix in='noise' type='saturate' values='0'/%3E%3CfeComponentTransfer%3E%3CfeFuncR type='linear' slope='2.2' intercept='-0.6'/%3E%3CfeFuncG type='linear' slope='2.2' intercept='-0.6'/%3E%3CfeFuncB type='linear' slope='2.2' intercept='-0.6'/%3E%3C/feComponentTransfer%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 150px 150px;
  opacity: 0.4;
  mix-blend-mode: overlay;
}
.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 72px max(24px, calc((100vw - var(--container-width)) / 2 + 24px)) 72px 24px;
}
.hero-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-green);
  margin-bottom: 1rem;
}
.hero-copy p {
  font-size: 1.15rem;
  color: var(--color-green);
  max-width: 46ch;
}
.hero-media {
  position: relative;
  overflow: hidden;
  background: var(--color-rose);
  min-height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px;
}
.hero-media img {
  display: block;
  width: min(400px, 100%);
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: 50% 15%;
  border: 10px solid var(--color-bg);
  outline: 1px solid rgba(59, 98, 80, 0.25);
  outline-offset: -1px;
  box-shadow: var(--shadow);
}

/* ---------- Email capture ---------- */
.signup {
  background: var(--color-green);
  color: var(--color-bg);
}
.signup .container { padding-top: 56px; padding-bottom: 56px; text-align: center; }
.signup h2 { color: var(--color-white); }
.signup p { color: var(--color-bg-blue); max-width: 50ch; margin-left: auto; margin-right: auto; }
.signup-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-top: 1.5rem;
}
.signup-form input {
  padding: 0.85em 1.1em;
  border-radius: 999px;
  border: none;
  font-family: var(--font-body);
  font-size: 1rem;
  min-width: 220px;
}
.signup-form .btn-primary {
  background: var(--color-terracotta-accessible);
}
.signup-form .btn-primary:hover { background: #8f5539; }

/* ---------- Generic page hero (subpages) ---------- */
.page-hero {
  position: relative;
  overflow: hidden;
  padding: 22px 0;
  background: var(--color-rose);
}
.page-hero h1 {
  font-size: 1.6rem;
  margin-bottom: 0.2em;
}
.page-hero p {
  max-width: 60ch;
  font-size: 0.95rem;
  margin-bottom: 0;
}

.prose {
  max-width: 70ch;
  margin: 0 auto;
}

/* ---------- Section ---------- */
.section { padding: 64px 0; }
.section-alt { background: var(--color-white); }
.section-tight { padding: 40px 0; }
.page-tint { background: var(--color-rose); }

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}
@media (max-width: 780px) {
  .two-col { grid-template-columns: 1fr; }
  .hero { grid-template-columns: 1fr; min-height: auto; }
  .hero-copy { padding: 48px 24px 32px; }
  .hero-media { min-height: 280px; }
}

.media-placeholder {
  background: var(--color-bg);
  border: 1px dashed rgba(59, 98, 80, 0.35);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  text-align: center;
  padding: 2rem;
  min-height: 260px;
  font-size: 0.9rem;
}

/* ---------- Cards / grid ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.75rem;
  margin-top: 2.5rem;
}
.card {
  background: var(--color-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.card-media {
  aspect-ratio: 1 / 1;
  background: var(--color-bg-blue);
}
.card-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.card-media a {
  display: block;
  width: 100%;
  height: 100%;
}
.card-body { padding: 1.25rem 1.4rem 1.5rem; }
.card-body h3 { margin-bottom: 0.4rem; }
.card-body p { font-size: 0.95rem; color: var(--color-text-muted); margin-bottom: 0.9rem; }
.spotify-embed {
  display: block;
  width: calc(100% + 2.8rem);
  margin-left: -1.4rem;
  border-radius: 12px;
}

/* ---------- Book launch modal ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(59, 98, 80, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: modal-fade 0.25s ease;
}
.modal-overlay[hidden] { display: none; }
@keyframes modal-fade { from { opacity: 0; } to { opacity: 1; } }

.modal {
  position: relative;
  width: 100%;
  max-width: 880px;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  background: var(--color-bg);
  border-radius: var(--radius);
  box-shadow: 0 24px 60px rgba(59, 98, 80, 0.3);
}
.modal-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: stretch;
}
.modal-copy { padding: 48px 40px; align-self: center; }
.modal-copy h2 {
  font-size: 2.6rem;
  font-weight: 700;
  margin-bottom: 0.3em;
}
.modal-sub {
  font-size: 1.1rem;
  color: var(--color-text-muted);
  margin: 0 0 2rem;
}
/* Absolute fill so the tall portrait crops to the copy's height
   instead of stretching the modal past its max-height. */
.modal-media { position: relative; }
.modal-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0 var(--radius) var(--radius) 0;
}

.modal-actions { display: grid; gap: 0.9rem; }
.modal-action {
  display: block;
  padding: 1rem 1.2rem;
  border: 1px solid var(--color-green);
  border-radius: var(--radius);
  background: var(--color-white);
  font-weight: 600;
  text-align: center;
  transition: background 0.2s ease, color 0.2s ease;
}
.modal-action:hover { background: var(--color-rose); }
.modal-action-primary {
  background: var(--color-terracotta-accessible);
  border-color: var(--color-terracotta-accessible);
  color: var(--color-white);
}
.modal-action-primary:hover {
  background: var(--color-green);
  border-color: var(--color-green);
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 14px;
  z-index: 2;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  color: var(--color-green);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}
.modal-close:hover { background: var(--color-white); }

@media (max-width: 780px) {
  .modal-body { grid-template-columns: 1fr; }
  .modal-media { order: -1; position: relative; height: 240px; }
  .modal-media img {
    border-radius: var(--radius) var(--radius) 0 0;
  }
  .modal-copy { padding: 28px 24px 32px; }
  .modal-copy h2 { font-size: 2rem; }
}

/* ---------- Carousel ---------- */
.carousel {
  position: relative;
  margin-top: 2.5rem;
}
.carousel-track {
  display: flex;
  gap: 1.75rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding-bottom: 0.5rem;
  scrollbar-width: none;
}
.carousel-track::-webkit-scrollbar { display: none; }
.carousel-track .card {
  flex: 0 0 300px;
  scroll-snap-align: start;
}
.carousel-btn {
  position: absolute;
  top: 40%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: var(--color-white);
  box-shadow: var(--shadow);
  color: var(--color-green);
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}
.carousel-btn.prev { left: -18px; }
.carousel-btn.next { right: -18px; }
.carousel-btn:hover { background: var(--color-green); color: var(--color-white); }
@media (max-width: 640px) {
  .carousel-btn { display: none; }
}

/* Gallery-specific card media (art page) */
.gallery .card-media { aspect-ratio: 4 / 5; background: var(--color-bg); }

/* ---------- Book detail ---------- */
.intro-media {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.intro-media img {
  display: block;
  width: 100%;
  height: auto;
}
@media (max-width: 780px) {
  .two-col .intro-media { order: -1; }
}

.book-cover {
  aspect-ratio: 1422 / 1106;
  background: var(--color-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.book-cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.buy-note {
  max-width: 52ch;
  margin-top: 1.1rem;
  font-size: 0.9rem;
  color: var(--color-text-muted);
}
.buy-note a { text-decoration: underline; }
.buy-heading {
  font-size: 1.15rem;
  margin: 1.8rem 0 0.2rem;
}
/* Primary call to action — sits above the alternative payment methods. */
.btn-buy {
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  padding: 0.95rem 2.4rem;
}
.buy-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 1.5rem;
}

/* ---------- Testimonial / quote ---------- */
.quote {
  border-left: 4px solid var(--color-terracotta);
  padding-left: 1.5rem;
  font-family: var(--font-heading);
  font-size: 1.3rem;
  color: var(--color-green);
  margin: 2rem 0;
}

/* ---------- Forms (contact / commission inquiry) ---------- */
.form-card {
  background: var(--color-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2rem;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}
.section-divider {
  border: none;
  height: 3px;
  background: var(--color-terracotta);
  margin: 0;
}
.birth-story-details { text-align: center; margin-top: 3rem; }
.entry-steps-heading { text-align: center; }
.entry-steps {
  max-width: 60ch;
  margin: 1.5rem auto 0;
  padding: 0;
  list-style: none;
  text-align: left;
  counter-reset: entry-step;
}
.entry-steps li {
  counter-increment: entry-step;
  position: relative;
  padding-left: 2.4rem;
  margin-bottom: 1.2rem;
}
.entry-steps li::before {
  content: counter(entry-step);
  position: absolute;
  left: 0;
  top: 0;
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 50%;
  background: var(--color-green);
  color: var(--color-white);
  font-weight: 600;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.entry-cta { margin-top: 2rem; }
.entry-cta .btn-primary {
  background: var(--color-terracotta-accessible);
}
.entry-cta .btn-primary:hover { background: #8f5539; }
.entry-fine-print {
  margin: 1.2rem auto 0;
  max-width: 52ch;
  text-align: center;
}
.section-title-center {
  font-family: var(--font-heading);
  color: var(--color-green);
  text-align: center;
  margin: 0 0 1.5rem;
}
.form-intro {
  max-width: 62ch;
  margin: 0 auto 2rem;
  text-align: center;
}
.form-intro p { color: var(--color-text-muted); margin: 0 0 0.9rem; }
.form-intro p:last-child { margin-bottom: 0; }
.req { font-weight: 400; font-size: 0.85em; color: var(--color-text-muted); }

.form-row { margin-bottom: 1.2rem; display: flex; flex-direction: column; gap: 0.4rem; }
.form-row label { font-weight: 600; font-size: 0.9rem; color: var(--color-green); }
.form-row input,
.form-row select,
.form-row textarea {
  padding: 0.8em 1em;
  border-radius: 10px;
  border: 1px solid rgba(59, 98, 80, 0.3);
  font-family: var(--font-body);
  font-size: 1rem;
  background: var(--color-bg);
}
.form-row textarea { min-height: 130px; resize: vertical; }

/* ---------- Soft CTA (end of page) ---------- */
/* ---------- Footer ---------- */
.site-footer {
  background: var(--color-green);
  color: var(--color-bg);
  padding: 48px 0 28px;
}
.footer-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(249, 238, 231, 0.2);
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--color-bg);
}
.footer-brand img {
  height: 36px;
  width: 36px;
}
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}
.footer-nav a { font-weight: 500; }
.footer-social {
  display: flex;
  gap: 1rem;
}
.footer-social a {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(249, 238, 231, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
}
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1.5rem;
  font-size: 0.85rem;
  color: var(--color-bg-blue);
}
@media (max-width: 780px) {
  .footer-top {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .footer-nav {
    justify-content: center;
  }
  .footer-bottom {
    justify-content: center;
    text-align: center;
  }
}

/* ---------- About page family photo ---------- */
.about-title {
  text-align: center;
  max-width: 1000px;
  margin: 0 auto 32px;
}
.about-photo {
  max-width: 1000px;
  margin: 0 auto 56px;
}
.about-photo img {
  display: block;
  width: 100%;
  height: auto;
}
.about-text {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 3.9% 0 5.9%;
  box-sizing: border-box;
}
