/* HemBook landing page. Tokens follow the HemBook brand board (indigo & marigold). */
:root {
  --paper: #FBF5EA;
  --surface: #FFFFFF;
  --sunken: #F4ECDD;
  --line: #E8E0D0;
  --ink: #1A1C3A;
  --muted: #5A5E78;
  --indigo: #26306F;
  --indigo-lift: #3A4590;
  --marigold: #F2A23A;
  --marigold-deep: #C97A1E;
  --marigold-tint: #FDE9CC;
  --tint: #F5F6FA; /* cool, faintly indigo; replaces cream for section and card grounds */
  --owed: #B3261E;
  --paid: #1F6B45;
  --on-indigo: #FBF5EA;
  --on-indigo-muted: #C9CCE6;

  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  --r-sm: 8px; --r-md: 12px; --r-lg: 16px; --r-pill: 999px;
  --shadow-card: 0 6px 16px rgba(38, 48, 111, .10);
  --shadow-phone: 0 18px 40px rgba(38, 48, 111, .18);
  --gutter: max(16px, env(safe-area-inset-left, 0px));
  --gutter-r: max(16px, env(safe-area-inset-right, 0px));
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
section[id], article[id] { scroll-margin-top: 84px; } /* keep menu targets clear of the sticky header */
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--surface); color: var(--ink); font-family: var(--sans); font-size: 17px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--marigold); outline-offset: 2px; border-radius: 4px; }

.wrap { max-width: 1120px; margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter-r); }
.narrow { max-width: 760px; }

h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.08; letter-spacing: -0.01em; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(40px, 7vw, 64px); }
h2 { font-size: clamp(30px, 4.4vw, 44px); margin-bottom: 16px; }
h3 { font-size: 21px; line-height: 1.2; }
p { margin: 0 0 16px; }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.eyebrow.on-dark { color: var(--on-indigo-muted); }
.lead { font-size: clamp(17px, 2vw, 19px); color: var(--muted); max-width: 34em; }
.fine { font-size: 14px; color: var(--muted); margin: 12px 0 0; }
.fine.on-dark { color: var(--on-indigo-muted); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 24px; border-radius: var(--r-md); font: 700 16px/1 var(--sans); text-decoration: none; border: 2px solid transparent; cursor: pointer; transition: background .15s, transform .15s; }
.btn:active { transform: translateY(1px); }
.btn-marigold { background: var(--marigold); color: var(--ink); }
.btn-marigold:hover { background: #E8952A; }
.btn-ghost { background: transparent; border-color: var(--indigo); color: var(--indigo); }
.btn-ghost:hover { background: var(--tint); }
.btn-sm { min-height: 42px; padding: 0 16px; font-size: 15px; }
.btn-block { width: 100%; }

/* Header */
.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: rgba(255, 255, 255, .94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 21; background: var(--surface); }
.top-in { display: flex; align-items: center; gap: 24px; min-height: 68px; }
.logo img { height: 36px; width: auto; }
.top { transition: box-shadow .25s; }
.top.scrolled { box-shadow: 0 4px 18px rgba(38, 48, 111, .08); }
.top-nav { display: flex; gap: 28px; margin-left: auto; font-weight: 500; font-size: 15px; }
.top-nav a { position: relative; text-decoration: none; color: var(--muted); padding: 6px 0; }
.top-nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--marigold); transform: scaleX(0); transform-origin: left; transition: transform .25s; }
.top-nav a:hover, .top-nav a.active { color: var(--ink); }
.top-nav a:hover::after, .top-nav a.active::after { transform: scaleX(1); }
.menu-btn { display: none; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); cursor: pointer; padding: 0; flex-direction: column; align-items: center; justify-content: center; gap: 5px; }
.menu-btn span { display: block; width: 18px; height: 2px; border-radius: 2px; background: var(--ink); transition: transform .25s, opacity .2s; }
.menu-open .menu-btn span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-open .menu-btn span:nth-child(2) { opacity: 0; }
.menu-open .menu-btn span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
@media (max-width: 720px) {
  .top-in { gap: 10px; }
  .logo img { height: 30px; }
  .top-cta { margin-left: auto; min-height: 44px; padding: 0 14px; font-size: 14px; }
  .menu-btn { display: flex; }
  .top-nav { position: absolute; left: 0; right: 0; top: 100%; margin: 0; flex-direction: column; gap: 0; background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: 0 14px 24px rgba(38, 48, 111, .10); padding: 8px max(16px, env(safe-area-inset-left, 0px)) 16px; visibility: hidden; opacity: 0; transform: translateY(-8px); transition: opacity .2s, transform .2s, visibility .2s; }
  .menu-open .top-nav { visibility: visible; opacity: 1; transform: none; }
  .top-nav a { font-size: 18px; padding: 14px 0; border-bottom: 1px solid var(--line); }
  .top-nav a:last-child { border-bottom: 0; }
  .top-nav a::after { display: none; }
}
@media (max-width: 360px) { .top-cta { padding: 0 10px; font-size: 13px; } }

/* Hero */
.hero { background: var(--surface); overflow: hidden; }
.hero-in { display: grid; grid-template-columns: 1.05fr .95fr; gap: 40px; align-items: center; padding-block: 64px 72px; }
.hero-copy { min-width: 0; }
.hero h1 { margin-bottom: 20px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-art { position: relative; height: 560px; min-width: 0; }
.phone { border-radius: 28px; border: 1px solid var(--line); box-shadow: var(--shadow-phone); background: var(--surface); width: 100%; height: auto; }
.hero-art .phone { position: absolute; width: 250px; }
.phone-back { left: 4%; top: 0; transform: rotate(-4deg); }
.phone-front { right: 4%; top: 48px; transform: rotate(3deg); }
.sms-float { position: absolute; left: 0; bottom: 18px; width: 260px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px 16px 16px 4px; padding: 14px 16px; font-size: 14px; line-height: 1.45; box-shadow: var(--shadow-card); }
.sms-meta { display: block; margin-top: 6px; font-size: 11px; font-weight: 700; color: var(--paid); }
.sms-from { display: block; font-size: 11px; font-weight: 700; letter-spacing: .06em; color: var(--indigo); margin-bottom: 4px; }
@media (max-width: 880px) {
  .hero-in { grid-template-columns: 1fr; padding-block: 40px 48px; }
  .hero-art { height: 470px; max-width: 420px; width: 100%; margin: 0 auto; }
  .hero-art .phone { width: 205px; }
  .sms-float { width: 230px; font-size: 13px; }
}
@media (max-width: 380px) { .hero-art .phone { width: 180px; } .hero-art { height: 420px; } }

/* Tape-measure motif divider */
.tape { height: 22px; background-color: var(--marigold);
  background-image:
    repeating-linear-gradient(90deg, var(--ink) 0 1.5px, transparent 1.5px 16px),
    repeating-linear-gradient(90deg, var(--ink) 0 1.5px, transparent 1.5px 8px);
  background-size: 16px 11px, 8px 6px; background-repeat: repeat-x; background-position: 0 0, 0 0; }

/* Sections */
.section { padding-block: 80px; }
.section-paper { background: var(--tint); }
@media (max-width: 640px) { .section { padding-block: 56px; } }

.pains { list-style: none; padding: 0; margin: 28px 0 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.pains li { background: var(--tint); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px 22px; min-width: 0; }
.pains b { display: block; font-family: var(--display); font-weight: 600; font-size: 20px; line-height: 1.25; margin-bottom: 6px; }
.pains span { color: var(--muted); }
@media (max-width: 640px) { .pains { grid-template-columns: 1fr; } }

ul.ticks { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 10px; }
ul.ticks li { position: relative; padding-left: 32px; }
ul.ticks li::before { content: ""; position: absolute; left: 0; top: 2px; width: 22px; height: 22px; border-radius: 50%; background: var(--marigold); }
ul.ticks li::after { content: ""; position: absolute; left: 8px; top: 7px; width: 5px; height: 9px; border: solid var(--ink); border-width: 0 2px 2px 0; transform: rotate(45deg); }
ul.ticks.on-dark li { color: var(--on-indigo); }

.feature { display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: center; padding-block: 40px; }
.feature + .feature, .feature + .feature-wide { border-top: 1px solid var(--line); }
.feature.flip .feature-copy { order: 2; }
.feature-copy { min-width: 0; }
.feature-copy p { color: var(--muted); max-width: 32em; }
.feature-art { display: flex; justify-content: center; min-width: 0; }
.feature-art .phone { max-width: 300px; }
@media (max-width: 880px) {
  .feature { grid-template-columns: 1fr; gap: 28px; }
  .feature.flip .feature-copy { order: 0; }
  .feature-art .phone { max-width: 260px; }
}

.feature-wide { padding-block: 56px 16px; }
.center { text-align: center; }
.center p { margin-left: auto; margin-right: auto; }
.steps { list-style: none; padding: 0; margin: 32px 0 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; counter-reset: step; }
.steps li { min-width: 0; counter-increment: step; }
.steps .phone { aspect-ratio: 390 / 600; object-fit: cover; object-position: top; border-radius: 20px; box-shadow: var(--shadow-card); }
.steps span { display: block; margin-top: 12px; font-weight: 700; font-size: 15px; }
.steps span::before { content: counter(step) " · "; color: var(--marigold-deep); }
@media (max-width: 880px) { .steps { grid-template-columns: repeat(2, 1fr); gap: 16px; } }

.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 28px; }
.fact { border-top: 3px solid var(--marigold); padding-top: 16px; min-width: 0; }
.fact h3 { font-size: 19px; margin-bottom: 8px; }
.fact p { color: var(--muted); font-size: 16px; margin: 0; }
@media (max-width: 880px) { .facts { grid-template-columns: repeat(2, 1fr); gap: 28px 20px; } }
@media (max-width: 480px) { .facts { grid-template-columns: 1fr; } }
.tablet { margin: 48px 0 0; border-radius: 22px; overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow-phone); }

/* Waitlist */
.waitlist { background: var(--indigo); color: var(--on-indigo); padding-block: 80px; }
.waitlist-in { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.waitlist h2 { color: var(--on-indigo); }
.waitlist-copy { min-width: 0; }
.waitlist-copy > p { color: var(--on-indigo-muted); }
@media (max-width: 880px) { .waitlist-in { grid-template-columns: 1fr; gap: 32px; } .waitlist { padding-block: 56px; } }

.form { background: var(--indigo-lift); border-radius: var(--r-lg); padding: 24px; display: grid; gap: 16px; min-width: 0; }
.field { display: grid; gap: 6px; min-width: 0; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 480px) { .field-row { grid-template-columns: 1fr; } .form { padding: 20px 16px; } }
.field label { font-size: 14px; font-weight: 700; color: var(--on-indigo); }
.field input, .field select { width: 100%; min-height: 50px; padding: 0 14px; border-radius: var(--r-md); border: 2px solid transparent; background: var(--surface); color: var(--ink); font: 400 16px var(--sans); }
.field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 36px; }
.field input::placeholder { color: #8A8DA3; }
.field input:focus, .field select:focus { outline: none; border-color: var(--marigold); }
.field input[aria-invalid="true"], .field select[aria-invalid="true"] { border-color: #F08A80; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-error { margin: 0; background: #FDECEA; color: var(--owed); border-radius: var(--r-sm); padding: 10px 12px; font-size: 15px; font-weight: 500; }
.form-done { text-align: center; padding: 24px 8px 8px; display: grid; justify-items: center; gap: 12px; }
.form-done h3 { color: var(--on-indigo); font-size: 28px; margin: 4px 0 0; outline: none; }
.form-done p { color: var(--on-indigo-muted); margin: 0; max-width: 28em; }
.form.is-done > :not(.form-done) { display: none; }
.done-badge { position: relative; width: 88px; height: 88px; }
.done-ring { fill: var(--marigold); stroke: none; }
.done-tick { fill: none; stroke: var(--ink); stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; }
.burst { position: absolute; inset: 0; pointer-events: none; }
.burst i { position: absolute; left: 50%; top: 50%; width: 4px; height: 12px; margin: -6px 0 0 -2px; border-radius: 2px; background: var(--marigold); opacity: 0; }
.burst i:nth-child(even) { background: var(--on-indigo); height: 8px; }
.done-tape { width: 160px; height: 14px; border-radius: 3px; background-color: var(--marigold);
  background-image: repeating-linear-gradient(90deg, var(--ink) 0 1.5px, transparent 1.5px 16px), repeating-linear-gradient(90deg, var(--ink) 0 1.5px, transparent 1.5px 8px);
  background-size: 16px 8px, 8px 5px; background-repeat: repeat-x; }
.btn-ghost-light { background: transparent; border-color: rgba(251, 245, 234, .5); color: var(--on-indigo); }
.btn-ghost-light:hover { background: rgba(251, 245, 234, .08); border-color: var(--on-indigo); }
.done-share-note { font-size: 14px; color: var(--marigold) !important; }
.btn.is-busy { position: relative; color: transparent; pointer-events: none; }
.btn.is-busy::after { content: ""; position: absolute; width: 22px; height: 22px; border-radius: 50%; border: 3px solid rgba(26, 28, 58, .25); border-top-color: var(--ink); animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* FAQ */
details { border-bottom: 1px solid var(--line); padding: 4px 0; }
details:first-of-type { border-top: 1px solid var(--line); margin-top: 24px; }
summary { cursor: pointer; list-style: none; padding: 18px 40px 18px 0; position: relative; font-weight: 700; font-size: 18px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; position: absolute; right: 4px; top: 12px; font: 400 28px/1 var(--sans); color: var(--marigold-deep); }
details[open] summary::after { content: "–"; }
details p { color: var(--muted); padding-right: 40px; }

/* Footer */
.foot { background: var(--indigo); color: var(--on-indigo); padding-bottom: env(safe-area-inset-bottom, 0px); }
.foot-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 40px; padding-block: 56px 40px; }
.foot-brand { display: grid; gap: 18px; justify-items: start; max-width: 380px; min-width: 0; }
.foot-brand img { height: 40px; width: auto; }
.foot-brand p { margin: 0; color: var(--on-indigo-muted); font-size: 15px; }
.foot-col { display: grid; gap: 10px; align-content: start; min-width: 0; font-size: 15px; }
.foot-col h3 { font-family: var(--sans); font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--marigold); margin: 0 0 4px; }
.foot-col a, .foot-col span { color: var(--on-indigo); text-decoration: none; overflow-wrap: break-word; }
.foot-col span { color: var(--on-indigo-muted); }
.foot-col a:hover { color: var(--marigold); }
.foot-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; border-top: 1px solid rgba(251, 245, 234, .16); padding-block: 20px 28px; font-size: 13px; color: var(--on-indigo-muted); }
.foot-bottom a { color: var(--on-indigo); text-decoration: none; border-bottom: 1px solid var(--marigold); }
.foot-bottom a:hover { color: var(--marigold); }
@media (max-width: 720px) {
  .foot-grid { grid-template-columns: 1fr 1fr; gap: 32px 20px; padding-block: 44px 32px; }
  .foot-brand { grid-column: 1 / -1; }
}
@media (max-width: 480px) {
  .foot-grid { grid-template-columns: 1fr; gap: 28px; }
  .foot-bottom { flex-direction: column; }
}


/* Notebook scan illustration (AI import feature) */
.scan { position: relative; width: 100%; max-width: 440px; }
.note-page { position: relative; overflow: hidden; display: grid; gap: 0; width: 82%; padding: 22px 20px 26px 44px; border-radius: 6px; transform: rotate(-3deg);
  background-color: #FFFDF6; box-shadow: var(--shadow-phone);
  background-image: linear-gradient(90deg, transparent 32px, #E9A9A3 32px, #E9A9A3 33.5px, transparent 33.5px), repeating-linear-gradient(transparent 0 33px, #C9D6EA 33px 34px);
  background-position: 0 0, 0 18px; }
.note-line { font-family: "Caveat", "Segoe Print", cursive; font-size: 22px; line-height: 34px; color: #2B3A8C; white-space: nowrap; }
.note-gap { margin-top: 10px; }
.scan-beam { position: absolute; left: 0; right: 0; top: 0; height: 46px; background: linear-gradient(180deg, transparent, rgba(242, 162, 58, .38) 70%, var(--marigold) 96%, transparent); pointer-events: none; opacity: 0; }
.scan-results { position: relative; z-index: 1; margin: -64px 0 0 auto; width: 78%; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-phone); padding: 14px; display: grid; gap: 10px; font-size: 13px; }
.scan-head { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; }
.scan-ai { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: var(--indigo); color: var(--on-indigo); font-size: 11px; letter-spacing: .04em; }
.scan-row { display: grid; grid-template-columns: 1fr auto; gap: 6px 8px; padding: 10px; border-radius: var(--r-md); background: var(--tint); }
.scan-who { min-width: 0; }
.scan-who b { display: block; font-size: 14px; }
.scan-who small { color: var(--muted); font-size: 12px; }
.owes { align-self: start; font-size: 11px; font-weight: 700; color: var(--owed); background: #FDECEA; padding: 3px 8px; border-radius: var(--r-pill); white-space: nowrap; }
.chips { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; }
.chips span { font-size: 11px; font-weight: 500; background: var(--surface); border: 1px solid var(--line); padding: 2px 8px; border-radius: var(--r-pill); }
.scan-btn { display: block; text-align: center; background: var(--marigold); color: var(--ink); font-weight: 700; border-radius: var(--r-md); padding: 10px; font-size: 14px; }
@media (max-width: 480px) {
  .note-line { font-size: 19px; }
  .note-page { width: 88%; padding-left: 40px; }
  .scan-results { width: 86%; }
}

/* ---------- Motion ---------- */
.btn { transition: background .15s, transform .15s, box-shadow .15s; }
.btn-marigold:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(242, 162, 58, .35); }

/* Hero entrance: copy rises in, phones settle at their tilt, the SMS receipt arrives last. */
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes phone-back-in { from { opacity: 0; transform: translateY(60px) rotate(-10deg); } to { opacity: 1; transform: rotate(-4deg); } }
@keyframes phone-front-in { from { opacity: 0; transform: translateY(80px) rotate(9deg); } to { opacity: 1; transform: rotate(3deg); } }
@keyframes sms-in { 0% { opacity: 0; transform: translateY(16px) scale(.92); } 70% { opacity: 1; transform: translateY(-3px) scale(1.02); } 100% { opacity: 1; transform: none; } }
@keyframes bob-back { 0%, 100% { transform: rotate(-4deg) translateY(0); } 50% { transform: rotate(-4deg) translateY(-8px); } }
@keyframes bob-front { 0%, 100% { transform: rotate(3deg) translateY(0); } 50% { transform: rotate(3deg) translateY(-10px); } }
@keyframes tape-run { from { background-position: 0 0, 0 0; } to { background-position: 16px 0, 16px 0; } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }

.motion .hero-copy > * { animation: rise .7s cubic-bezier(.2, .7, .2, 1) both; }
.motion .hero-copy > :nth-child(2) { animation-delay: .08s; }
.motion .hero-copy > :nth-child(3) { animation-delay: .16s; }
.motion .hero-copy > :nth-child(4) { animation-delay: .24s; }
.motion .hero-copy > :nth-child(5) { animation-delay: .32s; }
.motion .phone-back { animation: phone-back-in .9s cubic-bezier(.2, .7, .2, 1) .15s both, bob-back 6s ease-in-out 1.2s infinite; }
.motion .phone-front { animation: phone-front-in .9s cubic-bezier(.2, .7, .2, 1) .35s both, bob-front 7s ease-in-out 1.4s infinite; }
.motion .sms-float { animation: sms-in .6s cubic-bezier(.2, .7, .2, 1) 1.1s both; }
.motion .sms-meta { animation: pulse 1.6s ease-in-out 1.8s 2; }
.motion .tape { animation: tape-run 1.4s linear infinite; }

/* Scroll reveal: added by motion.js, staggered with --d */
.motion .reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s cubic-bezier(.2, .7, .2, 1) var(--d, 0ms), transform .7s cubic-bezier(.2, .7, .2, 1) var(--d, 0ms); }
.motion .reveal.in { opacity: 1; transform: none; }
.motion .feature-art.reveal { transform: translateY(40px) scale(.97); }
.motion .feature-art.reveal.in { transform: none; }
.motion .steps .phone, .motion .feature-art .phone { transition: transform .3s; }
.motion .steps li:hover .phone, .motion .feature-art:hover .phone { transform: translateY(-6px); }

/* Waitlist: fields fade out, then the success panel plays */
.motion .form { transition: opacity .28s, transform .28s; }
.motion .form.is-leaving { opacity: 0; transform: scale(.98); }
@keyframes badge-pop { 0% { transform: scale(.3); opacity: 0; } 60% { transform: scale(1.12); opacity: 1; } 100% { transform: scale(1); opacity: 1; } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes burst { 0% { opacity: 0; transform: rotate(var(--r)) translateY(0) scaleY(.4); } 25% { opacity: 1; } 100% { opacity: 0; transform: rotate(var(--r)) translateY(-70px) scaleY(1); } }
@keyframes tape-pull { from { width: 0; } to { width: 160px; } }
.motion .form.is-done .done-badge svg { opacity: 0; }
.motion .form.play .done-badge svg { animation: badge-pop .55s cubic-bezier(.2, .8, .2, 1.2) both; }
.motion .form.is-done .done-tick { stroke-dasharray: 40; stroke-dashoffset: 40; }
.motion .form.play .done-tick { animation: draw .45s ease-out .4s forwards; }
.motion .form.play .burst i { animation: burst .9s cubic-bezier(.2, .7, .2, 1) .3s both; }
.burst i:nth-child(1) { --r: 0deg; } .burst i:nth-child(2) { --r: 30deg; } .burst i:nth-child(3) { --r: 60deg; } .burst i:nth-child(4) { --r: 90deg; }
.burst i:nth-child(5) { --r: 120deg; } .burst i:nth-child(6) { --r: 150deg; } .burst i:nth-child(7) { --r: 180deg; } .burst i:nth-child(8) { --r: 210deg; }
.burst i:nth-child(9) { --r: 240deg; } .burst i:nth-child(10) { --r: 270deg; } .burst i:nth-child(11) { --r: 300deg; } .burst i:nth-child(12) { --r: 330deg; }
.motion .form.is-done .form-done > :not(.done-badge) { opacity: 0; }
.motion .form.play .form-done > :not(.done-badge):not([hidden]) { animation: rise .6s cubic-bezier(.2, .7, .2, 1) both; }
.motion .form.play .form-done > h3 { animation-delay: .55s; }
.motion .form.play .form-done > p { animation-delay: .7s; }
.motion .form.play .done-tape { animation: rise .6s cubic-bezier(.2, .7, .2, 1) .85s both, tape-pull .9s cubic-bezier(.2, .7, .2, 1) .85s both; }
.motion .form.play .form-done > .btn { animation-delay: 1s; }
.motion .form.play .done-share-note { animation-delay: 0s; }


/* AI import: a scan line sweeps the page, then results arrive one by one */
@keyframes scan-sweep { 0% { top: -46px; opacity: 0; } 10% { opacity: 1; } 85% { opacity: 1; } 100% { top: 100%; opacity: 0; } }
.motion .feature-art.in .scan-beam { animation: scan-sweep 2.4s cubic-bezier(.45, 0, .55, 1) .3s 2 both; }
.motion .feature-art .scan-results > * { opacity: 0; }
.motion .feature-art.in .scan-results > * { animation: rise .5s cubic-bezier(.2, .7, .2, 1) both; }
.motion .feature-art.in .scan-results > :nth-child(1) { animation-delay: 1.4s; }
.motion .feature-art.in .scan-results > :nth-child(2) { animation-delay: 1.9s; }
.motion .feature-art.in .scan-results > :nth-child(3) { animation-delay: 2.3s; }
.motion .feature-art.in .scan-results > :nth-child(4) { animation-delay: 2.8s; }

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