/* Offline Academy — forest-green band echoing the PDF covers (sun + grass), calm cream catalogue;
   each guide page re-tints its band with that guide's cover color. */
:root {
  --bg: #F5F1E8; --surface: #FFFDF8; --ink: #1E2A23; --muted: #5B675F; --line: #E1D9C9;
  --soft: #E4EDDF; --accent: #C9623F; --primary: #1F3A2E; --on-primary: #F7F2E8;
  --band: #1F3A2E; --band-ink: #F7F2E8; --band-muted: #C8D8C1; --sun: #D9734E;
  --shadow: 0 1px 2px rgba(30,42,35,.06), 0 10px 28px rgba(30,42,35,.10);
  --f-display: "Fraunces", Georgia, "Times New Roman", serif;
  --f-body: "Figtree", "Segoe UI", system-ui, -apple-system, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111814; --surface: #19221D; --ink: #ECE6DA; --muted: #A4B0A7; --line: #2C3832;
    --soft: #22302A; --accent: #E58A66; --primary: #A8C3A0; --on-primary: #13201A;
    --band: #16261E; --band-ink: #F2ECDF; --band-muted: #A8C3A0;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 10px 28px rgba(0,0,0,.35); color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font-family: var(--f-body); font-size: 16px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--f-display); font-weight: 600; line-height: 1.12; text-wrap: balance; margin: 0; letter-spacing: -0.01em; }
p { margin: 0; }
button { font: inherit; cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .55; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.wrap { max-width: 1160px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
section { padding-block: 72px; }
.sec-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 18px; margin-bottom: 28px; }
.sec-head h2 { font-size: clamp(30px, 3.6vw, 42px); margin-top: 8px; }
.sec-head p { color: var(--muted); max-width: 46ch; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 999px; padding: 13px 22px; font-weight: 600; text-decoration: none; font-size: 15px; transition: transform .15s ease; }
.btn:hover:not(:disabled) { transform: translateY(-1px); }
.btn-primary { background: var(--primary); color: var(--on-primary); }
.btn-accent { background: var(--sun); color: #1B1712; }
.btn-ghost { background: transparent; color: inherit; box-shadow: inset 0 0 0 1.5px currentColor; }
.text-btn { background: none; border: 0; padding: 0; color: var(--muted); text-decoration: underline; font-size: 13px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 20; background: var(--surface); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 12px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--f-display); font-weight: 700; font-size: 20px; }
.logo-mark { width: 30px; height: 30px; border-radius: 50%; background: var(--sun); position: relative; overflow: hidden; flex: none; }
.logo-mark::after { content: ""; position: absolute; left: -4px; right: -4px; bottom: -6px; height: 15px; background: var(--primary); border-radius: 50% 50% 0 0; }
.nav { display: flex; align-items: center; gap: 22px; font-size: 15px; font-weight: 500; }
.nav a { text-decoration: none; color: var(--muted); }
.nav a:hover { color: var(--ink); }
.cart-btn { display: inline-flex; align-items: center; gap: 8px; background: var(--primary); color: var(--on-primary); border: 0; border-radius: 999px; padding: 9px 16px; font-weight: 600; font-size: 14px; }
.cart-count { background: var(--sun); color: #1B1712; border-radius: 999px; min-width: 22px; height: 22px; display: inline-grid; place-items: center; font-size: 12px; font-weight: 700; padding: 0 6px; }
.cart-count:empty { display: none; }
@media (max-width: 760px) { .nav .nav-link { display: none; } }

/* Hero */
.hero { background: var(--band); color: var(--band-ink); position: relative; overflow: hidden; padding: 0; }
.hero .wrap { display: grid; grid-template-columns: 1.05fr .95fr; gap: 40px; align-items: center; padding-block: 64px 96px; position: relative; z-index: 1; }
.hero h1 { font-size: clamp(38px, 5.4vw, 64px); margin-top: 14px; }
.hero h1 em { font-style: italic; color: var(--sun); }
.hero .eyebrow { color: var(--sun); }
.hero-sub { font-size: 19px; color: var(--band-muted); margin-top: 18px; max-width: 34ch; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero .btn-ghost { color: var(--band-ink); }
.hero-facts { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 28px; font-size: 14px; color: var(--band-muted); }
.hero-facts span::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--sun); margin-right: 8px; vertical-align: 1px; }
.fan { position: relative; height: 420px; }
.fan a { position: absolute; width: 230px; aspect-ratio: 612/792; border-radius: 6px; overflow: hidden; box-shadow: 0 18px 40px rgba(0,0,0,.35); top: 50%; left: 50%; transition: transform .35s ease; background: rgba(255,255,255,.08); }
.fan img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fan a:nth-child(1) { transform: translate(-108%, -48%) rotate(-8deg); }
.fan a:nth-child(2) { transform: translate(-50%, -54%); z-index: 2; }
.fan a:nth-child(3) { transform: translate(8%, -48%) rotate(8deg); }
.fan:hover a:nth-child(1) { transform: translate(-114%, -48%) rotate(-11deg); }
.fan:hover a:nth-child(3) { transform: translate(14%, -48%) rotate(11deg); }
.grass { position: absolute; left: 0; right: 0; bottom: 0; height: 90px; width: 100%; display: block; pointer-events: none; }
@media (max-width: 860px) { .hero .wrap { grid-template-columns: 1fr; padding-block: 44px 90px; } .fan { height: 300px; } .fan a { width: 160px; } }

/* Deals strip */
.deals { background: var(--surface); border-bottom: 1px solid var(--line); }
.deals .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 28px; padding-block: 14px; font-size: 15px; }
.deal { display: inline-flex; align-items: center; gap: 8px; }
.deal b { background: var(--soft); border-radius: 999px; padding: 3px 10px; font-size: 13px; }

/* Chips + grid */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.chip { border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 999px; padding: 8px 15px; font-size: 14px; font-weight: 500; }
.chip[aria-pressed="true"] { background: var(--primary); color: var(--on-primary); border-color: transparent; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 30px 24px; transition: opacity .2s ease; }
.grid.dim { opacity: .55; }
@media (max-width: 520px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 14px; } }
.card { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.card-cover { display: block; border-radius: 8px; overflow: hidden; box-shadow: var(--shadow); aspect-ratio: 612/792; background: var(--soft); transition: transform .2s ease; }
.card-cover:hover { transform: translateY(-4px); }
.card-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card h3 { font-size: 20px; margin-top: 6px; }
.card h3 a { text-decoration: none; }
.card h3 a:hover { text-decoration: underline; text-underline-offset: 3px; }
.ribbons { display: flex; flex-wrap: wrap; gap: 6px; }
.badge { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; background: var(--sun); color: #1B1712; padding: 3px 8px; border-radius: 999px; }
.price-line { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.price { font-family: var(--f-display); font-size: 21px; font-weight: 600; font-variant-numeric: tabular-nums; }
.was { color: var(--muted); text-decoration: line-through; font-size: 14px; }
.disc { color: var(--accent); font-size: 13px; }
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 4px; }
.add { border: 1.5px solid var(--primary); color: var(--ink); background: transparent; border-radius: 999px; padding: 7px 14px; font-size: 13.5px; font-weight: 600; white-space: nowrap; text-decoration: none; }
.skeleton { background: var(--soft); border-radius: 8px; aspect-ratio: 612/792; }
.state { color: var(--muted); padding: 24px 0; }

/* Collection */
.collection { background: var(--surface); border-block: 1px solid var(--line); }
.collection .wrap { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.collection h2 { font-size: clamp(30px, 3.6vw, 42px); margin-top: 8px; }
.collection .lead { color: var(--muted); margin-top: 14px; max-width: 46ch; }
.collection ul { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 8px; }
.collection li { display: flex; gap: 10px; }
.collection li::before { content: ""; flex: none; width: 18px; height: 18px; margin-top: 3px; border-radius: 50%; box-shadow: inset 0 0 0 5px var(--soft), inset 0 0 0 9px var(--accent); }
.price-row { display: flex; align-items: baseline; gap: 12px; margin: 22px 0 18px; }
.price-row .now { font-family: var(--f-display); font-size: 40px; font-weight: 700; }
.price-row .was { font-size: 18px; }
.collection-img { border-radius: 12px; overflow: hidden; box-shadow: var(--shadow); aspect-ratio: 1; background: var(--soft); }
.collection-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (max-width: 860px) { .collection .wrap { grid-template-columns: 1fr; } .collection-img { max-width: 360px; order: -1; } }

/* Steps + FAQ */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.step { border-top: 2px solid var(--ink); padding-top: 18px; }
.step .n { font-family: var(--f-display); font-size: 15px; color: var(--accent); font-weight: 600; }
.step h3 { font-size: 23px; margin: 6px 0 8px; }
.step p { color: var(--muted); }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } }
.faq { max-width: 760px; }
.faq details { border-bottom: 1px solid var(--line); padding-block: 16px; }
.faq summary { cursor: pointer; font-weight: 600; font-size: 17px; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--f-display); font-size: 22px; line-height: 1; color: var(--accent); }
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--muted); margin-top: 10px; max-width: 62ch; }

/* Footer */
footer { border-top: 1px solid var(--line); background: var(--surface); }
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 18px; padding-block: 36px; font-size: 14px; color: var(--muted); }
footer .links { display: flex; flex-wrap: wrap; gap: 18px; }
footer a { text-decoration: none; }
footer strong { color: var(--ink); }

/* Product page */
.p-band { background: var(--g, #1F3A2E); color: #F7F2E8; padding: 0; }
.p-band .wrap { display: grid; grid-template-columns: minmax(0, 440px) minmax(0, 1fr); gap: 56px; padding-block: 32px 56px; align-items: start; }
.crumb { font-size: 14px; color: rgba(247,242,232,.78); grid-column: 1 / -1; }
.crumb a { text-decoration: none; }
.crumb a:hover { text-decoration: underline; }
.gallery-main { border-radius: 8px; overflow: hidden; box-shadow: 0 20px 44px rgba(0,0,0,.35); aspect-ratio: 612/792; background: rgba(255,255,255,.08); }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumbs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.thumbs button { padding: 0; border: 2px solid transparent; border-radius: 5px; overflow: hidden; background: none; aspect-ratio: 612/792; opacity: .72; }
.thumbs button[aria-pressed="true"] { border-color: var(--gs, #E8916C); opacity: 1; }
.thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }
.p-info .eyebrow { color: var(--gs, #E8916C); }
.p-info h1 { font-size: clamp(36px, 4.6vw, 56px); margin-top: 10px; }
.p-price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.p-price .now { font-family: var(--f-display); font-size: 42px; font-weight: 700; }
.p-price .was { color: rgba(247,242,232,.7); font-size: 18px; }
.p-price small { color: rgba(247,242,232,.78); font-size: 14px; }
.p-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 18px; }
.p-ctas .btn-main { background: var(--gs, #E8916C); color: #1B1712; }
.p-ctas .btn-ghost { color: #F7F2E8; }
.p-note { margin-top: 14px; font-size: 14px; color: rgba(247,242,232,.85); }
.p-note b { color: var(--gs, #E8916C); }
.p-error { margin-top: 10px; font-size: 14px; color: #FFD9CC; }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 28px; padding-top: 22px; border-top: 1px solid rgba(247,242,232,.22); }
.facts div { font-size: 13px; color: rgba(247,242,232,.74); }
.facts strong { display: block; font-size: 16px; color: #F7F2E8; font-weight: 600; }
@media (max-width: 900px) { .p-band .wrap { grid-template-columns: 1fr; gap: 28px; } .p-gallery { max-width: 380px; } }
.p-desc { max-width: 70ch; }
.p-desc p { margin: 0 0 14px; }
.p-desc ul { padding-left: 1.2em; margin: 0 0 14px; display: grid; gap: 6px; }
.p-desc h2, .p-desc h3 { margin: 18px 0 10px; }

/* Cart drawer */
.scrim { position: fixed; inset: 0; background: rgba(10,14,12,.45); z-index: 40; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(420px, 100%); background: var(--surface); z-index: 41; display: flex; flex-direction: column;
  padding: calc(20px + env(safe-area-inset-top, 0px)) max(20px, env(safe-area-inset-right, 0px)) calc(20px + env(safe-area-inset-bottom, 0px)) 20px; box-shadow: -10px 0 40px rgba(0,0,0,.2); }
.drawer-head { display: flex; justify-content: space-between; align-items: center; }
.drawer-head h2 { font-size: 26px; }
.x { border: 0; background: var(--soft); color: var(--ink); width: 36px; height: 36px; border-radius: 50%; font-size: 18px; }
.lines { flex: 1; overflow-y: auto; margin-top: 18px; display: grid; align-content: start; gap: 16px; }
.line { display: grid; grid-template-columns: 52px 1fr auto; gap: 12px; align-items: start; }
.line img { width: 52px; border-radius: 3px; box-shadow: var(--shadow); display: block; }
.line .t { font-weight: 600; font-size: 15px; line-height: 1.3; }
.line .sub { font-size: 13px; color: var(--muted); }
.line .pr { font-variant-numeric: tabular-nums; font-weight: 600; text-align: right; }
.qty { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; }
.qty button { width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--ink); line-height: 1; }
.totals { border-top: 1px solid var(--line); margin-top: 14px; padding-top: 14px; display: grid; gap: 6px; font-variant-numeric: tabular-nums; }
.totals div { display: flex; justify-content: space-between; gap: 12px; }
.totals .save { color: var(--accent); }
.totals .grand { font-family: var(--f-display); font-size: 22px; font-weight: 700; margin-top: 4px; }
.cart-msg { font-size: 13px; color: var(--muted); margin-top: 10px; }
.cart-err { font-size: 13px; color: var(--accent); margin-top: 8px; }
body.locked { overflow: hidden; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; } }