/* Folium landing — same visual language as the app (src/app.css) */

@font-face {
  font-family: "Inter Variable";
  src: url("fonts/inter-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Space Grotesk Variable";
  src: url("fonts/space-grotesk-latin-wght-normal.woff2") format("woff2");
  font-weight: 300 700;
  font-display: swap;
}
@font-face {
  font-family: "Caveat Variable";
  src: url("fonts/caveat-latin-wght-normal.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}

:root {
  --font-body: "Inter Variable", "Segoe UI", system-ui, sans-serif;
  --font-heading: "Space Grotesk Variable", "Inter Variable", system-ui, sans-serif;

  --bg: #faf6ee;
  --ink: #33312c;
  --ink-soft: #7d7668;
  --paper: #fffdf7;
  --accent-blue: #d9e6f5;
  --accent-pink: #f6d9d5;
  --accent-yellow: #f9ecc8;
  --accent-green: #e4eed6;
  --accent-purple: #e6ddf0;
  --accent-gray: #45423c;
  --drawer-body: #ecdfc6;
  --drawer-dark: #d9c8a6;
  --brass: #d9b96a;
  --hand-radius: 255px 15px 225px 15px / 15px 225px 15px 255px;
  --hand-radius-alt: 15px 225px 15px 255px / 225px 15px 255px 15px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  /* faint brown dot grid — barely-there graph-paper feel */
  background-image: radial-gradient(circle, rgba(122, 92, 55, 0.13) 1px, transparent 1.6px);
  background-size: 26px 26px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

/* subtle paper grain over the whole page */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

h1, h2, h3 { font-family: var(--font-heading); line-height: 1.12; }

a { color: inherit; }

code {
  background: var(--accent-yellow);
  border: 1px solid var(--ink);
  border-radius: 6px 3px 7px 3px / 3px 7px 3px 6px;
  padding: 0 5px;
  font-size: 0.9em;
}

/* ---------- sketchy button (mirrors the app) ---------- */
.btn {
  border: 2px solid var(--ink);
  background: #fff;
  border-radius: 10px 4px 12px 4px / 4px 12px 4px 10px;
  padding: 5px 12px;
  font: inherit;
  font-size: 13.5px;
  color: var(--ink);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  box-shadow: 2px 3px 0 rgba(51, 49, 44, 0.85);
  transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover {
  background: var(--accent-yellow);
  transform: translate(-1px, -1px);
  box-shadow: 3px 4px 0 rgba(51, 49, 44, 0.85);
}
.btn:active {
  transform: translate(1px, 2px);
  box-shadow: 0 0 0 rgba(51, 49, 44, 0.85);
}
.btn.primary { background: var(--accent-yellow); font-weight: 700; }
.btn.primary:hover { background: var(--accent-green); }
.btn.big { font-size: 16px; padding: 10px 20px; }
.btn.big:hover { transform: rotate(-0.6deg) translate(-1px, -2px); }
/* Placeholder CTA (store not live yet): same look, clearly non-interactive. */
.btn[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; }
.btn[aria-disabled="true"]:hover,
.btn[aria-disabled="true"]:active { background: var(--accent-yellow); transform: none; box-shadow: 2px 3px 0 rgba(51, 49, 44, 0.85); }
.cta-note { margin: 18px 0 0; font-size: 13px; color: var(--ink-soft); }

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 10px clamp(16px, 4vw, 40px);
  background: #fff;
  border-bottom: 2px solid var(--ink);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 19px;
  text-decoration: none;
}
.brand img { display: block; }
.site-nav {
  display: flex;
  gap: 18px;
  margin-left: auto;
  font-size: 14.5px;
}
.site-nav a {
  text-decoration: none;
  color: var(--ink-soft);
  padding: 0 2px;
}
.site-nav a:hover {
  color: var(--ink);
  background: linear-gradient(transparent 55%, var(--accent-yellow) 45%);
}
@media (max-width: 640px) { .site-nav { display: none; } }
/* legal pages: the nav holds only the "back" link — keep it on phones */
@media (max-width: 640px) { .site-nav:has(.back) { display: flex; } }

/* ---------- hero ---------- */
.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(20px, 4vw, 48px);
  max-width: 1080px;
  margin: 0 auto;
  padding: clamp(40px, 7vw, 80px) clamp(16px, 4vw, 40px) clamp(28px, 4vw, 48px);
  overflow: hidden;
}
.hero-copy {
  position: relative;
  z-index: 2;
  max-width: 640px;
}
.hero h1 {
  font-size: clamp(30px, 3.6vw, 40px);
  font-weight: 700;
  margin: 0 0 18px;
  letter-spacing: -0.01em;
  transform: rotate(-0.6deg);
}
.lede {
  font-size: clamp(16px, 2vw, 19px);
  color: var(--ink);
  max-width: 54ch;
  margin: 0 0 16px;
}
.lede-last { margin-bottom: 24px; }
.lede-lead {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: clamp(19px, 2.3vw, 24px);
  line-height: 1.3;
  letter-spacing: -0.005em;
}
.lede-actions {
  font-weight: 500;
  line-height: 1.75;
}
.lede-actions mark {
  background: linear-gradient(transparent 58%, var(--accent-green) 42%);
  color: inherit;
  padding: 0 1px;
}
/* the lead sentence: a hand-drawn brass underline draws itself across it */
.lede-lead { position: relative; padding-bottom: 14px; }
.dp-line {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 10px;
  overflow: visible;
  pointer-events: none;
}
.dp-line path {
  fill: none;
  stroke: var(--accent-green);
  stroke-width: 3.2;
  stroke-linecap: round;
  stroke-dasharray: 340;
  stroke-dashoffset: 0;
  animation: dp-draw 1.4s ease-out 0.5s 1 both;
}
@keyframes dp-draw {
  from { stroke-dashoffset: 340; }
  to { stroke-dashoffset: 0; }
}
.lede-nos {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.6;
  letter-spacing: 0.01em;
}
.lede-nos mark {
  background: linear-gradient(transparent 58%, var(--accent-yellow) 42%);
  color: inherit;
  padding: 0 1px;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 14px; }
.hero-note { font-size: 13.5px; color: var(--ink-soft); margin: 0; }
.hero-art {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  justify-self: center;
  pointer-events: none;
}
@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; }
}

/* hero art slot: holds the fallback <img> and (when WebGL works) the 3D canvas */
.hero-art-slot {
  position: relative;
  width: 100%;
  max-width: 460px;
  height: clamp(300px, 36vw, 440px);
  justify-self: center;
}
.hero-art-slot .hero-art {
  width: 100%;
  height: 100%;
  max-width: none;
  margin-top: 0;
}
.hero-art-slot canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: pan-y; /* don't trap vertical scrolling on touch */
}
.hero-art-slot.webgl .hero-art { visibility: hidden; }
@media (max-width: 760px) {
  .hero-art-slot { max-width: 340px; height: 300px; margin: 8px auto 0; }
}

/* hero slideshow: caption + dots over the 3D canvas */
.hero-slide-caption {
  position: absolute;
  left: 50%;
  bottom: 4px;
  transform: translateX(-50%);
  width: max-content;
  max-width: 94%;
  text-align: center;
  z-index: 3;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.hero-slide-caption.swap { opacity: 0; }
.hsc-kind {
  display: block;
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.hsc-line {
  display: block;
  font-size: 12.5px;
  line-height: 1.35;
  color: var(--ink-soft);
}
.hero-slide-dots {
  position: absolute;
  top: 8px;
  right: 8px;
  display: flex;
  gap: 6px;
  z-index: 3;
}
.hero-slide-dots button {
  width: 11px;
  height: 11px;
  padding: 0;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
}
.hero-slide-dots button.active { background: var(--accent-yellow); }

/* ---------- bridge ---------- */
.bridge {
  text-align: center;
  padding: clamp(40px, 6vw, 72px) 20px;
  border-top: 2px solid var(--ink);
  border-image: repeating-linear-gradient(90deg, var(--ink) 0 14px, transparent 14px 22px) 2;
}
.bridge-sub {
  max-width: 56ch;
  margin: 0 auto 16px;
  color: var(--ink-soft);
  font-size: 18px;
  line-height: 1.6;
}
.bridge-sub:last-child { margin-bottom: 0; }
.bridge-sub strong { color: var(--ink); }
.bridge-punch {
  font-family: var(--font-heading);
  font-size: clamp(21px, 3vw, 28px);
  font-weight: 700;
  margin: 30px auto 14px;
  max-width: 56ch;
  text-wrap: balance;
}

/* ---------- notebook animation (above the bridge) ---------- */
.notebook-anim {
  width: 300px;
  max-width: 84vw;
  margin: 0 auto 30px;
  perspective: 720px;
}
.nb-book {
  position: relative;
  width: 100%;
  height: 200px;
  background: var(--accent-blue);
  border: 2px solid var(--ink);
  border-radius: 12px 22px 22px 12px / 14px 24px 24px 14px;
  box-shadow: 4px 5px 0 rgba(51, 49, 44, 0.2);
  transform: rotateX(16deg) rotate(-2.5deg); /* lying flatter, like on a desk */
  transform-style: preserve-3d;
}
.nb-spiral {
  position: absolute;
  left: -8px;
  top: 12px;
  bottom: 12px;
  width: 14px;
  background-image: radial-gradient(circle at 7px 8px, transparent 2.6px, var(--ink) 2.6px 4px, transparent 4.4px);
  background-size: 14px 17px;
  background-repeat: repeat-y;
  transform: translateZ(3px);
}
.nb-pages {
  position: absolute;
  top: 7px;
  right: -5px;
  bottom: 7px;
  width: 12px;
  background: repeating-linear-gradient(to bottom, var(--paper) 0 3px, rgba(51, 49, 44, 0.28) 3px 4px);
  border: 2px solid var(--ink);
  border-radius: 2px;
}
.nb-under,
.nb-flip {
  position: absolute;
  inset: 9px 16px 9px 14px;
  background: var(--paper);
  background-image: repeating-linear-gradient(to bottom, transparent 0 17px, rgba(51, 49, 44, 0.12) 17px 18px);
  border: 2px solid var(--ink);
  border-radius: 6px 14px 14px 6px / 8px 16px 16px 8px;
}
.nb-under { transform: translateZ(1px) rotate(0.4deg); }
.nb-under svg,
.nb-flip svg {
  position: absolute;
  inset: 12px 16px;
  width: calc(100% - 32px);
  height: calc(100% - 24px);
  color: rgba(51, 49, 44, 0.75);
}
.nb-tab {
  position: absolute;
  right: -16px;
  top: 108px;
  writing-mode: vertical-rl;
  font-family: var(--font-heading);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 10px 4px;
  background: linear-gradient(180deg, #e8cf8d, var(--brass));
  border: 2px solid var(--ink);
  border-radius: 4px;
  transform: translateZ(2px);
}
.nb-flip {
  transform: translateZ(2px);
  transform-origin: left center;
  box-shadow: 3px 2px 8px rgba(51, 49, 44, 0.22);
  animation: nb-flip 7s ease-in-out infinite;
}
@keyframes nb-flip {
  0%, 40% { transform: translateZ(2px) rotateY(0deg) rotateZ(0deg) skewY(0deg); }
  47% { transform: translateZ(24px) rotateY(-52deg) rotateZ(-4deg) skewY(-2deg); }
  54% { transform: translateZ(6px) rotateY(-140deg) rotateZ(1deg) skewY(0.5deg); }
  58%, 82% { transform: translateZ(3px) rotateY(-168deg) rotateZ(0deg) skewY(0deg); }
  89% { transform: translateZ(20px) rotateY(-70deg) rotateZ(3deg) skewY(1.5deg); }
  96%, 100% { transform: translateZ(2px) rotateY(0deg) rotateZ(0deg) skewY(0deg); }
}
.nb-band {
  position: absolute;
  top: -5px;
  bottom: -5px;
  right: 46px;
  width: 10px;
  background: var(--accent-pink);
  border: 2px solid var(--ink);
  border-radius: 4px;
  transform: translateZ(3px) rotate(1deg);
}

/* ---------- generic section ---------- */
.section {
  padding: clamp(36px, 5vw, 64px) clamp(16px, 4vw, 40px);
  max-width: 1080px;
  margin: 0 auto;
  text-align: center;
}
.section h2 {
  display: inline-block;
  font-size: clamp(28px, 4vw, 40px);
  margin: 0 0 14px;
  transform: rotate(-0.4deg);
  text-wrap: balance;
  /* hand-drawn pen squiggle under the heading */
  padding-bottom: 12px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='10' viewBox='0 0 140 10' preserveAspectRatio='none'%3E%3Cpath d='M3 7 Q 14 2, 28 5.5 T 56 5.5 T 84 5.5 T 112 5.5 T 137 4' fill='none' stroke='%23d9b96a' stroke-width='3.2' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat 0 100% / 100% 10px;
}
.pricing-section h2 { display: inline-block; }
.section-note {
  font-family: "Caveat Variable", cursive;
  font-weight: 500;
  color: var(--ink-soft);
  font-size: 21px;
  line-height: 1.25;
  max-width: 62ch;
  margin: 0 auto 30px;
  text-wrap: balance;
}

/* ---------- paper cards ---------- */
.paper-card {
  position: relative;
  text-align: left;
  /* the colored band is painted *into* the card background, so it always
     merges flush with the card's top edge and wobbly corners */
  background-color: var(--paper);
  background-image:
    linear-gradient(to bottom, var(--band, var(--accent-yellow)) 0 16px, transparent 16px),
    repeating-linear-gradient(to bottom, transparent 0 27px, rgba(51, 49, 44, 0.055) 27px 28px);
  border: 2px solid var(--ink);
  border-radius: var(--hand-radius);
  padding: 30px 24px 22px;
  box-shadow: 3px 4px 0 rgba(51, 49, 44, 0.16);
}
.band-pink { --band: var(--accent-pink); }
.band-blue { --band: var(--accent-blue); }
.band-purple { --band: var(--accent-purple); }
.band-green { --band: var(--accent-green); }
.band-yellow { --band: var(--accent-yellow); }

.paper-card h3 { margin: 8px 0 8px; font-size: 21px; }
.paper-card p { margin: 0; font-size: 15px; }
.paper-card p + p { margin-top: 10px; }

/* ---------- steps ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 22px;
}
.step-tag {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  border-bottom: 2px solid var(--ink);
  padding-bottom: 2px;
}
.steps .paper-card:nth-child(2) { border-radius: var(--hand-radius-alt); transform: rotate(0.5deg); }
.steps .paper-card:nth-child(1) { transform: rotate(-0.5deg); }
.steps .paper-card:nth-child(3) { transform: rotate(-0.7deg); }

/* ---------- planner mock ---------- */
.planner-mock {
  display: flex;
  gap: 18px;
  max-width: 860px;
  margin: 0 auto 36px;
  text-align: left;
}
.pm-week {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.pm-day {
  position: relative;
  height: 250px;
  background: var(--paper);
  background-image: repeating-linear-gradient(to bottom, transparent 0 21px, rgba(51, 49, 44, 0.1) 21px 22px);
  border: 2px solid var(--ink);
  border-radius: 10px 4px 12px 4px / 4px 12px 4px 10px;
  box-shadow: 3px 4px 0 rgba(51, 49, 44, 0.16);
}
.pm-dow {
  position: absolute;
  top: 4px;
  left: 10px;
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--ink-soft);
}
.pm-block {
  position: absolute;
  left: 6px;
  right: 6px;
  top: calc(26px + var(--t) * 22px);
  height: calc(var(--h) * 22px - 5px);
  border: 2px solid var(--ink);
  border-radius: 8px 3px 9px 3px / 3px 9px 3px 8px;
  font-size: 10.5px;
  font-weight: 600;
  line-height: 1.25;
  padding: 3px 6px;
  overflow: hidden;
  box-shadow: 1px 2px 0 rgba(51, 49, 44, 0.25);
}
.b-green { background: var(--accent-green); }
.b-blue { background: var(--accent-blue); }
.b-pink { background: var(--accent-pink); }
.b-yellow { background: var(--accent-yellow); }
.b-purple { background: var(--accent-purple); }

.pm-inbox {
  width: 172px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 12px 10px;
  border: 2px dashed var(--ink-soft);
  border-radius: 10px 4px 12px 4px / 4px 12px 4px 10px;
}
.pm-inbox-label {
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--ink-soft);
}
.pm-scrap {
  background: var(--accent-yellow);
  border: 2px solid var(--ink);
  border-radius: 4px 10px 5px 12px / 12px 5px 10px 4px;
  font-family: "Caveat Variable", cursive;
  font-size: 16px;
  line-height: 1.1;
  padding: 7px 9px 5px;
  transform: rotate(-1.2deg);
  box-shadow: 1px 2px 0 rgba(51, 49, 44, 0.25);
}
.pm-scrap:nth-child(odd) { transform: rotate(1.1deg); }

@media (max-width: 700px) {
  .planner-mock { flex-direction: column; }
  .pm-inbox { width: auto; flex-direction: row; flex-wrap: wrap; align-items: center; }
}

/* ---------- paper-type micro-animations ---------- */
.paper-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 680px) { .paper-grid { grid-template-columns: 1fr; } }
#paper .paper-card { padding-bottom: 52px; }
#paper .paper-card > div[class^="anim-"] { margin: 8px 0 14px; }

/* minimo: the scrap types itself (JS drives text + counter) */
.anim-minimo { position: relative; }
.am-scrap {
  position: relative;
  min-height: 62px;
  background: var(--accent-yellow);
  border: 2px solid var(--ink);
  border-radius: 4px 10px 5px 12px / 12px 5px 10px 4px;
  padding: 14px 12px 10px;
  font-family: "Caveat Variable", cursive;
  font-size: 20px;
  line-height: 1.2;
  transform: rotate(-1deg);
  box-shadow: 2px 3px 0 rgba(51, 49, 44, 0.2);
  word-break: break-word;
}
.am-pin {
  position: absolute;
  top: -8px;
  left: 50%;
  width: 13px;
  height: 13px;
  margin-left: -7px;
  background: var(--accent-pink);
  border: 2px solid var(--ink);
  border-radius: 50%;
}
.am-caret {
  display: inline-block;
  width: 2px;
  height: 0.95em;
  background: var(--ink);
  vertical-align: -0.15em;
  animation: am-blink 1s steps(1) infinite;
}
@keyframes am-blink { 50% { opacity: 0; } }
.am-counter {
  margin-top: 5px;
  text-align: right;
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-soft);
}

/* quarto: the card grows to its limit, then splits into a linked card */
.anim-quarto {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 104px;
}
.aq-card {
  background: #fff;
  border: 2px solid var(--ink);
  border-radius: 8px 3px 9px 3px / 3px 9px 3px 8px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  box-shadow: 2px 3px 0 rgba(51, 49, 44, 0.16);
}
.aq-main { width: 60%; }
.aq-line {
  display: block;
  height: 5px;
  background: rgba(51, 49, 44, 0.35);
  border-radius: 3px;
}
.aq-main .aq-line:nth-child(1) { width: 82%; }
.aq-main .aq-line:nth-child(2) { width: 94%; }
.aq-main .aq-line:nth-child(3) { width: 68%; }
.aq-grow { animation: aq-fill 6s ease-in-out infinite; }
.aq-link {
  flex: 1;
  border-top: 2px dashed var(--ink);
  animation: aq-appear 6s ease-in-out infinite;
}
.aq-split {
  width: 26%;
  animation: aq-split 6s ease-in-out infinite;
}
.aq-split .aq-line:nth-child(1) { width: 88%; }
.aq-split .aq-line:nth-child(2) { width: 62%; }
@keyframes aq-fill {
  0%, 38% { width: 25%; }
  55%, 100% { width: 100%; }
}
@keyframes aq-split {
  0%, 52% { opacity: 0; transform: translateX(-16px) scale(0.85); }
  66%, 90% { opacity: 1; transform: none; }
  100% { opacity: 0; transform: translateX(-16px) scale(0.85); }
}
@keyframes aq-appear {
  0%, 56% { opacity: 0; }
  68%, 90% { opacity: 1; }
  100% { opacity: 0; }
}

/* octavo: the flashcard flips (JS toggles .flipped) */
.anim-octavo { perspective: 640px; }
.ao-inner {
  position: relative;
  width: 80%;
  height: 96px;
  margin: 0 auto;
  transform-style: preserve-3d;
  transition: transform 0.7s cubic-bezier(0.3, 0.9, 0.4, 1.1);
}
.ao-inner.flipped { transform: rotateY(180deg); }
.ao-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  background: #fff;
  border: 2px solid var(--ink);
  border-radius: 8px 3px 9px 3px / 3px 9px 3px 8px;
  padding: 16px 12px 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ao-front { background-image: linear-gradient(to bottom, var(--accent-pink) 0 11px, transparent 11px); }
.ao-back {
  transform: rotateY(180deg);
  background-image: linear-gradient(to bottom, var(--accent-gray) 0 11px, transparent 11px);
}
.ao-line {
  height: 4px;
  width: 55%;
  background: rgba(51, 49, 44, 0.3);
  border-radius: 3px;
}
.ao-line + .ao-line { width: 40%; }
.ao-q { font-size: 12.5px; font-weight: 600; line-height: 1.3; margin: 0; }
.ao-src {
  display: block;
  text-align: center;
  margin-top: 7px;
  font-size: 10.5px;
  font-style: italic;
  color: var(--ink-soft);
}

/* folio: the sketch draws itself, then fades and redraws */
.anim-folio svg {
  display: block;
  width: 100%;
  height: 104px;
  color: var(--ink);
}
.af-draw { stroke-dasharray: 320; }
@media (prefers-reduced-motion: no-preference) {
  .af-draw {
    stroke-dashoffset: 320;
    animation: af-draw 7s ease-in-out infinite;
  }
  .af-2 { animation-delay: 0.5s; }
  .af-3 { animation-delay: 1s; }
  .af-4 { animation-delay: 1.5s; }
  .af-5 { animation-delay: 2s; }
}
@keyframes af-draw {
  0% { stroke-dashoffset: 320; opacity: 1; }
  32%, 72% { stroke-dashoffset: 0; opacity: 1; }
  86%, 100% { stroke-dashoffset: 0; opacity: 0; }
}

/* ---------- modal close button (info modal) ---------- */
.reader-close {
  position: absolute;
  top: 14px; right: 14px;
  width: 30px; height: 30px;
  font-size: 19px;
  line-height: 1;
  background: #fff;
  border: 2px solid var(--ink);
  border-radius: 50% 40% 55% 45% / 45% 55% 40% 50%;
  cursor: pointer;
}
.reader-close:hover { background: var(--accent-pink); }

/* ---------- principles ---------- */
.principles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}
.principles .paper-card:nth-child(odd) { transform: rotate(-0.4deg); }
.principles .paper-card:nth-child(even) { transform: rotate(0.5deg); border-radius: var(--hand-radius-alt); }

/* ---------- pricing ---------- */
.pricing-section { text-align: center; }
.price-card {
  max-width: 760px;
  margin: 0 auto 44px;
  --band: var(--accent-yellow);
}
.price-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 30px;
  align-items: start;
  text-align: left;
}
@media (max-width: 620px) {
  .price-grid { grid-template-columns: 1fr; gap: 20px; }
}
.price {
  font-family: var(--font-heading);
  font-size: clamp(46px, 6vw, 62px);
  font-weight: 700;
  margin: 4px 0 4px;
}
.price-sub { color: var(--ink-soft); font-size: 14.5px; margin: 0 0 20px; }
.price-list {
  list-style: none;
  padding: 0;
  margin: 4px 0 0;
  font-size: 15px;
}
.price-list li { padding: 7px 0 7px 26px; position: relative; }
.price-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  font-weight: 700;
}
.price-cta { display: flex; flex-direction: column; gap: 10px; align-items: stretch; }
.price-cta .btn { justify-content: center; }

/* ---------- faq ---------- */
.faq { max-width: 620px; margin: 0 auto; text-align: left; }
.faq h3 { font-size: 22px; margin: 0 0 14px; }
.faq details {
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: 10px 4px 12px 4px / 4px 12px 4px 10px;
  padding: 12px 16px;
  margin-bottom: 10px;
}
.faq details[open] { background: #fff; }
.faq summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 15.5px;
}
.faq details p { margin: 10px 0 2px; font-size: 14.5px; color: var(--ink); }

/* ---------- footer: centered text block ---------- */
.site-footer {
  margin-top: clamp(12px, 2.5vw, 28px);
  display: flex;
  justify-content: center;
  padding: 0 16px 34px;
  text-align: center;
}
.footer-brand {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 15px;
}
.footer-motto {
  font-family: "Caveat Variable", cursive;
  font-size: 19px;
  line-height: 1.2;
  color: var(--ink-soft);
}
.footer-line {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 18px;
  padding: 4px 0;
  font-size: 14px;
}
.footer-line a { color: var(--ink-soft); text-decoration: none; padding: 0 2px; }
.footer-line a:hover {
  color: var(--ink);
  background: linear-gradient(transparent 55%, var(--accent-yellow) 45%);
}

/* ---------- legal pages ---------- */
.legal {
  max-width: 680px;
  margin: 0 auto;
  padding: clamp(30px, 6vw, 70px) clamp(16px, 4vw, 40px) 60px;
}
.legal h1 { font-size: clamp(28px, 4vw, 38px); margin: 0 0 6px; }
.legal .updated { color: var(--ink-soft); font-size: 13.5px; margin: 0 0 26px; }
.legal h2 { font-size: 21px; margin: 30px 0 10px; }
.legal p, .legal li { font-size: 15px; }
.legal table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  margin: 12px 0;
}
.legal th, .legal td {
  border: 1.5px solid var(--ink-soft);
  padding: 6px 10px;
  text-align: left;
}
.legal th { background: var(--accent-yellow); }
.legal .back { font-size: 14px; }

/* ---------- comparison table ---------- */
.compare-wrap {
  overflow-x: auto;
  max-width: 900px;
  margin: 0 auto;
  text-align: left;
}
table.compare {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
  background: var(--paper);
  border: 2px solid var(--ink);
  box-shadow: 3px 4px 0 rgba(51, 49, 44, 0.16);
}
table.compare th, table.compare td {
  border: 1.5px solid var(--ink-soft);
  padding: 9px 13px;
  text-align: left;
  vertical-align: top;
}
table.compare thead th {
  background: var(--accent-yellow);
  font-family: var(--font-heading);
  font-size: 15px;
}
table.compare th[scope="row"] { font-weight: 600; white-space: nowrap; }
table.compare .col-folium { background: var(--accent-green); font-weight: 600; }
table.compare thead th.col-folium { font-weight: 700; }
/* the comparison table eats too much vertical space on phones */
@media (max-width: 640px) { #compare { display: none; } }

/* ---------- info buttons on the paper-type cards ---------- */
.info-btn {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 28px;
  height: 28px;
  font-family: Georgia, serif;
  font-style: italic;
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  color: var(--ink);
  background: #fff;
  border: 2px solid var(--ink);
  border-radius: 50% 40% 55% 45% / 45% 55% 40% 50%;
  cursor: pointer;
  box-shadow: 1px 2px 0 rgba(51, 49, 44, 0.5);
  transition: background 0.15s ease, transform 0.15s ease;
}
.info-btn:hover {
  background: var(--accent-blue);
  transform: translate(-1px, -1px);
}

/* ---------- info modal ---------- */
.info-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.info-modal[hidden] { display: none; }
.info-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(51, 49, 44, 0.35);
}
.info-card {
  position: relative;
  width: 100%;
  max-width: 460px;
  padding-top: 34px;
  outline: none;
}
#info-body h4 {
  font-family: var(--font-heading);
  font-size: 20px;
  margin: 4px 0 10px;
}
#info-body p { font-size: 15px; margin: 0; }
#info-body p + p { margin-top: 10px; }

/* ---------- section rhythm: hand-drawn dashed divider between sections ---------- */
.section + .section {
  border-top: 2px solid transparent;
  border-image: repeating-linear-gradient(90deg, rgba(51, 49, 44, 0.25) 0 14px, transparent 14px 22px) 2;
}

/* ---------- keyboard focus ---------- */
.btn:focus-visible,
.info-btn:focus-visible,
.reader-close:focus-visible,
.site-nav a:focus-visible,
.footer-line a:focus-visible,
.faq summary:focus-visible {
  outline: 3px solid var(--brass);
  outline-offset: 2px;
}

/* ---------- scroll reveal (JS adds .reveal; visible without JS) ---------- */
.reveal {
  opacity: 0;
  translate: 0 14px;
  transition: opacity 0.5s ease, translate 0.5s ease;
}
.reveal.in {
  opacity: 1;
  translate: 0 0;
}
