/* StepsInFaith Books - site styles
   Colours follow the house style of the picture books:
   cream pages, warm brown rounded lettering, gold stars. */

:root {
  --cream: #FFF6DC;
  --cream-deep: #FBEBC4;
  --paper: #FFFDF6;
  --brown: #4A2E15;
  --brown-soft: #7A5436;
  --tan: #C27A2C;
  --gold: #F3C14B;
  --gold-deep: #D9A62E;
  --sky: #CFE6F5;
  --mint: #E6F5EC;
  --lavender: #EEE9F7;
  --navy: #1B2A44;
  --coral: #E8743B;
  --red: #E05A5A;
  --shadow: 0 10px 30px rgba(74, 46, 21, 0.12);
  --radius: 22px;
  --font: "Nunito", "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--brown);
  background: var(--cream);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--tan); }
h1, h2, h3 { font-weight: 900; line-height: 1.12; margin: 0 0 .4em; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.4rem, 6vw, 4.2rem); }
h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
h3 { font-size: 1.35rem; }
p { margin: 0 0 1em; }
.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }
.muted { color: var(--brown-soft); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255, 246, 220, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 2px solid var(--cream-deep);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; min-height: 68px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--brown); font-weight: 900; font-size: 1.2rem; }
.brand svg { width: 34px; height: 34px; }
.nav { display: flex; gap: 6px; flex-wrap: wrap; }
.nav a {
  text-decoration: none; color: var(--brown); font-weight: 800;
  padding: 8px 14px; border-radius: 999px; font-size: .95rem;
}
.nav a:hover { background: var(--cream-deep); }
.nav a.yt { background: var(--red); color: #fff; }
.nav a.yt:hover { background: #c94848; }
.nav a.yt .short { display: none; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: clamp(40px, 8vw, 96px) 0 clamp(32px, 6vw, 72px); }
.hero .wrap { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; }
.hero-copy p.lead { font-size: 1.2rem; max-width: 36ch; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 20px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px; font-weight: 800; text-decoration: none;
  border: 3px solid var(--brown); color: var(--brown); background: transparent;
  cursor: pointer; font-family: inherit; font-size: 1rem; transition: transform .12s ease, background .15s ease;
}
.btn:hover { transform: translateY(-2px); background: var(--cream-deep); }
.btn.primary { background: var(--brown); color: var(--cream); }
.btn.primary:hover { background: #3a2410; }
.btn.red { background: var(--red); border-color: var(--red); color: #fff; }
.btn.red:hover { background: #c94848; }
.btn.small { padding: 9px 16px; font-size: .92rem; border-width: 2px; }
.btn.amazon { background: #FF9900; border-color: #FF9900; color: #131921; }
.btn.amazon:hover { background: #f08a00; }
.btn.amazon .az {
  display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 6px;
  background: #131921; color: #FF9900; font-weight: 900; font-size: .95rem; line-height: 1;
}
.btn svg { width: 20px; height: 20px; }

.hero-art { position: relative; }
.fan { position: relative; height: 380px; }
.fan img {
  position: absolute; width: 230px; aspect-ratio: 1; object-fit: cover;
  border-radius: 18px; box-shadow: var(--shadow); border: 5px solid #fff;
  transition: transform .3s ease;
}
.fan img:nth-child(1) { left: 0; top: 60px; transform: rotate(-8deg); }
.fan img:nth-child(2) { left: 120px; top: 20px; transform: rotate(2deg); z-index: 2; }
.fan img:nth-child(3) { left: 240px; top: 70px; transform: rotate(9deg); }
.fan:hover img:nth-child(1) { transform: rotate(-11deg) translateX(-10px); }
.fan:hover img:nth-child(3) { transform: rotate(12deg) translateX(10px); }

.star { position: absolute; color: var(--gold); opacity: .9; pointer-events: none; z-index: 0; }
.cloud { position: absolute; pointer-events: none; z-index: 0; }
.fan { z-index: 1; }

/* ---------- Sections ---------- */
section { padding: clamp(40px, 6vw, 72px) 0; }
.section-head { text-align: center; max-width: 60ch; margin: 0 auto 28px; }
.section-head p { font-size: 1.1rem; color: var(--brown-soft); }

/* Audience sections: children's on cream, adult books on a calmer paper tone */
.audience.adult-books { background: var(--paper); border-top: 2px solid var(--cream-deep); border-bottom: 2px solid var(--cream-deep); }
.audience.adult-books .card { background: #fff; }
.tabs:empty { display: none; }

/* Filter tabs */
.tabs { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; margin-bottom: 28px; }
.tab {
  border: 2px solid var(--brown); background: transparent; color: var(--brown);
  padding: 9px 18px; border-radius: 999px; font-weight: 800; cursor: pointer; font-family: inherit; font-size: .95rem;
}
.tab[aria-pressed="true"] { background: var(--brown); color: var(--cream); }
.tab-tagline { text-align: center; color: var(--brown-soft); min-height: 1.6em; margin-top: -16px; margin-bottom: 24px; }

/* Book grid */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 26px; }
.card {
  background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow);
  overflow: hidden; display: flex; flex-direction: column;
  transition: transform .18s ease, box-shadow .18s ease;
  border: 2px solid rgba(74, 46, 21, 0.06);
}
.card:hover { transform: translateY(-5px); box-shadow: 0 16px 36px rgba(74, 46, 21, 0.18); }
.card .cover { aspect-ratio: 1; background: var(--cream-deep); cursor: pointer; border: 0; padding: 0; }
.card .cover img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card h3 { margin: 0; font-size: 1.25rem; }
.card .sub { color: var(--brown-soft); font-weight: 700; font-size: .95rem; margin: 0; }
.card .meta { font-size: .85rem; color: var(--brown-soft); margin: 0; }
.card .short { font-size: .95rem; margin: 6px 0 10px; }
.card-actions { margin-top: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.pill {
  display: inline-block; background: var(--gold); color: var(--brown); font-weight: 800;
  font-size: .78rem; padding: 3px 10px; border-radius: 999px; width: fit-content;
}
.pill.soon { background: var(--cream-deep); color: var(--brown-soft); }
.empty { text-align: center; color: var(--brown-soft); padding: 30px; }

/* ---------- Gift bundles ---------- */
.bundle-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 26px; }
.bundle { flex: 1 1 300px; max-width: 356px; }
.bundle-art { position: relative; height: 256px; padding-top: 22px; overflow: hidden; }
.bundle-books { display: flex; justify-content: center; align-items: center; height: 150px; }
.bundle-books img {
  height: 146px; width: auto; min-width: 97px; background: #fff; border: 4px solid #fff; border-radius: 10px;
  box-shadow: 0 8px 18px rgba(74, 46, 21, 0.22); transform: rotate(-4deg);
}
.bundle-books img + img { margin-left: -34px; transform: rotate(4deg); }
.bundle-books.many img { height: 122px; }
.bundle-books.many img + img { margin-left: -44px; transform: rotate(0); z-index: 1; }
.bundle-books.many img:last-child { transform: rotate(6deg); z-index: 0; }
.bundle-extras { position: absolute; left: 0; right: 0; bottom: 12px; display: flex; justify-content: center; gap: 14px; }
.bundle-icon {
  display: grid; place-items: center; width: 62px; height: 62px; border-radius: 50%;
  background: #fff; box-shadow: 0 5px 14px rgba(74, 46, 21, 0.18);
}
.bundle-icon svg { width: 44px; height: 44px; }
.bundle .inside { font-weight: 900; margin: 8px 0 0; font-size: .95rem; }
.bundle-list { list-style: none; margin: 0 0 12px; padding: 0; font-size: .95rem; }
.bundle-list li { position: relative; padding: 2px 0 2px 22px; }
.bundle-list li::before { content: "★"; position: absolute; left: 0; color: var(--gold-deep); }
.bundle-price { font-weight: 900; font-size: 1.3rem; margin: 0 0 8px; }
.bundle-price span { font-size: .85rem; font-weight: 700; color: var(--brown-soft); }
.pay-note { font-size: .82rem; color: var(--brown-soft); margin: 8px 0 0; }
.bundle-note { text-align: center; color: var(--brown-soft); font-size: .95rem; margin: 28px auto 0; max-width: 60ch; }

/* Coming soon mode */
.soon-ribbon {
  position: absolute; top: 18px; right: -40px; z-index: 2; width: 160px; padding: 6px 0;
  background: var(--brown); color: var(--cream); font-weight: 900; font-size: .8rem;
  letter-spacing: .04em; text-transform: uppercase; text-align: center;
  transform: rotate(35deg); box-shadow: 0 4px 10px rgba(74, 46, 21, 0.25);
}
.notify {
  margin: 32px auto 0; max-width: 620px; text-align: center; padding: clamp(20px, 4vw, 32px);
  background: var(--paper); border: 2px dashed var(--gold-deep); border-radius: var(--radius);
}
.notify h3 { margin: 0 0 6px; }
.notify p { color: var(--brown-soft); margin: 0 0 16px; }

.policy {
  margin-top: 32px; padding: clamp(20px, 4vw, 32px); background: var(--paper);
  border: 2px solid var(--cream-deep); border-radius: var(--radius);
}
.policy h3 { text-align: center; margin-bottom: 4px; }
.policy-seller { text-align: center; color: var(--brown-soft); font-size: .95rem; margin-bottom: 20px; }
.policy-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 22px; }
.policy-block h4 { margin: 0 0 6px; font-size: 1.02rem; font-weight: 900; }
.policy-block p { font-size: .93rem; margin: 0 0 8px; overflow-wrap: anywhere; }

/* ---------- Book detail dialog ---------- */
dialog.book {
  border: 0; border-radius: var(--radius); padding: 0; max-width: min(920px, 92vw);
  width: 100%; background: var(--paper); color: var(--brown); box-shadow: 0 30px 80px rgba(0,0,0,.3);
}
dialog.book::backdrop { background: rgba(60, 38, 14, .55); }
.dlg { display: grid; grid-template-columns: 1fr 1.2fr; }
.dlg .cover img { width: 100%; height: 100%; object-fit: cover; }
.dlg .text { padding: 28px 30px 30px; position: relative; }
.dlg h2 { font-size: 2rem; margin-bottom: .1em; }
.dlg .sub { color: var(--brown-soft); font-weight: 700; margin-bottom: 10px; }
.dlg .meta { font-size: .9rem; color: var(--brown-soft); }
.dlg .long { margin: 14px 0 18px; }
.dlg .close {
  position: absolute; top: 12px; right: 12px; width: 40px; height: 40px; border-radius: 50%;
  border: 0; background: var(--cream-deep); color: var(--brown); font-size: 1.3rem; cursor: pointer; font-weight: 900;
}
.dlg .close:hover { background: var(--gold); }
.shop-note { font-size: .85rem; color: var(--brown-soft); margin-top: 12px; }

/* ---------- YouTube ---------- */
.youtube { background: var(--navy); color: #fff; }
.youtube .wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.youtube h2 { color: var(--gold); }
.youtube p { color: #e8ecf4; font-size: 1.08rem; }
.yt-card {
  background: #fff; color: var(--navy); border-radius: var(--radius); padding: 26px; text-align: center;
  box-shadow: 0 20px 50px rgba(0,0,0,.35);
}
.yt-card .logo { width: 84px; height: 84px; margin: 0 auto 12px; }
.yt-card h3 { font-size: 1.5rem; margin-bottom: 4px; }
.yt-card p { color: #4a5568; margin-bottom: 16px; }
.video { margin-top: 20px; aspect-ratio: 16/9; border-radius: 16px; overflow: hidden; background: #000; }
.video iframe { width: 100%; height: 100%; border: 0; }

/* ---------- About ---------- */
.about .wrap { display: grid; grid-template-columns: .8fr 1.2fr; gap: 40px; align-items: center; }
.about-art {
  aspect-ratio: 1; border-radius: 50%; background: var(--gold); display: grid; place-items: center;
  max-width: 320px; margin: 0 auto; box-shadow: var(--shadow);
}
.about-art svg { width: 70%; height: 70%; }
.about p { font-size: 1.08rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--brown); color: var(--cream); padding: 36px 0 28px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 18px; align-items: center; }
.site-footer a { color: var(--gold); text-decoration: none; font-weight: 800; }
.site-footer .links { display: flex; gap: 16px; flex-wrap: wrap; }
.site-footer small { opacity: .8; display: block; width: 100%; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .hero .wrap, .youtube .wrap, .about .wrap { grid-template-columns: 1fr; }
  .fan { height: 300px; max-width: 420px; margin: 0 auto; }
  .fan img { width: 180px; }
  .fan img:nth-child(2) { left: 100px; }
  .fan img:nth-child(3) { left: 200px; }
  .dlg { grid-template-columns: 1fr; }
  .dlg .cover { max-height: 46vh; }
  .nav a:not(.yt) { display: none; }
  .hero-art .cloud, .hero-art .star { display: none; }
}
@media (max-width: 480px) {
  .fan { height: 240px; }
  .fan img { width: 150px; }
  .fan img:nth-child(2) { left: 80px; }
  .fan img:nth-child(3) { left: 160px; }
  .brand span { font-size: 1rem; }
  .nav a.yt .full { display: none; }
  .nav a.yt .short { display: inline; }
}
