/* ==========================================================================
   Lemncake Press — site styles
   Palette pulls from the book covers: ink, paper, forest (Wild Forest spine),
   ocean (Deep Ocean spine), plus a lemon accent for the Lemncake name.
   ========================================================================== */

:root {
  --ink: #1b1b1a;
  --ink-soft: #4a4a46;
  --ink-faint: #85857e;
  --paper: #fbfaf6;
  --paper-2: #f3f1ea;
  --card: #ffffff;
  --line: #e2dfd5;
  --grid: #d9d6cc;
  --forest: #2f4a35;
  --ocean: #24384a;
  --koala: #8a6f5a;
  --lemon: #f2c94c;
  --lemon-soft: #fbefc4;
  --focus: #2f6fdf;

  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", "Helvetica Neue", Arial, sans-serif;

  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(27, 27, 26, .06), 0 8px 24px rgba(27, 27, 26, .08);
  --shadow-book: 0 2px 4px rgba(27, 27, 26, .12), 0 18px 40px rgba(27, 27, 26, .18);
  --wrap: 1120px;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
a:focus-visible,
button:focus-visible,
input:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 0 0 .5em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.3rem, 5.5vw, 4rem); font-variation-settings: "opsz" 144; }
h2 { font-size: clamp(1.75rem, 3.6vw, 2.6rem); font-variation-settings: "opsz" 96; }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 720px; }

.eyebrow {
  font-family: var(--sans);
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0 0 1rem;
}
.lede { font-size: 1.15rem; color: var(--ink-soft); max-width: 36em; }
.muted { color: var(--ink-faint); }
.center { text-align: center; }
.center .lede { margin-left: auto; margin-right: auto; }

.skip-link {
  position: absolute; left: 12px; top: -60px;
  background: var(--ink); color: var(--paper);
  padding: 10px 14px; border-radius: var(--radius-sm); z-index: 100;
}
.skip-link:focus { top: 12px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(251, 250, 246, .92);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand img { width: 36px; height: 36px; }
.brand-name { font-family: var(--serif); font-weight: 700; font-size: 1.3rem; letter-spacing: -.01em; }
.brand-name span { font-family: var(--sans); font-weight: 500; font-size: .7rem; letter-spacing: .24em; text-transform: uppercase; color: var(--ink-faint); margin-left: 4px; }

.nav ul { list-style: none; display: flex; gap: 4px; margin: 0; padding: 0; }
.nav a {
  display: block; padding: 8px 14px; border-radius: 999px;
  text-decoration: none; font-size: .95rem; font-weight: 500; color: var(--ink-soft);
}
.nav a:hover { background: var(--paper-2); color: var(--ink); }
.nav a[aria-current="page"] { color: var(--ink); background: var(--paper-2); }
.nav .nav-cta a { background: var(--ink); color: var(--paper); }
.nav .nav-cta a:hover { background: #000; color: #fff; }

.nav-toggle {
  display: none; background: none; border: 1px solid var(--line); border-radius: var(--radius-sm);
  width: 44px; height: 44px; cursor: pointer; color: var(--ink);
}
.nav-toggle svg { margin: auto; }

@media (max-width: 820px) {
  .nav-toggle { display: grid; place-items: center; }
  .nav { position: absolute; top: 68px; left: 0; right: 0; background: var(--paper); border-bottom: 1px solid var(--line); display: none; }
  .nav.open { display: block; }
  .nav ul { flex-direction: column; padding: 10px 20px 18px; gap: 2px; }
  .nav a { padding: 12px 14px; font-size: 1.05rem; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 12px 24px; border-radius: 999px;
  font-family: var(--sans); font-size: 1rem; font-weight: 600; text-decoration: none;
  border: 2px solid var(--ink); background: var(--ink); color: var(--paper); cursor: pointer;
  transition: transform .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-1px); background: #000; }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--paper); }
.btn-lemon { background: var(--lemon); border-color: var(--lemon); color: var(--ink); }
.btn-lemon:hover { background: #eebd2c; border-color: #eebd2c; }
.btn.pending { opacity: .45; pointer-events: none; }
.btn-sm { min-height: 40px; padding: 8px 18px; font-size: .92rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Sections ---------- */
section { padding: clamp(56px, 9vw, 104px) 0; }
.section-alt { background: var(--paper-2); }
.section-dark { background: var(--ink); color: var(--paper); }
.section-dark .eyebrow { color: #a9a79e; }
.section-dark .lede { color: #cfccc2; }
.section-head { margin-bottom: 44px; }

/* mosaic grid texture used behind heroes */
.grid-bg {
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 22px 22px;
  background-position: -1px -1px;
}

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: clamp(48px, 8vw, 96px) 0 clamp(56px, 9vw, 110px); }
.hero::before {
  content: ""; position: absolute; inset: 0; opacity: .55;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 22px 22px;
  -webkit-mask-image: linear-gradient(100deg, transparent 30%, #000 75%);
  mask-image: linear-gradient(100deg, transparent 30%, #000 75%);
}
.hero .wrap { position: relative; display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; }
.hero h1 em { font-style: italic; font-weight: 600; color: var(--forest); }
.hero .lede { margin-bottom: 28px; }
.hero-books { position: relative; height: 480px; }
.hero-books .book {
  position: absolute; width: 58%; border-radius: 4px 8px 8px 4px; box-shadow: var(--shadow-book);
  background: #fff;
}
.hero-books .book:nth-child(1) { left: 2%; top: 40px; transform: rotate(-6deg); }
.hero-books .book:nth-child(2) { right: 2%; top: 0; transform: rotate(4deg); }
.hero-books .book::after { content: ""; position: absolute; inset: 0 auto 0 0; width: 10px; background: linear-gradient(90deg, rgba(0,0,0,.12), transparent); border-radius: 4px 0 0 4px; }
.hero-note { margin-top: 18px; font-size: .9rem; color: var(--ink-faint); }

@media (max-width: 880px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-books { height: 360px; max-width: 460px; margin: 0 auto; width: 100%; }
}
@media (max-width: 480px) { .hero-books { height: 290px; } }

/* ---------- Marks legend (how it works) ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; counter-reset: step; }
.step { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.step-num { font-family: var(--serif); font-size: 2.4rem; font-weight: 700; color: var(--lemon); line-height: 1; margin-bottom: 14px; -webkit-text-stroke: 1px var(--ink); }
.step h3 { margin-bottom: .35em; }
.step p { color: var(--ink-soft); margin: 0; font-size: .98rem; }
@media (max-width: 820px) { .steps { grid-template-columns: 1fr; } }

.legend { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; margin-top: 40px; }
.legend-cell { text-align: center; }
.legend-cell svg { width: 100%; max-width: 76px; aspect-ratio: 1; margin: 0 auto 8px; background: #fff; border: 1.5px solid var(--ink); border-radius: 6px; }
.legend-cell .n { font-family: var(--serif); font-weight: 700; font-size: 1.15rem; display: block; }
.legend-cell .l { font-size: .8rem; color: var(--ink-faint); text-transform: uppercase; letter-spacing: .12em; }
@media (max-width: 560px) { .legend { grid-template-columns: repeat(3, 1fr); row-gap: 22px; } }

/* ---------- Reveal demo ---------- */
.reveal { display: grid; grid-template-columns: 1fr auto 1fr; gap: 28px; align-items: center; margin-top: 12px; }
.reveal figure { margin: 0; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); }
.reveal figure img { width: 100%; aspect-ratio: 612 / 792; object-fit: cover; border-radius: 4px; }
.reveal figcaption { font-size: .85rem; color: var(--ink-faint); text-align: center; margin-top: 10px; letter-spacing: .06em; text-transform: uppercase; }
.reveal .arrow { font-family: var(--serif); font-size: 2.6rem; color: var(--ink-faint); }
@media (max-width: 700px) { .reveal { grid-template-columns: 1fr; } .reveal .arrow { transform: rotate(90deg); justify-self: center; } }

/* ---------- Books / products ---------- */
.series { margin-bottom: 64px; }
.series:last-child { margin-bottom: 0; }
.series-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; border-bottom: 1px solid var(--line); padding-bottom: 14px; margin-bottom: 28px; }
.series-head h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin: 0; }
.series-head p { margin: 0; color: var(--ink-faint); font-size: .95rem; }

.book-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; }
.book-card {
  display: grid; grid-template-columns: 170px 1fr; gap: 24px; align-items: start;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px;
  box-shadow: var(--shadow);
}
.book-card .cover { border-radius: 3px 6px 6px 3px; box-shadow: var(--shadow-book); background: #fff; }
.book-card .cover.square { aspect-ratio: 1; object-fit: cover; }
.book-card h3 { font-size: 1.35rem; margin-bottom: .25em; }
.book-card .sub { font-size: .9rem; color: var(--ink-faint); margin-bottom: .8em; }
.book-card p.desc { font-size: .95rem; color: var(--ink-soft); }
.book-card .specs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 16px; padding: 0; list-style: none; }
.book-card .specs li { font-size: .78rem; background: var(--paper-2); border-radius: 999px; padding: 3px 10px; color: var(--ink-soft); }
.tag { display: inline-block; font-size: .7rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; margin-bottom: 10px; color: #fff; }
.tag-forest { background: var(--forest); }
.tag-ocean { background: var(--ocean); }
.tag-koala { background: var(--koala); }
@media (max-width: 980px) { .book-grid { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .book-card { grid-template-columns: 1fr; } .book-card .cover { max-width: 220px; } }

/* home page featured strip */
.feature-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.feature { text-decoration: none; display: block; }
.feature img { border-radius: 3px 6px 6px 3px; box-shadow: var(--shadow-book); transition: transform .2s ease; background: #fff; aspect-ratio: 612 / 792; object-fit: cover; }
.feature img.square { aspect-ratio: 1; }
.feature:hover img { transform: translateY(-4px); }
.feature h3 { font-size: 1.05rem; margin: 16px 0 2px; }
.feature span { font-size: .85rem; color: var(--ink-faint); }
@media (max-width: 880px) { .feature-grid { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Email signup ---------- */
.signup { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: center; }
.signup ul { padding-left: 0; list-style: none; margin: 0 0 8px; }
.signup li { padding-left: 30px; position: relative; margin-bottom: 8px; }
.signup li::before { content: ""; position: absolute; left: 0; top: 7px; width: 14px; height: 14px; background: var(--lemon); border-radius: 3px; }
.signup-form { background: var(--card); color: var(--ink); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); }
.signup-form label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 6px; }
.signup-form input[type="email"],
.signup-form input[type="text"] {
  width: 100%; min-height: 50px; padding: 12px 16px; font: inherit; font-size: 1rem;
  border: 1.5px solid var(--line); border-radius: var(--radius-sm); background: var(--paper); margin-bottom: 14px;
}
.signup-form input:focus { border-color: var(--ink); outline: none; box-shadow: 0 0 0 3px var(--lemon-soft); }
.signup-form .btn { width: 100%; }
.signup-form .fine { font-size: .8rem; color: var(--ink-faint); margin: 12px 0 0; }
.signup-form .fine a { color: var(--ink-soft); }
.hp { position: absolute !important; left: -9999px !important; }
.form-msg { display: none; margin-top: 14px; padding: 12px 14px; border-radius: var(--radius-sm); font-size: .95rem; }
.form-msg.show { display: block; }
.form-msg.ok { background: #e6f2e8; color: #1f4d2a; }
.form-msg.err { background: #fbeaea; color: #7a1f1f; }
@media (max-width: 880px) { .signup { grid-template-columns: 1fr; } }

/* ---------- Page header (inner pages) ---------- */
.page-head { padding: clamp(48px, 7vw, 84px) 0 clamp(36px, 5vw, 56px); border-bottom: 1px solid var(--line); position: relative; overflow: hidden; }
.page-head::before {
  content: ""; position: absolute; inset: 0; opacity: .5;
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 22px 22px;
  -webkit-mask-image: linear-gradient(90deg, transparent 40%, #000);
  mask-image: linear-gradient(90deg, transparent 40%, #000);
}
.page-head .wrap { position: relative; }
.page-head h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); }

/* ---------- Listen (QR landing) ---------- */
.listen-list { display: grid; gap: 20px; }
.playlist {
  display: grid; grid-template-columns: 120px 1fr; gap: 22px; align-items: center;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow);
  scroll-margin-top: 90px;
}
.playlist:target { outline: 3px solid var(--lemon); outline-offset: 2px; }
.playlist img { border-radius: 3px 6px 6px 3px; box-shadow: var(--shadow-book); background: #fff; }
.playlist img.square { aspect-ratio: 1; object-fit: cover; }
.playlist h2 { font-size: 1.45rem; margin-bottom: .2em; }
.playlist .mood { font-size: .93rem; color: var(--ink-soft); margin-bottom: 14px; }
.services { display: flex; flex-wrap: wrap; gap: 10px; }
.service {
  display: inline-flex; align-items: center; gap: 8px; min-height: 46px; padding: 10px 18px;
  border-radius: 999px; border: 1.5px solid var(--line); text-decoration: none; font-weight: 600; font-size: .95rem;
  background: var(--paper);
}
.service:hover { border-color: var(--ink); }
.service svg { width: 20px; height: 20px; flex: none; }
.service.pending { opacity: .5; pointer-events: none; }
@media (max-width: 560px) {
  .playlist { grid-template-columns: 76px 1fr; gap: 16px; padding: 16px; align-items: start; }
  .service { flex: 1 1 100%; justify-content: center; }
}

/* ---------- Bonus ---------- */
.bonus-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.bonus-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.bonus-card .thumbs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 18px; }
.bonus-card .thumbs img { border: 1px solid var(--line); border-radius: 4px; aspect-ratio: 612 / 792; object-fit: cover; background: #fff; }
.bonus-card h3 { margin-bottom: .3em; }
.bonus-card p { color: var(--ink-soft); font-size: .95rem; }
.bonus-card .btn-row { margin-top: auto; }
.file-meta { font-size: .8rem; color: var(--ink-faint); margin-top: 10px; }
.tips { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.tip { border-top: 3px solid var(--ink); padding-top: 16px; }
.tip h3 { font-size: 1.1rem; }
.tip p { color: var(--ink-soft); font-size: .95rem; margin: 0; }
@media (max-width: 820px) { .bonus-grid, .tips { grid-template-columns: 1fr; } }

/* ---------- Prose (privacy etc) ---------- */
.prose h2 { font-size: 1.5rem; margin-top: 1.8em; }
.prose p, .prose li { color: var(--ink-soft); }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #cfccc2; padding: 56px 0 36px; font-size: .92rem; }
.site-footer .cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; margin-bottom: 36px; }
.site-footer h4 { font-family: var(--sans); font-size: .75rem; letter-spacing: .2em; text-transform: uppercase; color: #8f8d85; margin: 0 0 12px; font-weight: 600; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 6px; }
.site-footer a { color: #f1efe7; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer .brand-name { color: #fff; }
.site-footer .legal { border-top: 1px solid #34342f; padding-top: 22px; color: #8f8d85; font-size: .82rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
@media (max-width: 720px) { .site-footer .cols { grid-template-columns: 1fr; } }
