/* The top of the page: the claim, then a wide glass window with the live example inside. */
.hero { position: relative; padding: calc(var(--header-h) + clamp(36px, 4.4vw, 64px)) 0 clamp(40px, 5vw, 72px); }
.hero-head { display: grid; gap: 22px; justify-items: center; text-align: center; }
.hero-title { font-size: clamp(44px, 6vw, 84px); max-width: 13ch; }
.hero-head .lead { max-width: 62ch; }
.hero-cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 6px; }
.hero-points { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 28px; font-size: 14.5px; color: var(--dim); }
.hero-points li { display: inline-flex; align-items: center; gap: 9px; }
.hero-points .icon { width: 17px; height: 17px; color: var(--accent); }

/* The stage */
.hero-stage { position: relative; margin-top: clamp(40px, 4.4vw, 60px); }
.hero-stage::before { content: ''; position: absolute; inset: 8% 6% -6%; z-index: -1; border-radius: 50%; background: radial-gradient(closest-side, var(--aura-blue), transparent); filter: blur(70px); opacity: 0.45; }
.stage { aspect-ratio: 16 / 8.8; border-radius: var(--r-xl); overflow: hidden; background: linear-gradient(180deg, var(--glass-top), var(--glass-bottom) 55%, var(--glass)); box-shadow: var(--shadow-deep), 0 1px 0 var(--shine) inset; }
.stage-view { position: absolute; inset: 0; background: radial-gradient(50% 70% at 36% 100%, var(--iris-soft), transparent 70%); }
.stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; transition: opacity 400ms, filter 400ms; }

.stage-corners i { position: absolute; width: 26px; height: 26px; border: 1.5px solid var(--success); opacity: 0.85; transition: border-color var(--fast); }
.stage[data-tone='warn'] .stage-corners i { border-color: var(--warn); }
.stage-corners i:nth-child(1) { left: 20px; top: 20px; border-right: 0; border-bottom: 0; border-top-left-radius: 12px; }
.stage-corners i:nth-child(2) { left: calc(62% - 26px); top: 20px; border-left: 0; border-bottom: 0; border-top-right-radius: 12px; }
.stage-corners i:nth-child(3) { left: 20px; bottom: 20px; border-right: 0; border-top: 0; border-bottom-left-radius: 12px; }
.stage-corners i:nth-child(4) { left: calc(62% - 26px); bottom: 20px; border-left: 0; border-top: 0; border-bottom-right-radius: 12px; }

.stage-top { position: absolute; left: 36px; top: 34px; width: calc(62% - 72px); display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.chip { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 13px; border-radius: var(--r-pill); background: var(--glass-strong); border: 1px solid var(--edge); -webkit-backdrop-filter: var(--blur-light); backdrop-filter: var(--blur-light); font-size: 13px; font-weight: 500; white-space: nowrap; }
.chip-track i { width: 7px; height: 7px; border-radius: 50%; background: var(--success); animation: live 1.8s ease-out infinite; }
@keyframes live { 0% { box-shadow: 0 0 0 0 var(--success); } 70%, 100% { box-shadow: 0 0 0 9px transparent; } }

.stage-tabs { display: inline-flex; padding: 3px; border-radius: var(--r-pill); background: var(--glass-deep); border: 1px solid var(--edge-soft); -webkit-backdrop-filter: var(--blur-light); backdrop-filter: var(--blur-light); }
.stage-tabs button { min-height: 34px; padding: 0 13px; border-radius: var(--r-pill); font-size: 13px; font-weight: 500; color: var(--dim); transition: color var(--fast), background var(--fast); white-space: nowrap; }
.stage-tabs button:hover { color: var(--text); }
.stage-tabs button[aria-selected='true'] { color: var(--ink); background: var(--white); }

.stage-count { position: absolute; left: 44px; bottom: 40px; display: flex; align-items: flex-end; gap: 12px; transition: opacity 300ms; }
.stage-count b { font-weight: 500; font-size: clamp(64px, 8vw, 116px); line-height: 0.8; letter-spacing: -0.07em; background: var(--grad-text); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; padding-right: 0.06em; }
.stage-count span { display: grid; padding-bottom: 2px; line-height: 1.2; }
.stage-count strong { font-size: 19px; font-weight: 600; letter-spacing: -0.02em; }
.stage-count small { font-size: 14px; color: var(--dim); }

/* The glass panel inside the stage: the set's numbers and the trainer's words. */
.stage-panel { position: absolute; right: 20px; top: 20px; bottom: 20px; width: calc(38% - 40px); padding: 26px; display: flex; flex-direction: column; gap: 20px; border-radius: var(--r-lg); background: linear-gradient(180deg, var(--glass-strong), var(--glass)); border: 1px solid var(--edge); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); box-shadow: 0 1px 0 var(--shine) inset; }
.panel-head { display: grid; gap: 2px; padding-bottom: 18px; border-bottom: 1px solid var(--edge-soft); }
.panel-head b { font-size: 22px; font-weight: 600; letter-spacing: -0.03em; }
.panel-head small { font-size: 13.5px; color: var(--dim); }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 14px; }
.tiles b { display: block; font-size: 30px; font-weight: 500; line-height: 1.05; }
.tiles small { font-size: 12.5px; color: var(--dim); }
.t-good { color: var(--success); }
.t-work { color: var(--warn); }
.t-miss { color: var(--faint); }
.meter { display: grid; gap: 8px; }
.meter span { font-size: 12.5px; color: var(--dim); }
.meter-bar { position: relative; height: 6px; border-radius: var(--r-pill); background: var(--edge); }
.meter-bar i { position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(90deg, var(--iris), var(--accent)); transform-origin: 0 50%; transform: scaleX(var(--v, 0)); }
.meter-bar.is-plain i { background: var(--text); transition: transform 380ms var(--curve); }
.meter-bar i[data-tone='success'] { box-shadow: 0 0 18px var(--accent-glow); }
.meter-bar i[data-tone='warn'] { background: var(--warn); }
.meter-bar em { position: absolute; top: -5px; bottom: -5px; right: 4%; width: 2px; background: var(--gold); border-radius: 2px; }
.meter-bar.is-plain em { display: none; }

.stage-cue { margin-top: auto; display: flex; align-items: center; gap: 14px; min-height: 76px; padding: 14px 16px 14px 14px; border-radius: var(--r-md); background: var(--glass-deep); border: 1px solid var(--edge-soft); transition: border-color var(--fast); }
.stage-cue p { font-size: clamp(16px, 1.45vw, 19px); font-weight: 500; line-height: 1.3; letter-spacing: -0.02em; }
.stage-cue p.in { animation: cue-in 340ms var(--curve); }
.stage-cue[data-kind='miss'] p, .stage-cue[data-kind='work'] p { color: var(--warn); }
.stage-cue[data-kind='miss'], .stage-cue[data-kind='work'] { border-color: var(--warn-line); }
.stage-cue[data-kind='review'] p { font-size: 15px; font-weight: 450; }
@keyframes cue-in { from { opacity: 0; transform: translateY(8px); filter: blur(4px); } }

.stage-reward { position: absolute; left: 31%; top: 46%; transform: translate(-50%, -50%) scale(0.92); text-align: center; display: grid; justify-items: center; gap: 6px; opacity: 0; pointer-events: none; transition: opacity 300ms, transform 600ms var(--curve); }
.stage[data-phase='reward'] .stage-reward { opacity: 1; transform: translate(-50%, -50%); }
.stage[data-phase='reward'] canvas { opacity: 0.25; filter: blur(3px); }
.stage[data-phase='reward'] .stage-count { opacity: 0; }
.stage-reward small { font-size: 14px; font-weight: 500; color: var(--gold); }
.stage-reward b { font-weight: 500; font-size: clamp(64px, 8vw, 112px); line-height: 0.95; letter-spacing: -0.07em; background: var(--grad-gold); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; padding-right: 0.06em; }
.stage-reward span { font-size: 16px; color: var(--dim); }

/* A card that floats over the stage's edge */
.float { position: absolute; z-index: 3; border-radius: var(--r-md); }
.float-private { left: -22px; bottom: 24%; display: flex; align-items: center; gap: 12px; padding: 13px 18px 13px 14px; background: linear-gradient(180deg, var(--glass-strong), var(--glass)); animation: bob 7s ease-in-out infinite; }
.float-private .icon { color: var(--accent); }
.float-private span { display: grid; line-height: 1.3; }
.float-private b { font-size: 13.5px; font-weight: 600; }
.float-private small { font-size: 12.5px; color: var(--dim); }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

/* Four facts under the stage */
.facts { margin-top: clamp(20px, 2.4vw, 28px); display: grid; grid-template-columns: repeat(4, 1fr); border-radius: var(--r-lg); }
.facts li { padding: 30px clamp(18px, 2.4vw, 34px); display: grid; gap: 10px; align-content: start; }
.facts li + li { border-left: 1px solid var(--edge-soft); }
.facts b { font-weight: 500; font-size: clamp(36px, 4vw, 52px); line-height: 1; letter-spacing: -0.06em; }
.facts b small { font-size: 0.5em; margin-left: 3px; color: var(--dim); }
.facts li:nth-child(3) b { color: var(--accent); }
.facts span { font-size: 14px; line-height: 1.45; color: var(--dim); max-width: 24ch; }

@media (max-width: 1100px) {
  .stage-tabs button { padding: 0 10px; }
  .stage-panel { padding: 20px; gap: 16px; }
  .tiles b { font-size: 24px; }
}
@media (max-width: 900px) {
  .stage { aspect-ratio: auto; }
  .stage-view { position: relative; inset: auto; aspect-ratio: 4 / 4.3; background: radial-gradient(70% 60% at 50% 100%, var(--iris-soft), transparent 70%); }
  .stage-corners { display: none; }
  .stage-top { left: 14px; right: 14px; top: 14px; width: auto; flex-wrap: wrap; }
  .stage-count { left: 22px; bottom: 18px; }
  .stage-panel { position: relative; inset: auto; width: auto; margin: 0 12px 12px; }
  .stage-reward { left: 50%; }
  .float { display: none; }
  .facts { grid-template-columns: 1fr 1fr; }
  .facts li:nth-child(3) { border-left: 0; }
  .facts li:nth-child(n + 3) { border-top: 1px solid var(--edge-soft); }
}
@media (max-width: 560px) {
  .hero-cta .btn { flex: 1 1 100%; }
  .chip-track { display: none; }
  .stage-tabs { width: 100%; }
  .stage-tabs button { padding: 0 6px; font-size: 12.5px; flex: 1; min-height: 40px; }
  .facts li { padding: 22px 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .chip-track i, .float-private, .stage-cue p.in { animation: none; }
}

/* The photograph behind the claim: a phone on its stand at one side, the athlete at the other, and the
   dark between them for the words. It fades into the page below. */
.hero-photo { position: absolute; z-index: -1; left: 0; right: 0; top: 0; height: clamp(560px, 47vw, 820px); overflow: hidden; -webkit-mask-image: linear-gradient(to bottom, var(--ink) 58%, transparent); mask-image: linear-gradient(to bottom, var(--ink) 58%, transparent); }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; opacity: 0.92; }
@media (max-width: 900px) {
  .hero-photo { height: 620px; }
  .hero-photo img { object-position: 88% 40%; opacity: 0.5; }
}

/* The recording of the app itself, in the glass window under the claim. */
.film { position: relative; padding: 8px; border-radius: var(--r-xl); overflow: hidden; box-shadow: var(--shadow-deep), 0 1px 0 var(--shine) inset; }
.film-video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; border-radius: calc(var(--r-xl) - 8px); background: var(--ink); }
.film-chip { position: absolute; left: 24px; bottom: 24px; }
@media (max-width: 560px) {
  .film { padding: 5px; border-radius: var(--r-lg); }
  .film-video { border-radius: calc(var(--r-lg) - 5px); }
  .film-chip { display: none; }
}
