/* Landing + docs */
body.landing { --page: var(--paper); --page-ink: var(--ink); background: var(--page); color: var(--page-ink); transition: background-color 1.2s var(--ease), color 1.2s var(--ease); }
body.landing[data-mood="night"] { --page: var(--night); --page-ink: #d9d3c2; }

.nav {
  position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px clamp(16px, 4vw, 48px); background: color-mix(in srgb, var(--page, var(--paper)) 82%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid transparent; transition: background-color 1.2s var(--ease), border-color .3s;
}
.nav.scrolled { border-bottom-color: color-mix(in srgb, var(--line) 60%, transparent); }
body[data-mood="night"] .nav.scrolled { border-bottom-color: #222418; }
.nav-links { display: flex; gap: 30px; font-size: .92rem; }
.nav-links a { text-decoration: none; color: inherit; opacity: .72; transition: opacity .2s; }
.nav-links a:hover { opacity: 1; }
.btn-sm { padding: 10px 18px; font-size: .88rem; }
.logo img { width: 34px; height: 34px; border-radius: 9px; }
.logo em, h1 em, h2 em { font-style: italic; color: var(--moss); }
body[data-mood="night"] .logo em { color: var(--amber); }
body[data-mood="night"] .nav .btn-primary { background: var(--amber); color: var(--night); }

main { overflow-x: clip; }
.section { max-width: 1080px; margin: 0 auto; padding: clamp(96px, 14vw, 168px) clamp(16px, 4vw, 48px) 0; }
.section-head { max-width: 620px; margin-bottom: 56px; }
.section-head.center { text-align: center; margin-inline: auto; }
.section-head h2, .final-cta h2 { font: 350 clamp(2.1rem, 5vw, 3.4rem)/1.06 var(--serif); letter-spacing: -.025em; margin: 14px 0 16px; }
.section-head p { color: var(--ink-2); font-size: 1.06rem; margin: 0; }
.muted { color: var(--muted); }

/* ---------- HERO ---------- */
.hero {
  position: relative; min-height: calc(100svh - 64px); max-width: 1180px; margin: 0 auto;
  padding: clamp(32px, 6vw, 72px) clamp(16px, 4vw, 48px) 150px;
  display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(32px, 6vw, 72px); align-items: center;
}
.hero h1 { font: 330 clamp(2.9rem, 7.4vw, 5.6rem)/.98 var(--serif); letter-spacing: -.035em; margin: 20px 0 26px; }
.lede { font-size: clamp(1.05rem, 1.6vw, 1.22rem); color: var(--ink-2); max-width: 32em; margin: 0 0 36px; line-height: 1.65; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }

.rise { opacity: 0; transform: translateY(22px); animation: rise 1.1s var(--ease) forwards; animation-delay: calc(var(--d) * 140ms + 120ms); }
@keyframes rise { to { opacity: 1; transform: none; } }

.hero-art { display: flex; justify-content: center; }
.phone {
  --dim: 0; width: min(280px, 70vw); aspect-ratio: 9 / 19; border-radius: 44px; padding: 10px; background: #22251c;
  box-shadow: 0 50px 90px -40px rgba(31, 42, 31, .6), inset 0 0 0 1.5px #3a3e30;
  animation: bob 7s ease-in-out infinite;
}
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(-2.5deg); } 50% { transform: translateY(-12px) rotate(-1.5deg); } }
.phone-screen {
  height: 100%; border-radius: 35px; background: radial-gradient(120% 70% at 50% 40%, #1a1c13 0%, var(--night) 70%);
  color: var(--amber); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 28px 22px; position: relative;
}
.phone-screen > * { opacity: calc(1 - var(--dim) * .85); transition: opacity .2s linear; }
.ph-count { position: absolute; top: 30px; font-size: .66rem; letter-spacing: .16em; text-transform: uppercase; opacity: .45; }
.ph-glyph { font-size: 1.3rem; margin-bottom: 18px; animation: breathe 5s var(--ease) infinite; }
.ph-quest { font: 400 1.28rem/1.3 var(--serif); margin: 0 0 14px; }
.ph-hint { font-size: .76rem; color: #8d8770; margin: 0 0 40px; }
.ph-btn { border: 1px solid rgba(214, 176, 106, .5); border-radius: 999px; padding: 11px 22px; font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; }
@keyframes breathe { 0%, 100% { opacity: .35; transform: scale(.94); } 50% { opacity: .9; transform: scale(1.08); } }

/* drifting seeds */
.seeds { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.seeds i { position: absolute; bottom: -10px; width: 5px; height: 5px; border-radius: 50%; background: var(--moss-2); opacity: 0; animation: seed 16s linear infinite; }
.seeds i:nth-child(1) { left: 8%;  animation-delay: 0s; }
.seeds i:nth-child(2) { left: 22%; animation-delay: 5s; width: 3px; height: 3px; }
.seeds i:nth-child(3) { left: 41%; animation-delay: 9s; }
.seeds i:nth-child(4) { left: 57%; animation-delay: 2.5s; width: 4px; height: 4px; background: var(--amber); }
.seeds i:nth-child(5) { left: 71%; animation-delay: 12s; width: 3px; height: 3px; }
.seeds i:nth-child(6) { left: 84%; animation-delay: 7s; }
.seeds i:nth-child(7) { left: 93%; animation-delay: 14s; width: 4px; height: 4px; background: var(--amber); }
@keyframes seed {
  0% { transform: translate(0, 0); opacity: 0; } 10% { opacity: .55; }
  50% { transform: translate(40px, -45vh); } 90% { opacity: .4; }
  100% { transform: translate(-20px, -90vh); opacity: 0; }
}

/* the meadow (blades are drawn by site.js) */
.meadow { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 120px; pointer-events: none; }
.meadow path { transform-box: fill-box; transform-origin: 50% 100%; animation: sway var(--t, 5s) ease-in-out infinite alternate; animation-delay: var(--delay, 0s); }
@keyframes sway { from { transform: rotate(calc(var(--lean, 0deg) - 3deg)); } to { transform: rotate(calc(var(--lean, 0deg) + 4deg)); } }

/* ---------- STORY ---------- */
.story { max-width: 1080px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 48px); }
.chapter { min-height: 88svh; display: flex; flex-direction: column; justify-content: center; max-width: 640px; position: relative; padding: 80px 0; }
.chapter:nth-child(2) { margin-left: auto; text-align: right; align-items: flex-end; }
.chapter-n { font: 300 clamp(5rem, 14vw, 9rem)/1 var(--serif); color: var(--moss); opacity: .16; position: absolute; top: 50%; transform: translateY(-80%); left: -.06em; z-index: 0; transition: color 1.2s; pointer-events: none; }
.chapter > :not(.chapter-n) { position: relative; z-index: 1; }
.chapter:nth-child(2) .chapter-n { left: auto; right: -.04em; }
.chapter h2 { font: 350 clamp(2.4rem, 6vw, 4.2rem)/1.02 var(--serif); letter-spacing: -.03em; margin: 14px 0 20px; }
.chapter p { font-size: 1.1rem; line-height: 1.7; color: inherit; opacity: .78; margin: 0; max-width: 30em; }
.chapter .quote { margin-top: 26px; font: italic 400 1.15rem/1.4 var(--serif); opacity: .6; }
body[data-mood="night"] .chapter h2 { color: var(--amber); }
body[data-mood="night"] .chapter-n { color: var(--amber); }
.chapter > :not(.chapter-n) { opacity: 0; transform: translateY(24px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.chapter.in > :not(.chapter-n) { opacity: 1; transform: none; }
.chapter.in > p { opacity: .78; }
.chapter.in > .quote { opacity: .6; }
.chapter.in > :nth-child(3) { transition-delay: .1s; } .chapter.in > :nth-child(4) { transition-delay: .2s; } .chapter.in > :nth-child(5) { transition-delay: .32s; }

/* ---------- DEVELOPED ---------- */
.sample-roll { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.specimen-card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 12px 12px 22px; transition: transform .5s var(--ease), box-shadow .5s; }
.specimen-card:nth-child(1) { transform: rotate(-1.2deg); }
.specimen-card:nth-child(2) { transform: translateY(28px) rotate(.6deg); }
.specimen-card:nth-child(3) { transform: rotate(1.1deg); }
.specimen-card:hover { transform: translateY(-6px) rotate(0); box-shadow: 0 30px 50px -30px rgba(31, 42, 31, .45); }
.specimen-card .img { overflow: hidden; border-radius: 6px; }
.specimen-card img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; filter: sepia(1) brightness(.28) contrast(.8) blur(4px); transform: scale(1.06); transition: filter 2.8s var(--ease), transform 2.8s var(--ease); }
.specimen-card.in img { filter: none; transform: none; }
.specimen-card .stamp { margin-top: 16px; }
.specimen-card h3 { font: 400 1.3rem/1.2 var(--serif); margin: 10px 0 8px; }
.specimen-card .note { font: italic 400 1rem/1.55 var(--serif); color: var(--ink-2); margin: 0; }
.specimen-card .meta { font-size: .76rem; color: var(--muted); margin: 14px 0 0; }
.stamp {
  display: inline-block; font: 600 .62rem/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--moss);
  border: 1.5px solid currentColor; padding: 4px 7px; border-radius: 4px; transform: rotate(-3deg);
}
.stamp.no { color: var(--clay); }
.honest { max-width: 560px; margin: 72px auto 0; text-align: center; color: var(--muted); font: italic 400 1.02rem/1.6 var(--serif); }

/* ---------- WHY ---------- */
.why-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.why-list li { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 30px 16px; border-radius: 22px; transition: background .4s var(--ease); }
.why-list li:hover { background: var(--paper-2); }
.why-list span { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; border: 1px solid var(--line); color: var(--moss); font-size: 1.2rem; margin-bottom: 10px; }
.why-list b { font: 400 1.25rem/1.2 var(--serif); }
.why-list i { font-style: normal; color: var(--muted); font-size: .92rem; }

/* ---------- FAQ ---------- */
.faq-list { max-width: 720px; margin: 0 auto; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; padding: 24px 44px 24px 0; position: relative; font: 400 1.2rem/1.35 var(--serif); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; position: absolute; right: 6px; top: 20px; font: 300 1.6rem/1 var(--sans); color: var(--moss); transition: transform .35s var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0 0 26px; color: var(--ink-2); max-width: 60ch; animation: fadein .5s var(--ease); }
@keyframes fadein { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.more { text-align: center; margin: 28px 0 0; }
.more a { color: var(--moss); text-decoration: none; font-weight: 500; }
code { font: .86em ui-monospace, 'SF Mono', Consolas, monospace; background: var(--paper-2); padding: 2px 6px; border-radius: 5px; }

/* ---------- CTA + FOOTER ---------- */
.final-cta { position: relative; text-align: center; padding: clamp(120px, 16vw, 200px) 16px 190px; }
.final-cta h2 { margin-bottom: 36px; }
.footer {
  border-top: 1px solid var(--line); padding: 40px clamp(16px, 4vw, 48px); display: grid; grid-template-columns: 1fr auto; gap: 24px;
  font-size: .88rem; color: var(--ink-2); max-width: 1180px; margin: 0 auto;
}
.footer .logo img { width: 28px; height: 28px; border-radius: 7px; }
.footer p { margin: 10px 0 0; max-width: 46ch; }
.footer nav { display: flex; gap: 22px; }
.footer nav a { text-decoration: none; }
.footer .credits { grid-column: 1 / -1; max-width: none; font-size: .76rem; color: var(--muted); }

/* generic reveal */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

@media (max-width: 900px) {
  .nav-links { display: none; }
  .hero { grid-template-columns: 1fr; min-height: auto; padding-bottom: 130px; }
  .br-wide { display: none; }
  .chapter, .chapter:nth-child(2) { min-height: 70svh; text-align: left; align-items: flex-start; margin-left: 0; }
  .chapter:nth-child(2) .chapter-n { right: auto; left: -.06em; }
  .sample-roll { grid-template-columns: 1fr; max-width: 420px; margin: 0 auto; }
  .specimen-card:nth-child(n) { transform: none; }
  .why-list { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
  .logo-tail { display: none; }
  .footer { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .rise, .chapter > *, .specimen-card img, .reveal { opacity: 1 !important; transform: none !important; filter: none !important; }
}

/* ---------- DOCS ---------- */
.docs { max-width: 1120px; margin: 0 auto; padding: 48px clamp(16px, 4vw, 48px) 96px; display: grid; grid-template-columns: 220px 1fr; gap: 56px; }
.docs-toc { position: sticky; top: 84px; align-self: start; font-size: .9rem; }
.docs-toc ol { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 10px; }
.docs-toc a { text-decoration: none; color: var(--ink-2); }
.docs-toc a:hover { color: var(--moss); }
.docs-body { max-width: 720px; min-width: 0; }
.docs-body h1 { font: 350 clamp(2.2rem, 5vw, 3.2rem)/1.05 var(--serif); letter-spacing: -.02em; margin: 10px 0 16px; }
.docs-body h2 { font: 400 1.8rem/1.2 var(--serif); margin: 64px 0 14px; padding-top: 8px; scroll-margin-top: 80px; }
.docs-body h3 { font: 600 1rem/1.4 var(--sans); margin: 28px 0 8px; }
.docs-body p, .docs-body li { color: var(--ink-2); }
.docs-body pre { background: var(--night); color: #e5dfcd; padding: 18px 20px; border-radius: 12px; overflow-x: auto; font: .88rem/1.6 ui-monospace, Consolas, monospace; }
.docs-body pre code { background: none; padding: 0; color: inherit; }
.docs-body table { width: 100%; border-collapse: collapse; font-size: .92rem; display: block; overflow-x: auto; }
.docs-body th, .docs-body td { text-align: left; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.docs-body th { font-weight: 600; color: var(--ink); }
.callout { background: var(--paper-2); border-left: 3px solid var(--moss); padding: 14px 18px; border-radius: 0 10px 10px 0; margin: 20px 0; }
.callout p { margin: 0; }
@media (max-width: 860px) { .docs { grid-template-columns: 1fr; gap: 24px; } .docs-toc { position: static; } }

/* refinements: chapter numerals sit above, a fuller meadow */
.chapter-n, .chapter:nth-child(2) .chapter-n { position: static; transform: none; z-index: auto; font: 300 clamp(3.2rem, 7vw, 5rem)/1 var(--serif); opacity: .28; margin-bottom: 18px; letter-spacing: -.03em; }
.meadow { height: 150px; }
.why-list span { font-size: 1.5rem; }
.phone { width: min(250px, 64vw); }
.hero { padding-top: clamp(24px, 4vw, 48px); padding-bottom: 140px; }
@media (max-height: 760px) and (min-width: 901px) { .phone { width: 220px; } }
.hero .meadow { left: 50%; right: auto; width: 100vw; transform: translateX(-50%); }

/* film */
.film { padding-top: clamp(72px, 10vw, 120px); }
.film-frame { max-width: 1000px; margin: 0 auto; border-radius: 22px; overflow: hidden; background: #0c0d0a; box-shadow: 0 40px 90px -40px rgba(31, 42, 31, .55); aspect-ratio: 16 / 9; }
.film-frame video { width: 100%; height: 100%; display: block; }
.film-note { text-align: center; color: var(--muted); font-size: .9rem; margin: 22px auto 0; max-width: 560px; }

/* try it */
.try-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.try-card { display: flex; flex-direction: column; gap: 8px; padding: 28px 26px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); text-decoration: none; color: var(--ink); transition: transform .35s var(--ease), box-shadow .35s var(--ease); }
.try-card:hover { transform: translateY(-4px); box-shadow: 0 26px 50px -32px rgba(31, 42, 31, .5); }
.try-card.dark { background: var(--night); border-color: var(--night); color: #e5dfcd; }
.try-card.dark h3 { color: var(--amber); }
.try-time { font: 600 .7rem/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.try-card h3 { font: 400 1.6rem/1.15 var(--serif); margin: 6px 0 0; }
.try-card p { margin: 0; opacity: .8; }
.try-go { margin-top: auto; padding-top: 14px; font-weight: 500; color: var(--moss); }
.try-card.dark .try-go { color: var(--amber); }
.try-note { text-align: center; color: var(--muted); font-size: .92rem; margin: 26px auto 0; max-width: 620px; }
@media (max-width: 900px) { .try-grid { grid-template-columns: 1fr; } }
