/* ============================================================
   The Wonder Log — shared site stylesheet
   Palette and type match the books and the printables landing page.
   ============================================================ */

:root{
  --cream:#f7f0e4;
  --cream-deep:#efe4d2;
  --ink:#3d2b3d;
  --ink-soft:#6b5567;
  --terra:#bd5b38;
  --terra-dark:#9e4728;
  --rule:#c6b8a4;
  --dusk:#232a45;
  --dusk-deep:#171d33;
  --slab:'Roboto Slab',Rockwell,'Bookman Old Style',Georgia,serif;
  --serif:'Source Serif 4',Georgia,'Times New Roman',serif;
  --maxw:1080px;
}

*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{
  margin:0;
  background:var(--cream);
  color:var(--ink);
  font-family:var(--serif);
  font-size:18px;
  line-height:1.6;
}
img{max-width:100%;height:auto;display:block}
.wrap{max-width:var(--maxw);margin:0 auto;padding-inline:20px}
a{color:var(--terra-dark)}
h1,h2,h3{font-family:var(--slab)}

/* ---------- nav ---------- */
.sitenav{
  background:var(--cream-deep);
  border-bottom:1px solid var(--rule);
  padding-top:env(safe-area-inset-top,0px);
}
.sitenav .wrap{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:space-between;
  gap:10px 18px;
  padding-block:14px;
}
.wordmark{
  font-family:var(--slab);
  font-weight:800;
  font-size:1.15rem;
  color:var(--ink);
  text-decoration:none;
  letter-spacing:.01em;
}
.wordmark:hover{color:var(--terra-dark)}
.navlinks{
  display:flex;
  flex-wrap:wrap;
  gap:6px 22px;
  list-style:none;
  margin:0;
  padding:0;
}
.navlinks a{
  font-family:var(--slab);
  font-weight:500;
  font-size:.92rem;
  color:var(--ink-soft);
  text-decoration:none;
  padding-block:4px;
  border-bottom:2px solid transparent;
}
.navlinks a:hover{color:var(--terra-dark)}
.navlinks a[aria-current="page"]{
  color:var(--ink);
  font-weight:700;
  border-bottom-color:var(--terra);
}

/* ---------- generic hero ---------- */
.hero{
  background:linear-gradient(170deg,var(--dusk-deep),var(--dusk) 55%,#2f3552);
  color:#f4eee2;
  padding-block:clamp(36px,7vw,68px);
  text-align:center;
}
.kicker{
  font-family:var(--slab);
  font-weight:700;
  letter-spacing:.14em;
  text-transform:uppercase;
  font-size:.72rem;
  color:#e0a87f;
  margin:0 0 16px;
}
.hero h1{
  font-weight:800;
  font-size:clamp(1.85rem,5.4vw,3rem);
  line-height:1.12;
  margin:0 auto 18px;
  max-width:26ch;
}
.hero p.lede{
  font-size:clamp(1.02rem,2.4vw,1.2rem);
  max-width:50ch;
  margin:0 auto;
  color:#ded5c6;
}
.hero .cover{
  width:100%;
  max-width:440px;
  margin:30px auto 0;
  border-radius:6px;
  box-shadow:0 18px 40px rgba(0,0,0,.42);
}

/* ---------- buttons ---------- */
.btn{
  display:inline-block;
  font-family:var(--slab);
  font-weight:700;
  text-decoration:none;
  color:#fff;
  background:var(--terra);
  padding:14px 26px;
  border-radius:5px;
  border:0;
  cursor:pointer;
}
.btn:hover{background:var(--terra-dark)}
.btn.btn-ink{background:var(--ink)}
.btn.btn-ink:hover{background:#2c1e2c}
.btn.btn-outline{
  background:transparent;
  color:#f4eee2;
  border:1px solid rgba(244,238,226,.55);
}
.btn.btn-outline:hover{background:rgba(244,238,226,.12)}

/* ---------- section headings ---------- */
section{padding-block:clamp(36px,6vw,60px)}
h2.section{
  font-weight:700;
  font-size:clamp(1.3rem,3.4vw,1.75rem);
  text-align:center;
  margin:0 0 6px;
}
.section-sub{text-align:center;color:var(--ink-soft);margin:0 0 32px}

/* ---------- generic cards (printables contents grid) ---------- */
.grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(248px,1fr));
  gap:18px;
}
.card{
  background:#fffdf8;
  border:1px solid var(--rule);
  border-left:4px solid var(--terra);
  border-radius:6px;
  padding:18px 20px;
}
.card h3{font-weight:700;font-size:1.02rem;margin:0 0 6px}
.card p{margin:0;font-size:.95rem;color:var(--ink-soft)}

/* ---------- book feature block (index / printables cross-link) ---------- */
.book{
  background:var(--cream-deep);
  border-top:1px solid var(--rule);
  border-bottom:1px solid var(--rule);
}
.book-inner{
  display:grid;
  grid-template-columns:minmax(0,1fr);
  gap:26px;
  align-items:center;
}
@media(min-width:720px){
  .book-inner{grid-template-columns:minmax(0,260px) minmax(0,1fr);gap:34px}
}
.book h2{font-weight:700;font-size:clamp(1.25rem,3.2vw,1.6rem);margin:0 0 12px}
.book p{margin:0 0 14px}
.book-cover-box{
  background:#fffdf8;
  border:1px solid var(--rule);
  border-radius:6px;
  padding:14px;
  box-shadow:0 10px 26px rgba(61,43,61,.18);
}
.book-cover-box img{border-radius:3px;margin:0 auto}

/* ---------- book cards (books.html) ----------
   Covers ship at different aspect ratios: one landscape, two portrait.
   Each cover sits in a fixed-height stage and is letterboxed (object-fit:
   contain) on a cream-deep mat rather than being cropped to a fixed box,
   so no title or art gets cut off regardless of shape. ---------- */
.book-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(270px,1fr));
  gap:28px;
}
.book-card{
  display:flex;
  flex-direction:column;
  background:#fffdf8;
  border:1px solid var(--rule);
  border-radius:8px;
  overflow:hidden;
  box-shadow:0 10px 22px rgba(61,43,61,.10);
}
.book-card .stage{
  background:var(--cream-deep);
  border-bottom:1px solid var(--rule);
  height:260px;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:18px;
}
.book-card .stage img{
  max-width:100%;
  max-height:100%;
  width:auto;
  height:auto;
  object-fit:contain;
  border-radius:3px;
  box-shadow:0 8px 18px rgba(61,43,61,.22);
}
.book-card .body{
  padding:20px 22px 24px;
  display:flex;
  flex-direction:column;
  gap:10px;
  flex:1;
}
.book-card .age{
  font-family:var(--slab);
  font-weight:700;
  letter-spacing:.08em;
  text-transform:uppercase;
  font-size:.72rem;
  color:var(--terra-dark);
  margin:0;
}
.book-card h3{font-weight:700;font-size:1.15rem;margin:0;line-height:1.3}
.book-card .blurb{margin:0;color:var(--ink-soft);font-size:.98rem;flex:1}
.book-card .formats{
  margin:6px 0 0;
  padding:0;
  list-style:none;
  font-size:.92rem;
  color:var(--ink-soft);
  border-top:1px solid var(--rule);
  padding-top:10px;
}
.book-card .formats li{margin:2px 0}
.book-card .cta{margin-top:8px}
.badge-draft{
  display:inline-block;
  font-family:var(--slab);
  font-weight:700;
  letter-spacing:.07em;
  text-transform:uppercase;
  font-size:.68rem;
  color:#fff;
  background:var(--ink-soft);
  padding:3px 9px;
  border-radius:4px;
  margin-bottom:2px;
}

/* ---------- about page ---------- */
.about-layout{
  display:grid;
  grid-template-columns:minmax(0,1fr);
  gap:30px;
}
@media(min-width:720px){
  .about-layout{grid-template-columns:minmax(0,240px) minmax(0,1fr)}
}
.about-photo-box{
  background:var(--cream-deep);
  border:1px dashed var(--rule);
  border-radius:8px;
  padding:14px;
  text-align:center;
}
.about-photo-box img{margin:0 auto;border-radius:4px}
.about h2{font-weight:700;font-size:1.25rem;margin:28px 0 10px}
.about h2:first-child{margin-top:0}
.about p{margin:0 0 14px}
.bio-list{margin:0 0 14px;padding-left:1.2em}
.bio-list li{margin:0 0 6px}

/* Visible placeholder for facts pending confirmation from Rob.
   Deliberately styled to look unfinished, never like a real fact. */
.rob-note{
  display:block;
  background:repeating-linear-gradient(135deg,#fdf6e3,#fdf6e3 10px,#f5ecd6 10px,#f5ecd6 20px);
  border:1px dashed var(--terra-dark);
  border-radius:5px;
  padding:10px 14px;
  margin:10px 0 16px;
  font-family:var(--slab);
  font-size:.85rem;
  font-style:normal;
  color:var(--terra-dark);
}
.rob-note::before{
  content:"PLACEHOLDER \2014 NOT YET CONFIRMED: ";
  font-weight:700;
  letter-spacing:.02em;
}

/* ---------- printables signup form ---------- */
.signup{
  background:var(--cream-deep);
  border-top:5px solid var(--terra);
}
.signup h2{font-weight:700;font-size:clamp(1.3rem,3.4vw,1.75rem);margin:0 0 10px;text-align:center}
.signup .sub{text-align:center;color:var(--ink-soft);margin:0 auto 26px;max-width:44ch}
.formbox{
  max-width:520px;
  margin:0 auto;
  background:#fff;
  border:1px solid var(--rule);
  border-radius:8px;
  padding:clamp(18px,4vw,28px);
}
.ff label{
  display:block;
  font-family:var(--slab);
  font-weight:500;
  font-size:.78rem;
  letter-spacing:.09em;
  text-transform:uppercase;
  color:var(--ink-soft);
  margin-bottom:6px;
}
.ff input{
  width:100%;
  font:inherit;
  padding:12px 14px;
  border:1px solid var(--rule);
  border-radius:5px;
  background:#fffdf8;
  color:var(--ink);
  margin-bottom:16px;
}
.ff input:focus{outline:2px solid var(--terra);outline-offset:1px}
.ff button{
  width:100%;
  font-family:var(--slab);
  font-weight:700;
  font-size:1rem;
  letter-spacing:.03em;
  color:#fff;
  background:var(--terra);
  border:0;
  border-radius:5px;
  padding:14px 18px;
  cursor:pointer;
}
.ff button:hover{background:var(--terra-dark)}
.fineprint{
  font-size:.82rem;
  color:var(--ink-soft);
  text-align:center;
  margin:14px 0 0;
}

/* ---------- home page book cards (compact, links out to books.html) ---------- */
.home-book-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(240px,1fr));
  gap:22px;
}
.home-book-card{
  display:block;
  background:#fffdf8;
  border:1px solid var(--rule);
  border-radius:8px;
  overflow:hidden;
  text-decoration:none;
  color:var(--ink);
  box-shadow:0 8px 18px rgba(61,43,61,.08);
}
.home-book-card:hover{border-color:var(--terra)}
.home-book-card .stage{
  background:var(--cream-deep);
  border-bottom:1px solid var(--rule);
  height:210px;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:16px;
}
.home-book-card .stage img{
  max-width:100%;
  max-height:100%;
  object-fit:contain;
  border-radius:3px;
  box-shadow:0 6px 14px rgba(61,43,61,.2);
}
.home-book-card .body{padding:14px 16px 18px}
.home-book-card h3{font-weight:700;font-size:1rem;margin:0 0 4px}
.home-book-card p{margin:0;font-size:.9rem;color:var(--ink-soft)}

/* ---------- meet-the-author teaser ---------- */
.author-teaser{background:var(--cream-deep);border-top:1px solid var(--rule);border-bottom:1px solid var(--rule)}
.author-teaser-inner{
  display:grid;
  grid-template-columns:minmax(0,1fr);
  gap:22px;
  align-items:center;
}
@media(min-width:720px){
  .author-teaser-inner{grid-template-columns:auto minmax(0,1fr)}
}
.author-photo-placeholder{
  width:140px;
  height:140px;
  border-radius:50%;
  background:repeating-linear-gradient(135deg,#fdf6e3,#fdf6e3 8px,#f0e6cd 8px,#f0e6cd 16px);
  border:1px dashed var(--terra-dark);
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  font-family:var(--slab);
  font-size:.7rem;
  color:var(--terra-dark);
  padding:10px;
  margin:0 auto;
}

/* ---------- footer ---------- */
footer.sitefoot{
  padding-block:32px;
  padding-bottom:calc(32px + env(safe-area-inset-bottom,0px));
  text-align:center;
  font-size:.85rem;
  color:var(--ink-soft);
  border-top:1px solid var(--rule);
}
footer.sitefoot p{margin:4px 0}
footer.sitefoot a{color:var(--ink-soft)}
footer.sitefoot a.footer-cta{color:var(--terra-dark);font-weight:600}
