/* Visual polish for the public home page. Palette comes from design-system.css tokens; no new colours. */
html body.product-home{position:relative;isolation:isolate}
html body.product-home:before{content:"";position:absolute;z-index:-1;top:0;left:0;right:0;height:980px;pointer-events:none;background:radial-gradient(48% 52% at 78% 30%,rgb(198 159 122/.20),transparent 70%),radial-gradient(42% 46% at 14% 18%,rgb(82 123 145/.26),transparent 72%),radial-gradient(circle,rgb(247 245 239/.07) 1px,transparent 1.2px) 0 0/28px 28px;-webkit-mask-image:linear-gradient(#000 55%,transparent);mask-image:linear-gradient(#000 55%,transparent)}
html[data-theme=light] body.product-home:before{background:radial-gradient(48% 52% at 78% 30%,rgb(198 159 122/.28),transparent 70%),radial-gradient(42% 46% at 14% 18%,rgb(82 123 145/.14),transparent 72%),radial-gradient(circle,rgb(23 53 71/.08) 1px,transparent 1.2px) 0 0/28px 28px}
html body.product-home{overflow-x:clip}

/* Hero card: glass frame, spotlight and floor glow behind the character */
html body .landing-demo{position:relative;border-radius:28px;border:1px solid transparent;background:linear-gradient(var(--q-surface),var(--q-surface)) padding-box,linear-gradient(150deg,rgb(198 159 122/.7),rgb(82 123 145/.35) 45%,rgb(198 159 122/.18)) border-box;box-shadow:0 40px 90px -40px rgb(0 0 0/.65),0 0 80px -30px rgb(198 159 122/.45)}
html body .demo-stage{overflow:hidden;background:radial-gradient(62% 58% at 50% 36%,rgb(82 123 145/.50),transparent 72%),linear-gradient(var(--q-soft),var(--q-surface))}
html body .demo-stage:after{content:"";position:absolute;left:10%;right:10%;bottom:6%;height:22%;pointer-events:none;background:radial-gradient(closest-side,rgb(198 159 122/.28),transparent);filter:blur(6px)}
html body #landing-avatar{position:relative;z-index:1}
.demo-chip{position:absolute;z-index:2;font-size:11px;font-weight:600;letter-spacing:.08em;padding:6px 10px;border-radius:999px;color:var(--q-ink);background:color-mix(in srgb,var(--q-surface) 78%,transparent);border:1px solid var(--q-border);backdrop-filter:blur(8px);animation:polish-float 6s ease-in-out infinite}
.demo-chip--a{left:14px;top:16px}.demo-chip--b{right:14px;top:56px;animation-delay:-2s}.demo-chip--c{left:14px;bottom:18px;animation-delay:-4s;color:var(--q-primary)}
@keyframes polish-float{50%{transform:translateY(-6px)}}
html body .avatar-hero h1 em{background:linear-gradient(100deg,var(--q-primary),#e6c8a8 55%,var(--q-primary));-webkit-background-clip:text;background-clip:text}

/* Stats band */
.camera-conversation{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:clamp(32px,6vw,88px);align-items:center}
.camera-copy>p{max-width:48ch;line-height:1.8;color:var(--q-muted);margin:24px 0}
.camera-copy .camera-note{font-size:13px;margin-bottom:0;max-width:46ch}
.camera-steps{list-style:none;padding:32px;margin:0;display:grid;gap:24px;background:linear-gradient(150deg,var(--q-raised),var(--q-surface))}
.camera-steps li{display:grid;grid-template-columns:40px minmax(0,1fr);gap:20px;align-items:start}
.camera-steps li+li{border-top:1px solid var(--q-border);padding-top:24px}
.camera-step-number{font-size:13px;color:var(--q-primary);padding-top:4px;letter-spacing:.08em}
.camera-steps h3{font-size:20px;line-height:1.35;margin:0 0 8px}
.camera-steps p{font-size:14px;line-height:1.7;color:var(--q-muted);margin:0}
@media(max-width:740px){.camera-conversation{grid-template-columns:1fr;gap:28px}.camera-steps{padding:24px}.camera-steps li{gap:12px}}
.stats-band{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));max-width:1200px;margin:8px auto 0;padding:0 24px}
.stats-band .stat{display:grid;gap:6px;padding:24px 20px;border-left:1px solid var(--q-border)}
.stats-band .stat:first-child{border-left:0}
.stats-band strong{font-size:clamp(24px,2.6vw,36px);letter-spacing:-.03em;color:var(--q-primary);font-weight:700}
.stats-band span{font-size:13px;color:var(--q-muted)}

/* Word chips in the dictionary block */
.dictionary-example .word-hint{display:inline-flex;align-items:center;gap:8px}
.dictionary-example .word-hint svg,.chip svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
html body .dictionary-example{background:linear-gradient(160deg,var(--q-raised),var(--q-surface));box-shadow:var(--q-shadow)}

/* Step scenes replace the old grey placeholders */
html body .steps article{grid-template-columns:104px minmax(0,1fr) minmax(230px,300px);align-items:center;gap:32px}
.step-scene{border:1px solid var(--q-border);border-radius:18px;padding:16px;background:linear-gradient(160deg,var(--q-raised),var(--q-surface));box-shadow:var(--q-shadow);display:grid;gap:14px;min-height:140px;align-content:center;color:var(--q-ink)}
.scene-top{display:flex;gap:6px}.scene-top i{width:8px;height:8px;border-radius:50%;background:var(--q-border)}
.scene-input{margin:0;font-size:18px;font-weight:600;letter-spacing:-.01em}
.scene-caret{display:inline-block;width:2px;height:1.1em;margin-left:3px;vertical-align:text-bottom;background:var(--q-primary);animation:polish-blink 1s steps(2) infinite}
@keyframes polish-blink{50%{opacity:0}}
.scene-foot,.scene-bar2{display:flex;align-items:center;justify-content:space-between;gap:10px}
.scene-pill{font-size:11px;font-weight:600;letter-spacing:.06em;padding:4px 9px;border-radius:999px;border:1px solid var(--q-border);color:var(--q-muted)}
.scene-go,.scene-play{display:grid;place-items:center;width:32px;height:32px;border-radius:50%;background:var(--q-primary);color:var(--q-on-primary)}
.scene-go svg,.scene-play svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}.scene-play svg{fill:currentColor;stroke:none}
.scene-chips{display:flex;flex-wrap:wrap;gap:8px}
.chip{display:inline-flex;align-items:center;gap:6px;font-size:14px;padding:7px 11px;border-radius:8px;border:1px solid var(--q-border)}
.chip.ok{background:var(--q-success-soft);border-color:var(--q-success);color:var(--q-success)}
.chip.miss{border-style:dashed;border-color:var(--q-primary);color:var(--q-primary)}
.scene-line{display:grid;gap:7px}.scene-line i{display:block;height:5px;border-radius:3px;background:var(--q-border)}.scene-line i:last-child{width:60%}
.scene-player{height:112px;border-radius:12px;display:grid;place-items:end center;overflow:hidden;background:radial-gradient(70% 80% at 50% 30%,rgb(82 123 145/.5),transparent 75%),var(--q-soft)}
.scene-figure{height:104px;fill:var(--q-ink);opacity:.9;stroke:none}.scene-figure .arm{fill:none;stroke:var(--q-ink);stroke-width:6;stroke-linecap:round;animation:polish-sign 3.2s ease-in-out infinite}.scene-figure .arm.l{transform-origin:43px 84px}.scene-figure .arm.r{transform-origin:77px 84px;animation-delay:-1.6s}
@keyframes polish-sign{50%{transform:rotate(-12deg)}}
.scene-track{flex:1;height:5px;border-radius:3px;background:var(--q-border);overflow:hidden}.scene-track b{display:block;height:100%;width:40%;border-radius:3px;background:var(--q-primary);animation:polish-progress 4s ease-in-out infinite alternate}
@keyframes polish-progress{to{width:85%}}

/* Use cases */
html body .use-case{position:relative;overflow:hidden;transition:transform .25s var(--q-motion-ease),border-color .25s,box-shadow .25s}
html body .use-case:before{content:"";position:absolute;left:0;right:0;top:0;height:2px;background:linear-gradient(90deg,var(--q-primary),transparent)}
html body .use-case:hover{transform:translateY(-4px);border-color:var(--q-primary);box-shadow:var(--q-shadow)}
.use-icon{display:grid;place-items:center;width:48px;height:48px;border-radius:14px;margin-bottom:8px;background:color-mix(in srgb,var(--q-primary) 16%,transparent);color:var(--q-primary)}
.use-icon svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.75;stroke-linecap:round;stroke-linejoin:round}
.use-case .card-number{position:absolute;right:20px;top:20px}
html body .use-case h3{margin-top:16px}

/* Plans */
html body .price-card{transition:transform .25s var(--q-motion-ease),box-shadow .25s}
html body .price-card:hover{transform:translateY(-4px)}
html body .price-card.featured{position:relative;overflow:visible;transform:translateY(-8px);border-color:var(--q-primary);background:linear-gradient(170deg,color-mix(in srgb,var(--q-primary) 14%,var(--q-surface)),var(--q-surface));box-shadow:0 30px 70px -36px rgb(198 159 122/.7)}
html body .price-card.featured:hover{transform:translateY(-12px)}
.price-badge{position:absolute;top:-13px;left:50%;transform:translateX(-50%);padding:5px 14px;border-radius:999px;font-size:11px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;background:var(--q-primary);color:var(--q-on-primary);white-space:nowrap}

/* Keep each section heading on one text axis. */
html body :is(#about,#features,#pricing) .section-head{text-align:center}
html body :is(#about,#features,#pricing) .section-head>.eyebrow{justify-content:center}
html body :is(#about,#features,#pricing) .section-head>p{margin-inline:auto;text-align:center}
html body #faq .section-head{text-align:left;min-width:0}
html body #faq .section-head>.eyebrow{justify-content:flex-start}
html body #faq .section-head h2{margin-inline:0;max-width:100%;text-align:left}
html body .dictionary-intro>div:first-child{text-align:left;min-width:0}
html body .dictionary-intro .eyebrow{justify-content:flex-start}

/* Closing band and footer */
html body .closing{position:relative;overflow:hidden;background:radial-gradient(60% 120% at 80% 0%,rgb(198 159 122/.30),transparent 70%),radial-gradient(50% 100% at 10% 100%,rgb(82 123 145/.35),transparent 70%),var(--q-surface);border-top:1px solid var(--q-border);border-bottom:1px solid var(--q-border)}
html body .site-footer{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:20px 40px;padding-block:40px;border-top:1px solid var(--q-border)}
html body .site-footer>div{display:flex;flex-wrap:wrap;gap:8px 28px}
html body .site-footer>div a{color:var(--q-muted);transition:color .2s}html body .site-footer>div a:hover{color:var(--q-primary)}

/* Cookie notice: compact card instead of a full-width bar */
@media(min-width:741px){html body .storage-notice:not(.inside-auth){left:20px;right:auto;bottom:20px;width:min(440px,calc(100vw - 40px));max-width:none;flex-direction:column;align-items:stretch;gap:14px;padding:18px 20px;border:1px solid var(--q-border);border-radius:18px;box-shadow:var(--q-shadow)}html body .storage-notice:not(.inside-auth) .legal-actions{flex-wrap:wrap}}

/* Sign-in dialog: stronger backdrop so the studio behind it does not fight the form */
html body dialog.auth-dialog::backdrop{background:rgb(7 18 27/.72);backdrop-filter:blur(8px)}

/* Scroll reveal (class is added by landing-polish.js only when motion is allowed) */
.reveal-ready [data-reveal]{opacity:0;transform:translateY(22px);transition:opacity .7s var(--q-motion-ease),transform .7s var(--q-motion-ease);transition-delay:var(--reveal-delay,0s)}
.reveal-ready [data-reveal].is-in{opacity:1;transform:none}
@media(max-width:900px){html body .steps article{grid-template-columns:76px minmax(0,1fr);gap:16px 20px}.step-scene{grid-column:1/-1}.stats-band{grid-template-columns:repeat(2,minmax(0,1fr))}.stats-band .stat:nth-child(odd){border-left:0}}
@media(max-width:740px){html body .price-card.featured{transform:none}html body .price-card.featured:hover{transform:none}.demo-chip{display:none}html body.product-home:before{height:640px}}
@media(prefers-reduced-motion:reduce){.demo-chip,.scene-caret,.scene-figure .arm,.scene-track b{animation:none}.reveal-ready [data-reveal]{opacity:1;transform:none;transition:none}html body .use-case,html body .price-card{transition:none}}

/* Light theme corrections (audit by Codex worker) */
html[data-theme=light] body .closing { color:var(--q-ink); } html[data-theme=light] body .closing .eyebrow, html[data-theme=light] body .closing h2 em { color:var(--sand); -webkit-text-fill-color:var(--sand); }
html[data-theme=light] body .avatar-hero h1 em { background:none; color:var(--sand); -webkit-text-fill-color:var(--sand); }
html[data-theme=light] .stats-band strong { color:var(--sand); }
html[data-theme=light] .demo-chip { background:var(--q-surface); border-color:var(--q-control-border); } html[data-theme=light] .demo-chip--c { color:var(--sand); }
html[data-theme=light] .chip.miss { color:var(--sand); border-color:var(--sand); }
html[data-theme=light] .use-icon { color:var(--sand); }
html[data-theme=light] body .site-footer>div a:hover { color:var(--sand); text-decoration:underline; }
html[data-theme=light] body .landing-demo { box-shadow:var(--q-shadow),0 18px 48px -32px rgb(198 159 122/.24); }
html[data-theme=light] body .demo-stage { background:radial-gradient(62% 58% at 50% 36%,rgb(82 123 145/.14),transparent 72%), linear-gradient(var(--q-soft),var(--q-surface)); } html[data-theme=light] body .demo-stage:after { background:radial-gradient(closest-side,rgb(198 159 122/.14),transparent); }
html[data-theme=light] .scene-player { background:radial-gradient(70% 80% at 50% 30%,rgb(82 123 145/.12),transparent 75%), var(--q-soft); } html[data-theme=light] .scene-figure .arm { stroke:var(--sand); } html[data-theme=light] .scene-track b { background:var(--sand); }
html[data-theme=light] body .price-card.featured { border-color:var(--sand); box-shadow:var(--q-shadow); }
html[data-theme=light] body dialog.auth-dialog::backdrop { background:var(--q-backdrop); }
.demo-controls[hidden]{display:none}

html[data-theme=light] .scene-figure .arm{stroke:var(--q-ink)}

/* The page no longer waits for the 3D model: fade the avatar in once it is ready */
html body #landing-avatar{transition:opacity .6s var(--q-motion-ease)}
#landing-demo[data-ready=false] #landing-avatar{opacity:0}
@media(prefers-reduced-motion:reduce){html body #landing-avatar{transition:none}}

/* Readability: larger, higher-contrast body text on the home page */
html:not([data-theme=light]) body.product-home{--q-muted:#C9D4DA}
html body .avatar-hero .lead{font-size:18px;line-height:1.7;color:var(--q-ink);opacity:.9}
html body .avatar-hero .hero-meta{font-size:14px}
html body .section-head>p,html body .dictionary-intro p{font-size:17px;line-height:1.7}
html body .steps p{font-size:16px;line-height:1.7}
html body .use-case p{font-size:15.5px}
html body .price-card p,html body .price-card li{font-size:15px}
html body .faq-items summary{font-size:17px}
html body .faq-items details p{font-size:15.5px}
.stats-band span{font-size:14px}
.demo-footer>p,.workflow-line{font-size:13px}
/* Camera → word → conversation: a short animated horizontal explanation. */
html body .camera-conversation{grid-template-columns:minmax(0,1fr);gap:36px}
.camera-copy{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(0,1fr);column-gap:56px;align-items:start}
.camera-copy .section-head{grid-row:span 2}.camera-copy>p{margin:0 0 24px;max-width:48ch}.camera-copy>.button{justify-self:start;align-self:start}
.conversation-flow{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:28px}
.conversation-flow-step{position:relative;min-width:0;padding:20px 24px 26px;border:1px solid var(--q-border);border-radius:22px;background:linear-gradient(145deg,var(--q-raised),var(--q-surface))}
.flow-visual{position:relative;height:160px;display:grid;place-items:center;margin-bottom:18px;color:var(--q-primary)}
.flow-visual svg{width:100%;height:150px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.flow-visual .flow-frame{stroke:var(--q-muted);opacity:.5}.flow-visual circle:not(.flow-dot){fill:color-mix(in srgb,var(--q-primary) 12%,transparent)}
.flow-number{display:block;margin-bottom:10px;color:var(--q-primary);font-size:12px;letter-spacing:.08em}
html body .conversation-flow-step h3{font-size:clamp(18px,1.8vw,23px);line-height:1.35;letter-spacing:-.025em;margin:0 0 10px}
.conversation-flow-step p{font-size:13px;color:var(--q-muted);line-height:1.6;margin:0}
.flow-arrow{position:absolute;right:-23px;top:91px;color:var(--q-primary);font-size:23px;z-index:1}
.flow-scan{opacity:0}.flow-check{stroke:var(--q-success,var(--q-primary));stroke-dasharray:35;stroke-dashoffset:0}
.flow-word{position:absolute;top:53px;left:50%;transform:translateX(-50%);padding:7px 15px;border-radius:8px;background:var(--q-surface);font-size:16px;white-space:nowrap;font-weight:600;color:var(--q-ink)}
.flow-dot{fill:currentColor;stroke:none}.flow-bubble-two{stroke:var(--q-muted);opacity:.6}
.flow-visible .flow-hand{transform-origin:165px 83px;animation:flow-wave 5s ease-in-out infinite}
.flow-visible .flow-scan{animation:flow-scan 5s ease-in-out infinite}
.flow-visible .flow-text-line{animation:flow-type 5s ease-in-out infinite}
.flow-visible .flow-check{animation:flow-check 5s ease-in-out infinite}
.flow-visible .flow-dot{animation:flow-dot 5s ease-in-out infinite}.flow-visible .flow-dot:nth-last-child(2){animation-delay:.16s}.flow-visible .flow-dot:last-child{animation-delay:.32s}
@keyframes flow-wave{0%,8%,35%,100%{transform:rotate(0)}15%,27%{transform:rotate(-14deg)}21%{transform:rotate(8deg)}}
@keyframes flow-scan{0%,8%,38%,100%{opacity:0;transform:translateY(0)}12%{opacity:.5}30%{opacity:.5;transform:translateY(58px)}}
@keyframes flow-type{0%,30%{opacity:.25}42%,100%{opacity:1}}
@keyframes flow-check{0%,35%{stroke-dashoffset:35;opacity:0}50%,100%{stroke-dashoffset:0;opacity:1}}
@keyframes flow-dot{0%,55%,85%,100%{opacity:.35;transform:translateY(0)}68%{opacity:1;transform:translateY(-3px)}}
@media(max-width:740px){.camera-copy{display:block}.camera-copy>p{margin:20px 0 24px}.conversation-flow{gap:20px;overflow-x:auto;scroll-snap-type:x mandatory;padding:2px 2px 14px;grid-template-columns:repeat(3,minmax(210px,1fr))}.conversation-flow-step{scroll-snap-align:center;padding:16px 20px 22px}.flow-arrow{right:-19px;font-size:20px}.flow-visual{height:140px}}
@media(prefers-reduced-motion:reduce){.conversation-flow *, .conversation-flow *:before{animation:none!important}.flow-scan{display:none}}

/* The camera action completes the three-step sequence. */
.camera-cta{display:flex;justify-content:center;padding-top:4px}.camera-cta .button{min-height:48px}.camera-copy .section-head{grid-row:auto}.camera-copy>p{align-self:center;margin-bottom:0}
@media(max-width:740px){.camera-copy>p{margin:20px 0 0}.camera-cta{padding-top:0}}

/* Center the heading over the full three-step flow. */
html body .camera-conversation .camera-copy{display:block;width:100%;text-align:center}html body .camera-conversation .camera-copy .section-head{width:100%;max-width:none;margin-inline:auto;text-align:center}html body .camera-conversation #camera-title{max-width:none;margin-inline:auto;font-size:clamp(36px,5.5vw,72px);line-height:1.08}html body .camera-conversation .camera-copy .eyebrow{justify-content:center}
/* Keep the legacy public-page background aligned with the shared theme. */
html[data-theme=dark] body.product-home{--ivory:var(--q-canvas);--white:var(--q-surface);background:var(--q-canvas)}
