/* "See how it works" lands here: the section fills exactly one screen below
   the sticky header, with the video centered in it */
section.how { padding: 40px 0; min-height: calc(100vh - 64px); min-height: calc(100svh - 64px); display: flex; flex-direction: column; justify-content: center; scroll-margin-top: 64px; }
section.how .section-head { margin-bottom: 24px; }

.player { max-width: 980px; margin: 0 auto; }
.stage {
  position: relative; aspect-ratio: 16 / 9; border-radius: 24px; overflow: hidden;
  background: linear-gradient(165deg, #ffffff 45%, #efe6fd 78%, #dccbf9 100%);
  color: #000; container-type: inline-size; box-shadow: 0 0 0 1px rgba(42, 22, 80, 0.1), 0 24px 60px rgba(31, 18, 53, 0.14);
}
.stage.paused *, .stage.paused *::before, .stage.paused *::after { animation-play-state: paused !important; }

.scene { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 5cqw 6cqw; opacity: 0; visibility: hidden; transition: opacity 0.45s ease, visibility 0.45s; }
.scene.active { opacity: 1; visibility: visible; }

/* Each piece waits for its scene, then animates in after --d */
.scene .a { opacity: 0; }
.scene.active .a { animation: rise 0.6s cubic-bezier(.2, .8, .2, 1) both; animation-delay: var(--d, 0s); }
.scene.active .a.pop { animation-name: pop; }
@keyframes pop { 0% { opacity: 0; transform: scale(0.5); } 70% { opacity: 1; transform: scale(1.1); } 100% { opacity: 1; transform: none; } }

/* Big words */
.kinetic { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 0.6cqw; font-weight: 800; font-size: clamp(22px, 6.4cqw, 68px); line-height: 1.1; letter-spacing: -0.04em; }
.kinetic > span { display: block; }
.kinetic .btn { font-size: clamp(13px, 1.6cqw, 16px); letter-spacing: 0; font-weight: 700; }
.kinetic .small { font-size: 0.6em; font-weight: 700; letter-spacing: -0.02em; color: #5a2a99; }
.k-chip { display: inline-flex; width: 1.15em; height: 1.15em; border-radius: 50%; background: #ffe6d9; align-items: center; justify-content: center; vertical-align: -0.2em; box-shadow: 0 0 0 0.08em #fff, 0 0.3em 0.8em rgba(31, 18, 53, 0.18); }
.k-chip img { width: 86%; height: 86%; }
.check { display: inline-flex; width: 1em; height: 1em; border-radius: 50%; background: #6b2fd0; color: #fff; font-size: 0.8em; align-items: center; justify-content: center; vertical-align: 0.05em; }

/* Story layout */
.duo { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 4cqw; align-items: center; width: 100%; }
.col { display: flex; flex-direction: column; gap: 1.4cqw; align-items: flex-start; }
.bubble { padding: 1.2cqw 1.8cqw; border-radius: 2cqw; font-size: clamp(11px, 1.9cqw, 19px); line-height: 1.35; max-width: 100%; font-weight: 500; }
.bubble.me { background: #eadcfb; color: #2a1650; align-self: flex-end; border-bottom-right-radius: 0.5cqw; }
.bubble.ai { background: #6b2fd0; color: #fff; border-bottom-left-radius: 0.5cqw; }
.chip { display: flex; align-items: center; gap: 1cqw; background: #fff; color: #2a1650; border-radius: 999px; padding: 0.6cqw 1.8cqw 0.6cqw 0.6cqw; box-shadow: 0 0 0 1px #ece6f2, 0 1cqw 3cqw rgba(31, 18, 53, 0.14); font-size: clamp(10px, 1.5cqw, 15px); }
.chip img { width: 4cqw; height: 4cqw; min-width: 24px; min-height: 24px; border-radius: 50%; background: #ffe6d9; }
.chip b { display: block; }
.chip small { display: flex; align-items: center; gap: 0.6cqw; color: #6b5260; }
.spinner { width: 1.2cqw; height: 1.2cqw; min-width: 9px; min-height: 9px; border-radius: 50%; border: 2px solid #d9c9f5; border-top-color: #6b2fd0; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.card { background: #fff; color: #2a1650; border-radius: 2cqw; padding: 1.8cqw; width: 100%; box-shadow: 0 0 0 1px #ece6f2, 0 1.4cqw 4cqw rgba(31, 18, 53, 0.14); font-size: clamp(10px, 1.6cqw, 16px); }

/* Calendar */
.cal { display: flex; flex-direction: column; gap: 0.9cqw; }
.cal-head { font-weight: 800; font-size: 1.2em; margin-bottom: 0.4cqw; }
.slot { display: flex; gap: 1.4cqw; align-items: center; background: #f5f0ec; border-radius: 1cqw; padding: 1cqw 1.4cqw; font-weight: 600; }
.slot span { color: #7d6357; min-width: 3.4em; font-weight: 700; }
.slot.new { background: #6b2fd0; color: #fff; }
.slot.new span { color: #e9dcff; }

/* Order */
.order { display: flex; flex-direction: column; gap: 1cqw; }
.item { display: flex; align-items: center; gap: 1.2cqw; }
.item .emo { width: 4.4cqw; height: 4.4cqw; min-width: 26px; min-height: 26px; border-radius: 1cqw; background: #f5f0ec; display: flex; align-items: center; justify-content: center; font-size: 1.4em; }
.item div { flex: 1; font-weight: 600; }
.item small { display: block; color: #7d6357; font-weight: 500; font-size: 0.85em; }
.total { display: flex; justify-content: space-between; border-top: 1px solid #eee3dc; padding-top: 1cqw; font-weight: 700; }
.ask { display: flex; align-items: center; gap: 0.8cqw; color: #7d6357; font-size: 0.9em; }
.lock { width: 0.9em; height: 0.9em; border-radius: 0.2em; background: #ef9f27; }
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 1cqw; }
.actions span { text-align: center; padding: 1cqw; border-radius: 999px; font-weight: 700; }
.deny { background: #f1ebe7; }
.allow { background: #6b2fd0; color: #fff; }
.scene.active .allow { animation: press 0.5s ease 4.2s both; }
@keyframes press { 0%, 100% { transform: none; } 40% { transform: scale(0.9); box-shadow: 0 0 0 0.6cqw rgba(107, 47, 208, 0.35); } }

/* Trainer */
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1cqw; }
.stats-head { grid-column: 1 / -1; font-weight: 800; }
.stat b { display: block; font-size: 1.7em; letter-spacing: -0.03em; }
.stat small { color: #7d6357; }
.plan { padding: 0; overflow: hidden; }
.plan-head { background: #fac775; color: #633806; font-weight: 800; font-size: 0.8em; padding: 0.8cqw 1.8cqw; letter-spacing: 0.04em; }
.plan-body { padding: 1.4cqw 1.8cqw; font-weight: 700; }

/* Intro */
.k-logo { width: 12cqw; height: auto; margin-bottom: 2cqw; }
.k-biz { width: 16cqw; height: 16cqw; margin-bottom: 0.5cqw; }
.sides { display: flex; gap: 1.6cqw; margin-top: 2cqw; font-size: clamp(12px, 2cqw, 20px); letter-spacing: 0; }
.side { display: flex; align-items: center; gap: 1cqw; background: #ffe6d9; color: #2a1650; border-radius: 999px; padding: 0.6cqw 2cqw 0.6cqw 0.6cqw; font-weight: 700; }
.side img { width: 4.4cqw; height: 4.4cqw; min-width: 26px; min-height: 26px; border-radius: 50%; background: #fff; }
.side.biz { background: #2a1650; color: #fff; }

/* Which Ervo is in this scene */
.scene-tag { position: absolute; top: 2.4cqw; left: 2.4cqw; background: #ffe6d9; color: #2a1650; font-weight: 800; font-size: clamp(10px, 1.4cqw, 14px); padding: 0.5cqw 1.4cqw; border-radius: 999px; }
.scene-tag.biz { background: #2a1650; color: #fff; }

/* Personal return */
.steps { display: flex; flex-direction: column; gap: 1.1cqw; }
.steps-head { display: flex; align-items: center; gap: 1.2cqw; font-weight: 700; margin-bottom: 0.4cqw; }
.steps-head .emo { width: 4.4cqw; height: 4.4cqw; min-width: 26px; min-height: 26px; border-radius: 1cqw; background: #f5f0ec; display: flex; align-items: center; justify-content: center; font-size: 1.4em; }
.steps-head small { display: block; color: #7d6357; font-weight: 500; font-size: 0.85em; }
.step { display: flex; align-items: center; gap: 1cqw; font-weight: 600; }
.step i { flex: none; width: 1.5em; height: 1.5em; border-radius: 50%; background: #1d9e75; color: #fff; font-style: normal; font-size: 0.8em; display: flex; align-items: center; justify-content: center; }
.step.now i { background: #fff; box-shadow: inset 0 0 0 0.35em #6b2fd0; }

/* Business support */
.chat-head { font-size: clamp(10px, 1.4cqw, 14px); color: #4a4250; font-weight: 700; }
.bubble.cust { background: #f2eef6; color: #000; box-shadow: inset 0 0 0 1px #e2dbea; border-bottom-left-radius: 0.5cqw; }
.policy { display: flex; flex-direction: column; gap: 0.9cqw; }
.policy-head { font-weight: 800; }
.prow { display: flex; justify-content: space-between; gap: 1cqw; background: #f5f0ec; border-radius: 1cqw; padding: 0.9cqw 1.3cqw; }
.prow b { color: #0f6e56; }
.resolved { align-self: flex-start; background: #1d9e75; color: #fff; font-weight: 800; padding: 0.9cqw 2cqw; border-radius: 999px; font-size: clamp(11px, 1.7cqw, 17px); }
.handoff { display: flex; flex-direction: column; gap: 1cqw; }
.handoff-head { display: flex; align-items: center; gap: 0.8cqw; font-weight: 800; }
.handoff-head .dot { width: 0.8em; height: 0.8em; border-radius: 50%; background: #ef9f27; }
.handoff p { margin: 0; line-height: 1.4; }
.handoff-tags { display: flex; gap: 0.8cqw; flex-wrap: wrap; }
.handoff-tags span { background: #eadcfb; color: #3c3489; font-weight: 700; font-size: 0.85em; padding: 0.4cqw 1.2cqw; border-radius: 999px; }

/* Chat on the right instead of the left */
.duo.flip > :first-child { order: 2; }

/* Business: week planner */
.week { display: flex; flex-direction: column; gap: 1.2cqw; }
.week-head { font-weight: 800; }
.week-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.7cqw; }
.week-grid span { min-height: 3.6cqw; border-radius: 0.8cqw; background: #f5f0ec; }
.week-grid .day { min-height: 0; background: none; text-align: center; font-weight: 700; color: #7d6357; font-size: 0.85em; }
.week-grid .busy { background: #e3d8f5; }
.week-grid .booked { background: #6b2fd0; color: #fff; font-weight: 800; font-size: 0.72em; line-height: 1.15; padding: 0.4cqw; display: flex; align-items: center; justify-content: center; text-align: center; }
.attach { display: flex; align-items: center; gap: 1.2cqw; background: #f5f0ec; border-radius: 1.2cqw; padding: 1cqw 1.3cqw; font-weight: 700; }
.attach .file { flex: none; background: #d85a30; color: #fff; font-size: 0.7em; font-weight: 800; padding: 0.6cqw 0.8cqw; border-radius: 0.6cqw; }
.attach small { display: block; color: #7d6357; font-weight: 500; font-size: 0.85em; }

/* Finale confetti */
.confetti { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.confetti i { position: absolute; top: -6%; width: 1.2cqw; height: 0.7cqw; border-radius: 2px; opacity: 0; }
.scene.active .confetti i { animation: fall var(--t, 3s) linear var(--d, 0s) both; }
@keyframes fall { 0% { opacity: 1; transform: translateY(0) rotate(0); } 100% { opacity: 1; transform: translateY(120cqw) rotate(var(--r, 540deg)); } }

/* Overlay play */
.big-play { position: absolute; inset: 0; margin: auto; width: 84px; height: 84px; border-radius: 50%; border: 0; background: #6b2fd0; color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; box-shadow: 0 10px 40px rgba(107, 47, 208, 0.5); transition: transform 0.15s; z-index: 3; }
.big-play:hover { transform: scale(1.06); }
.big-play svg { width: 36px; height: 36px; margin-left: 4px; }
.big-play[hidden] { display: none; }

/* Controls */
.controls { display: flex; align-items: center; gap: 12px; margin-top: 14px; }
.ctrl { width: 44px; height: 44px; flex: none; border-radius: 50%; border: 0; background: var(--surface); color: var(--text); cursor: pointer; display: flex; align-items: center; justify-content: center; box-shadow: inset 0 0 0 1px var(--line); }
.ctrl:hover { background: var(--surface-2); }
.ctrl svg { width: 20px; height: 20px; }
.ctrl .i-pause { display: none; }
.playing .ctrl .i-play { display: none; }
.playing .ctrl .i-pause { display: block; }
.bar { flex: 1; height: 8px; border-radius: 999px; background: var(--surface); cursor: pointer; position: relative; box-shadow: inset 0 0 0 1px var(--line); }
.bar:focus-visible { outline: 3px solid var(--link); outline-offset: 3px; }
.fill { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--brand); border-radius: 999px; }
.time { color: var(--text-2); font-size: 14px; font-variant-numeric: tabular-nums; min-width: 84px; text-align: right; }
.volume { display: flex; align-items: center; gap: 8px; }
.volume input { width: 90px; accent-color: var(--brand); }
.ctrl .i-muted { display: none; }
.muted .ctrl .i-vol { display: none; }
.muted .ctrl .i-muted { display: block; }

/* Chapters */
.chapters { list-style: none; padding: 0; margin: 20px auto 0; max-width: 980px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.chapters button { width: 100%; text-align: left; background: var(--bg-2); color: var(--text-2); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; cursor: pointer; min-height: 44px; font-weight: 600; font-size: 14px; }
.chapters button:hover { color: var(--text); }
.chapters button.on { border-color: var(--brand); color: var(--text); }
.chapters button small { display: block; color: var(--text-3); font-weight: 500; }

/* Phones: taller frame, stories stack */
@media (max-width: 640px) {
  .stage { aspect-ratio: 4 / 5; border-radius: 18px; }
  .scene { padding: 6cqw; }
  .duo { grid-template-columns: minmax(0, 1fr); gap: 4cqw; }
  .col { gap: 3cqw; }
  .bubble, .card, .chip { font-size: 13px; }
  .bubble { padding: 2.6cqw 3.6cqw; border-radius: 4cqw; }
  .card { padding: 4cqw; border-radius: 4cqw; }
  .cal, .order { gap: 2cqw; }
  .slot { padding: 2cqw 3cqw; border-radius: 2.4cqw; }
  .kinetic { font-size: 10cqw; }
  .volume input { display: none; }
  .scene-tag { top: 4cqw; left: 4cqw; }
  .big-play { width: 64px; height: 64px; }
  .time { min-width: 0; font-size: 12px; }
}


/* Glass icons: tinted glass with a soft highlight on top, like Apple's newer icons */
.gl { position: relative; display: inline-flex; align-items: center; justify-content: center; flex: none; width: 4.4cqw; height: 4.4cqw; min-width: 28px; min-height: 28px; border-radius: 28%; overflow: hidden;
  background: linear-gradient(160deg, color-mix(in srgb, var(--c) 50%, #fff) 0%, var(--c) 70%);
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: inset 0 0.18cqw 0.4cqw rgba(255, 255, 255, 0.75), inset 0 -0.35cqw 0.7cqw rgba(0, 0, 0, 0.16), 0 0.8cqw 2cqw color-mix(in srgb, var(--c) 40%, transparent); }
.gl::before { content: ""; position: absolute; left: 9%; right: 9%; top: 4%; height: 44%; border-radius: 50% 50% 42% 42% / 64% 64% 36% 36%; background: linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0)); pointer-events: none; }
.gl svg { position: relative; width: 58%; height: 58%; filter: drop-shadow(0 0.15cqw 0.25cqw rgba(0, 0, 0, 0.22)); }
.gl.emo { font-size: 1.3em; }
.gl.big { width: 6.4cqw; height: 6.4cqw; border-radius: 50%; }
.gl-row { display: flex; gap: 2.2cqw; margin: 2.6cqw 0 1.4cqw; }
.gl-row .gl { width: 8.5cqw; height: 8.5cqw; }

/* Hey Ervo + alarm */
.voice-line { display: flex; align-items: center; gap: 1.4cqw; font-weight: 800; font-size: clamp(14px, 2.6cqw, 26px); color: #2a1650; }
.voice-line .gl { animation: listen 1.6s ease-in-out infinite; }
@keyframes listen { 0%, 100% { box-shadow: 0 0 0 0 rgba(139, 92, 246, 0.45); } 50% { box-shadow: 0 0 0 1.4cqw rgba(139, 92, 246, 0); } }
.alarm { display: flex; flex-direction: column; gap: 1cqw; }
.alarm-head { display: flex; align-items: center; gap: 1.2cqw; font-weight: 800; }
.alarm-head small { display: block; color: #7d6357; font-weight: 500; font-size: 0.8em; }
.alarm-row { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 1.2cqw; background: #f5f0ec; border-radius: 1.2cqw; padding: 1cqw 1.4cqw; }
.alarm-row b { font-size: 1.5em; letter-spacing: -0.03em; }
.alarm-row b small { font-size: 0.5em; }
.alarm-row span { color: #7d6357; font-weight: 600; font-size: 0.9em; }
.alarm-row.dim { opacity: 0.55; }
.sw { width: 3.6cqw; height: 2.1cqw; min-width: 26px; min-height: 15px; border-radius: 999px; background: #d9cfe8; position: relative; }
.sw::after { content: ""; position: absolute; top: 12%; left: 7%; width: 42%; height: 76%; border-radius: 50%; background: #fff; }
.sw.on { background: #34c759; }
.sw.on::after { left: auto; right: 7%; }

/* Business team */
.team { display: flex; flex-direction: column; gap: 1cqw; }
.team-head { font-weight: 800; }
.member { display: flex; align-items: center; gap: 1.2cqw; background: #f5f0ec; border-radius: 1.2cqw; padding: 0.9cqw 1.3cqw; font-weight: 700; }
.member small { display: block; color: #7d6357; font-weight: 500; font-size: 0.82em; }
@media (max-width: 640px) { .gl-row { gap: 3cqw; } .gl-row .gl { width: 11cqw; height: 11cqw; } }
.steps-head .emo.gl { background: linear-gradient(160deg, color-mix(in srgb, var(--c) 50%, #fff) 0%, var(--c) 70%); border-radius: 28%; }

/* 2026-11: the app's own 3D icons (Fluent emoji) in the video */
.f3d { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 4.6cqw; height: 4.6cqw; min-width: 28px; min-height: 28px; font-size: 3.2cqw; line-height: 1; }
.f3d img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 0.3cqw 0.5cqw rgba(0, 0, 0, 0.25)); }
.f3d.big { width: 6.6cqw; height: 6.6cqw; }
.voice-line .f3d { animation: listen 1.6s ease-in-out infinite; }
.gl-row .f3d { width: 8.5cqw; height: 8.5cqw; font-size: 6cqw; }
.steps-head .emo.f3d { background: none; }
@media (max-width: 640px) { .gl-row .f3d { width: 11cqw; height: 11cqw; } }
