/* ============================================================
   Wisdom Beyond Books — landing page
   Palette sampled from the logo.
   ============================================================ */

:root {
  --ink:        #4a3226;
  --ink-soft:   #6b5546;
  --ink-mute:   #8b7566;

  --olive:      #97a055;
  --olive-deep: #6f7a38;
  --olive-tint: #eef0dd;

  --pink:       #e8768e;
  --pink-deep:  #cf5876;
  --pink-tint:  #fdeaf0;

  --blue-tint:  #e4f0fb;
  --lilac-tint: #f0e8f5;

  --cream:      #fbf6ec;
  --cream-deep: #f6efe1;
  --paper:      #fffdf9;

  --line:       #e9ded0;
  --shadow:     0 1px 2px rgba(74, 50, 38, .05), 0 12px 32px -12px rgba(74, 50, 38, .18);
  --shadow-sm:  0 1px 2px rgba(74, 50, 38, .05), 0 6px 18px -10px rgba(74, 50, 38, .22);

  --radius:     22px;
  --radius-sm:  14px;

  --display: "Fraunces", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --body:    "Nunito Sans", "Segoe UI", system-ui, -apple-system, sans-serif;

  --wrap: 1140px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
}

/* ---------- base ---------- */

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: clamp(1rem, .96rem + .2vw, 1.075rem);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -.01em;
  margin: 0 0 .6em;
  text-wrap: balance;
}

h1 { font-size: clamp(2.35rem, 1.6rem + 3.4vw, 4rem); }
h2 { font-size: clamp(1.85rem, 1.35rem + 2.1vw, 2.9rem); }
h3 { font-size: clamp(1.15rem, 1.05rem + .4vw, 1.35rem); }

p { margin: 0 0 1.1rem; }
p:last-child { margin-bottom: 0; }

a { color: var(--pink-deep); text-underline-offset: .18em; }
a:hover { color: var(--ink); }

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

ul { margin: 0; padding: 0; list-style: none; }

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

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

.skip-link {
  position: absolute; left: 50%; top: -100px; transform: translateX(-50%);
  z-index: 100; background: var(--ink); color: #fff;
  padding: .7rem 1.2rem; border-radius: 0 0 12px 12px; text-decoration: none;
  transition: top .2s;
}
.skip-link:focus { top: 0; color: #fff; }

/* ---------- layout ---------- */

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.wrap.narrow { max-width: 780px; }

.section { padding: clamp(4rem, 9vw, 7.5rem) 0; }
/* keep anchored sections clear of the sticky header */
[id] { scroll-margin-top: 96px; }
.section-cream { background: var(--cream); }
.section-sage  { background: var(--olive-tint); }

.section-head { max-width: 720px; margin-bottom: clamp(2.25rem, 5vw, 3.5rem); }
.section-head .body-lg { margin-top: 1.25rem; }

.eyebrow {
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--olive-deep);
  margin-bottom: .9rem;
}

.body-lg {
  font-size: clamp(1.075rem, 1rem + .35vw, 1.25rem);
  color: var(--ink-soft);
  line-height: 1.75;
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .85rem 1.6rem;
  border: 2px solid var(--pink);
  border-radius: 999px;
  background: var(--pink);
  color: #fff;
  font-family: var(--body);
  font-weight: 700;
  font-size: .98rem;
  text-decoration: none;
  cursor: pointer;
  transition: transform .18s ease, background .18s ease, border-color .18s ease, box-shadow .18s ease;
  box-shadow: var(--shadow-sm);
}
.btn:hover {
  background: var(--pink-deep);
  border-color: var(--pink-deep);
  color: #fff;
  transform: translateY(-2px);
}
.btn:active { transform: translateY(0); }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
  box-shadow: none;
}
.btn-ghost:hover {
  background: var(--paper);
  border-color: var(--olive);
  color: var(--ink);
}

.btn-small { padding: .55rem 1.15rem; font-size: .9rem; }

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 253, 249, .88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s, box-shadow .25s;
}
.site-header.is-stuck {
  border-bottom-color: var(--line);
  box-shadow: 0 8px 24px -20px rgba(74, 50, 38, .6);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 76px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  text-decoration: none;
  color: inherit;
}
.brand img { width: 52px; height: 52px; }
.brand-text { display: grid; line-height: 1; }
.brand-text strong {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--olive-deep);
}
.brand-text em {
  font-style: normal;
  font-weight: 700;
  font-size: .8rem;
  letter-spacing: .07em;
  color: var(--pink);
  margin-top: .2rem;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.2vw, 1.9rem);
}
.site-nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-weight: 600;
  font-size: .95rem;
}
.site-nav a:hover { color: var(--ink); }
.site-nav a.btn { color: #fff; }

.nav-toggle {
  display: none;
  width: 46px; height: 46px;
  align-items: center; justify-content: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  cursor: pointer;
}
.nav-toggle-bars { display: grid; gap: 5px; }
.nav-toggle-bars span {
  display: block; width: 20px; height: 2px;
  background: var(--ink); border-radius: 2px;
  transition: transform .2s, opacity .2s;
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(90% 70% at 12% 0%, var(--pink-tint) 0%, transparent 60%),
    radial-gradient(70% 60% at 95% 20%, var(--blue-tint) 0%, transparent 65%),
    linear-gradient(180deg, var(--cream) 0%, var(--paper) 100%);
  padding: clamp(3rem, 7vw, 6rem) 0 clamp(4rem, 8vw, 7rem);
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  align-items: center;
  gap: clamp(2rem, 5vw, 4.5rem);
  position: relative;
  z-index: 1;
}

.hero-lines {
  font-family: var(--display);
  font-size: clamp(1.2rem, 1rem + .8vw, 1.6rem);
  color: var(--pink-deep);
  line-height: 1.5;
  margin-bottom: 1.4rem;
}

.hero .lede {
  max-width: 34rem;
  font-size: clamp(1.05rem, 1rem + .35vw, 1.2rem);
  color: var(--ink-soft);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .85rem;
  margin-top: 2rem;
}

.hero-logo { display: grid; place-items: center; }
.hero-logo img {
  width: min(100%, 440px);
  filter: drop-shadow(0 26px 50px rgba(74, 50, 38, .16));
  animation: float 9s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-14px); }
}

/* floating petals */
.petals { position: absolute; inset: 0; pointer-events: none; }
.petal {
  position: absolute;
  width: 14px; height: 14px;
  border-radius: 50% 0 50% 50%;
  opacity: .5;
  animation: drift 14s ease-in-out infinite;
}
.petal.p1 { top: 14%; left: 6%;  background: var(--pink);   animation-delay: 0s; }
.petal.p2 { top: 68%; left: 3%;  background: var(--olive);  animation-delay: -3s; width: 10px; height: 10px; }
.petal.p3 { top: 8%;  left: 46%; background: #c5a8ce;       animation-delay: -6s; }
.petal.p4 { top: 78%; left: 42%; background: #a9cdea;       animation-delay: -2s; width: 11px; height: 11px; }
.petal.p5 { top: 22%; right: 5%; background: var(--pink);   animation-delay: -8s; width: 9px; height: 9px; }
.petal.p6 { top: 85%; right: 12%; background: var(--olive); animation-delay: -5s; }

@keyframes drift {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  50%      { transform: translate(10px, -22px) rotate(120deg); }
}

/* ---------- photos ---------- */

.photo {
  margin: 0;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--cream-deep);
  box-shadow: var(--shadow);
}
.photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .5s ease;
}
.photo:hover img { transform: scale(1.03); }

/* wide strip that sits above a block of cards */
.photo-banner {
  margin-bottom: clamp(1.75rem, 4vw, 2.75rem);
  aspect-ratio: 21 / 8;
}

/* column-height image beside a block of text */
.photo-tall { aspect-ratio: 4 / 5; height: 100%; }

/* image paired with a section heading */
.photo-wide { aspect-ratio: 4 / 3; }

.head-with-photo {
  display: grid;
  grid-template-columns: 1fr .8fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
  margin-bottom: clamp(2.25rem, 5vw, 3.5rem);
}
.head-with-photo .section-head { margin-bottom: 0; }

/* ---------- pull quote ---------- */

.pullquote {
  margin: clamp(2.5rem, 6vw, 4rem) 0 0;
  padding: clamp(2rem, 5vw, 3rem);
  background: var(--paper);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  text-align: center;
}
.pullquote blockquote {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(1.4rem, 1.1rem + 1.4vw, 2.1rem);
  line-height: 1.35;
  color: var(--ink);
}
.pullquote .hl {
  color: var(--pink-deep);
  font-style: italic;
  background: linear-gradient(transparent 62%, var(--pink-tint) 62%);
}
.pullquote figcaption {
  margin-top: 1.35rem;
  font-weight: 700;
  color: var(--olive-deep);
  letter-spacing: .01em;
}

/* ---------- cards ---------- */

.cards { display: grid; gap: clamp(1rem, 2.2vw, 1.5rem); }
.cards.two   { grid-template-columns: repeat(2, 1fr); }
.cards.three { grid-template-columns: repeat(3, 1fr); }
.cards.four  { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 3vw, 2rem);
  box-shadow: var(--shadow-sm);
  transition: transform .22s ease, box-shadow .22s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card p { color: var(--ink-soft); margin: 0; }
.card h3 { margin-bottom: .5rem; }

.card-mark {
  display: inline-grid;
  place-items: center;
  width: 40px; height: 40px;
  margin-bottom: 1rem;
  border-radius: 12px;
  background: var(--pink-tint);
  color: var(--pink-deep);
  font-size: 1.1rem;
}

.card-lg { padding: clamp(1.75rem, 4vw, 2.75rem); }
.card-lg p { font-size: 1.075rem; }

.card-tint-pink  { background: var(--pink-tint);  border-color: transparent; }
.card-tint-olive { background: var(--olive-tint); border-color: transparent; }
.card-tint-blue  { background: var(--blue-tint);  border-color: transparent; }
.card-tint-lilac { background: var(--lilac-tint); border-color: transparent; }
.cards.four .card h3 { font-family: var(--display); color: var(--ink); }

/* ---------- question band ---------- */

.question-band {
  margin-top: clamp(2rem, 4vw, 3rem);
  padding: clamp(2rem, 5vw, 3.25rem);
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--olive-tint), var(--pink-tint));
  text-align: center;
}
.question-lead { color: var(--ink-soft); margin-bottom: .4rem; }
.question {
  font-family: var(--display);
  font-size: clamp(1.6rem, 1.2rem + 2vw, 2.6rem);
  font-weight: 600;
  color: var(--olive-deep);
  margin-bottom: 1rem;
}
.question-note {
  max-width: 44rem;
  margin: 0 auto;
  color: var(--ink-soft);
}

.statement {
  margin-top: clamp(2rem, 4vw, 3rem);
  text-align: center;
  font-family: var(--display);
  font-size: clamp(1.2rem, 1rem + 1vw, 1.6rem);
  font-weight: 600;
  color: var(--pink-deep);
}

/* ---------- split ---------- */

.split {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.chips { display: flex; flex-wrap: wrap; gap: .65rem; margin-top: 1.75rem; }
.chips li {
  background: var(--paper);
  border: 1px solid rgba(151, 160, 85, .35);
  border-radius: 999px;
  padding: .55rem 1.1rem;
  font-size: .95rem;
  font-weight: 600;
  color: var(--ink-soft);
  box-shadow: var(--shadow-sm);
}

/* ---------- beliefs ---------- */

.beliefs {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
}
.beliefs li {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 1rem;
  align-items: baseline;
  padding: 1.4rem 0;
  border-bottom: 1px solid var(--line);
}
.beliefs li span {
  font-family: var(--display);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--pink);
}
.beliefs li p {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(1.15rem, 1rem + .7vw, 1.5rem);
  line-height: 1.4;
  color: var(--ink);
}

/* ---------- tabs ---------- */

.tablist {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  padding: .4rem;
  background: var(--cream);
  border-radius: 999px;
  width: fit-content;
  max-width: 100%;
  margin-bottom: 2rem;
}
.tablist button {
  appearance: none;
  border: 0;
  background: transparent;
  border-radius: 999px;
  padding: .7rem 1.5rem;
  font-family: var(--body);
  font-size: .98rem;
  font-weight: 700;
  color: var(--ink-soft);
  cursor: pointer;
  transition: background .18s, color .18s;
}
.tablist button:hover { color: var(--ink); }
.tablist button[aria-selected="true"] {
  background: var(--paper);
  color: var(--pink-deep);
  box-shadow: var(--shadow-sm);
}

.tabpanel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.75rem, 4vw, 2.75rem);
  background: var(--paper);
  box-shadow: var(--shadow-sm);
  animation: fadeIn .3s ease;
}
.tabpanel h3 { color: var(--olive-deep); margin-bottom: 1.4rem; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.ticks { display: grid; gap: .85rem; }
/* multicolumn so items read top-to-bottom, then across, without ragged rows */
.ticks.two-col { display: block; columns: 2; column-gap: 2.5rem; }
.ticks li {
  position: relative;
  padding-left: 1.9rem;
  break-inside: avoid;
  color: var(--ink-soft);
  line-height: 1.55;
}
.ticks.two-col li { margin-bottom: .85rem; }
.ticks li::before {
  content: "";
  position: absolute;
  left: 0; top: .55em;
  width: 9px; height: 9px;
  border-radius: 50% 0 50% 50%;
  background: var(--pink);
  transform: rotate(-10deg);
}
.panel-note {
  margin-top: 1.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  font-family: var(--display);
  font-size: 1.1rem;
  color: var(--ink);
}

/* ---------- contact ---------- */

.contact {
  background:
    radial-gradient(80% 60% at 10% 0%, var(--pink-tint) 0%, transparent 62%),
    radial-gradient(70% 60% at 92% 90%, var(--olive-tint) 0%, transparent 65%),
    var(--paper);
}

.contact-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.1rem;
  padding: clamp(1.6rem, 4vw, 2.5rem);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.field { display: grid; gap: .4rem; }
.field-full { grid-column: 1 / -1; }
.field label { font-weight: 700; font-size: .92rem; color: var(--ink); }

.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  font-family: var(--body);
  font-size: 1rem;
  color: var(--ink);
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: .8rem 1rem;
  transition: border-color .18s, background .18s;
}
.contact-form textarea { resize: vertical; min-height: 130px; }
.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  background: var(--paper);
  border-color: var(--olive);
}
.contact-form [aria-invalid="true"] { border-color: var(--pink-deep); background: var(--pink-tint); }

.honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin-top: .3rem;
}
.form-note { margin: 0; font-size: .92rem; color: var(--ink-mute); }
.form-note.is-error { color: var(--pink-deep); font-weight: 600; }
.form-note.is-ok { color: var(--olive-deep); font-weight: 600; }

.contact-alt { margin-top: 1.5rem; text-align: center; color: var(--ink-mute); }

/* ---------- footer ---------- */

.site-footer {
  background: var(--cream-deep);
  padding: clamp(2.5rem, 5vw, 3.5rem) 0;
  border-top: 1px solid var(--line);
}
.footer-inner { display: grid; justify-items: center; gap: 1rem; text-align: center; }
.footer-line {
  font-family: var(--display);
  font-size: 1.1rem;
  color: var(--olive-deep);
  margin: 0;
  max-width: 34rem;
}
.footer-meta { margin: 0; font-size: .9rem; color: var(--ink-mute); }

/* ---------- reveal on scroll ---------- */

/* only hide when JS is running, so content is never lost if the script fails */
.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .6s ease, transform .6s ease;
}
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- responsive ---------- */

@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; text-align: center; }
  .hero-copy { order: 2; }
  .hero-logo { order: 1; }
  .hero .lede, .hero-lines { margin-inline: auto; }
  .hero-actions { justify-content: center; }
  .hero-logo img { width: min(72%, 300px); }

  .split { grid-template-columns: 1fr; }
  .cards.three, .cards.four { grid-template-columns: repeat(2, 1fr); }
  .section-head { margin-inline: auto; }

  .head-with-photo { grid-template-columns: 1fr; }
  .photo-tall { aspect-ratio: 16 / 10; }
  .photo-banner { aspect-ratio: 16 / 7; }
}

@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  .site-nav {
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: .25rem;
    padding: 1rem var(--gutter) 1.5rem;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    display: none;
  }
  .site-nav.is-open { display: flex; }
  .site-nav a { padding: .7rem 0; font-size: 1.05rem; }
  .site-nav a.btn { margin-top: .6rem; justify-content: center; }
  .header-inner { position: relative; }
}

@media (max-width: 700px) {
  .cards.two, .cards.three, .cards.four { grid-template-columns: 1fr; }
  .ticks.two-col { columns: 1; }
  .contact-form { grid-template-columns: 1fr; }
  .beliefs li { grid-template-columns: 52px 1fr; gap: .6rem; }
  .tablist { width: 100%; justify-content: center; border-radius: var(--radius); }
  .tablist button { flex: 1 1 auto; padding: .65rem 1rem; }
  .photo-banner, .photo-tall, .photo-wide { aspect-ratio: 3 / 2; }
}

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

@media print {
  .site-header, .petals, .hero-actions, .contact-form, .nav-toggle { display: none !important; }
  .reveal { opacity: 1; transform: none; }
  body { background: #fff; }
  .tabpanel[hidden] { display: block !important; }
}
