/* The Long-Life Almanac: store site. Mobile-first, no framework.
   Ported from the approved Claude Design mockup (docs/design/claude-design/project/Main.dc.html).
   CSP: style-src 'self' + Google Fonts, so every style lives here (no inline styles in the HTML). */
:root {
  --bg: #F7F3EA;          /* page */
  --band: #F1EBDD;        /* quote band, signed band */
  --card: #FBF8F1;        /* offer card */
  --ink: #233528;         /* body text, buttons */
  --head: #1F3024;        /* headings */
  --text: #3D4A3F;        /* lede text */
  --text-soft: #4A564C;   /* item text */
  --muted: #6B6E5F;       /* meta, captions */
  --struck: #8A8676;      /* crossed-out list price */
  --accent: #85692F;      /* gold accent, darkened from #9A7B3F to pass AA contrast (4.7:1) */
  --gold-light: #C9A66B;  /* gold on the dark letter */
  --link: #2F4A33;
  --link-hover: #1C2E20;
  --rule: #E3D9C3;        /* band edges, footer */
  --rule-item: #DCD2BD;   /* list rules */
  --ring: #D8CBAE;        /* portrait ring, card edge */
  --letter-bg: #233528;
  --letter-text: #EDE6D6;
  --rust: #A4552F;
  --shadow-page: 0 18px 40px rgba(35, 53, 40, 0.14);
  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --body: "Lora", Georgia, "Times New Roman", serif;
  --label: "Alegreya Sans SC", "Gill Sans", "Trebuchet MS", sans-serif;
  --wrap: 1180px;
  --gutter: 20px;
  color-scheme: light;
}
@media (min-width: 720px) { :root { --gutter: 24px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.65;
  overflow-x: hidden;
}
@media (min-width: 720px) { body { font-size: 1.125rem; } }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); text-underline-offset: 3px; }
a:hover { color: var(--link-hover); }
:focus-visible { outline: 3px solid var(--rust); outline-offset: 3px; border-radius: 4px; }
p { margin: 0; }
h1, h2, h3 { font-family: var(--display); color: var(--head); margin: 0; font-weight: 300; }
h2 { text-wrap: balance; }
h3 { font-weight: 400; }
.nowrap { white-space: nowrap; }

.skip { position: absolute; left: -9999px; top: 0; }
.skip:focus { left: 16px; top: 16px; z-index: 100; background: var(--card); padding: 8px 14px; border-radius: 8px; }

.wrap { width: 100%; max-width: var(--wrap); margin-left: auto; margin-right: auto; padding-left: var(--gutter); padding-right: var(--gutter); }

/* Small-caps label above a heading (the design's accent eyebrow). .kicker is the same thing on the plain pages. */
.eyebrow, .kicker {
  margin: 0;
  font-family: var(--label);
  font-weight: 700;
  font-size: 0.875rem;
  line-height: 1.5;
  letter-spacing: 0.3em;
  color: var(--accent);
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 56px; padding: 0 34px;
  border: 0; border-radius: 999px;
  background: var(--ink); color: var(--bg);
  font-family: var(--label); font-weight: 700; font-size: 1.0625rem; letter-spacing: 0.1em;
  text-decoration: none; cursor: pointer;
  transition: background-color .2s ease, transform .2s ease;
}
.btn:hover { background: var(--link-hover); color: var(--bg); transform: translateY(-1px); }
.btn[disabled] { opacity: .7; cursor: progress; transform: none; }
.btn-buy { padding: 0 40px; }
.btn-ghost { background: transparent; color: var(--ink); border: 1px solid var(--ink); }
.btn-ghost:hover { background: rgba(35, 53, 40, 0.06); color: var(--ink); }

/* ---------- Header ---------- */
.site-header {
  max-width: var(--wrap); margin: 0 auto;
  padding: 20px var(--gutter) 4px;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.brand {
  font-family: var(--display); font-size: 1.3rem; font-weight: 400; letter-spacing: 0.01em;
  color: var(--ink); text-decoration: none;
}
.site-nav {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 0 22px;
  font-family: var(--label); font-weight: 500; font-size: 0.9375rem; letter-spacing: 0.1em;
}
.site-nav a { color: var(--ink); text-decoration: none; display: inline-flex; align-items: center; min-height: 44px; }
.site-nav a:hover { color: var(--link-hover); text-decoration: underline; }
.site-nav .nav-pill { display: none; }
@media (min-width: 720px) {
  .site-header { flex-direction: row; flex-wrap: wrap; justify-content: space-between; gap: 16px; padding: 28px var(--gutter); }
  .brand { font-size: 1.375rem; }
  .site-nav { gap: 12px 28px; letter-spacing: 0.12em; }
  .site-nav .nav-pill {
    display: inline-flex; padding: 0 20px; border: 1px solid var(--ink); border-radius: 999px;
  }
  .site-nav .nav-pill:hover { background: var(--ink); color: var(--bg); text-decoration: none; }
}

/* ---------- Hero ---------- */
.hero {
  max-width: var(--wrap); margin: 0 auto;
  padding: 28px var(--gutter) 72px;
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 22px;
  position: relative;
}
.hero .eyebrow { letter-spacing: 0.32em; }
.sol-frame {
  width: 340px; max-width: 78vw; aspect-ratio: 1 / 1;
  border-radius: 50%; padding: 14px; border: 1px solid var(--ring);
}
.sol-frame img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
.hero h1 {
  margin-top: 4px;
  font-size: clamp(3rem, 7vw, 6rem); line-height: 1.02; letter-spacing: -0.015em;
  text-wrap: balance;
}
.hero-sub { max-width: 620px; font-size: 1.125rem; color: var(--text); text-wrap: balance; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 14px 20px; margin-top: 6px; }
.hero-price {
  min-height: 1.5em;
  display: inline-flex; flex-wrap: wrap; align-items: baseline; justify-content: center; gap: 4px 10px;
  font-family: var(--display); font-size: 1.5rem; line-height: 1.2; color: var(--head);
}
/* app.js writes "<s.was>$24.99</s> $19.99"; the design shows "$19.99 $24.99(struck)", so flip the order. */
.price-pair { display: inline-flex; flex-direction: row-reverse; align-items: baseline; gap: 8px; }
.price-pair .was { font-size: 1.125rem; color: var(--struck); }
.price-label { font-family: var(--label); font-size: 0.8125rem; letter-spacing: 0.16em; color: var(--accent); }
.hero-meta { font-size: 0.9375rem; color: var(--muted); text-wrap: balance; }
@media (min-width: 720px) {
  .hero { padding: 48px var(--gutter) 120px; gap: 28px; }
  .hero h1 { margin-top: 8px; }
  .hero-sub { font-size: 1.25rem; }
  .hero-actions { margin-top: 8px; }
}

/* ---------- The leaf (moved by js/app.js; only transform changes) ---------- */
.leaf {
  /* top offset: app.js starts the leaf ~14% down the viewport; this drops it beside Sol's portrait,
     clear of the nav, the eyebrow and the headline. */
  position: fixed; top: 8vh; left: 0; z-index: 30;
  width: 46px; height: 46px;
  pointer-events: none;
  will-change: transform;
  transform: translate3d(50vw, -80px, 0);
  filter: drop-shadow(0 6px 6px rgba(38, 52, 31, 0.18));
}
.leaf svg { width: 100%; height: 100%; display: block; }
@media (min-width: 720px) { .leaf { width: 54px; height: 54px; } }
@media print { .leaf { display: none; } }

/* ---------- Bands (quote, signed pages) ---------- */
.band { background: var(--band); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.quote { max-width: 900px; margin: 0 auto; padding: 64px var(--gutter); text-align: center; }
.quote blockquote { margin: 0; }
.quote blockquote p {
  font-family: var(--display); font-style: italic; font-weight: 300;
  font-size: clamp(1.75rem, 4vw, 3rem); line-height: 1.25; color: var(--head); text-wrap: balance;
}
.quote figcaption { margin-top: 24px; font-family: var(--label); font-size: 0.875rem; letter-spacing: 0.24em; color: var(--accent); }
@media (min-width: 720px) { .quote { padding: 96px var(--gutter); } }

/* ---------- What's inside ---------- */
.inside { padding-top: 72px; padding-bottom: 48px; }
.inside-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 16px; margin-bottom: 32px; }
.inside-head h2 { font-size: clamp(2.25rem, 4.4vw, 3.5rem); line-height: 1.1; }
.inside-meta { font-family: var(--label); font-size: 0.9375rem; letter-spacing: 0.18em; color: var(--muted); }
.features {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 0 56px;
}
.features li { padding: 24px 0; border-top: 1px solid var(--rule-item); }
.features h3 { margin-bottom: 8px; font-size: 1.375rem; line-height: 1.25; }
.features p { color: var(--text-soft); }
@media (min-width: 720px) {
  .inside { padding-top: 120px; padding-bottom: 80px; }
  .inside-head { margin-bottom: 56px; }
  .features li { padding: 28px 0; }
  .features h3 { font-size: 1.5rem; }
}

/* ---------- Book pages (look inside, signed pages) ---------- */
.look { padding-top: 32px; padding-bottom: 72px; }
.look h2 { margin-bottom: 28px; font-size: clamp(1.875rem, 3.4vw, 2.5rem); line-height: 1.15; }
.pages { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px 16px; }
.pages figure { margin: 0; display: flex; flex-direction: column; gap: 10px; }
.pages img {
  width: 100%; aspect-ratio: 210 / 297; object-fit: cover;
  border-radius: 4px; box-shadow: 0 10px 24px rgba(35, 53, 40, 0.14); background: var(--card);
}
.pages figcaption { font-family: var(--label); font-size: 0.8125rem; line-height: 1.4; letter-spacing: 0.12em; color: var(--muted); }
@media (min-width: 720px) {
  .look { padding-top: 40px; padding-bottom: 120px; }
  .look h2 { margin-bottom: 40px; }
  .pages { gap: 28px; }
  .pages figure { gap: 12px; }
  .pages img { box-shadow: var(--shadow-page); }
  .pages figcaption { font-size: 0.875rem; letter-spacing: 0.14em; }
  .pages-4 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
}

.signed-inner { padding-top: 72px; padding-bottom: 72px; display: flex; flex-direction: column; gap: 36px; }
.signed-copy { max-width: 640px; display: flex; flex-direction: column; gap: 16px; }
.signed-copy h2 { font-size: clamp(2.125rem, 4vw, 3.25rem); line-height: 1.1; }
.signed-lede { font-size: 1.125rem; color: var(--text); }
@media (min-width: 720px) {
  .signed-inner { padding-top: 120px; padding-bottom: 120px; gap: 48px; }
  .signed-lede { font-size: 1.1875rem; }
}

/* ---------- A note from Sol ---------- */
.letter { background: var(--letter-bg); color: var(--letter-text); }
.letter-inner { max-width: 760px; margin: 0 auto; padding: 80px var(--gutter); display: flex; flex-direction: column; gap: 24px; }
.letter .eyebrow { color: var(--gold-light); }
.letter-lead { font-family: var(--display); font-weight: 300; font-size: clamp(1.5rem, 2.6vw, 2rem); line-height: 1.45; color: var(--bg); }
.letter-body { font-size: 1.125rem; line-height: 1.75; color: #D9D1BF; }
.letter-sign { margin-top: 8px; font-family: var(--display); font-style: italic; font-size: 1.625rem; color: var(--gold-light); }
@media (min-width: 720px) {
  .letter-inner { padding: 120px var(--gutter); }
  .letter-body { font-size: 1.1875rem; }
}

/* ---------- Offer ---------- */
.offer { padding-top: 72px; padding-bottom: 72px; }
.offer-card {
  max-width: 640px; margin: 0 auto;
  border: 1px solid var(--ring); border-radius: 20px; background: var(--card);
  padding: 44px 22px;
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 20px;
}
.offer-price { font-family: var(--display); font-weight: 300; font-size: 4rem; line-height: 1; color: var(--head); }
/* The big price shows only the current price; the struck one sits on the line below.
   It stays readable to screen readers here ("was $24.99"), and the line below is aria-hidden. */
.offer-price .was {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}
.offer-was { margin-top: -8px; font-size: 1rem; color: var(--muted); }
.was-only { font-size: 0; }
.was-only .was { font-size: 1rem; color: var(--muted); }
.was-only:has(.was)::after { content: "\00a0\00b7\00a0"; font-size: 1rem; }
.offer-list { margin: 8px 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; color: var(--text); }
.offer-list li { text-wrap: balance; }
.offer-fine { font-size: 0.875rem; color: var(--muted); }
.notice {
  width: 100%; padding: 14px 16px; border-radius: 12px;
  background: var(--bg); border: 1px solid var(--accent); color: var(--ink); font-size: 1rem;
}
.notice[hidden] { display: none; }
@media (min-width: 720px) {
  .offer { padding-top: 120px; padding-bottom: 120px; }
  .offer-card { padding: 56px 48px; }
}

/* ---------- FAQ ---------- */
.faq { max-width: 820px; margin: 0 auto; padding: 0 var(--gutter) 80px; }
.faq h2 { margin-bottom: 24px; font-size: clamp(1.875rem, 3.4vw, 2.5rem); line-height: 1.15; }
.faq-item { padding: 24px 0; border-top: 1px solid var(--rule-item); }
.faq-item:last-child { border-bottom: 1px solid var(--rule-item); }
.faq-item h3 { margin-bottom: 6px; font-size: 1.3125rem; line-height: 1.3; }
.faq-item p { color: var(--text-soft); }
@media (min-width: 720px) {
  .faq { padding-bottom: 120px; }
  .faq h2 { margin-bottom: 32px; }
}

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--rule); }
.footer-inner {
  max-width: var(--wrap); margin: 0 auto; padding: 40px var(--gutter) 56px;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px;
  font-size: 0.9375rem; color: var(--muted);
}
.footer-about { display: flex; flex-direction: column; gap: 8px; max-width: 520px; }
.footer-brand { font-family: var(--display); font-size: 1.25rem; color: var(--ink); }
.footer-nav { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 4px 24px; }
.footer-nav a { display: inline-flex; align-items: center; min-height: 44px; }
@media (min-width: 720px) { .footer-inner { padding: 48px var(--gutter) 64px; } }

/* ---------- Plain pages (thanks, legal, errors) ---------- */
body.plain { background: var(--bg); }
.topbar {
  max-width: 760px; margin: 0 auto; padding: 24px var(--gutter) 0;
  font-family: var(--display); font-size: 1.3rem; font-weight: 400; letter-spacing: 0.01em;
}
.topbar a { color: var(--ink); text-decoration: none; }
.topbar a:hover { color: var(--link-hover); }
.plain-main { max-width: 760px; margin: 0 auto; padding: 40px var(--gutter) 80px; }
.plain-main p, .plain-main ul, .plain-main ol { margin: 0 0 14px; }
.plain-main .kicker { margin-bottom: 12px; }
.plain-main h1 { margin-bottom: 16px; font-size: clamp(2.25rem, 7vw, 3.5rem); line-height: 1.08; letter-spacing: -0.01em; }
.plain-main h2 { margin: 36px 0 12px; font-size: 1.5rem; line-height: 1.2; font-weight: 400; }
.plain-main .card h2 { margin-top: 0; }
.plain-main li { margin: 6px 0; }
.draft-banner {
  background: #FFF4E5; border: 2px dashed var(--rust); color: #8A4424;
  padding: 12px 16px; border-radius: 10px; font-family: var(--label); letter-spacing: .06em; margin-bottom: 24px;
}
.card { background: var(--card); border: 1px solid var(--ring); border-radius: 20px; padding: 24px; margin: 22px 0; }
.card > :last-child { margin-bottom: 0; }
.form-row { display: grid; gap: 10px; margin-top: 10px; }
.form-row label { font-family: var(--label); font-weight: 500; letter-spacing: .08em; }
.form-row input {
  font: inherit; color: var(--ink); padding: 12px 14px; min-height: 48px;
  border: 1px solid var(--ring); border-radius: 12px; background: #fff;
}
.form-row input:focus-visible { border-color: var(--ink); }
.status { min-height: 1.5em; color: var(--text-soft); }
.muted { color: var(--muted); font-size: .95rem; }
@media (min-width: 720px) { .card { padding: 32px; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .btn:hover { transform: none; }
}

/* launch pricing: crossed-out list price (written by js/app.js) */
.was { font-weight: 400; text-decoration-thickness: 1.5px; }
