/* Stax Planner — the home page: a paper planner, a letter, a table of
   contents and a printed card, set on dark emerald leather with warm gold,
   like the app icon (leather cover, gold metal, cream pages). The first
   part is the paper base; the overrides at the end (.design-ink) put it on
   leather. Lora for type, Caveat for handwriting (both OFL, served from
   this site). */

@font-face { font-family: "Lora"; src: url("/assets/fonts/Lora-Regular.ttf") format("truetype"); font-weight: 400 700; font-display: swap; }
@font-face { font-family: "Lora"; src: url("/assets/fonts/Lora-Italic.ttf") format("truetype"); font-weight: 400 700; font-style: italic; font-display: swap; }
@font-face { font-family: "Caveat"; src: url("/assets/fonts/Caveat-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Caveat"; src: url("/assets/fonts/Caveat-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }

:root {
  --paper: #f6f1e6;
  --paper-hi: #fffdf7;
  --paper-lo: #ece4d3;
  --ink: #151715;
  --ink-2: #2b2e2b;
  --muted: #5f645e;
  --faint: #8e928c;
  --emerald: #1f5a43;
  --emerald-2: #2a7356;
  --sage: #8fb5a0;
  --gold: #b98a3c;
  --gold-soft: #d6ad62;
  --cream: #e9ddc0;
  --rule: rgba(21, 23, 21, 0.12);
  --serif: "Lora", "Iowan Old Style", Georgia, serif;
  --hand: "Caveat", "Bradley Hand", "Segoe Print", cursive;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Arial, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: clip; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
/* Paper fibre. */
body::before {
  content: "";
  position: fixed; inset: 0; pointer-events: none; z-index: 100; opacity: 0.45;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3'/%3E%3CfeColorMatrix values='0 0 0 0 .32 0 0 0 0 .26 0 0 0 0 .15 0 0 0 .16 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
img { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-weight: 400; }
::selection { background: var(--emerald); color: var(--paper-hi); }
:focus-visible { outline: 2px solid var(--emerald); outline-offset: 3px; }

.wrap { width: min(1200px, 100% - 56px); margin-inline: auto; }
.p-narrow { width: min(780px, 100% - 56px); }
.skip { position: absolute; left: 16px; top: -60px; z-index: 200; background: var(--ink); color: var(--paper); padding: 10px 16px; }
.skip:focus { top: 16px; }

/* ---------- Header and footer (shared markup) ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  transition: background 0.4s var(--ease), box-shadow 0.4s;
}
.site-header.is-scrolled { background: rgba(246, 241, 230, 0.86); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: 0 1px 0 var(--rule); }
.header-inner { display: flex; align-items: center; gap: 36px; height: 78px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; font-family: var(--serif); font-size: 21px; letter-spacing: -0.01em; }
.brand img { border-radius: 8px; }
.nav { display: flex; gap: 32px; margin-left: auto; }
.nav a { text-decoration: none; font-size: 14px; color: var(--muted); letter-spacing: 0.02em; }
.nav a:hover { color: var(--ink); }
.button-small { font-size: 14px; text-decoration: none; color: var(--ink); border-bottom: 1px solid var(--ink); padding-bottom: 2px; }
@media (max-width: 820px) { .nav { display: none; } .button-small { margin-left: auto; } }

.site-footer { border-top: 1px solid var(--rule); padding: 54px 0 44px; background: var(--paper); }
.footer-inner { display: grid; grid-template-columns: 1fr auto; gap: 26px 40px; }
.footer-brand p { margin-top: 10px; color: var(--muted); font-size: 14.5px; font-family: var(--serif); font-style: italic; }
.footer-links { display: flex; gap: 26px; flex-wrap: wrap; }
.footer-links a { text-decoration: none; color: var(--muted); font-size: 14.5px; }
.footer-links a:hover { color: var(--ink); }
.footer-legal { grid-column: 1 / -1; color: var(--faint); font-size: 13px; padding-top: 20px; border-top: 1px solid var(--rule); }
@media (max-width: 640px) { .footer-inner { grid-template-columns: 1fr; } }

/* ---------- Type ---------- */
.p-kicker { display: flex; align-items: center; gap: 14px; font-size: 12px; letter-spacing: 0.3em; text-transform: uppercase; color: var(--muted); }
.p-kicker::before { content: ""; width: 38px; height: 1px; background: var(--ink); }
.p-display { font-family: var(--serif); font-size: clamp(54px, 7.2vw, 100px); line-height: 0.98; letter-spacing: -0.035em; margin-top: 26px; }
.p-display i, .p-title i { color: var(--emerald); }
.p-title { font-family: var(--serif); font-size: clamp(38px, 4.8vw, 64px); line-height: 1.04; letter-spacing: -0.025em; margin-top: 18px; }
.p-hand { font-family: var(--hand); font-size: clamp(28px, 2.6vw, 38px); color: var(--emerald); line-height: 1.1; }
.p-hand-arrow { position: relative; margin: 18px 0 0 54px; transform: rotate(-2deg); display: inline-block; }
.p-hand-arrow svg { position: absolute; left: -54px; top: -4px; }
.p-lede { margin-top: 28px; max-width: 31em; font-size: clamp(17px, 1.4vw, 19.5px); color: var(--muted); }
.p-intro { margin-top: 24px; max-width: 34em; font-size: 18.5px; color: var(--muted); }
.p-head { margin-bottom: 60px; }

.p-actions { display: flex; flex-wrap: wrap; gap: 28px; align-items: center; margin-top: 40px; }
.p-button {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--ink); color: var(--paper-hi); text-decoration: none;
  padding: 18px 30px; border-radius: 2px; font-size: 15px; letter-spacing: 0.03em;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.15) inset, 0 14px 30px -18px rgba(21, 23, 21, 0.7);
  transition: transform 0.35s var(--ease), background 0.35s;
}
.p-button:hover { transform: translateY(-2px); background: var(--emerald); }
.p-link { font-size: 15px; text-decoration: none; border-bottom: 1px solid var(--rule); padding-bottom: 2px; }
.p-link::after { content: " →"; }
.p-link:hover { border-color: var(--ink); }
.p-fine { margin-top: 30px; font-size: 13px; color: var(--faint); letter-spacing: 0.02em; }

/* ---------- Hero: the open planner ---------- */
.p-hero { padding: 150px 0 110px; position: relative; }
.p-hero-grid { display: grid; grid-template-columns: 1fr 1.05fr; gap: 40px; align-items: center; }
.p-hero-grid > * { min-width: 0; }
@media (max-width: 960px) { .p-hero-grid { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .p-hero { padding-top: 120px; } }

/* ---------- Contents ---------- */
.p-contents { padding: 140px 0 120px; }
.p-contents-grid { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 70px; align-items: start; }
.p-contents-grid .p-head { position: sticky; top: 120px; }
.p-contents-grid .p-hand { margin-top: 18px; transform: rotate(-2deg); }
.p-toc { list-style: none; margin: 0; padding: 0; }
.p-toc li { padding: 24px 0; border-bottom: 1px solid var(--rule); }
.p-toc li:first-child { border-top: 1px solid var(--ink); }
.p-toc-row { display: flex; align-items: baseline; gap: 14px; }
.p-toc h3 { font-family: var(--serif); font-size: clamp(22px, 2.2vw, 28px); letter-spacing: -0.01em; }
.p-dots { flex: 1; border-bottom: 1.5px dotted var(--faint); transform: translateY(-6px); }
.p-num { font-family: var(--serif); font-style: italic; color: var(--gold); font-size: 20px; }
.p-toc p { margin-top: 8px; color: var(--muted); font-size: 16px; max-width: 36em; }
.p-forthcoming { margin-top: 110px; padding: 44px 0 0; border-top: 3px double var(--ink); }
.p-forthcoming-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; margin-top: 26px; }
.p-forthcoming h3 { font-family: var(--serif); font-style: italic; font-size: 28px; margin-bottom: 10px; }
.p-forthcoming p { color: var(--muted); }
@media (max-width: 900px) {
  .p-contents-grid { grid-template-columns: 1fr; gap: 10px; }
  .p-contents-grid .p-head { position: static; }
  .p-forthcoming-grid { grid-template-columns: 1fr; gap: 30px; }
}

/* ---------- Pricing: a printed card ---------- */
.p-pricing { padding: 60px 0 150px; }
.p-card {
  position: relative; max-width: 760px; margin: 0 auto; padding: 70px 56px 60px; text-align: center;
  background: var(--paper-hi);
  border: 1px solid var(--ink); outline: 1px solid var(--ink); outline-offset: 8px;
  box-shadow: 0 50px 80px -50px rgba(60, 40, 10, 0.45);
}
.p-card .p-kicker { justify-content: center; }
.p-card .p-kicker::after { content: ""; width: 38px; height: 1px; background: var(--ink); }
.p-prices { display: flex; align-items: center; justify-content: center; gap: 36px; margin: 30px 0 24px; flex-wrap: wrap; }
.p-prices > div { display: grid; justify-items: center; }
.p-amount { font-family: var(--serif); font-size: clamp(64px, 8.4vw, 100px); line-height: 1; letter-spacing: -0.03em; }
.p-per { margin-top: 8px; font-size: 12px; letter-spacing: 0.26em; text-transform: uppercase; color: var(--muted); }
.p-or { font-family: var(--hand); font-size: 34px; color: var(--emerald); }
.p-card-text { max-width: 28em; margin: 0 auto 34px; color: var(--muted); font-size: 18px; }
.p-card-note { position: absolute; right: -10px; bottom: -36px; transform: rotate(-4deg); font-size: 30px; }
@media (max-width: 560px) { .p-card { padding: 54px 24px 50px; } .p-prices { flex-direction: column; gap: 6px; } .p-card-note { right: 10px; bottom: -40px; } }

/* ---------- Questions ---------- */
.p-questions { padding: 130px 0; border-top: 1px solid var(--rule); background: linear-gradient(180deg, var(--paper-lo), var(--paper)); }
.p-faq details { border-top: 1px solid var(--rule); }
.p-faq details:last-child { border-bottom: 1px solid var(--rule); }
.p-faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 24px; align-items: center; padding: 24px 0; font-family: var(--serif); font-size: clamp(20px, 2.1vw, 25px); }
.p-faq summary::-webkit-details-marker { display: none; }
.p-faq summary::after { content: "+"; font-family: var(--serif); font-size: 28px; color: var(--gold); transition: transform 0.4s var(--ease); }
.p-faq details[open] summary::after { transform: rotate(45deg); }
.p-faq details p { padding: 0 40px 26px 0; color: var(--muted); }
.p-faq a { color: var(--emerald); }

/* ---------- Closing ---------- */
.p-closing { padding: 130px 0 150px; text-align: center; }
.p-closing .wrap { display: grid; justify-items: center; gap: 36px; }
.p-closing-hand { font-size: clamp(56px, 8vw, 104px); transform: rotate(-3deg); color: var(--ink-2); }

/* ---------- Reveal and motion ---------- */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity 1.1s var(--ease), transform 1.1s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .js .reveal { opacity: 1; transform: none; }
}

/* =====================================================================
   Evergreen & Ink overrides
   ===================================================================== */
:root {
  --leather: #0b231c;
  --leather-hi: #173f34;
  --leather-lo: #061a15;
  --cream-text: #efe6d2;
  --cream-muted: rgba(239, 230, 210, 0.66);
  --cream-faint: rgba(239, 230, 210, 0.4);
  --gold-hi: #f3dca3;
  --gold-mid: #d6ad62;
  --gold-lo: #a9803d;
  --gold-line: rgba(214, 173, 98, 0.28);
}

/* Leather: deep evergreen with a soft sheen and a fine grain. */
.design-ink {
  background: var(--leather-lo);
  color: var(--cream-text);
}
.design-ink::before {
  opacity: 0.55;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.75' numOctaves='4'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 .05 0 0 0 0 .03 0 0 0 .22 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.ink-leather, .design-ink .p-hero, .design-ink .p-contents, .design-ink .p-pricing, .design-ink .p-closing {
  background:
    radial-gradient(1100px 620px at 80% 10%, rgba(49, 105, 79, 0.42), transparent 62%),
    radial-gradient(900px 560px at 0% 100%, rgba(23, 63, 52, 0.75), transparent 65%),
    linear-gradient(180deg, var(--leather), var(--leather-lo));
  color: var(--cream-text);
}
/* Gold stitching between leather and paper. */
.design-ink .p-promise, .design-ink .p-questions {
  position: relative;
  color: var(--ink);
  background: linear-gradient(180deg, #f8f2e4, #efe5cf);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}
.design-ink .p-promise::before, .design-ink .p-questions::before,
.design-ink .p-promise::after, .design-ink .p-questions::after {
  content: ""; position: absolute; left: 0; right: 0; height: 0;
  border-top: 1.5px dashed var(--gold-mid); opacity: 0.7;
}
.design-ink .p-promise::before, .design-ink .p-questions::before { top: 10px; }
.design-ink .p-promise::after, .design-ink .p-questions::after { bottom: 10px; }

/* Header and footer on leather. */
.design-ink .site-header.is-scrolled { background: rgba(6, 26, 21, 0.97); box-shadow: 0 1px 0 var(--gold-line); }
.design-ink .brand { color: var(--cream-text); }
.design-ink .nav a { color: var(--cream-muted); }
.design-ink .nav a:hover { color: var(--cream-text); }
.design-ink .button-small { color: var(--gold-hi); border-color: var(--gold-mid); }
.design-ink .site-footer { background: var(--leather-lo); border-top: 1px solid var(--gold-line); color: var(--cream-muted); }
.design-ink .footer-brand p, .design-ink .footer-links a { color: var(--cream-muted); }
.design-ink .footer-links a:hover { color: var(--gold-hi); }
.design-ink .footer-legal { color: var(--cream-faint); border-color: rgba(214, 173, 98, 0.14); }

/* Type on leather: cream, with gold for the voice. */
.design-ink .p-hero .p-kicker, .design-ink .p-contents .p-kicker { color: var(--cream-muted); }
.design-ink .p-hero .p-kicker::before, .design-ink .p-contents .p-kicker::before,
.design-ink .p-pricing .p-kicker::before, .design-ink .p-pricing .p-kicker::after { background: var(--gold-mid); }
.design-ink .p-hero .p-display i, .design-ink .p-contents .p-title i {
  background: linear-gradient(100deg, var(--gold-hi), var(--gold-mid) 45%, var(--gold-lo));
  -webkit-background-clip: text; background-clip: text; color: transparent; padding-right: 0.05em;
}
.design-ink .p-hero .p-hand, .design-ink .p-contents .p-hand, .design-ink .p-closing .p-hand, .design-ink .p-pricing .p-hand { color: var(--gold-mid); }
.design-ink .p-lede { color: var(--cream-muted); }
.design-ink .p-fine { color: var(--cream-faint); }
.design-ink .p-promise .p-title i, .design-ink .p-questions .p-title i { color: var(--emerald); }

/* Buttons: gold on leather, ink on paper. */
.design-ink .p-button {
  background: linear-gradient(135deg, var(--gold-hi), var(--gold-mid) 50%, var(--gold-lo));
  color: #1b1408; border-radius: 999px; font-weight: 600;
  box-shadow: 0 12px 30px -12px rgba(214, 173, 98, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}
.design-ink .p-button:hover { background: linear-gradient(135deg, #fbe7b5, var(--gold-hi) 50%, var(--gold-mid)); }
.design-ink .p-link { border-color: var(--gold-line); color: var(--cream-text); }
.design-ink .p-link:hover { border-color: var(--gold-mid); }

/* The planner: cream pages in a leather cover a shade lighter than the
   desk, gold edges on the pages, a gold ribbon. */
.design-ink .p-book {
  --book-cover: linear-gradient(135deg, #2c6450, #1a4a3b 50%, #123529);
  --book-stitch: rgba(243, 220, 163, 0.6);
  --book-ribbon: linear-gradient(90deg, var(--gold-lo), var(--gold-mid) 35%, #e3c07c 55%, var(--gold-lo));
  --book-edge: 0 0 0 1px rgba(214, 173, 98, 0.35);
  --book-shadow: drop-shadow(0 60px 60px rgba(0, 0, 0, 0.55)) drop-shadow(0 10px 14px rgba(0, 0, 0, 0.35));
  --book-stamp: var(--emerald);
  --book-caption: var(--cream-muted);
}

/* The letter keeps its paper; the seal is gold wax. */
.design-ink .p-wax {
  color: rgba(80, 52, 10, 0.75);
  background: radial-gradient(circle at 35% 30%, #fbe7b5, #d6ad62 55%, #9c7433);
  box-shadow: 0 10px 18px -6px rgba(120, 84, 20, 0.55), inset 0 -4px 8px rgba(0, 0, 0, 0.2), inset 0 3px 6px rgba(255, 255, 255, 0.4);
}
.design-ink .zk-path { --zk-wax: radial-gradient(circle at 35% 30%, #fbe7b5, #d6ad62 55%, #9c7433); }
.design-ink .p-letter.is-sealed .p-letter-line, .design-ink .p-letter.is-sealed .p-letter-small { color: var(--gold-lo); }
.design-ink .p-principles span { color: var(--gold-lo); }

/* Contents on leather. */
.design-ink .p-toc li { border-color: rgba(239, 230, 210, 0.12); }
.design-ink .p-toc li:first-child { border-top-color: var(--gold-mid); }
.design-ink .p-toc h3 { color: var(--cream-text); }
.design-ink .p-dots { border-color: rgba(214, 173, 98, 0.45); }
.design-ink .p-num { color: var(--gold-mid); }
.design-ink .p-toc p, .design-ink .p-forthcoming p { color: var(--cream-muted); }
.design-ink .p-forthcoming { border-top-color: var(--gold-mid); }
.design-ink .p-forthcoming .p-kicker { color: var(--cream-muted); }
.design-ink .p-forthcoming .p-kicker::before { background: var(--gold-mid); }
.design-ink .p-forthcoming h3 { color: var(--gold-hi); }

/* Pricing: the printed card on leather, framed in gold foil. */
.design-ink .p-card {
  color: var(--ink);
  border: 1px solid var(--gold-mid); outline: 1px solid var(--gold-mid);
  box-shadow: 0 60px 100px -50px rgba(0, 0, 0, 0.85), 0 0 0 14px rgba(214, 173, 98, 0.06);
}
.design-ink .p-card .p-kicker { color: var(--muted); }
.design-ink .p-card .p-kicker::before, .design-ink .p-card .p-kicker::after { background: var(--gold-mid); }
.design-ink .p-or { color: var(--gold-lo); }
.design-ink .p-card-note { color: var(--gold-mid); }

/* Questions on paper: gold accents. */
.design-ink .p-faq summary::after { color: var(--gold-lo); }

/* Closing on leather. */
.design-ink .p-closing-hand { color: var(--gold-hi); }
