/* Shared Trails. Palette from the logo: paper, forest, river, ochre. */
:root {
  --paper: #f8f3e7;
  --paper-deep: #f1e8d4;
  --card: #fffdf7;
  --forest: #375d3b;
  --forest-dark: #22392a;
  --river: #548da3;
  --river-dark: #36687c;
  --ochre: #f1c075;
  --ochre-deep: #e0a347;
  --ink: #26301f;
  --muted: #5d6656;
  --line: #e4d9c1;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(34,57,42,.06), 0 12px 32px -12px rgba(34,57,42,.22);
  --serif: "Fraunces", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "Nunito Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ease: cubic-bezier(.2,.7,.2,1);
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body {
  margin: 0; line-height: 1.6; font-size: 1.0625rem; -webkit-font-smoothing: antialiased;
  /* faint paper grain */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .4 0 0 0 0 .32 0 0 0 0 .2 0 0 0 .05 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
img { max-width: 100%; }
a { color: var(--river-dark); }
h1, h2, h3 { font-family: var(--serif); line-height: 1.1; color: var(--forest-dark); font-weight: 600; letter-spacing: -.01em; }
h1, h2, h3 { text-wrap: balance; }
h1 { font-size: clamp(2.3rem, 6vw, 4rem); margin: 0 0 1.1rem; font-variation-settings: "opsz" 144; }
h1 em, h2 em { font-style: italic; color: var(--forest); font-weight: 500; }
h2 { font-size: clamp(1.8rem, 4vw, 2.7rem); margin: 0 0 .9rem; font-variation-settings: "opsz" 120; }
h3 { font-size: 1.3rem; margin: 0 0 .5rem; }
main > section { position: relative; max-width: 1120px; margin: 0 auto; padding: clamp(3.5rem, 8vw, 6.5rem) 20px; }
.section-head { max-width: 680px; margin: 0 auto 2.5rem; text-align: center; }
.eyebrow { text-transform: uppercase; letter-spacing: .14em; font: 800 .78rem var(--sans); color: var(--river-dark); margin: 0 0 .8rem; }
.lede { font-size: clamp(1.08rem, 2vw, 1.22rem); color: var(--muted); margin: 0; }
[hidden] { display: none !important; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 12px max(20px, calc((100vw - 1120px) / 2 + 20px));
  background: rgba(248,243,231,.82); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  transition: box-shadow .3s, padding .3s;
}
.site-header.is-scrolled { box-shadow: 0 1px 0 var(--line), 0 6px 20px -14px rgba(0,0,0,.3); padding-top: 8px; padding-bottom: 8px; }
.brand { display: inline-flex; align-items: center; gap: .6rem; font: 600 1.25rem var(--serif); color: var(--forest-dark); text-decoration: none; }
.brand img { width: 40px; height: 40px; border-radius: 10px; }
.site-header nav { display: flex; gap: 1.4rem; align-items: center; font-size: .95rem; font-weight: 600; }
.site-header nav a:not(.btn) { color: var(--ink); text-decoration: none; position: relative; }
.site-header nav a:not(.btn)::after { content: ""; position: absolute; left: 0; right: 0; bottom: -3px; height: 2px; background: var(--ochre-deep); transform: scaleX(0); transform-origin: left; transition: transform .25s var(--ease); }
.site-header nav a:not(.btn):hover::after { transform: scaleX(1); }
@media (max-width: 720px) { .site-header nav a:not(.btn) { display: none; } .brand span { font-size: 1.1rem; } }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  border: 0; cursor: pointer; text-decoration: none;
  background: var(--ochre); color: var(--forest-dark); font: 800 1rem var(--sans);
  padding: .85rem 1.5rem; border-radius: 999px;
  box-shadow: 0 1px 0 rgba(255,255,255,.6) inset, 0 6px 16px -6px rgba(224,163,71,.8);
  transition: transform .2s var(--ease), background .2s, box-shadow .2s;
}
.btn:hover { background: var(--ochre-deep); transform: translateY(-2px); box-shadow: 0 10px 22px -8px rgba(224,163,71,.9); }
.btn:active { transform: translateY(0); }
.btn:focus-visible, a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible { outline: 3px solid var(--river); outline-offset: 3px; }
.btn:disabled { opacity: .6; cursor: wait; transform: none; }
.btn-small { padding: .5rem 1.05rem; font-size: .9rem; }
.btn-large { padding: 1rem 2rem; font-size: 1.08rem; }
.btn-ghost { background: transparent; color: var(--forest); box-shadow: inset 0 0 0 2px var(--forest); }
.btn-ghost:hover { background: rgba(55,93,59,.08); box-shadow: inset 0 0 0 2px var(--forest); }
.text-link { font-weight: 700; color: var(--forest); text-decoration: none; }
.text-link span { display: inline-block; transition: transform .25s var(--ease); }
.text-link:hover span { transform: translateY(3px); }

/* Hero */
.hero { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; padding-top: clamp(2rem, 6vw, 4.5rem) !important; }
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; text-align: center; gap: 1.8rem; padding-top: 1.2rem !important; }
  .hero .cta-row, .hero .trust { justify-content: center; }
  .hero-art { order: -1; max-width: 520px; margin: 0 auto; width: 100%; }
  .hero-art figcaption { display: none; }
  .book-frame { box-shadow: 0 20px 40px -22px rgba(34,57,42,.55), 0 0 0 6px var(--card), 0 0 0 7px var(--line); }
  .hero .eyebrow { margin-bottom: .5rem; }
  .hero .cta-row { margin-top: 1.3rem; }
  .trust { font-size: .82rem; gap: .4rem .9rem; }
}
.hero-text { position: relative; z-index: 1; }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; margin-top: 1.8rem; }
.trust { list-style: none; padding: 0; margin: 1.6rem 0 0; display: flex; flex-wrap: wrap; gap: .5rem 1.2rem; font-size: .9rem; color: var(--muted); font-weight: 600; }
.trust li { display: inline-flex; align-items: center; gap: .4rem; }
.trust li::before { content: ""; width: 16px; height: 16px; border-radius: 50%; background: var(--forest) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m4.5 8.3 2.3 2.2 4.7-4.8' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/100% no-repeat; flex: none; }

.wash { position: absolute; border-radius: 50%; filter: blur(50px); opacity: .55; pointer-events: none; z-index: 0; }
.wash-a { width: 420px; height: 340px; background: radial-gradient(closest-side, rgba(84,141,163,.55), transparent); right: -60px; top: 10px; animation: drift 18s ease-in-out infinite alternate; }
.wash-b { width: 360px; height: 300px; background: radial-gradient(closest-side, rgba(241,192,117,.6), transparent); left: -80px; bottom: -20px; animation: drift 22s ease-in-out infinite alternate-reverse; }
@keyframes drift { to { transform: translate(30px, -24px) scale(1.08); } }

.hero-art { position: relative; z-index: 1; margin: 0; will-change: transform; }
.book-frame, .stage-frame {
  position: relative; aspect-ratio: 4 / 3; border-radius: 22px; overflow: hidden;
  background: var(--paper-deep); box-shadow: 0 30px 60px -28px rgba(34,57,42,.55), 0 0 0 8px var(--card), 0 0 0 9px var(--line);
  transform: rotate(1.2deg);
}
.book-frame img, .stage-frame img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transform: scale(1.06); transition: opacity 1.1s ease, transform 6s ease-out;
}
.book-frame img.is-on, .stage-frame img.is-on { opacity: 1; transform: scale(1); }
.age-chip {
  position: absolute; left: 14px; bottom: 14px; z-index: 2;
  background: rgba(255,253,247,.94); color: var(--forest-dark); font: 700 .9rem var(--sans);
  padding: .35rem .8rem; border-radius: 999px; box-shadow: 0 4px 14px -6px rgba(0,0,0,.3);
}
.age-chip b { display: inline-block; min-width: 1.2em; font-variant-numeric: tabular-nums; }
.age-chip-lg { font-size: 1.05rem; padding: .45rem 1rem; }
.hero-art figcaption { font-size: .88rem; color: var(--muted); margin-top: 1.4rem; text-align: center; }

/* Story scroll */
.story { max-width: 1180px !important; }
.name-try { display: flex; flex-wrap: nowrap; justify-content: center; gap: .8rem 1rem; margin-top: 1.6rem; }
.name-try label { display: flex; flex-direction: column; text-align: left; font-size: .8rem; font-weight: 700; color: var(--muted); gap: .25rem; }
.name-try input { font: 600 1rem var(--sans); width: min(11rem, 40vw); padding: .55rem .8rem; border: 1.5px solid var(--line); border-radius: 10px; background: var(--card); color: var(--ink); }
[data-child], [data-parent] { background: linear-gradient(transparent 62%, rgba(241,192,117,.55) 62%); padding: 0 .1em; transition: background .3s; }
.story-scroll { display: grid; grid-template-columns: 1.15fr 1fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }
.story-stage { position: sticky; top: 96px; }
.stage-frame { transform: none; }
.stage-progress { height: 4px; border-radius: 4px; background: var(--line); margin: 1.3rem 8px 0; overflow: hidden; }
.stage-progress span { display: block; height: 100%; width: 25%; background: linear-gradient(90deg, var(--river), var(--forest)); border-radius: inherit; transition: width .6s var(--ease); }
.beats { list-style: none; margin: 0; padding: 0; }
.beat { min-height: 72vh; display: flex; flex-direction: column; justify-content: center; padding: 1rem 0; opacity: .35; transition: opacity .5s ease; }
.beat.is-active { opacity: 1; }
.beat-thumb { display: none; }
.beat-age { font: 800 .8rem var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--river-dark); margin: 0 0 .5rem; }
.beat h3 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: 1rem; }
.beat blockquote { margin: 0; font: italic 400 clamp(1.1rem, 2vw, 1.3rem)/1.55 var(--serif); color: var(--ink); border-left: 3px solid var(--ochre); padding-left: 1.1rem; }
.beat:first-child { min-height: 52vh; }
@media (max-width: 860px) {
  .story-scroll { grid-template-columns: 1fr; }
  .story-stage { display: none; }
  .beats { display: grid; gap: 2.5rem; }
  .beat { min-height: 0; opacity: 1; padding: 0; }
  .beat-thumb { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 16px; margin-bottom: 1.1rem; box-shadow: var(--shadow); }
}

/* Why */
.why { max-width: 1180px !important; }
.why-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.25rem; }
.why-grid article { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.6rem; box-shadow: var(--shadow); transition: transform .3s var(--ease); }
.why-grid article:hover { transform: translateY(-4px); }
.why-grid svg, .soon-icon { width: 44px; height: 44px; fill: none; stroke: var(--forest); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; margin-bottom: .9rem; }
.why-grid p { margin: 0; color: var(--muted); font-size: 1rem; }

/* Editions */
.edition-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
@media (max-width: 960px) { .edition-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .edition-grid { grid-template-columns: 1fr; } }
.edition-card { position: relative; display: block; }
.edition-card input { position: absolute; opacity: 0; }
.edition-body {
  display: flex; flex-direction: column; gap: .4rem; height: 100%; cursor: pointer;
  background: var(--card); border: 2px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.1rem 1.4rem;
  transition: border-color .2s, box-shadow .2s, transform .3s var(--ease);
}
.edition-body strong { font: 600 1.25rem var(--serif); color: var(--forest-dark); }
.edition-desc { color: var(--muted); font-size: .97rem; }
.edition-thumb { display: block; overflow: hidden; border-radius: 12px; margin-bottom: .6rem; }
.edition-thumb img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; object-position: center top; transition: transform .8s var(--ease); }
.edition-card.featured:hover .edition-thumb img { transform: scale(1.05); }
.edition-card.featured:hover .edition-body { transform: translateY(-3px); }
.edition-card input:checked + .edition-body { border-color: var(--forest); box-shadow: 0 0 0 4px rgba(55,93,59,.14), var(--shadow); }
.edition-card input:focus-visible + .edition-body { outline: 3px solid var(--river); outline-offset: 2px; }
.edition-card.soon .edition-body { cursor: default; background: transparent; border-style: dashed; padding-top: 1.6rem; }
.edition-card.soon strong { color: var(--muted); }
.soon-icon { stroke: #9aa393; }
.soon-badge, .ready-badge { align-self: flex-start; font: 800 .7rem var(--sans); letter-spacing: .1em; text-transform: uppercase; padding: .28rem .65rem; border-radius: 999px; }
.soon-badge { background: var(--paper-deep); color: var(--muted); }
.ready-badge { background: var(--forest); color: #fff; }

/* How */
.trail-wrap { position: relative; }
.trail { position: absolute; left: 4%; right: 4%; top: 6px; width: 92%; height: 70px; overflow: visible; }
.trail path { fill: none; stroke: var(--ochre-deep); stroke-width: 3; stroke-linecap: round; stroke-dasharray: .012 .016; opacity: .8; }
.js .trail path { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 2.2s var(--ease); }
.js .trail.is-drawn path { stroke-dashoffset: 0; }
@media (max-width: 760px) { .trail { display: none; } }
.steps { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; padding: 0; margin: 0; list-style: none; }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } }
.steps li { text-align: center; padding: 0 .5rem; }
.step-num { display: grid; place-items: center; width: 64px; height: 64px; margin: 0 auto 1.1rem; border-radius: 50%; background: var(--forest); color: #fff; font: 600 1.6rem var(--serif); box-shadow: 0 0 0 8px var(--paper), 0 10px 24px -10px rgba(34,57,42,.6); }
.steps p { color: var(--muted); margin: 0; }

/* Cards and forms */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.8rem; box-shadow: var(--shadow); }
.preview-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 1.5rem; align-items: start; }
@media (max-width: 860px) { .preview-grid { grid-template-columns: 1fr; } }
.gate { display: flex; flex-direction: column; align-items: flex-start; gap: 1.2rem; }
.gate p { margin: 0; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1rem; }
@media (max-width: 560px) { .field-row { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: .35rem; font-size: .95rem; font-weight: 600; }
.field input, .field select { font: 400 1rem var(--sans); padding: .7rem .8rem; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); transition: border-color .2s; }
.field input:focus, .field select:focus { border-color: var(--river); }
.upload { border: 2px dashed var(--line); border-radius: 14px; padding: 1rem; transition: border-color .2s, background .2s; }
.upload:hover { border-color: var(--river); background: rgba(84,141,163,.05); }
.thumb { width: 96px; height: 96px; object-fit: cover; border-radius: 50%; margin-top: .5rem; animation: pop .4s var(--ease); }
@keyframes pop { from { transform: scale(.7); opacity: 0; } }
.hint { font-size: .88rem; color: var(--muted); }
.consent { display: flex; gap: .6rem; align-items: flex-start; font-size: .92rem; margin: 1rem 0 1.25rem; }
.consent input { margin-top: .25rem; }
.status { font-size: .95rem; color: var(--forest); min-height: 1.4em; }
.privacy-box { background: #e7eee3; border-radius: var(--radius); padding: 1.6rem; font-size: .97rem; }
.privacy-box h3 { display: flex; align-items: center; gap: .5rem; margin-top: 0; font-size: 1.15rem; }
.privacy-box h3 svg { width: 24px; height: 24px; fill: none; stroke: var(--forest); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.privacy-box ul { padding-left: 1.1rem; }
.privacy-box li { margin-bottom: .35rem; }

/* Order */
.order-card { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(1.5rem, 5vw, 4rem); align-items: center; padding: clamp(1.8rem, 4vw, 3rem); background: linear-gradient(160deg, var(--card), #f6efdf); }
@media (max-width: 760px) { .order-card { grid-template-columns: 1fr; } }
.order-info h2 { margin-bottom: .4rem; }
.book-mock { perspective: 1400px; display: flex; justify-content: center; padding: 1rem; }
.book-3d {
  position: relative; width: min(300px, 70vw); aspect-ratio: 1; border-radius: 4px 12px 12px 4px; overflow: hidden;
  transform: rotateY(-18deg) rotateX(4deg); transform-style: preserve-3d; transition: transform .8s var(--ease);
  box-shadow: -14px 20px 40px -10px rgba(34,57,42,.5), inset 12px 0 0 rgba(0,0,0,.12), inset 14px 0 0 rgba(255,255,255,.15);
}
.order-card:hover .book-3d { transform: rotateY(-8deg) rotateX(2deg); }
.book-3d img { width: 100%; height: 100%; object-fit: cover; display: block; }
.book-title { position: absolute; left: 0; right: 0; top: 10%; text-align: center; font: 600 1.7rem/1.05 var(--serif); color: #fff; text-shadow: 0 2px 10px rgba(0,0,0,.45); }
.order-edition { margin: 0; color: var(--muted); }
.order-price { font: 600 2.6rem var(--serif); color: var(--forest-dark); margin: .2rem 0 .8rem; }
.order-price span { font: 400 1rem var(--sans); color: var(--muted); }
.checks { list-style: none; padding: 0; margin: 0 0 1.6rem; display: grid; gap: .5rem; }
.checks li { display: flex; gap: .6rem; align-items: flex-start; }
.checks li::before { content: ""; width: 20px; height: 20px; margin-top: .2rem; flex: none; border-radius: 50%; background: var(--forest) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m4.5 8.3 2.3 2.2 4.7-4.8' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/100% no-repeat; }

/* FAQ */
.faq { max-width: 800px !important; }
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: 14px; margin-bottom: .75rem; overflow: hidden; }
.faq summary { cursor: pointer; font: 600 1.1rem var(--serif); padding: 1.1rem 3rem 1.1rem 1.3rem; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 1.2rem; top: 50%; transform: translateY(-50%); font: 400 1.6rem var(--sans); color: var(--forest); transition: transform .3s var(--ease); }
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details > div { padding: 0 1.3rem 1.1rem; color: var(--muted); }
.faq details > div p { margin: 0; }
.faq details[open] > div { animation: open .35s var(--ease); }
@keyframes open { from { opacity: 0; transform: translateY(-6px); } }

/* Closing */
.closing { max-width: none !important; padding-left: 0 !important; padding-right: 0 !important; }
.closing-inner { max-width: 760px; margin: 0 auto; text-align: center; padding: clamp(3rem, 7vw, 5rem) 24px; position: relative; }
.closing::before { content: ""; position: absolute; inset: 0; background: radial-gradient(60% 70% at 50% 50%, rgba(84,141,163,.18), transparent 70%), radial-gradient(40% 50% at 70% 70%, rgba(241,192,117,.25), transparent 70%); pointer-events: none; }
.closing-inner img { border-radius: 14px; margin-bottom: 1.2rem; }
.closing-quote { font: 400 clamp(1.5rem, 3.5vw, 2.2rem)/1.35 var(--serif); color: var(--forest-dark); margin: 0 0 .8rem; }
.closing-quote em { color: var(--forest); }
.closing-src { color: var(--muted); font-size: .9rem; margin: 0 0 2rem; }

/* Footer */
.site-footer { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; max-width: 1120px; margin: 0 auto; padding: 2rem 20px 6rem; font-size: .9rem; color: var(--muted); border-top: 1px solid var(--line); }
.foot-brand { display: flex; align-items: center; gap: .5rem; margin: 0; }
.foot-brand img { border-radius: 6px; }
.site-footer nav { display: flex; gap: 1.2rem; }
@media (min-width: 861px) { .site-footer { padding-bottom: 2rem; } }

/* Sticky mobile CTA */
.sticky-cta { position: fixed; left: 16px; right: 16px; bottom: max(14px, env(safe-area-inset-bottom)); z-index: 30; padding: 1rem; font-size: 1.05rem; transform: translateY(150%); transition: transform .4s var(--ease); }
.sticky-cta.is-shown { transform: none; }
@media (min-width: 861px) { .sticky-cta { display: none; } }

/* Scroll reveal (only when JS is on, so content never hides without it) */
.js [data-reveal] { opacity: 0; transform: translateY(22px); transition: opacity .8s var(--ease), transform .8s var(--ease); transition-delay: calc(var(--i, 0) * 90ms); }
.js [data-reveal].is-in { opacity: 1; transform: none; }

/* Other pages */
.narrow { max-width: 680px; margin: 0 auto; padding: 4rem 20px; }
.prose h2 { font-size: 1.4rem; margin: 2rem 0 .5rem; }
.draft-banner { background: #fff3cd; border: 1px solid #e8d48a; padding: .75rem 1rem; border-radius: 8px; font-size: .9rem; }
.link-btn { background: none; border: 0; color: var(--river-dark); text-decoration: underline; cursor: pointer; font: .9rem var(--sans); }
.divider { text-align: center; color: var(--muted); font-size: .9rem; margin: 1.5rem 0 1rem; }
#email-form .field { margin-bottom: 1rem; }
.order-list { list-style: none; padding: 0; display: grid; gap: .75rem; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
  .js [data-reveal] { opacity: 1; transform: none; }
  .js .trail path { stroke-dashoffset: 0; }
  .book-frame img, .stage-frame img { transform: none; }
}

/* Footer links wrap on phones (the "Do not sell" link is long) */
.site-footer nav { flex-wrap: wrap; gap: .4rem 1.2rem; }
.site-footer-small { padding-bottom: 2rem; justify-content: center; }

/* Cookie consent */
.cookie-banner { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; padding: 0 12px max(12px, env(safe-area-inset-bottom)); pointer-events: none; }
.cookie-card {
  pointer-events: auto; max-width: 640px; margin: 0 auto; max-height: calc(100vh - 24px); overflow-y: auto;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 20px 50px -18px rgba(34,57,42,.45); padding: 1.2rem 1.3rem 1.1rem;
  animation: consent-in .4s var(--ease);
}
@keyframes consent-in { from { transform: translateY(16px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .cookie-card { animation: none; } }
.cookie-title { font-size: 1.2rem; margin: 0 0 .4rem; }
.cookie-text { font-size: .92rem; color: var(--muted); margin: 0; line-height: 1.5; }
.cookie-options { margin: .9rem 0 0; display: grid; gap: .6rem; }
.cookie-row { display: flex; gap: .7rem; align-items: flex-start; font-size: .92rem; line-height: 1.4; padding: .6rem .7rem; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); cursor: pointer; }
.cookie-row input { width: 1.15rem; height: 1.15rem; margin-top: .1rem; accent-color: var(--forest); flex: none; }
.cookie-row input:disabled { cursor: not-allowed; }
.cookie-row small { color: var(--muted); }
.cookie-gpc { margin: 0; }
.cookie-msg { margin: .6rem 0 0; min-height: 0; }
.cookie-msg:empty { display: none; }
.cookie-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem .7rem; margin-top: 1rem; }
/* Accept and Reject get the same weight, as consent rules expect. */
.cookie-actions .btn { flex: 1 1 8rem; }
.cookie-more { margin-left: auto; }
@media (max-width: 480px) { .cookie-more { margin-left: 0; flex-basis: 100%; text-align: center; padding: .3rem; } }

/* ---------- Mobile pass ---------- */
/* Nothing may push the page wider than the screen (that made phones zoom out). */
html, body { overflow-x: clip; }
main { overflow-x: clip; }
.preview-grid > *, .field-row > *, .field, .edition-grid > *, .why-grid > *, .steps > * { min-width: 0; }
.field input, .field select { width: 100%; max-width: 100%; min-height: 48px; }
.field select {
  appearance: none; -webkit-appearance: none; padding-right: 2.4rem;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='m1 1.5 5 5 5-5' fill='none' stroke='%23375d3b' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") right .9rem center / 12px no-repeat;
}
.upload input[type="file"] { padding: .45rem; font-size: .9rem; color: var(--muted); background: #fff; cursor: pointer; }
.upload input[type="file"]::file-selector-button {
  font: 700 .9rem var(--sans); color: var(--forest-dark); background: var(--paper-deep);
  border: 0; border-radius: 8px; padding: .6rem .9rem; margin-right: .7rem; cursor: pointer;
}
.upload input[type="file"]::-webkit-file-upload-button {
  font: 700 .9rem var(--sans); color: var(--forest-dark); background: var(--paper-deep);
  border: 0; border-radius: 8px; padding: .6rem .9rem; margin-right: .7rem; cursor: pointer;
}
.consent input { width: 22px; height: 22px; flex: none; margin-top: .05rem; accent-color: var(--forest); }
.consent { line-height: 1.5; }
input, select, textarea { accent-color: var(--forest); }

@media (max-width: 560px) {
  main > section { padding: 3rem 16px; }
  .site-header { padding-left: 16px; padding-right: 16px; }
  .section-head { margin-bottom: 1.8rem; }
  .card { padding: 1.25rem; border-radius: 16px; }
  .privacy-box { padding: 1.25rem; }
  .field-row { gap: .9rem; margin-bottom: .9rem; }
  .upload { padding: .85rem; }
  .thumb { width: 80px; height: 80px; }
  #preview-form .btn, .gate .btn, #checkout-btn { width: 100%; }
  .gate { align-items: stretch; }
  .order-card { padding: 1.25rem; }
  .order-price { font-size: 2.2rem; }
  .book-mock { padding: .5rem 0 0; }
  .site-footer { padding-left: 16px; padding-right: 16px; }
  .site-footer nav a, .text-link { display: inline-block; padding: .55rem 0; }
  .faq summary { padding: 1rem 2.8rem 1rem 1.1rem; font-size: 1.05rem; }
  .faq details > div { padding: 0 1.1rem 1rem; }
  .why-grid article { padding: 1.3rem; }
  .name-try { gap: .7rem; }
  .name-try input { width: 100%; }
  .name-try label { flex: 1 1 0; min-width: 0; }
  .beat h3 { font-size: 1.5rem; }
  .closing-quote { font-size: 1.35rem; }
}
@media (max-width: 380px) {
  h1 { font-size: 2.05rem; }
  .brand span { font-size: 1rem; }
  .brand img { width: 34px; height: 34px; }
  .btn-small { padding: .5rem .85rem; font-size: .85rem; }
  .trust { flex-direction: column; align-items: center; }
}
@media (max-width: 560px) {
  .btn-small { min-height: 40px; }
  .privacy-box > a { display: inline-block; padding: .5rem 0; }
}
#preview-form .status:empty, #checkout-status:empty { min-height: 0; margin: 0; }

/* Book cards: flip through sample pages, tap for a larger view (books.js) */
.flipbook { position: relative; perspective: 1600px; touch-action: pan-y; -webkit-user-select: none; user-select: none; }
.flipbook img { -webkit-user-drag: none; }
.fb-leaf { position: absolute; inset: 0; transform-origin: left center; backface-visibility: hidden; -webkit-backface-visibility: hidden; pointer-events: none; z-index: 2; box-shadow: 0 6px 18px rgba(34,57,42,.25); }
.fb-leaf img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; aspect-ratio: auto; transform: none !important; }
.fb-shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(34,57,42,.05), rgba(34,57,42,.45)); opacity: 0; }
.fb-under { position: absolute; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(90deg, rgba(34,57,42,.35), transparent 60%); opacity: 0; }
.fb-zoom { position: absolute; inset: 0; z-index: 3; width: 100%; padding: 0; background: none; border: 0; cursor: zoom-in; border-radius: 12px; }
.fb-zoom:focus-visible { outline: 3px solid var(--river); outline-offset: -3px; }
.fb-nav { position: absolute; top: 50%; z-index: 4; width: 34px; height: 34px; margin-top: -17px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; background: rgba(255,253,247,.9); color: var(--forest-dark); box-shadow: 0 2px 8px rgba(34,57,42,.2); cursor: pointer; opacity: 0; transition: opacity .2s, transform .2s var(--ease); }
.fb-nav svg, .lb-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.fb-prev { left: 8px; }
.fb-next { right: 8px; }
.flipbook:hover .fb-nav, .fb-nav:focus-visible { opacity: 1; }
.fb-nav:hover { transform: scale(1.08); }
.fb-nav:focus-visible { outline: 3px solid var(--river); outline-offset: 2px; }
@media (hover: none) { .fb-nav { opacity: .92; } }
.fb-cap { position: absolute; top: 8px; left: 8px; z-index: 4; pointer-events: none; font: 800 .66rem var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--forest-dark); background: rgba(255,253,247,.9); padding: .22rem .55rem; border-radius: 999px; }
.fb-dots { position: absolute; bottom: 8px; left: 0; right: 0; z-index: 4; display: flex; justify-content: center; gap: 6px; pointer-events: none; }
.fb-dots i { width: 7px; height: 7px; border-radius: 50%; background: rgba(255,253,247,.6); box-shadow: 0 0 0 1px rgba(34,57,42,.15); transition: background .2s, transform .2s; }
.fb-dots i.on { background: #fffdf7; transform: scale(1.2); }

.lightbox { width: min(1200px, 100vw); max-width: 100vw; max-height: 100vh; padding: 56px 16px 20px; border: 0; background: transparent; overflow: visible; color: #fffdf7; }
.lightbox::backdrop { background: rgba(18,26,20,.92); }
.lb-figure { margin: 0; touch-action: pan-y; }
.lb-img { display: block; max-width: 100%; max-height: calc(100vh - 140px); max-height: calc(100dvh - 140px); width: auto; height: auto; margin: 0 auto; border-radius: 10px; box-shadow: 0 20px 60px rgba(0,0,0,.45); background: var(--paper); -webkit-user-drag: none; user-select: none; }
.lb-cap { margin-top: .8rem; text-align: center; font: 600 1rem var(--serif); white-space: pre-wrap; }
.lb-btn { position: fixed; z-index: 2; width: 48px; height: 48px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; background: rgba(255,253,247,.94); color: var(--forest-dark); box-shadow: 0 4px 16px rgba(0,0,0,.3); cursor: pointer; }
.lb-btn svg { width: 22px; height: 22px; }
.lb-btn:focus-visible { outline: 3px solid var(--river); outline-offset: 3px; }
.lb-close { top: max(12px, env(safe-area-inset-top)); right: 12px; }
.lb-prev, .lb-next { top: 50%; margin-top: -24px; }
.lb-prev { left: 12px; }
.lb-next { right: 12px; }
@media (max-width: 700px) {
  .lb-prev, .lb-next { top: auto; bottom: max(14px, env(safe-area-inset-bottom)); margin-top: 0; }
  .lb-prev { left: calc(50% - 60px); }
  .lb-next { right: calc(50% - 60px); }
  .lightbox { padding-bottom: 84px; }
  .lb-img { max-height: calc(100dvh - 200px); }
}
html.lb-open { overflow: hidden; }
/* ---------- iPhone fit (Safari and Chrome on iOS, both WebKit) ----------
   WebKit can size a "1fr" grid column to the widest thing inside it (here the
   file pickers, whose built-in width ignores width: 100% when the column is
   measured), even with min-width: 0 on the grid item. That made the preview
   form card wider than the phone. minmax(0, 1fr) caps every column at the
   space actually available, and the controls themselves can't force width. */
.preview-grid { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
.field-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
@media (max-width: 860px) { .preview-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 760px) { .order-card, .steps { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 560px) { .field-row { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 520px) { .edition-grid { grid-template-columns: minmax(0, 1fr); } }
.card, #preview-form, .upload, .privacy-box { max-width: 100%; min-width: 0; }
.field > * { min-width: 0; max-width: 100%; }
.upload input[type="file"] {
  display: block; width: 100%; min-width: 0; max-width: 100%;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  /* 16px stops iOS from zooming the page in when a control is tapped. */
  font-size: 16px;
}
.hint, .consent span { overflow-wrap: anywhere; }

/* Audience themes (themes.js) */
/* Until themes.js swaps in the visitor's story, keep the fly fishing hero
   from flashing. Shown after 2.5s anyway, in case a script fails. */
.js.theme-swap .hero-text, .js.theme-swap .hero-art, .js.theme-swap #story { visibility: hidden; animation: theme-reveal 0s 2.5s forwards; }
@keyframes theme-reveal { to { visibility: visible; } }
.edition-card.is-theme .edition-body { border-style: solid; border-color: var(--forest); background: var(--card); }
.edition-card.is-theme strong { color: var(--forest-dark); }
.edition-link { margin-top: auto; padding-top: .4rem; font-weight: 700; font-size: .92rem; color: var(--forest); text-decoration: none; }
.edition-link::after { content: " →"; }
.edition-link:hover { text-decoration: underline; }
.waitlist .order-info .soon-badge { display: inline-block; margin-bottom: .8rem; }
.waitlist-form { display: flex; gap: .8rem; align-items: flex-end; flex-wrap: wrap; margin: 1.2rem 0 .4rem; }
.waitlist-form .field { flex: 1 1 15rem; margin: 0; }
.waitlist-alt { color: var(--muted); font-size: .95rem; margin-top: 1rem; }
.waitlist-alt a { color: var(--forest); font-weight: 700; }

/* ---------- Order form details and photo uploads ---------- */
.field-full { margin-bottom: 1rem; }
@media (max-width: 560px) { .field-full { margin-bottom: .9rem; } }
.upload-error { color: #a33a2b; font-weight: 600; font-size: .88rem; }
.upload-error:empty { display: none; }
.upload.busy { opacity: .7; }
.upload.busy::after { content: "Preparing photo…"; font-size: .88rem; font-weight: 600; color: var(--muted); }

/* Shipping on the order card */
.ship-form { margin: 0 0 1.4rem; }
.ship-h { font: 600 1.2rem var(--serif); margin: 0 0 .8rem; }
.ship-form .field small { font-weight: 400; color: var(--muted); }
.ship-form .hint { margin: 0 0 1rem; color: var(--muted); font-size: .9rem; }
.ship-options { display: grid; gap: .6rem; margin: 0 0 1rem; border: 0; padding: 0; }
.ship-option { display: flex; gap: .7rem; align-items: flex-start; padding: .8rem .9rem; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer; }
.ship-option:has(input:checked) { border-color: var(--river); }
.ship-option input { margin-top: .25rem; accent-color: var(--forest); }
.ship-option .ship-label { flex: 1; min-width: 0; font-weight: 600; }
.ship-option .ship-note { display: block; font-weight: 400; color: var(--muted); font-size: .9rem; }
.ship-option .ship-price { font-weight: 600; white-space: nowrap; }
.addon-option { margin: 0 0 1rem; }
.order-ebook { display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: center; margin: .9rem 0 0; padding: .8rem .9rem; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; }
.order-ebook .ebook-text { flex: 1 1 14rem; min-width: 0; }
.order-ebook .ebook-text strong { display: block; }
.order-ebook .hint { margin: 0; font-size: .9rem; }
.order-total { font: 600 1.15rem var(--sans); color: var(--forest-dark); margin: 0; }
.order-total span { font-weight: 400; color: var(--muted); font-size: .95rem; }
.story-steps { border: 0; padding: 0; margin: 0 0 1rem; min-width: 0; }
.story-steps legend { font-weight: 700; font-size: 1.02rem; margin-bottom: .6rem; padding: 0; }
.story-steps legend small { font-weight: 400; color: var(--muted); }
.story-step { display: flex; align-items: flex-end; gap: .6rem; margin-bottom: .9rem; animation: pop .35s var(--ease); }
.story-step .field { flex: 1 1 auto; }
.dont-know {
  flex: none; min-height: 48px; padding: 0 .9rem; border: 1.5px solid var(--line); border-radius: 10px;
  background: transparent; color: var(--muted); font: 600 .9rem var(--sans); cursor: pointer; white-space: nowrap;
}
.dont-know:hover { border-color: var(--river); color: var(--ink); }
.story-steps-done .text-link { background: none; border: 0; padding: 0; font: inherit; color: var(--river); text-decoration: underline; cursor: pointer; }
@media (max-width: 380px) { .story-step { flex-wrap: wrap; } .dont-know { min-height: 40px; } }
/* Free preview results */
.preview-result { margin-top: 1.5rem; display: flex; flex-direction: column; gap: 1rem; }
.preview-result h3 { margin: 0; }
.preview-pages { display: grid; gap: 1.25rem; }
.preview-page { margin: 0; }
.preview-page img { width: 100%; height: auto; border-radius: 10px; display: block; background: var(--paper-deep); }
.preview-page .painting { aspect-ratio: 2 / 1; border-radius: 10px; background: linear-gradient(110deg, var(--paper-deep) 30%, var(--paper) 50%, var(--paper-deep) 70%); background-size: 200% 100%; animation: preview-shimmer 1.6s linear infinite; display: grid; place-items: center; color: var(--forest); font-size: .95rem; }
.preview-page.cover .painting, .preview-page.cover img { aspect-ratio: 1 / 1; max-width: 420px; }
.preview-page figcaption { margin-top: .6rem; font-size: .98rem; line-height: 1.5; }
.preview-page figcaption p { margin: 0 0 .3rem; }
@keyframes preview-shimmer { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .preview-page .painting { animation: none; } }

/* Returns and reprints (account page) */
.returns { margin-top: 2.5rem; }
.return-form { display: flex; flex-direction: column; gap: 1.1rem; margin-top: 1rem; }
.return-form textarea { font: 400 1rem var(--sans); padding: .7rem .8rem; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); width: 100%; resize: vertical; }
.return-form .reasons { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .45rem; font-size: .95rem; }
.return-form .reasons legend { margin-bottom: .4rem; font-weight: 600; padding: 0; }
.return-form .reasons input[type=radio] { width: auto; min-height: 0; flex: none; }
.return-form .reasons label { font-weight: 400; display: flex; gap: .5rem; align-items: flex-start; }
.return-form .reasons input { margin-top: .3rem; }
.return-thumbs { display: flex; gap: .5rem; flex-wrap: wrap; }
.return-thumbs img { width: 84px; height: 84px; object-fit: cover; border-radius: 10px; }
.request-note { margin: .5rem 0 0; padding: .6rem .8rem; background: #f3efe6; border-radius: 8px; font-size: .95rem; }
.report-link { font-size: .9rem; }

/* Order progress (account page) */
.order-card-status { display: flex; flex-direction: column; gap: .8rem; }
.order-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .3rem 1rem; align-items: baseline; }
.timeline { list-style: none; margin: .4rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); }
.timeline .step { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: .3rem; font-size: .82rem; color: var(--muted); padding: 0 .2rem; }
.timeline .step::before { content: ""; position: absolute; top: 8px; right: 50%; width: 100%; height: 3px; background: var(--line); z-index: 0; }
.timeline .step:first-child::before { display: none; }
.timeline .step.done::before, .timeline .step.current::before { background: var(--forest); }
.timeline .dot { position: relative; z-index: 1; width: 19px; height: 19px; border-radius: 50%; background: var(--card); border: 3px solid var(--line); box-sizing: border-box; flex: none; }
.timeline .step.done .dot { background: var(--forest); border-color: var(--forest); }
.timeline .step.current .dot { border-color: var(--forest); box-shadow: 0 0 0 4px rgba(55,93,59,.15); }
.timeline .step.done .label, .timeline .step.current .label { color: var(--ink); }
.timeline .step.current .label { font-weight: 700; }
.timeline .when { font-size: .75rem; }
.timeline.paused .step.current .dot { border-color: var(--ochre-deep); box-shadow: 0 0 0 4px rgba(224,163,71,.2); }
.order-msg { margin: 0; }
.order-track { margin: 0; display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
@media (max-width: 480px) {
  .timeline { grid-template-columns: 1fr; gap: .55rem; }
  .timeline .step { flex-direction: row; text-align: left; gap: .6rem; }
  .timeline .step::before { top: auto; bottom: 50%; right: auto; left: 8px; width: 3px; height: calc(100% + .55rem); }
  .timeline .when { margin-left: auto; }
}
.thanks { margin-bottom: 2rem; background: #e7eee3; }
.thanks h2 { margin-top: 0; }
.order-card-status.is-new { box-shadow: 0 0 0 3px var(--forest), var(--shadow); }

/* "Your book" picker above the free preview form */
.book-pick { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; padding-top: 1.2rem; padding-bottom: 1.2rem; }
.book-pick .field { flex: 1; min-width: 0; }
.book-pick .hint { font-weight: 400; margin: 0; }
.book-pick-cover { flex: none; width: 72px; height: 72px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); background: var(--line); }
@media (max-width: 560px) { .book-pick { align-items: flex-start; gap: .8rem; } .book-pick-cover { width: 60px; height: 60px; margin-top: 1.6rem; } }
.order-edition .text-link { font-size: .9rem; margin-left: .35rem; }
