/*
  Start page. Loaded after style.css and ui.css.
  Layout: hero → step list beside a video "screen" (auto-advances, progress bar on the active step)
  → trial banner with a 72h ring → plan length switch + three plan cards → CTA to the guide.
*/

/* ---------- steps ---------- */
.steps2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 40px; align-items: center; }
.step-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.step-item {
  width: 100%; text-align: left; font: inherit; color: inherit; cursor: pointer;
  display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: start; padding: 20px 22px;
}
.step-item:hover { transform: none; }
.step-n {
  width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 800; font-size: 18px;
  background: color-mix(in srgb, var(--h-blue) 12%, transparent); color: var(--h-blue);
  transition: background .3s, color .3s;
}
.step-text { display: grid; gap: 4px; min-width: 0; }
.step-text b { font-family: var(--font-display); font-weight: 700; font-size: 19px; letter-spacing: -0.01em; }
.step-text > span { color: var(--h-muted); font-size: 15px; line-height: 1.55; }
.step-item:not(.active) .step-text > span { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.step-item.active { border-color: color-mix(in srgb, var(--h-blue) 60%, var(--h-line)); box-shadow: 0 18px 40px -26px color-mix(in srgb, var(--h-blue) 80%, transparent); }
.step-item.active .step-n { background: var(--h-blue); color: #fff; }
.step-bar { position: absolute; left: 0; bottom: 0; height: 3px; width: 0; background: var(--h-blue); border-radius: 0 3px 3px 0; }
.step-item.active .step-bar { animation: step-fill var(--dur, 8s) linear forwards; }
.step-item.active.paused .step-bar { animation-play-state: paused; }
@keyframes step-fill { to { width: 100%; } }

.stage {
  position: relative; aspect-ratio: 1 / 1; width: 100%; max-width: 560px; justify-self: center;
  border-radius: 28px; overflow: hidden; background: #0b1626;
  border: 1px solid var(--h-line); box-shadow: 0 40px 80px -40px rgba(8, 18, 31, .55);
}
.stage-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.03); transition: opacity .45s ease, transform .6s ease; }
.stage-video.on { opacity: 1; transform: none; }
.steps2-cta { text-align: center; margin-top: 40px; }

/* ---------- trial banner ---------- */
.trial-banner { display: grid; grid-template-columns: 1fr auto; gap: 32px; align-items: center; padding: 40px 44px; margin-bottom: 72px;
  background: radial-gradient(420px 220px at 85% 50%, var(--h-glow-card), transparent 70%), var(--h-surface); }
.trial-banner:hover { transform: none; }
.trial-copy { display: grid; gap: 14px; justify-items: start; }
.trial-visual { display: flex; align-items: center; gap: 4px; }
.trial-ring { position: relative; width: 168px; height: 168px; flex: none; }
.trial-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.trial-ring circle { fill: none; stroke-width: 9; }
.ring-bg { stroke: color-mix(in srgb, var(--h-blue) 14%, transparent); }
.ring-fg { stroke: var(--h-blue); stroke-linecap: round; stroke-dasharray: 327; stroke-dashoffset: 0; }
.ring-label { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; gap: 2px; }
.ring-label b { font-family: var(--font-display); font-weight: 800; font-size: 40px; line-height: 1; }
.ring-label span { font-size: 12px; color: var(--h-muted); max-width: 11ch; margin: 0 auto; line-height: 1.3; }
@supports (animation-timeline: view()) {
  .ring-fg { animation: ring-draw linear both; animation-timeline: view(); animation-range: entry 10% cover 45%; }
  @keyframes ring-draw { from { stroke-dashoffset: 327; } to { stroke-dashoffset: 0; } }
}

/* ---------- plans ---------- */
.plans-head { margin-bottom: 32px; }
.plans-head .sr-switch { margin-top: 8px; }
.plan-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: stretch; }
.plan { padding: 28px; display: flex; flex-direction: column; gap: 10px; }
.plan-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.plan-top h3 { font-family: var(--font-display); font-weight: 700; font-size: 22px; }
.plan-tag { font-size: 12px; font-weight: 700; color: #fff; background: var(--h-blue); padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.plan-hot { border-color: var(--h-blue); box-shadow: 0 0 0 1px var(--h-blue), 0 30px 60px -36px color-mix(in srgb, var(--h-blue) 90%, transparent); }
.plan-amount { font-family: var(--font-display); font-weight: 800; font-size: 48px; line-height: 1; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; margin-top: 6px; }
.plan-amount small { font-family: inherit; font-weight: 500; font-size: 15px; color: var(--h-muted); letter-spacing: 0; }
.plan-amount .tick { display: inline-block; animation: plan-tick .4s cubic-bezier(.2,.8,.2,1); }
@keyframes plan-tick { from { transform: translateY(-35%); filter: blur(4px); opacity: .3; } to { transform: none; filter: none; opacity: 1; } }
.plan-per { font-size: 14px; color: var(--h-ok); font-weight: 600; min-height: 1.5em; }
.plan-list { list-style: none; margin: 10px 0 18px; padding: 0; display: grid; gap: 9px; font-size: 15px; }
.plan-list li { display: grid; grid-template-columns: 18px 1fr; gap: 8px; line-height: 1.45; }
.plan-list li::before { content: "✓"; color: var(--h-ok); font-weight: 800; }
.plan-list li.no { color: var(--h-muted); }
.plan-list li.no::before { content: "–"; color: var(--h-muted); }
.plan .btn-full { margin-top: auto; }
body.sr .plan .btn-outline { color: var(--h-blue); border-color: var(--h-blue); }
body.sr .plan .btn-outline:hover { background: var(--h-blue); color: #fff; }
.plans-note { text-align: center; color: var(--h-muted); font-size: 14px; margin-top: 24px; }

@media (max-width: 900px) {
  .steps2 { grid-template-columns: 1fr; }
  .stage { order: -1; max-width: 460px; }
  .plan-grid { grid-template-columns: 1fr; max-width: 480px; margin-inline: auto; }
  .plan-hot { order: -1; }
}
@media (max-width: 640px) {
  /* swipe carousels: steps and plans (one card at a time, neighbours peek in) */
  .step-list, .plan-grid {
    display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
    margin-inline: -24px; padding: 4px 24px 8px; scroll-padding-inline: 24px; scrollbar-width: none; max-width: none;
  }
  .step-list::-webkit-scrollbar, .plan-grid::-webkit-scrollbar { display: none; }
  .step-list > li { flex: 0 0 86%; scroll-snap-align: center; display: flex; }
  .step-list .step-item { height: 100%; }
  .step-item:not(.active) .step-text > span { display: block; -webkit-line-clamp: unset; overflow: visible; }
  .plan-grid > .plan { flex: 0 0 86%; scroll-snap-align: center; }
  .plan-hot { order: 0; }
  .sr-dots { display: flex; }
  .steps2 { gap: 20px; }
  .step-dots { margin-top: 0; }
  .trial-banner { grid-template-columns: 1fr; padding: 28px 22px; justify-items: center; text-align: center; margin-bottom: 56px; }
  .trial-copy { justify-items: center; }
  .trial-visual { order: -1; }
  .trial-ring { width: 132px; height: 132px; }
  .step-item { padding: 16px; }
  .sr-switch button { padding: 8px 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .step-item.active .step-bar { animation: none; width: 100%; }
  .ring-fg, .plan-amount .tick { animation: none !important; }
  .stage-video { transition: none; }
}
