/* Compo Press — brand styles
   Terracotta #c07060 · Sage #809070 · Soft pink #f0b0b0
   Cream #faf6ee · Ink #4a3f35 · Dark bg #2a2320 */

:root {
  --terracotta: #c07060;
  --terracotta-deep: #a5564a;
  --sage: #809070;
  --sage-deep: #66755a;
  --pink: #f0b0b0;
  --cream: #faf6ee;
  --cream-warm: #f4ecdd;
  --ink: #4a3f35;
  --ink-soft: #6b5f52;
  --card: #ffffff;
  --line: #e8dcc8;
  --shadow: 0 10px 30px rgba(74, 63, 53, 0.12);
  --radius: 18px;
  --font-head: "Fraunces", Georgia, serif;
  --font-body: "Nunito", system-ui, sans-serif;
}

[data-theme="dark"] {
  --cream: #2a2320;
  --cream-warm: #332a25;
  --ink: #f2e8d8;
  --ink-soft: #c9bba6;
  --card: #3a2f28;
  --line: #54463a;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--cream);
  color: var(--ink);
  line-height: 1.65;
  transition: background 0.3s ease, color 0.3s ease;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3 {
  font-family: var(--font-head);
  line-height: 1.2;
  margin: 0 0 0.6em;
  color: var(--ink);
}

h2.section-title {
  font-size: clamp(1.7rem, 4.5vw, 2.4rem);
  text-align: center;
}

h2.section-title .accent { color: var(--terracotta); }

.section-lead {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 2.2rem;
  color: var(--ink-soft);
}

.wrap { width: min(1120px, 92%); margin: 0 auto; }

section { padding: 2.6rem 0; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--cream) 92%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.nav {
  width: min(1120px, 94%);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.7rem 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--ink);
  font-family: var(--font-head);
  font-size: 1.25rem;
  font-weight: 700;
}

.brand img { width: 40px; height: 40px; }

.nav-links {
  display: flex;
  gap: 1.2rem;
  margin-left: auto;
  align-items: center;
}

.nav-links a {
  text-decoration: none;
  color: var(--ink-soft);
  font-weight: 700;
  font-size: 0.95rem;
}

.nav-links a:hover { color: var(--terracotta); }

.btn {
  display: inline-block;
  background: var(--terracotta);
  color: #fff !important;
  padding: 0.7rem 1.4rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 800;
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease;
  font-family: var(--font-body);
}

.btn:hover { background: var(--terracotta-deep); transform: translateY(-2px); }

.btn-outline {
  background: transparent;
  color: var(--terracotta) !important;
  border: 2px solid var(--terracotta);
}

.btn-outline:hover { background: var(--terracotta); color: #fff !important; }

.btn-sm { padding: 0.45rem 1rem; font-size: 0.85rem; }

.theme-toggle {
  background: var(--cream-warm);
  border: 1px solid var(--line);
  border-radius: 999px;
  width: 42px;
  height: 42px;
  cursor: pointer;
  font-size: 1.1rem;
  display: grid;
  place-items: center;
  color: var(--ink);
}

.lang-toggle {
  background: var(--cream-warm);
  border: 1px solid var(--line);
  border-radius: 999px;
  min-width: 42px;
  height: 42px;
  padding: 0 10px;
  cursor: pointer;
  font-family: "Nunito", sans-serif;
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  display: grid;
  place-items: center;
  color: var(--ink);
}

.lang-toggle:hover, .theme-toggle:hover { border-color: var(--terracotta); }

/* ---------- Hero ---------- */
.hero {
  text-align: center;
  padding: 2.2rem 0 1.8rem;
  background:
    radial-gradient(600px 300px at 15% 10%, rgba(240, 176, 176, 0.25), transparent),
    radial-gradient(700px 350px at 85% 20%, rgba(128, 144, 112, 0.18), transparent);
}

.hero-logo { width: min(220px, 55%); margin: 0 auto 1rem; }

.hero h1 {
  font-size: clamp(2.1rem, 6vw, 3.4rem);
  font-weight: 700;
}

.hero h1 em { font-style: italic; color: var(--terracotta); }

.hero .lead {
  max-width: 640px;
  margin: 0 auto 1.8rem;
  font-size: 1.1rem;
  color: var(--ink-soft);
}

.hero .lead strong { color: var(--terracotta); }

.tagline {
  font-family: var(--font-head);
  font-style: italic;
  color: var(--sage-deep);
  margin: 0 0 0.4rem;
}

[data-theme="dark"] .tagline { color: var(--sage); }

.descriptor {
  letter-spacing: 0.18em;
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--ink-soft);
  text-transform: uppercase;
  margin-bottom: 1.8rem;
}

.hero-cta { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; align-items: center; }

.btn-lg { padding: 0.9rem 2rem; font-size: 1.05rem; }

.hero-blog-link {
  color: var(--ink-soft);
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  border-bottom: 2px solid var(--line);
  padding-bottom: 2px;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.hero-blog-link:hover { color: var(--terracotta); border-color: var(--terracotta); }

.hero-banner {
  margin: 1.8rem auto 0;
  width: min(1000px, 100%);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}

/* ---------- Stats ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  padding: 0;
  margin: 0 auto;
  max-width: 760px;
}

.stat {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.4rem 1rem;
  text-align: center;
  box-shadow: var(--shadow);
}

.stat b {
  display: block;
  font-family: var(--font-head);
  font-size: 2rem;
  color: var(--terracotta);
}

.stat span { font-size: 0.9rem; color: var(--ink-soft); font-weight: 700; }

/* ---------- Catalog ---------- */
.filters {
  display: flex;
  gap: 0.7rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 2.2rem;
}

.filter-btn {
  background: var(--card);
  border: 2px solid var(--line);
  color: var(--ink-soft);
  border-radius: 999px;
  padding: 0.55rem 1.3rem;
  font-family: var(--font-body);
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-btn:hover { border-color: var(--terracotta); color: var(--terracotta); }

.filter-btn.active {
  background: var(--terracotta);
  border-color: var(--terracotta);
  color: #fff;
}

.filter-sep {
  width: 1px;
  align-self: stretch;
  background: var(--line);
  margin: 0 0.3rem;
}

.filter-btn.lang-filter.active {
  background: var(--sage);
  border-color: var(--sage);
}

.books {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
  gap: 1.6rem;
}

.book-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, opacity 0.25s ease;
}

.book-card:hover { transform: translateY(-4px); }

.book-card.hidden { display: none; }

.book-cover { aspect-ratio: 15 / 16; overflow: hidden; background: var(--cream-warm); display: flex; align-items: center; justify-content: center; }

.book-cover img { width: 80%; height: 100%; object-fit: contain; }

.book-body { padding: 1.4rem; display: flex; flex-direction: column; gap: 0.7rem; flex: 1; }

.book-badges { display: flex; gap: 0.45rem; flex-wrap: wrap; }

.badge {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  background: var(--cream-warm);
  color: var(--ink-soft);
  border: 1px solid var(--line);
}

.badge.hot { background: var(--terracotta); border-color: var(--terracotta); color: #fff; }
.badge.sage { background: var(--sage); border-color: var(--sage); color: #fff; }
.badge.pink { background: var(--pink); border-color: var(--pink); color: var(--ink); }

.book-body h3 { font-size: 1.35rem; margin: 0; }

.book-body p { margin: 0; color: var(--ink-soft); font-size: 0.96rem; }

.book-body .btn { margin-top: auto; align-self: stretch; text-align: center; }

.book-body .btn-ghost { width: 100%; text-align: center; }

.book-caption { font-size: 0.8rem; font-style: italic; color: var(--ink-soft); }

/* ---------- Free page ---------- */
.free-page {
  background: var(--cream-warm);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.free-grid {
  display: grid;
  gap: 2rem;
  align-items: center;
}

@media (min-width: 760px) {
  .free-grid { grid-template-columns: 1fr 1fr; }
}

.free-grid figure {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  background: #fff;
}

/* ---------- Blog ---------- */
.post {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 1.2rem;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.post summary {
  list-style: none;
  cursor: pointer;
  padding: 1.3rem 1.5rem;
  display: flex;
  gap: 1rem;
  align-items: baseline;
  flex-wrap: wrap;
}

.post summary::-webkit-details-marker { display: none; }

.post-meta {
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--terracotta);
  width: 100%;
}

.post summary h3 { margin: 0; font-size: 1.25rem; flex: 1; }

.post summary .more {
  color: var(--terracotta);
  font-weight: 800;
  font-size: 0.9rem;
  white-space: nowrap;
}

.post[open] summary .more { visibility: hidden; }

.post-body { padding: 0 1.5rem 1.6rem; color: var(--ink-soft); }

.post-body p { margin: 0 0 1rem; }

.post-body figure {
  margin: 1.2rem auto 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  max-width: 300px;
}

/* ---------- About ---------- */
.about-grid {
  display: grid;
  gap: 2rem;
  align-items: center;
}

@media (min-width: 760px) {
  .about-grid { grid-template-columns: 280px 1fr; }
}

.about-badge img {
  width: min(320px, 80%);
  margin: 0 auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.about-text p { color: var(--ink-soft); }

.about-text strong { color: var(--ink); }

/* ---------- Shop / contact ---------- */
.shop {
  background: var(--sage);
  color: #fff;
  border-radius: var(--radius);
  padding: 2.5rem 2rem;
  text-align: center;
  box-shadow: var(--shadow);
}

.shop h2 { color: #fff; }

.shop p { max-width: 620px; margin: 0 auto 1.4rem; color: #f4f1e8; }

.shop .btn { background: #fff; color: #3f4a35 !important; }

.shop .btn:hover { background: var(--cream); }

.shopify-note {
  margin-top: 1.6rem;
  padding-top: 1.4rem;
  border-top: 1px solid rgba(255, 255, 255, 0.35);
  font-size: 0.95rem;
}

.shopify-note .soon {
  display: inline-block;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  padding: 0.25rem 0.9rem;
  font-weight: 800;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.5rem;
}

.social-row {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 1.6rem;
}

.social-row a {
  color: #fff;
  font-weight: 800;
  text-decoration: none;
  border: 2px solid rgba(255, 255, 255, 0.6);
  border-radius: 999px;
  padding: 0.45rem 1.1rem;
  font-size: 0.9rem;
  transition: background 0.2s ease;
}

.social-row a:hover { background: rgba(255, 255, 255, 0.2); }

/* ---------- Footer ---------- */
footer {
  border-top: 1px solid var(--line);
  padding: 2.5rem 0 2rem;
  text-align: center;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

footer .foot-logo { width: 220px; margin: 0 auto 1rem; }

footer nav { margin-bottom: 1rem; }

footer nav a {
  color: var(--ink-soft);
  text-decoration: none;
  margin: 0 0.7rem;
  font-weight: 700;
}

footer nav a:hover { color: var(--terracotta); }

footer .socials a {
  color: var(--terracotta);
  text-decoration: none;
  font-weight: 800;
  margin: 0 0.5rem;
}

/* ---------- Mobile nav ---------- */
@media (max-width: 720px) {
  .nav-links a:not(.btn):not(.theme-toggle) { display: none; }
  .nav-links .btn { font-size: 0.8rem; padding: 0.5rem 0.9rem; }
  section { padding: 2.8rem 0; }
  .stats { grid-template-columns: 1fr; max-width: 320px; }
}

/* Peek-inside lightbox */
.btn-ghost {
  background: transparent;
  border: 2px solid var(--terracotta);
  color: var(--terracotta) !important;
  margin-top: 0.5rem;
}
.btn-ghost:hover { background: rgba(192, 112, 96, 0.1); }
.book-body .btn-ghost { width: 100%; }

.peek-lightbox {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden; transition: opacity .25s ease;
}
.peek-lightbox.open { opacity: 1; visibility: visible; }
.peek-backdrop { position: absolute; inset: 0; background: rgba(30, 20, 15, .85); }
.peek-box {
  position: relative; max-width: min(92vw, 760px); max-height: 88vh;
  display: flex; align-items: center; justify-content: center;
}
.peek-img {
  max-width: 100%; max-height: 82vh; object-fit: contain;
  border-radius: var(--radius); box-shadow: var(--shadow);
  background: #fff;
}
.peek-close {
  position: absolute; top: -2.6rem; right: 0;
  background: none; border: none; color: #fff;
  font-size: 1.6rem; cursor: pointer; padding: .3rem .6rem;
}
.peek-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(255,255,255,.92); border: none;
  width: 2.6rem; height: 2.6rem; border-radius: 50%;
  font-size: 1.5rem; cursor: pointer; color: var(--ink);
  box-shadow: var(--shadow);
}
.peek-prev { left: -3.2rem; }
.peek-next { right: -3.2rem; }
.peek-counter {
  position: absolute; bottom: -2.2rem; left: 50%; transform: translateX(-50%);
  color: #fff; font-size: .9rem; font-weight: 600;
}
@media (max-width: 820px) {
  .peek-prev { left: .4rem; }
  .peek-next { right: .4rem; }
}

/* Book interior previews */
body.inside-open { overflow: hidden; }
.inside-dialog { width: min(920px, 94vw); max-height: 94dvh; border: 1px solid var(--line); border-radius: 18px; padding: 1rem; color: var(--ink); background: var(--card); }
.inside-dialog::backdrop { background: rgba(30,20,15,.82); }
.inside-header { display:flex; align-items:center; justify-content:space-between; gap:1rem; }
.inside-header h2 { font-size:clamp(1rem,3vw,1.4rem); margin:0; }
.inside-close { width:44px; height:44px; flex-shrink:0; border:0; border-radius:50%; background:var(--cream-warm); color:var(--ink); font-size:1.8rem; cursor:pointer; }
.inside-stage { display:grid; grid-template-columns:44px minmax(0,1fr) 44px; align-items:center; gap:.4rem; margin-top:.6rem; }
.inside-stage img { max-height:65dvh; width:auto; max-width:100%; margin:auto; object-fit:contain; background:#fff; touch-action:pan-y; }
.inside-arrow { width:44px; height:44px; border:1px solid var(--line); border-radius:50%; background:var(--cream-warm); color:var(--ink); font-size:2rem; cursor:pointer; }
.inside-arrow:disabled { opacity:.3; cursor:default; }
.inside-counter { text-align:center; margin:.5rem 0; font-size:.9rem; }
.inside-thumbs { display:flex; gap:.5rem; justify-content:center; }
.inside-thumbs button { padding:3px; height:66px; width:54px; background:#fff; border:2px solid transparent; border-radius:5px; cursor:pointer; }
.inside-thumbs img { height:100%; width:100%; object-fit:contain; }
.inside-thumbs button[aria-current="true"] { border-color:var(--terracotta); }
button:focus-visible, a:focus-visible { outline:3px solid var(--terracotta); outline-offset:3px; }
section[id] { scroll-margin-top:90px; }
@media (max-width:480px) { .inside-dialog { padding:.65rem; } .inside-stage { grid-template-columns:36px minmax(0,1fr) 36px; gap:.2rem; } .inside-arrow { width:36px; height:44px; } }

.gift-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:1.4rem; }
.gift-card { background:var(--card); border:1px solid var(--line); border-radius:var(--radius); padding:1rem; display:flex; flex-direction:column; }
.gift-card > img { height:260px; width:100%; object-fit:contain; background:#fff; border-radius:8px; }
.gift-card > div { display:flex; flex-direction:column; flex:1; }
.gift-card h3 { font-size:1.2rem; margin-top:1rem; }
.gift-card p { color:var(--ink-soft); }
.gift-card .gift-language { font-size:.8rem; }
.gift-card .btn { margin-top:auto; text-align:center; }
@media (max-width:720px) { .gift-grid { grid-template-columns:1fr; } }

.music-dialog { width:min(540px,92vw); border:1px solid var(--line); border-radius:var(--radius); padding:1.4rem; background:var(--card); color:var(--ink); }
.music-dialog::backdrop { background:rgba(30,20,15,.82); }
.music-dialog p { color:var(--ink-soft); }
.music-dialog audio { display:block; width:100%; margin-top:1rem; }
.music-button { border-color:var(--sage); }

/* Compact catalog introduction */
.catalog-note { margin: 0.5rem auto; padding: 0; text-align: center; color: var(--ink-soft); font-size: 0.95rem; line-height: 1.5; }

/* Etsy digital collection, preserving the existing brand palette. */
.shop .digital-notice{color:var(--ink);margin:1.25rem auto;font-size:1rem;line-height:1.65}
.digital-notice{padding:1rem 1.2rem;border:1px solid var(--line);border-left:4px solid var(--sage);border-radius:10px;background:var(--cream-warm);line-height:1.65}
.digital-subtitle{font-size:clamp(1.35rem,3vw,1.8rem);margin-top:2.4rem}
.digital-explainer{color:var(--ink-soft);max-width:920px}
.digital-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1.25rem;margin:1.5rem 0 2rem}
.digital-card{border:1px solid var(--line);border-radius:var(--radius);overflow:hidden;background:var(--card);display:flex;flex-direction:column;min-width:0}
.digital-card>img{width:100%;height:auto;aspect-ratio:1;object-fit:contain;background:white}
.digital-card>div{padding:1.15rem;display:flex;flex-direction:column;flex:1}
.digital-card h4{font:600 1.23rem/1.3 var(--font-head);margin:.5rem 0}
.digital-card p{color:var(--ink-soft);margin:0 0 1rem}
.digital-card .digital-badge{font-size:.75rem;font-weight:800;color:var(--ink)}
.digital-card .btn{margin-top:auto;text-align:center;min-height:44px}
.digital-actions{display:flex;align-items:center;justify-content:center;gap:1.2rem;flex-wrap:wrap}
.etsy-news-image{float:right;margin:0 0 1rem 1.5rem;border-radius:12px;width:min(300px,45%)}
.post-body:after{content:"";display:block;clear:both}
.post-body .digital-grid{clear:both;grid-template-columns:repeat(2,minmax(0,1fr))}
.post-body .digital-card>img{max-height:220px}
@media(max-width:900px){.digital-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.nav{flex-wrap:wrap;justify-content:center}.nav-links{flex-wrap:wrap;justify-content:center}}
@media(max-width:560px){.digital-grid,.post-body .digital-grid{grid-template-columns:1fr}.digital-card>img{max-height:300px;object-fit:contain}.etsy-news-image{float:none;width:100%;max-width:300px;margin:1rem auto}.hero-cta{flex-wrap:wrap}.nav{gap:.3rem}.nav-links .btn{font-size:.75rem}}

#kindle-news{scroll-margin-top:140px}.book-body .btn{margin-bottom:.5rem}.digital-actions{clear:both}

/* Full banner stays uncropped; readable localized headings and links remain HTML. */
.hero-banner.creative-desk-banner{width:100%;margin:0 auto 1.8rem}.creative-desk-banner img{display:block;width:100%;height:auto;aspect-ratio:3/1;object-fit:contain}@media(max-width:560px){.hero-banner.creative-desk-banner{margin-bottom:1.2rem;border-radius:10px}}

/* Full Etsy listing images, never square-cropped shop thumbnails. */
.digital-card.printable-book-card>img{height:280px;max-height:none;aspect-ratio:auto;object-fit:contain;object-position:center;padding:14px;background:#fff}

/* Full-resolution MEOW previews */
.digital-card.planner-card>img{width:100%;height:280px;max-height:none;aspect-ratio:auto;object-fit:contain;object-position:center;padding:12px;background:#fff}
