/* Landing: "a drawing walks off the page". A sticky stage where scrolling opens a drawing into a picture-book spread,
   then sections that read like pages of the same book. */
.art-defs { position: absolute; width: 0; height: 0; }
.lp { --open: 0; --tease: 0; }
@property --tease { syntax: "<number>"; inherits: true; initial-value: 0; }
.lp-top { position: fixed; z-index: 50; top: 0; left: 0; right: 0; display: flex; align-items: center; gap: 12px; padding: 12px clamp(16px, 4vw, 40px); background: linear-gradient(var(--bg) 40%, transparent); pointer-events: none; }
.lp-top > * { pointer-events: auto; }
.lp-signin { display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border: 2px solid var(--ink); border-radius: var(--r-pill); color: var(--ink); background: var(--surface); text-decoration: none; font-weight: 700; font-size: .95rem; box-shadow: 0 3px 0 var(--ink); }
.lp-link { color: var(--ink); font-weight: 700; text-underline-offset: 5px; text-decoration-thickness: 2px; text-decoration-color: var(--brand); }
.lp-link.big { font: 800 clamp(1.6rem, 4vw, 2.4rem) var(--font-display); }
.wrap { width: min(1120px, 100% - 2 * clamp(20px, 5vw, 56px)); margin: 0 auto; }
.eyebrow.plum { color: var(--plum); }
.btn.ghost { background: transparent; }

/* ---- hero ---- */
.stage-hero { position: relative; }
.hero-track { height: 230vh; }
.hero-sticky { position: sticky; top: 0; height: 100vh; min-height: 640px; overflow: hidden; display: grid; grid-template-columns: minmax(300px, .86fr) 1.14fr; align-items: center; gap: 2vw; padding: 84px clamp(20px, 5vw, 64px) 36px; }
.hero-copy { display: grid; gap: 20px; justify-items: start; max-width: 560px; position: relative; z-index: 6; }
.hero-copy h1 { font-size: clamp(2.3rem, 5.2vw, 4.3rem); font-weight: 800; line-height: 1.02; letter-spacing: -.03em; text-wrap: balance; }
.hero-copy .u { position: relative; white-space: nowrap; color: var(--brand-ink); }
.hero-copy .u::after { content: ""; position: absolute; left: -2%; right: -2%; bottom: -.12em; height: .3em; background: no-repeat center / 100% 100% url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 20' preserveAspectRatio='none'%3E%3Cpath d='M2 12c20-10 30 6 52-1s32-7 54 0 38 6 90-2' fill='none' stroke='%23E8562A' stroke-width='6' stroke-linecap='round'/%3E%3C/svg%3E"); }
.lead { font-size: clamp(1.05rem, 1.5vw, 1.25rem); color: var(--muted); max-width: 46ch; }
.hero-act { display: flex; align-items: center; flex-wrap: wrap; gap: 14px 26px; margin-top: 6px; } .hero-act .btn { min-height: 56px; padding: 0 34px; font-size: 1.1rem; box-shadow: 0 5px 0 var(--ink); }
.fine { font-size: .88rem; color: var(--muted); }

.hero-book { --w: clamp(176px, 23vw, 330px); --h: calc(var(--w) * 1.32); --walk: clamp(0, calc((var(--open) - .18) / .82), 1); position: relative; justify-self: center; width: calc(var(--w) * 2); height: var(--h); margin: 0; perspective: 2200px; }
.hero-book figcaption { position: absolute; left: 0; right: 0; bottom: calc(var(--h) * -.17); text-align: center; font: italic .85rem var(--font-story); color: var(--muted); }
.book3d { position: absolute; inset: 0; transform-style: preserve-3d; transform: translateX(calc(var(--w) * -.5 * (1 - var(--open)))); }
.pg-right { position: absolute; left: var(--w); top: 0; width: var(--w); height: var(--h); border-radius: 0 14px 14px 0; background: var(--surface); box-shadow: 0 1px 0 var(--line), 0 3px 0 -1px var(--surface), 0 4px 0 -1px var(--line-strong), 0 28px 40px -16px rgba(60,40,10,.55); }
.text-page { position: relative; height: 100%; display: grid; align-content: center; padding: calc(var(--w) * .12); }
.hero-book .story-text, .page-demo .story-text { font: 400 clamp(1rem, 1.7vw, 1.45rem)/1.55 var(--font-story); }
.hero-book .story-text::first-letter { float: left; margin: .05em .1em 0 0; font: 800 2.7em/.8 var(--font-display); color: var(--brand-ink); }
.folio { position: absolute; bottom: 12px; left: 0; right: 0; text-align: center; font: italic .85rem var(--font-story); color: var(--muted); }
.leaf { position: absolute; left: var(--w); top: 0; width: var(--w); height: var(--h); transform-style: preserve-3d; transform-origin: left center; transform: rotateY(calc(var(--open) * -180deg + var(--tease) * -13deg)); animation: tease 2.6s .8s ease-in-out 2 both; }
@keyframes tease { 0%, 100% { --tease: 0; } 40% { --tease: 1; } }
.face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; overflow: hidden; }
.face.front { border-radius: 0 14px 14px 0; background: #FFFDF6; box-shadow: 0 1px 0 #e6dcc4, 0 26px 40px -16px rgba(60,40,10,.55); }
.sheet-art { display: block; width: 100%; height: 100%; }
.face.back { transform: rotateY(180deg); border-radius: 14px 0 0 14px; background: var(--surface); box-shadow: 0 26px 40px -16px rgba(60,40,10,.5); }
.left-page { height: 100%; display: grid; align-content: end; justify-items: center; padding: 0 0 calc(var(--h) * .1); background: radial-gradient(120% 80% at 50% 30%, color-mix(in srgb, var(--teal) 24%, var(--surface)), color-mix(in srgb, var(--sun) 22%, var(--surface))); }
.left-page .scene { font: italic .9rem var(--font-story); color: var(--muted); }
.left-page .where { position: absolute; left: 17%; top: 25%; width: 62%; aspect-ratio: 1.02; border: 3px dashed color-mix(in srgb, var(--ink) 28%, transparent); border-radius: 46% 54% 50% 50%; }
.corner { position: absolute; right: 0; bottom: 0; width: 74px; height: 74px; padding: 0; border: 0; background: none; cursor: grab; touch-action: none; }
.corner span { position: absolute; right: 0; bottom: 0; width: 46px; height: 46px; background: linear-gradient(315deg, var(--bg) 0 50%, #e9dcbb 50% 100%); box-shadow: -4px -4px 6px -3px rgba(60,40,10,.35); border-top-left-radius: 8px; transition: width .2s var(--ease), height .2s var(--ease); }
.corner:hover span, .corner:focus-visible span { width: 62px; height: 62px; }
.corner:focus-visible { outline: 3px solid var(--focus); outline-offset: -3px; }
.fly { position: absolute; z-index: 5; left: calc(var(--w) * 1.06); top: calc(var(--h) * .358); width: calc(var(--w) * .5); aspect-ratio: 196 / 186; pointer-events: none; transform-origin: 50% 90%;
  transform: translateX(calc(var(--w) * -.5 * (1 - var(--open)))) translate(calc(var(--walk) * var(--w) * -.8), calc(var(--walk) * var(--h) * -.07 + var(--walk) * (1 - var(--walk)) * -76px)) rotate(calc(var(--walk) * -7deg)) scale(calc(1 + var(--walk) * .16));
  filter: drop-shadow(0 calc(3px + var(--walk) * 14px) calc(3px + var(--walk) * 7px) rgba(40,25,5,.38)); }
.fly svg { display: block; width: 100%; height: 100%; overflow: visible; } .fly .tear { opacity: clamp(0, calc(var(--walk) * 6), 1); }
.hero-book:not(:hover) .corner span { animation: none; }

/* ---- sections ---- */
.stage-hero ~ section, .lp-end { position: relative; }
.lp-cast, .lp-pen, .lp-share, .lp-promise, .lp-ent { padding: clamp(72px, 10vw, 140px) 0; }
.lp-cast, .lp-share { background: var(--surface); }
.lp-pen { background: var(--bg-2); }
.lp-cast::before, .lp-pen::before, .lp-share::before, .lp-promise::before, .lp-ent::before { content: ""; position: absolute; left: 0; right: 0; top: -17px; height: 18px; background: inherit; clip-path: polygon(0 100%,0 40%,3% 70%,6% 30%,9% 75%,12% 35%,15% 70%,18% 25%,21% 72%,24% 38%,27% 70%,30% 30%,33% 74%,36% 36%,39% 70%,42% 28%,45% 74%,48% 34%,51% 70%,54% 30%,57% 72%,60% 36%,63% 70%,66% 28%,69% 74%,72% 34%,75% 70%,78% 30%,81% 72%,84% 36%,87% 70%,90% 28%,93% 74%,96% 34%,100% 60%,100% 100%); }
.two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(32px, 6vw, 88px); align-items: center; } .two.flip { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); } .two.flip .copy { order: 2; }
.copy { display: grid; gap: 16px; justify-items: start; } .copy h2, .lp-share h2, .lp-promise h2, .ent h2 { font-size: clamp(1.9rem, 4vw, 3rem); font-weight: 800; line-height: 1.08; letter-spacing: -.02em; max-width: 20ch; } .copy h2 em { font-style: normal; color: var(--brand-ink); }
.copy p { max-width: 50ch; font-size: 1.08rem; }
.ticks { margin: 4px 0 0; padding: 0; list-style: none; display: grid; gap: 10px; } .ticks li { position: relative; padding-left: 30px; } .ticks li::before { content: ""; position: absolute; left: 0; top: .3em; width: 18px; height: 18px; border-radius: 50%; background: var(--teal) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.500l4 4 8-9' fill='none' stroke='white' stroke-width='3.500' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 12px no-repeat; }

/* cast board */
.board { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px 18px; padding: 34px 22px 24px; border-radius: 22px; background: var(--bg); border: 2px solid var(--line-strong); box-shadow: var(--shadow); background-image: radial-gradient(var(--line-strong) 1.2px, transparent 1.4px); background-size: 22px 22px; }
.char-demo { position: relative; display: grid; gap: 10px; justify-items: center; padding: 22px 10px 14px; border-radius: 14px; background: var(--surface); box-shadow: var(--shadow); transition: transform .3s var(--ease); } .char-demo:nth-child(2) { transform: rotate(1.6deg); } .char-demo:nth-child(1) { transform: rotate(-1.4deg); } .char-demo:nth-child(3) { transform: rotate(-.6deg); }
.char-demo .pin { top: -10px; opacity: 0; transform: translateY(-24px) scale(1.4); transition: opacity .2s, transform .35s cubic-bezier(.3,1.6,.5,1); }
.char-demo.on { background: var(--teal-soft); box-shadow: 0 0 0 3px var(--teal), var(--shadow); } .char-demo.on .pin { opacity: 1; transform: none; }
.piece { width: min(100%, 120px); } .piece svg { display: block; width: 100%; height: auto; }
.nm { font-size: 1rem; text-align: center; min-height: 1.3em; }
.chips { display: grid; gap: 6px; width: 100%; } .chips button { min-height: 36px; border: 2px solid var(--line-strong); border-radius: var(--r-pill); background: var(--surface); color: var(--ink); font: 700 .78rem var(--font-ui); cursor: pointer; } .chips button:hover { border-color: var(--ink); } .chips .pinit[aria-pressed="true"] { background: var(--teal); border-color: var(--teal); color: #fff; }
.tally { grid-column: 1 / -1; text-align: center; font: 700 .9rem var(--font-display); color: var(--muted); }

/* plot demo */
.demo-plot { display: grid; gap: 18px; }
.beats-demo { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.beats-demo li { display: grid; grid-template-columns: 44px 1fr; gap: 14px; align-items: center; padding: 14px 16px; border-radius: 16px; background: var(--plum-soft); } .beats-demo li > div { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px; }
.bn { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50% 50% 50% 14%; background: var(--plum); color: #fff; font: 800 1.2rem var(--font-display); transform: rotate(-4deg); }
.beats-demo .select { width: auto; min-width: 170px; }
.page-demo { position: relative; min-height: 150px; padding: 26px 26px 38px; border-radius: 10px 18px 18px 10px; background: var(--surface); box-shadow: var(--shadow-lift); }

/* trio */
.lp-share h2 { margin-bottom: 38px; } .lp-share .eyebrow { margin-bottom: 12px; }
.trio { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.obj { display: grid; gap: 10px; align-content: start; padding: 28px 24px; background: var(--bg); border-radius: 6px 20px 6px 20px; box-shadow: var(--shadow); transition: transform .25s var(--ease); } .obj:hover { transform: translateY(-6px) rotate(-.6deg); }
.obj:nth-child(2) { transform: translateY(18px); } .obj:nth-child(2):hover { transform: translateY(12px) rotate(.6deg); }
.obj-art { display: grid; place-items: center; width: 76px; height: 76px; border-radius: 50% 50% 50% 14%; background: var(--surface); border: 2px solid var(--ink); transform: rotate(-5deg); } .obj-art svg { width: 44px; height: 44px; }
.obj h3 { font-size: 1.35rem; } .obj p { color: var(--muted); }
.o-link { position: relative; } .o-link::before { content: ""; position: absolute; left: 0; right: 0; top: 98px; border-top: 2px dashed var(--line-strong); opacity: 0; }

/* promise (night panel) */
.lp-promise { background: #1E2A47; color: #F4EBD8; } :root[data-theme="dark"] .lp-promise { background: #0F1226; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .lp-promise { background: #0F1226; } }
.lp-promise .eyebrow { color: #F6B93B; } .lp-promise h2 { max-width: 22ch; margin-bottom: 44px; } .lp-promise a { color: #FFD166; }
.notes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; margin: 0; padding: 0; list-style: none; }
.notes li { display: grid; gap: 10px; align-content: start; padding: 26px 22px 24px; color: #1E2A47; background: #FFFBF3; clip-path: polygon(0 3%,10% 0,25% 2%,42% 0,60% 3%,78% 0,100% 2%,99% 40%,100% 70%,98% 100%,80% 98%,60% 100%,40% 98%,20% 100%,0 97%,1% 60%); box-shadow: none; filter: drop-shadow(0 10px 8px rgba(0,0,0,.35)); }
.notes b { font: 800 1.5rem/1.1 var(--font-display); } .notes span { font-size: .96rem; color: #3b4764; }
.note-a { transform: rotate(-2deg); background: #FCEBC2 !important; } .note-b { transform: rotate(1.4deg) translateY(10px); } .note-c { transform: rotate(-1deg); background: #D7EFEC !important; } .note-d { transform: rotate(2deg) translateY(8px); }
.lp-promise .fine { margin-top: 40px; color: #D7D9E4; }

/* enterprise */
.lp-ent { background: var(--bg); }
.ent { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: clamp(28px, 5vw, 64px); align-items: center; padding: clamp(28px, 5vw, 64px); border-radius: 32px; background: var(--surface); border: 2px solid var(--ink); box-shadow: 0 8px 0 var(--ink); }
.ent-copy { display: grid; gap: 16px; justify-items: start; } .ent .eyebrow { color: var(--brand-ink); }
.ent-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 0; padding: 0; list-style: none; }
.ent-tiles li { display: grid; gap: 6px; align-content: start; padding: 20px; border-radius: 18px; background: var(--bg); border: 1.5px solid var(--line-strong); } .ent-tiles .ico { width: 26px; height: 26px; color: var(--plum); } .ent-tiles b { font: 800 1.05rem var(--font-display); } .ent-tiles span { font-size: .9rem; color: var(--muted); }

/* end */
.lp-end { display: grid; justify-items: center; gap: 12px; padding: clamp(60px, 8vw, 110px) 20px 28px; text-align: center; background: var(--bg-2); } .lp-end-t { font: 800 clamp(1.4rem, 3vw, 2rem) var(--font-display); color: var(--muted); }
.lp-foot { display: flex; align-items: center; gap: 6px 22px; flex-wrap: wrap; width: min(1120px, 100%); margin-top: clamp(40px, 6vw, 80px); padding-top: 22px; border-top: 2px dashed var(--line-strong); color: var(--muted); font-size: .88rem; } .lp-foot a { color: var(--muted); }

/* reveal on scroll (only when the script is running) */
.js-ready .rise { opacity: 0; transform: translateY(26px); transition: opacity .7s var(--ease), transform .7s var(--ease); } .js-ready .rise.in { opacity: 1; transform: none; }

@media (max-width: 900px) {
  .hero-track { height: 210vh; }
  .hero-sticky { grid-template-columns: 1fr; grid-template-rows: auto 1fr; align-items: start; gap: 12px; padding: 70px 20px 30px; min-height: 0; }
  .hero-copy { gap: 12px; } .hero-copy h1 { font-size: clamp(1.9rem, 8.4vw, 2.6rem); } .lead { font-size: 1rem; } .hero-copy .fine { display: none; } .hero-act .btn { min-height: 50px; padding: 0 26px; }
  .hero-book { --w: min(46vw, 210px); align-self: center; margin-top: 4px; }
  .book3d { transform: translateX(calc(var(--w) * -.5)); }
  .fly { transform: translateX(calc(var(--w) * -.5)) translate(0, calc(var(--walk) * var(--h) * -.36 + var(--walk) * (1 - var(--walk)) * -50px)) rotate(calc(var(--walk) * -5deg)) scale(calc(1 - var(--walk) * .4)); transform-origin: 20% 10%; }
  .text-page { padding: calc(var(--h) * .3) 14px 12px; align-content: start; } .pg-right { overflow: hidden; } .hero-book .story-text { font-size: .82rem; line-height: 1.4; } .hero-book .story-text::first-letter { font-size: 2.2em; } .hero-book figcaption { bottom: -34px; }
  .two, .two.flip { grid-template-columns: 1fr; } .two.flip .copy { order: 0; }
  .trio { grid-template-columns: 1fr; } .obj:nth-child(2) { transform: none; }
  .notes { grid-template-columns: 1fr 1fr; } .ent { grid-template-columns: 1fr; border-radius: 24px; } .ent-tiles { grid-template-columns: 1fr; }
  .board { grid-template-columns: 1fr 1fr 1fr; padding: 28px 10px 18px; gap: 14px 8px; } .char-demo { padding: 18px 6px 10px; } .chips button { font-size: .7rem; padding: 0 4px; } .nm { font-size: .85rem; }
}
@media (max-width: 900px) { .left-page .where { display: none; } }
@media (max-width: 520px) { .notes { grid-template-columns: 1fr; } .beats-demo li { grid-template-columns: 38px 1fr; } .beats-demo .select { min-width: 0; width: 100%; } .beats-demo li > div { display: grid; } }
@media (prefers-reduced-motion: reduce) {
  .hero-track { height: auto; } .hero-sticky { position: static; height: auto; padding-bottom: 80px; } .lp { --open: 1; } .leaf { animation: none; }
  .js-ready .rise { opacity: 1; transform: none; transition: none; } .obj, .char-demo, .corner span { transition: none; }
}
