/* Home page only: "Spread the smile". Uses the tokens in style.css. Everything moving stops under reduced motion. */
.home { --night: #0b0d2a; --neon: #ff4f7b; }
.home .night { background: radial-gradient(120% 90% at 80% 0%, #232a78 0%, var(--night) 60%) var(--night); color: #e9ebff; }
.home .night h2 { color: var(--white); }
.home .night :focus-visible { outline-color: var(--yellow); }

/* ---------- Hero ---------- */
.home .hero { position: relative; overflow: hidden; min-height: calc(100vh - var(--nav-h)); display: flex; align-items: flex-end; background: var(--night); color: var(--white); padding: 0; }
.home .hero-photos { position: absolute; inset: 0; }
.home .hero-photos img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; object-position: 40% 20%; transition: opacity 1.2s ease, transform 8s ease; }
.home .hero-day { opacity: 0; }
.home .hero.is-day .hero-day { opacity: 1; }
.home .hero-photos::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(11,13,42,.10) 0%, rgba(11,13,42,.55) 45%, rgba(11,13,42,.96) 100%); }
@media (min-width: 1024px) { .home .hero-photos::after { background: linear-gradient(90deg, rgba(11,13,42,.95) 0%, rgba(11,13,42,.80) 38%, rgba(11,13,42,.05) 70%), linear-gradient(0deg, rgba(11,13,42,.7), rgba(11,13,42,0) 40%); } .home .hero-photos img { object-position: 100% 30%; } }
.home .hero-glow { position: absolute; left: 0; top: 0; width: 520px; height: 520px; margin: -260px 0 0 -260px; border-radius: 50%; background: radial-gradient(circle, rgba(255,79,123,.35), rgba(255,79,123,0) 65%); mix-blend-mode: screen; pointer-events: none; opacity: 0; transition: opacity .4s; }
.home .hero-glow.is-on { opacity: 1; }
.home .hero-content { position: relative; padding-top: 32px; padding-bottom: 88px; }
.home .hero h1 { color: var(--white); max-width: 14ch; text-shadow: 0 2px 18px rgba(0,0,0,.6); }
.home .hero-lead { color: var(--white); font-size: 19px; text-shadow: 0 1px 10px rgba(0,0,0,.7); }
.home .neon { display: block; width: min(380px, 78vw); margin-bottom: 12px; overflow: visible; }
.home .neon-tooth, .home .neon-star { fill: none; stroke: #ffe3ea; stroke-width: 6; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 0 4px var(--neon)) drop-shadow(0 0 14px var(--neon)); }
.home .neon-word { font: 700 68px "Dancing Script", cursive; fill: #ffe3ea; filter: drop-shadow(0 0 4px var(--neon)) drop-shadow(0 0 14px var(--neon)); }
.home .open-now { display: inline-flex; align-items: center; gap: 10px; background: rgba(11,13,42,.7); border: 1px solid rgba(255,255,255,.35); border-radius: 99px; padding: 8px 18px; font-size: 15px; }
.home .open-now::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: #ffb020; }
.home .open-now.is-open::before { background: #38e08a; box-shadow: 0 0 10px #38e08a; }
.home .scroll-cue { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); color: var(--white); font-weight: 600; text-decoration: none; font-size: 14px; letter-spacing: .08em; }
.home .scroll-cue::after { content: ""; display: block; width: 10px; height: 10px; margin: 4px auto 0; border: solid var(--yellow); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.home button.btn { font: inherit; font-weight: 600; cursor: pointer; background: transparent; }
.home button.btn-accent { background: var(--yellow); }

/* ---------- Walk-through: stacked pictures without script, a scroll film with it ---------- */
.home .walk { background: var(--night); color: var(--white); scroll-margin-top: var(--nav-h); }
.home .walk-title { color: var(--white); text-align: center; padding: 40px var(--gutter) 16px; margin: 0 auto; }
.home .walk-scene { margin: 0; position: relative; }
.home .walk-scene img { width: 100%; }
.home .walk-scene figcaption { padding: 14px var(--gutter) 28px; text-align: center; }
.home .walk-scene strong { color: var(--yellow); font-family: var(--font-head); margin-right: 6px; }
.home .walk-progress { display: none; }
.home .walk.is-film { height: 420vh; }
.home .walk.is-film .walk-stage { position: sticky; top: var(--nav-h); height: calc(100vh - var(--nav-h)); overflow: hidden; }
.home .walk.is-film .walk-title { position: absolute; left: 0; right: 0; top: 0; z-index: 5; padding-top: 24px; font-size: clamp(22px, 3.4vw, 36px); text-shadow: 0 2px 16px #000; background: linear-gradient(rgba(11,13,42,.85), rgba(11,13,42,0)); padding-bottom: 48px; max-width: none; }
.home .walk.is-film .walk-scene { position: absolute; inset: 0; opacity: 0; }
.home .walk.is-film .walk-scene img { position: absolute; inset: 0; height: 100%; max-width: none; object-fit: cover; will-change: transform; }
.home .walk.is-film .walk-scene figcaption { position: absolute; left: 50%; bottom: 96px; transform: translateX(-50%); width: min(620px, calc(100% - 32px)); background: rgba(11,13,42,.88); border-radius: var(--radius); padding: 16px 20px; }
@media (min-width: 768px) { .home .walk.is-film .walk-scene figcaption { bottom: 40px; } }
.home .walk.is-film .walk-progress { display: block; position: absolute; left: 0; right: 0; bottom: 0; height: 5px; z-index: 6; background: rgba(255,255,255,.2); }
.home .walk-progress span { display: block; height: 100%; width: 100%; background: var(--yellow); transform-origin: left; transform: scaleX(0); }

/* ---------- Tooth chart ---------- */
.home .mouth { display: grid; gap: 32px; }
@media (min-width: 900px) { .home .mouth { grid-template-columns: 420px 1fr; align-items: center; gap: 56px; } }
.home .mouth-chart svg { width: 100%; max-width: 420px; margin: 0 auto; display: block; touch-action: manipulation; }
.home .chart-tooth { cursor: pointer; outline: none; }
.home .chart-tooth path { fill: #fdfdff; stroke: #8f96d8; stroke-width: 1.5; transition: fill .2s, transform .2s; transform-box: fill-box; transform-origin: center; }
.home .chart-tooth:hover path { transform: scale(1.12); }
.home .chart-tooth:focus-visible path { stroke: var(--yellow); stroke-width: 4; }
.home .chart-tooth[aria-pressed="true"] path { fill: var(--neon); stroke: var(--white); stroke-width: 2.5; filter: drop-shadow(0 0 6px var(--neon)); }
.home .chart-label { fill: #b9bff5; font: 600 14px var(--font-head); text-anchor: middle; }
.home .concerns { border: 0; margin: 0 0 16px; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.home .concerns legend { font-weight: 600; margin-bottom: 12px; color: var(--white); }
.home .concerns button { min-height: 48px; padding: 10px 18px; border-radius: 99px; border: 2px solid #8f96d8; background: transparent; color: var(--white); font: inherit; cursor: pointer; }
.home .concerns button[aria-pressed="true"] { background: var(--yellow); border-color: var(--yellow); color: var(--navy); font-weight: 600; }
.home .mouth-result { min-height: 110px; }

/* ---------- Drawings ---------- */
.home .lab, .home .cases, .home .strip { display: grid; gap: 24px; list-style: none; }
@media (min-width: 900px) { .home .lab, .home .strip { grid-template-columns: repeat(3, 1fr); } }
.home .lab-card { padding: 20px; background: var(--white); display: flex; flex-direction: column; gap: 10px; }
.home .lab-card svg { width: 100%; }
.home .lab-card label { font-weight: 600; color: var(--navy); }
.home input[type="range"] { width: 100%; height: 44px; accent-color: var(--navy); cursor: pointer; }
.home .demo-text { min-height: 5em; margin: 0; }
.home .bone { fill: #f1dfbf; } .home .gum { fill: #e98a93; } .home .tooth { fill: #fff; stroke: #aab0d8; stroke-width: 2; }
.home .part-screw path { fill: #8c93a8; } .home .part-screw .thread { fill: none; stroke: #5b6175; stroke-width: 3; }
.home .part-post { fill: #b7bccd; } .home .part-crown { fill: #fff; stroke: var(--navy); stroke-width: 2; }
.home .mouth-bg { fill: #7c2436; } .home .row rect { stroke: #b9a9a0; stroke-width: 1; } .home .row circle { fill: #aeb4c4; stroke: #59607a; stroke-width: 1.5; }
.home .wire { fill: none; stroke: #e6e9f5; stroke-width: 3; }

/* ---------- Before and after ---------- */
@media (min-width: 900px) { .home .cases { grid-template-columns: repeat(3, 1fr); } }
.home .reveal { position: relative; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); aspect-ratio: 2 / 1; }
.home .reveal img { width: 100%; height: 100%; object-fit: cover; }
.home .reveal .reveal-after { position: absolute; inset: 0; clip-path: inset(0 0 0 50%); }
.home .reveal input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; }
.home .reveal::after { content: ""; position: absolute; top: 0; bottom: 0; left: var(--split, 50%); width: 3px; margin-left: -1.5px; background: var(--yellow); box-shadow: 0 0 10px rgba(0,0,0,.5); pointer-events: none; }
.home .reveal:focus-within { outline: var(--ring); outline-offset: 3px; }
.home:not(.js-on) .reveal .reveal-after { position: static; clip-path: none; }
.home:not(.js-on) .reveal { aspect-ratio: auto; }
.home:not(.js-on) .reveal input, .home:not(.js-on) .reveal::after { display: none; }

/* ---------- Brushing game ---------- */
.home .brush { display: grid; gap: 28px; }
@media (min-width: 900px) { .home .brush { grid-template-columns: 1fr 1.25fr; align-items: center; gap: 56px; } }
.home .brush canvas { width: 100%; height: auto; border-radius: 24px; background: #14173f; touch-action: none; cursor: grab; }
.home .brush-time { font: 700 72px var(--font-head); color: var(--yellow); margin: 0; font-variant-numeric: tabular-nums; }
.home .brush-where { min-height: 3.4em; }

.home .strip img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); transition: transform .5s ease; }
.home .strip li { overflow: hidden; border-radius: var(--radius); }
.home .strip li:hover img { transform: scale(1.06); }
.home .rating { display: grid; gap: 20px; }
@media (min-width: 768px) { .home .rating { grid-template-columns: auto 1fr; align-items: center; gap: 56px; } }
.home .rating-num { font: 700 clamp(96px, 16vw, 180px)/1 var(--font-head); color: var(--yellow); margin: 0; text-shadow: 0 0 40px rgba(255,204,0,.45); }

/* ---------- Motion ---------- */
@media (prefers-reduced-motion: no-preference) {
  .home .neon-tooth, .home .neon-star { stroke-dasharray: 1; animation: draw 2.2s ease forwards, flicker 6s 3s infinite; }
  .home .neon-star { animation: draw 1s 1.8s ease both, flicker 6s 3.4s infinite; }
  .home .neon-word { animation: lit .9s ease both; }
  .home .neon-word:nth-of-type(1) { animation-delay: .9s; }
  .home .neon-word:nth-of-type(2) { animation-delay: 1.4s; }
  .home .neon-word:nth-of-type(3) { animation-delay: 1.9s; }
  .home .hero.is-ready .hero-photos img { transform: scale(1.06); }
  .home .scroll-cue::after { animation: bob 1.6s ease-in-out infinite; }
  .home.js-on .rise { opacity: 0; transform: translateY(36px); transition: opacity .7s ease, transform .7s ease; }
  .home.js-on .rise.is-seen { opacity: 1; transform: none; }
}
@keyframes draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes lit { 0% { opacity: 0; } 30% { opacity: 1; } 45% { opacity: .2; } 60%, 100% { opacity: 1; } }
@keyframes flicker { 0%, 92%, 96%, 100% { opacity: 1; } 94% { opacity: .55; } 98% { opacity: .75; } }
@keyframes bob { 50% { translate: 0 5px; } }

/* ---------- Hero framing: the whole shopfront stays visible ---------- */
@media (max-width: 1023px) {
  .home .hero { display: block; }
  .home .hero-photos { position: relative; aspect-ratio: 16 / 9; }
  .home .hero-photos img { object-position: center; }
  .home .hero-photos::after { background: linear-gradient(180deg, rgba(11,13,42,0) 70%, var(--night) 100%); }
  .home .hero-content { padding-top: 8px; }
}
@media (min-width: 1024px) {
  .home .hero { align-items: center; }
  .home .hero-photos { left: 38%; }
  .home .hero-photos img { object-fit: contain; object-position: right center; }
  .home .hero-photos img { -webkit-mask-image: linear-gradient(90deg, transparent, #000 22%); mask-image: linear-gradient(90deg, transparent, #000 22%); }
  .home .hero-photos::after { display: none; }
  .home .hero.is-ready .hero-photos img { transform: none; }
}
.home .walk.is-film .walk-scene:first-of-type img { object-position: 12% center; }

/* The day and evening switch sits on the photo, where its effect is seen. */
.home .hero .light-switch { position: absolute; z-index: 2; right: 12px; top: calc(56.25vw - 64px); min-height: 48px; padding: 0 18px; background: rgba(11,13,42,.82); }
@media (min-width: 1024px) { .home .hero .light-switch { top: auto; bottom: 20px; right: 108px; } }
