/* Mark's Wine Shelf landing page. Same palette and typefaces as the ebooks (ebook/template/book.css),
   so the page, the PDFs and the videos look like one brand. Change the tokens first. */
:root {
  --accent: #7A1F2B;
  --accent-deep: #4E1119;
  --accent-soft: #EBD9DB;
  --ink: #2B2116;
  --muted: #7A6849;
  --paper: #F1EADD;
  --tint: #E8DDCB;
  --line: #D9CBB2;
  --white: #FAF6EE;
  --body: 'Literata', Georgia, 'Times New Roman', serif;
  --head: 'Montserrat', 'Helvetica Neue', Arial, sans-serif;
  --size: 19px;
  --wrap: 1120px;
  --narrow: 760px;
  color-scheme: light;
}
@font-face { font-family: 'Literata'; src: url(fonts/Literata-normal-400.woff2) format('woff2'); font-weight: 200 900; font-style: normal; font-display: swap; }
@font-face { font-family: 'Literata'; src: url(fonts/Literata-italic-400.woff2) format('woff2'); font-weight: 200 900; font-style: italic; font-display: swap; }
@font-face { font-family: 'Montserrat'; src: url(fonts/Montserrat-700.woff2) format('woff2'); font-weight: 100 900; font-display: swap; }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 var(--size)/1.65 var(--body); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: var(--accent-deep); }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 28px; }
.narrow { max-width: var(--narrow); }
.center { text-align: center; }

h1, h2, h3 { font-family: var(--head); letter-spacing: -0.01em; line-height: 1.15; margin: 0 0 .5em; }
h1 { font-weight: 800; font-size: clamp(34px, 4.4vw, 54px); text-wrap: balance; }
h2 { font-weight: 800; font-size: clamp(28px, 3.4vw, 40px); }
h3 { font-weight: 800; font-size: 24px; }
p { margin: 0 0 1em; }
.eyebrow { font: 800 13px var(--head); letter-spacing: .18em; text-transform: uppercase; color: var(--accent); margin: 0 0 .9em; }
.lede { font-size: 22px; line-height: 1.55; color: #45382a; max-width: 34em; }
.sub-lede { font-size: 20px; color: #4d4033; max-width: 40em; }

/* buttons */
.btn { display: inline-flex; align-items: center; gap: .4em; background: var(--accent); color: #fff; text-decoration: none; font: 800 18px var(--head); letter-spacing: .01em; padding: 18px 30px; border-radius: 12px; box-shadow: 0 6px 0 var(--accent-deep); transition: transform .12s, box-shadow .12s; }
.btn:hover { transform: translateY(2px); box-shadow: 0 4px 0 var(--accent-deep); }
.btn:focus-visible, button:focus-visible, summary:focus-visible { outline: 3px solid #D9A441; outline-offset: 3px; }
.btn b { font-weight: 800; }
.btn.big { font-size: 21px; padding: 22px 38px; }
.btn-sm { font-size: 15px; padding: 11px 18px; box-shadow: 0 4px 0 var(--accent-deep); border-radius: 10px; }
.textlink { font: 700 17px var(--head); color: var(--ink); text-underline-offset: 5px; }
.assure { font: 600 15px/1.5 var(--head); color: var(--muted); margin-top: 18px; }
.assure.light { color: #E9D6D9; }
.check { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: #E3EFE2; color: #2F6B34; font-size: 13px; margin-right: 6px; }

/* header */
.top { position: sticky; top: 0; z-index: 20; background: rgba(241,234,221,.94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.top-in { display: flex; align-items: center; gap: 28px; height: 72px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); margin-right: auto; }
.brand b { display: block; font: 800 17px/1.1 var(--head); }
.brand small { display: block; font: 600 12px var(--head); color: var(--muted); letter-spacing: .04em; }
.mono { width: 40px; height: 40px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font: 800 14px var(--head); letter-spacing: .04em; }
.links { display: flex; gap: 26px; }
.links a { font: 700 15px var(--head); color: var(--ink); text-decoration: none; }
.links a:hover { color: var(--accent); }

/* hero */
.hero { padding: 64px 0 72px; background: radial-gradient(1200px 500px at 85% 20%, #EAD8CF 0%, rgba(234,216,207,0) 60%), var(--paper); }
.hero-in { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 22px; margin-top: 30px; }

/* the three books as a cascade, in reading order. Each book sits in front of the one to its left and covers
   only the right part of it; the titles are on the left of every cover, so all three stay readable. */
.hero-books, .offer-books, .order-books { position: relative; width: 100%; aspect-ratio: 1 / .76; }
.hero-books img, .offer-books img, .order-books img { position: absolute; width: 46%; border-radius: 3px 8px 8px 3px; box-shadow: -10px 18px 34px rgba(60,30,10,.30), inset 4px 0 0 rgba(0,0,0,.15); }
.hero-books img:nth-child(1), .offer-books img:nth-child(1), .order-books img:nth-child(1) { left: 0; top: 9%; z-index: 1; }
.hero-books img:nth-child(2), .offer-books img:nth-child(2), .order-books img:nth-child(2) { left: 27%; top: 4.5%; z-index: 2; }
.hero-books img:nth-child(3), .offer-books img:nth-child(3), .order-books img:nth-child(3) { left: 54%; top: 0; z-index: 3; }
/* bring a book to the front: hover on a computer, tap on a phone (books.js adds .front) */
.hero-books img, .offer-books img, .order-books img { cursor: pointer; transition: transform .25s ease, box-shadow .25s ease; -webkit-tap-highlight-color: transparent; }
.hero-books img.front, .offer-books img.front, .order-books img.front { z-index: 5; transform: translateY(-4%) scale(1.04); box-shadow: 0 30px 50px rgba(60,30,10,.38); }
@media (hover: hover) {
  .hero-books img:hover, .offer-books img:hover, .order-books img:hover { z-index: 5; transform: translateY(-4%) scale(1.04); box-shadow: 0 30px 50px rgba(60,30,10,.38); }
}
.hero-books { max-width: 580px; justify-self: center; }
.offer-books { max-width: 520px; justify-self: center; }
.order-books { max-width: 360px; margin: 0 0 22px; }

/* stats */
.stats { background: var(--accent); color: #fff; }
.stats-in { display: grid; grid-template-columns: repeat(4, 1fr); text-align: center; padding-top: 26px; padding-bottom: 26px; }
.stats b { display: block; font: 800 32px/1.1 var(--head); }
.stats span { display: block; font: 600 13px/1.35 var(--head); letter-spacing: .08em; text-transform: uppercase; color: #F0D9DC; margin-top: 6px; }

/* map */
.map { background: var(--white); border-bottom: 1px solid var(--line); }
.map-in { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; }
.map a { display: block; padding: 22px 24px; text-decoration: none; color: var(--ink); border-right: 1px solid var(--line); }
.map a:last-child { border-right: 0; }
.map b { display: block; font: 800 17px var(--head); color: var(--accent); }
.map span { font-size: 16px; line-height: 1.45; color: #4d4033; }
.easy { list-style: none; padding: 0; margin: 18px 0 0; font-size: 16px; color: #4d4033; }
.easy li { padding-left: 26px; position: relative; margin-bottom: 6px; }
.easy li::before { content: '•'; position: absolute; left: 8px; color: var(--accent); }

/* sections */
.sec { padding: 92px 0; }
.sec-tint { background: var(--tint); }
.moments { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 14px; }
.moments li { display: grid; grid-template-columns: 52px 1fr; gap: 14px; background: var(--white); border: 1px solid var(--line); border-radius: 14px; padding: 20px 22px; }
.moments li span { font: 800 22px var(--head); color: var(--accent); }
.ledger { width: 100%; border-collapse: collapse; margin: 22px 0 22px; background: var(--white); border-radius: 14px; overflow: hidden; box-shadow: 0 1px 0 var(--line); }
.ledger td { padding: 18px 22px; border-bottom: 1px solid var(--line); vertical-align: top; }
.ledger td:last-child { text-align: right; font: 800 17px var(--head); color: var(--accent-deep); white-space: nowrap; }
.ledger tr.total td { background: var(--accent); color: #fff; border: 0; font-weight: 600; }
.ledger tr.total td:last-child { color: #fff; font-size: 24px; }
.note { font-style: italic; color: #4d4033; }

/* books */
.book { display: grid; grid-template-columns: 300px 1fr; gap: 48px; padding: 48px 0; border-bottom: 1px solid var(--line); }
.book:last-of-type { border-bottom: 0; }
.cover { width: 100%; border-radius: 4px 8px 8px 4px; box-shadow: 0 24px 40px rgba(60,30,10,.25); align-self: start; }
.kicker { font: 800 13px var(--head); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.book h3 { font-size: 34px; margin-bottom: 4px; color: var(--book, var(--ink)); }
.pull { font-style: italic; font-size: 22px; color: var(--book, var(--accent)); border-left: 4px solid var(--book, var(--accent)); padding-left: 14px; }
.chapters { columns: 2; column-gap: 32px; padding-left: 1.3em; margin: 18px 0 0; font-size: 17px; color: #3e3226; }
.chapters li { break-inside: avoid; margin-bottom: 4px; }
.center .btn, .book + .center { margin-top: 30px; }

/* sources */
.examples { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 28px; }
.examples div { background: var(--white); border-radius: 14px; padding: 20px; border: 1px solid var(--line); }
.examples b { display: block; font: 800 17px var(--head); color: var(--accent); margin-bottom: 6px; }
.examples span { font-size: 16px; line-height: 1.5; display: block; }

/* look inside */
.pages { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; margin-top: 32px; }
.pages figure { margin: 0; }
.pages button { padding: 0; border: 0; background: none; cursor: zoom-in; display: block; width: 100%; }
.pages img { border-radius: 6px; box-shadow: 0 14px 30px rgba(60,30,10,.18); border: 1px solid var(--line); transition: transform .15s; }
.pages button:hover img { transform: translateY(-4px); }
.pages figcaption { font: 700 14px var(--head); color: var(--muted); margin-top: 12px; text-align: center; }
dialog { border: 0; padding: 0; background: transparent; max-width: min(92vw, 760px); max-height: 94vh; }
dialog::backdrop { background: rgba(30,18,12,.82); }
dialog img { max-height: 92vh; width: auto; border-radius: 6px; }
dialog .close { position: absolute; top: 8px; right: 8px; width: 48px; height: 48px; border-radius: 50%; border: 0; background: #fff; font-size: 30px; line-height: 1; cursor: pointer; }

/* offer */
.offer { display: grid; grid-template-columns: .9fr 1.1fr; gap: 56px; align-items: center; background: var(--white); border-radius: 24px; padding: 48px; box-shadow: 0 30px 60px rgba(60,30,10,.12); border: 1px solid var(--line); }
.included { list-style: none; padding: 0; margin: 18px 0; }
.included li { display: flex; flex-direction: column; padding: 12px 0; border-bottom: 1px solid var(--line); }
.included b { font: 800 19px var(--head); }
.included span { font-size: 16px; color: var(--muted); }
.price { display: flex; align-items: baseline; gap: 14px; margin: 22px 0 20px; }
.price b { font: 800 56px/1 var(--head); color: var(--accent); }
.price span { font: 600 15px var(--head); color: var(--muted); }

/* guarantee + author */
.guarantee { text-align: center; border: 3px double var(--accent); border-radius: 22px; padding: 40px 36px; margin-bottom: 80px; background: var(--white); }
.author { display: grid; grid-template-columns: 260px 1fr; gap: 40px; align-items: start; }
.author img { border-radius: 16px; box-shadow: 0 20px 40px rgba(60,30,10,.2); }
.sig { font: 800 18px var(--head); color: var(--accent); }

/* fit */
.fit { display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; margin-top: 24px; }
.fit > div { background: var(--white); border-radius: 16px; padding: 26px 28px; border: 1px solid var(--line); }
.fit h3 { font-size: 20px; }
.fit ul { padding-left: 1.2em; margin: 0; }
.fit li { margin-bottom: 10px; font-size: 18px; }

/* faq */
details { border-bottom: 1px solid var(--line); }
summary { cursor: pointer; list-style: none; font: 700 20px/1.4 var(--head); padding: 22px 44px 22px 0; position: relative; }
summary::-webkit-details-marker { display: none; }
summary::after { content: '+'; position: absolute; right: 6px; top: 16px; font-size: 30px; color: var(--accent); }
details[open] summary::after { content: '−'; }
details p { padding-bottom: 14px; color: #3e3226; }

/* closing + footer */
.closing { background: var(--accent); color: #fff; padding: 92px 0; }
.closing h2 { color: #fff; }
.closing p { color: #F3E3E5; font-size: 21px; max-width: 32em; margin: 0 auto 30px; }
.closing .assure { font-size: 15px; margin: 20px auto 0; }
.closing .btn { background: #fff; color: var(--accent); box-shadow: 0 6px 0 #D8BFC2; }
.foot { background: #2B2116; color: #CDBFAA; font: 600 14px var(--head); padding: 30px 0; }
.foot-in { display: flex; flex-wrap: wrap; gap: 12px 28px; justify-content: space-between; }
.foot a { color: #EADCC4; }
.foot .small { flex-basis: 100%; color: #9C8D77; font-weight: 500; }

/* mobile buy bar */
.buybar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: none; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; background: var(--white); border-top: 1px solid var(--line); box-shadow: 0 -8px 24px rgba(60,30,10,.12); font: 600 15px var(--head); transform: translateY(110%); transition: transform .2s; }
.buybar.show { transform: none; }

/* ── responsive ── */
@media (max-width: 900px) {
  .links { display: none; }
  .hero-in, .offer, .author { grid-template-columns: 1fr; }
  .hero-books { max-width: 520px; margin-top: 8px; }
  .offer-books { max-width: 460px; }
  .stats-in { grid-template-columns: repeat(2, 1fr); row-gap: 20px; }
  .book { grid-template-columns: 200px 1fr; gap: 28px; }
  .examples, .pages { grid-template-columns: 1fr 1fr; }
  .fit { grid-template-columns: 1fr; }
  .map-in { grid-template-columns: 1fr; }
  .map a { border-right: 0; border-bottom: 1px solid var(--line); padding: 16px 0; }
  .offer { padding: 32px; }
  .author img { max-width: 280px; }
}
@media (max-width: 600px) {
  :root { --size: 18px; }
  .wrap { padding: 0 16px; }
  .top-in { height: 64px; gap: 12px; }
  .brand small { display: none; }
  .top .buy { display: none; }
  .hero { padding: 36px 0 48px; }
  .lede { font-size: 19px; }
  .cta-row .btn { width: 100%; justify-content: center; }
  .stats-in { grid-template-columns: 1fr 1fr; }
  .stats b { font-size: 26px; }
  .sec { padding: 64px 0; }
  .book { grid-template-columns: 1fr; padding: 36px 0; }
  .book .cover { max-width: 220px; }
  .chapters { columns: 1; }
  .examples, .pages { grid-template-columns: 1fr; }
  .pages img { max-width: 380px; margin: 0 auto; }
  .ledger td { padding: 14px; font-size: 16px; }
  .ledger td:last-child { white-space: normal; font-size: 15px; }
  .offer { padding: 24px 18px; border-radius: 18px; }
  .price b { font-size: 46px; }
  .btn.big { width: 100%; justify-content: center; font-size: 19px; padding: 20px; }
  .guarantee { padding: 28px 20px; margin-bottom: 56px; }
  .buybar { display: flex; }
  body { padding-bottom: 72px; }
}

/* checkout + thanks */
.checkout-sec { padding: 56px 0 80px; }
.checkout { display: grid; grid-template-columns: .85fr 1.15fr; gap: 48px; align-items: start; }
.order { background: var(--white); border: 1px solid var(--line); border-radius: 20px; padding: 32px; position: sticky; top: 96px; }
.order h1 { font-size: 28px; }
.pay { min-width: 0; }
.whop-box { min-height: 560px; background: var(--white); border: 1px solid var(--line); border-radius: 20px; padding: 12px; }
.fallback, .notice { background: var(--white); border: 1px solid var(--line); border-radius: 16px; padding: 24px; margin-bottom: 16px; }
.notice { background: #F5E8D3; border-color: #E8C79A; }
.thanks-h { font-size: clamp(30px, 4vw, 44px); }
.steps { text-align: left; max-width: 34em; margin: 26px auto; padding-left: 1.3em; }
.steps li { margin-bottom: 10px; }
@media (max-width: 900px) {
  .checkout { grid-template-columns: 1fr; gap: 28px; }
  .order { position: static; }
}
@media (max-width: 600px) {
  .order { padding: 22px 18px; }
  .whop-box { padding: 6px; border-radius: 14px; }
}

.dl-list { display: grid; gap: 14px; max-width: 420px; margin: 0 auto 10px; }
.dl-btn { justify-content: center; font-size: 19px; }

/* order + recover pages */
.book-list { display: grid; gap: 12px; max-width: 520px; margin: 0 auto 18px; text-align: left; }
.book-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 20px; background: var(--white); border: 1px solid var(--line); border-radius: 14px; text-decoration: none; color: var(--ink); box-shadow: 0 6px 18px rgba(60,30,10,.06); }
.book-row:hover { border-color: var(--accent); }
.book-row b { display: block; font: 800 19px var(--head); }
.book-row small { display: block; font-size: 15px; color: var(--muted); }
.book-row .dl { flex: none; font: 800 15px var(--head); color: #fff; background: var(--accent); padding: 10px 14px; border-radius: 10px; }
.recover-form { display: grid; gap: 10px; max-width: 460px; margin: 24px 0; }
.recover-form label { font: 700 16px var(--head); }
.recover-form input { font: 400 20px var(--body); padding: 14px 16px; border: 2px solid var(--line); border-radius: 12px; background: var(--white); color: var(--ink); }
.recover-form input:focus { outline: none; border-color: var(--accent); }
.recover-form .btn { justify-content: center; border: 0; cursor: pointer; }
@media (max-width: 600px) { .book-row { flex-direction: column; align-items: flex-start; } }
.method { margin-top: 22px; background: var(--white); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 12px; padding: 18px 22px; }
.method p { margin: 0; }
.method b { color: var(--accent); }
