/* Product-led layout, rotating showcase, and guided screen details. */
:root { --spacing-section: 64px; }
body { animation: none; }
.grain-overlay, .phone-mockup::before, .btn::after, .hero::after { display: none; }
.phone-mockup, .phone-mockup.is-visible, .phone-mockup.is-floating {
  opacity: 1; animation: none; transform: none; will-change: auto;
}
.hero { min-height: auto; padding-block: 32px 40px; }
.hero-shell { grid-template-columns: minmax(0, 560px) minmax(0, 1fr); gap: 40px; }
.hero-headline { font-size: clamp(2.6rem, 4.8vw, 4.2rem); }
.hero-demo { width: min(100%, 390px); }
.hero-demo-video { width: 100%; height: auto; max-height: 590px; aspect-ratio: 720 / 1168; object-fit: contain; }
.hero-demo-caption { margin-top: 0; }
.hero-ctas .btn-secondary { padding: 13px 26px; min-height: 48px; line-height: 1.35; background: #1c1c1e; border: 1px solid #3a3a3c; }
.hero-ctas { margin-bottom: 0; }
.btn { max-width: 100%; box-sizing: border-box; }
.btn-primary, .btn-primary:hover { box-shadow: none; animation: none; }
.demo-toggle { min-height: 40px; margin-top: 8px; }
.feature-guide-link { font-size: .94rem; margin-top: 8px; color: #b5cce0; line-height: 1.5; }
.feature-guide-link:hover { color: #fff; }
.feature-kicker, .scene-count { font-size: .82rem; font-weight: 500; color: #a1a1a6; letter-spacing: .025em; }
.feature-rows { gap: 0; }
.feature-row { padding-block: 48px; gap: 56px; border-bottom: 1px solid #222; }
.feature-row-title { font-size: clamp(1.8rem, 3vw, 2.65rem); max-width: 16ch; }
.feature-row-text { gap: 14px; }
.feature-row-visual .phone-mockup { max-width: 232px; }
.page-hero { padding-block: 48px 32px; }
.page-hero .text-display { font-size: clamp(2.5rem, 6vw, 4.75rem); }
.feature-card { align-items: center; grid-template-columns: minmax(0,1fr) 175px; padding-block: 32px; }
.feature-card-title { font-size: 1.6rem; }
.feature-card-mockup { width: 175px; }
.feature-card-text { gap: 12px; }
.training-details { padding-top: 32px; }
.training-details .section-label { margin-bottom: 32px; }

/* Five phones orbit through the front position. The short scroll range ends
   as the final scene reaches the centre, so no empty trailing phase remains. */
.scroll-story { --scene-height: min(680px, calc(100svh - 56px)); height: calc(var(--scene-height) + 1060px); }
.scroll-story-sticky { top: 56px; height: var(--scene-height); padding: 16px 0; justify-content: center; }
.scroll-story-content { grid-template-columns: minmax(0, 420px) minmax(0, 1fr); grid-template-rows: auto auto; gap: 16px 24px; align-items: center; }
.scroll-story-text { height: 290px; }
.scroll-panel { gap: 16px; justify-content: center; transition: opacity .2s; visibility: hidden; }
.scroll-panel.is-active { visibility: visible; }
.scroll-panel .feature-guide-link { margin-top: 0; }
.scroll-panel-headline { font-size: clamp(2rem, 3.6vw, 3.1rem); }
.scroll-panel-body { max-width: 36ch; line-height: 1.6; }
.scroll-story-phones { height: min(520px, calc(100svh - 170px)); overflow: hidden; perspective: 1000px; isolation: isolate; }
.scroll-phone { inset: 0; transition: none; transform-origin: center; pointer-events: none; backface-visibility: hidden; }
.scroll-story .phone-mockup { width: min(230px, 48%); max-width: 230px; flex: 0 0 auto; }
.scene-nav { grid-column: 1 / -1; display: flex; justify-content: center; flex-wrap: wrap; gap: 6px 18px; padding: 0 0 8px; }
.scene-nav button { appearance: none; border: 0; border-bottom: 2px solid transparent; background: transparent; color: #929297; font: inherit; font-size: .83rem; padding: 10px 2px; cursor: pointer; }
.scene-nav button[aria-pressed="true"] { color: #f5f5f7; border-color: #f5f5f7; }
.scene-nav button:focus-visible { outline: 2px solid #a1a1a6; outline-offset: 3px; }

/* Guides keep the whole device visible first, then focus on the named control. */
.product-guide { padding-block: 48px 64px; }
.product-guide-header { max-width: 780px; margin-bottom: 36px; }
.product-guide-header h1 { font-size: clamp(2.4rem, 5vw, 4rem); margin-block: 14px 20px; line-height: 1.08; }
.product-guide-header > p:last-child { font-size: 1.1rem; color: #a1a1a6; max-width: 62ch; }
.guide-nav { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 24px; }
.guide-nav a { color: #b5cce0; font-size: .88rem; }
.focus-guide { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 450px); gap: 64px; position: relative; }
.guide-step { min-height: 430px; display: flex; flex-direction: column; justify-content: center; padding-block: 40px; scroll-margin-top: 100px; max-width: 480px; }
.guide-step h2 { font-size: clamp(1.65rem, 2.8vw, 2.25rem); margin-block: 12px 20px; }
.guide-step p { color: #a1a1a6; }
.guide-step p + p { margin-top: 14px; }
.focus-stage { align-self: start; position: sticky; top: 84px; height: min(640px, calc(100svh - 110px)); overflow: hidden; border-radius: 20px; background: #080808; display: flex; align-items: center; justify-content: center; }
.focus-stage .phone-mockup { width: 242px; max-width: 58%; flex: 0 0 auto; transform-origin: 50% var(--focus-origin, 50%); transform: scale(var(--focus-scale, 1)); transition: transform .55s cubic-bezier(.2,.65,.3,1), transform-origin .55s; }
.focus-stage .phone-mockup-screen img { transition: opacity .2s; }
.focus-caption { position: absolute; bottom: 16px; left: 16px; right: 16px; padding: 12px 16px; background: rgba(18,18,18,.96); border: 1px solid #393939; border-radius: 12px; color: #e5e5e7; font-size: .85rem; text-align: center; z-index: 4; }
.focus-caption::before { content: ''; display: block; position: absolute; bottom: 100%; left: 50%; width: 1px; height: 36px; background: #b5cce0; }
.focus-caption::after { content: ''; display: block; position: absolute; left: calc(50% - 3px); bottom: calc(100% + 34px); width: 7px; height: 7px; background: #b5cce0; border-radius: 50%; }
.focus-stage[data-overview="true"] .focus-caption::before, .focus-stage[data-overview="true"] .focus-caption::after { display: none; }
.guide-bottom { border-top: 1px solid #252525; padding-top: 32px; display: flex; flex-wrap: wrap; gap: 20px; align-items: center; }

@media (max-width: 767px) {
  :root { --spacing-section: 44px; }
  .hero { padding-block: 30px 12px; }
  .hero-shell { grid-template-columns: 1fr; gap: 10px; padding-inline: 22px; }
  .hero-headline { font-size: clamp(2rem, 8.5vw, 3rem); margin-bottom: 16px; }
  .hero-subheadline { font-size: 1.05rem; margin-bottom: 22px; max-width: 30ch; }
  .hero-badge { margin-bottom: 12px; }
  .hero-ctas .btn-secondary { padding: 12px 24px; font-size: .9rem; }
  .hero-demo { width: min(100%, 290px); }
  .hero-demo-video { max-height: 420px; }
  .feature-row { padding-block: 32px; gap: 24px; }
  .feature-row-visual .phone-mockup { max-width: 205px; }
  .feature-card { grid-template-columns: minmax(0, 1fr) 105px; gap: 18px; }
  .feature-card-title { font-size: 1.25rem; }
  .feature-card-mockup { width: 105px; }
  .feature-card-body { font-size: .92rem; }
  .scroll-story { --scene-height: min(760px, calc(100svh - 56px)); height: calc(var(--scene-height) + 900px); }
  .scroll-story-sticky { padding-block: 8px; }
  .scroll-story-content { grid-template-columns: 1fr; grid-template-rows: auto auto auto; gap: 8px; text-align: center; padding-inline: 16px; }
  .scroll-story-phones { order: 0; height: min(350px, 43svh); }
  .scroll-story .phone-mockup { width: min(152px, 45%); max-width: 152px; }
  .scroll-story-text { order: 1; height: 202px; }
  .scroll-panel { gap: 9px; justify-content: flex-start; }
  .scroll-panel-headline { font-size: clamp(1.65rem, 6.6vw, 2rem); }
  .scroll-panel-body { font-size: .9rem; line-height: 1.5; max-width: 36ch; margin-inline: auto; }
  .scroll-panel .feature-guide-link { font-size: .85rem; }
  .scene-count { font-size: .74rem; }
  .scene-nav { order: 2; gap: 2px 12px; padding: 0; }
  .scene-nav button { font-size: .73rem; padding: 8px 0; }
  .training-details { padding-top: 24px; }
  .product-guide { padding-top: 32px; }
  .product-guide-header { margin-bottom: 24px; }
  .product-guide-header h1 { font-size: 2.25rem; }
  .focus-guide { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .focus-stage { grid-row: 1; position: sticky; top: 56px; height: 310px; z-index: 3; border-radius: 12px; }
  .focus-stage .phone-mockup { width: 126px; max-width: 48%; }
  .focus-caption { left: 10px; right: 10px; bottom: 10px; padding: 8px 10px; font-size: .75rem; }
  .focus-caption::before { height: 22px; }
  .focus-caption::after { bottom: calc(100% + 20px); }
  .guide-step { min-height: 340px; padding-block: 24px; scroll-margin-top: 390px; }
  .guide-step h2 { font-size: 1.6rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .scroll-phone, .scroll-panel, .focus-stage .phone-mockup { transition: none; }
  .focus-stage .phone-mockup { transform: none; }
}
@media (max-height: 650px) and (min-width: 768px) {
  .scroll-story-phones { height: 400px; }
  .scroll-story .phone-mockup { max-width: 180px; }
}
.focus-stage .phone-mockup { transform: translateY(var(--focus-shift, 0px)) scale(var(--focus-scale, 1)); }
.focus-caption::before, .focus-caption::after { display: none; }
.focus-connector { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 3; overflow: visible; }
.focus-stage[data-overview="true"] .focus-connector { display: none; }
@media (prefers-reduced-motion: reduce) {
  .focus-stage .phone-mockup { transform: none; }
  .focus-connector { display: none; }
}
#training-story { scroll-margin-top: 56px; }
.guide-next { max-width: 720px; padding-block: 24px 36px; }
.guide-next h2 { font-size: 1.75rem; margin-bottom: 16px; }
.guide-next p { color: #a1a1a6; }
.guide-next .feature-guide-link { display: block; width: fit-content; margin-top: 16px; }
.focus-hotspots { position: absolute; inset: 0; z-index: 2; }
.focus-hotspots a { position: absolute; display: block; border-radius: 8px; outline: 1px solid transparent; outline-offset: -2px; }
.focus-hotspots a:hover, .focus-hotspots a:focus-visible { outline-color: #e5e5e7; background: rgba(255,255,255,.06); }
/* One guide step can hold several card previews while its copy stays in place. */
.guide-step--variants { display: block; min-height: 1440px; padding-block: 40px; }
.variant-copy { position: sticky; top: clamp(140px, 26svh, 240px); padding-block: 16px; }
@media (max-width: 767px) {
  .guide-step--variants { min-height: 1320px; padding-block: 24px; }
  .variant-copy { top: 390px; padding-block: 0; }
}

/* Carousel smoothing: scoped compositor layers and a short, interruptible settle. */
.scroll-phone { will-change: auto; }
.scroll-story.is-orbit-active .scroll-phone { will-change: transform, opacity; }
html.is-orbit-settling { scroll-behavior: auto; }
/* /Carousel smoothing */

/* Carousel layout refinement: closer desktop columns, balanced mobile controls. */
@media (min-width: 768px) {
  .scroll-story-content { max-width: 1080px; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 0; }
  .scroll-panel-body { max-width: 44ch; }
  /* Let the orbit cross its column edge without a rectangular crop. */
  .scroll-story-phones { overflow: visible; }
  .scroll-story-text { z-index: 1; background: transparent; }
  .scroll-panel { inset-inline-end: 64px; }
}
@media (max-width: 767px) {
  .scene-nav { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); width: min(100%, 330px); margin-inline: auto; gap: 0 12px; }
  .scene-nav button { min-height: 44px; text-align: center; }
}
/* The poster remains visible until the video has a decoded frame. */
.hero-demo-media { position: relative; }
.hero-demo-poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.hero-demo-media .hero-demo-video { position: relative; z-index: 1; }
.hero-demo-media.is-preview-managed .hero-demo-video { opacity: 0; }
.hero-demo-media.is-preview-managed.is-video-ready .hero-demo-video { opacity: 1; }

/* Keep moving compositor layers phone-sized rather than column-sized. */
.scroll-story .scroll-phone { width: min(230px, 48%); height: auto; aspect-ratio: 1470 / 3000; margin: auto; }
.scroll-story .scroll-phone .phone-mockup { width: 100%; max-width: none; }
@media (max-width: 767px) {
  .scroll-story .scroll-phone { width: min(152px, 45%); }
}
