/* Homepage scroll story — one choreography, three layouts (desktop, laptop, phone).
   Static layout is the default; html.cinematic-enabled turns on the pinned scenes. */

/* ---------- Hero card (static default) ---------- */
.hero-card{position:relative;padding:14px 14px 0}
.hero-card-frame{position:relative;min-height:min(78svh,760px);border-radius:22px;overflow:hidden;background:#0c2a20;isolation:isolate;transform-origin:50% 40%}
.hero-card-shadow{position:absolute;inset:4% 3% -2%;border-radius:40px;box-shadow:0 60px 120px -20px #000c,0 20px 50px -20px #0009;opacity:0;pointer-events:none;z-index:-1}
.hero-media{position:absolute;inset:0;z-index:0;transform-origin:50% 45%}
.hero-media picture,.hero-media img,.hero-media video{display:block;width:100%;height:100%;object-fit:cover;object-position:50% 55%}
.hero-media video{position:absolute;inset:0;opacity:0;transition:opacity 1.2s var(--ease-out)}
.hero-media video.is-playing{opacity:1}
.hero-shade{position:absolute;inset:0;z-index:1;pointer-events:none;
  background:linear-gradient(0deg,#051711f2 0%,#051711b8 28%,#05171140 58%,#05171126 100%),linear-gradient(90deg,#05171199,transparent 65%)}
.hero-copy{position:absolute;left:clamp(24px,4.2vw,64px);right:clamp(24px,4.2vw,64px);bottom:clamp(36px,7svh,72px);z-index:2;color:#eef3e9;max-width:860px}
.hero-copy .eyebrow{color:#c6edac;font-size:.6rem;letter-spacing:.2em;margin-bottom:22px;display:flex;align-items:center;gap:10px}
.hero-copy .eyebrow:before{content:'';width:6px;height:6px;border-radius:50%;background:#c6edac;box-shadow:0 0 0 4px #c6edac26}
.hero-copy h1{font-size:clamp(3rem,min(6.4vw,10.5svh),6.6rem);line-height:.98;letter-spacing:-.05em;font-weight:560;margin:0 0 24px;color:#f4f7f0}
.hero-copy h1 em{color:#c6edac;font-size:1.1em}
.hero-sub{font-size:clamp(.9rem,1.05vw,1.02rem);line-height:1.7;color:#cfdccb;max-width:540px;margin:0 0 30px}
.hero-actions-row{display:flex;align-items:center;gap:26px;flex-wrap:wrap}
.hero-actions-row .button{background:#c6edac;color:#102e27;padding:15px 22px}
.hero-actions-row .button:hover{background:#dbf5cb}
.hero-explore{font-size:.85rem;color:#e6efe0;display:inline-flex;gap:12px;align-items:center}
.hero-explore span{display:inline-block;transition:transform .5s var(--ease-out)}
.hero-explore:hover{text-decoration:none}
.hero-explore:hover span{transform:translate(3px,3px)}
.hero-indicator{position:absolute;left:50%;bottom:12px;z-index:3;transform:translateX(-50%);display:flex;flex-direction:column;align-items:center;gap:9px;color:#d7e3d1;font-size:.55rem;letter-spacing:.22em;text-transform:uppercase;pointer-events:none}
.hero-indicator i{display:block;width:118px;height:5px;border-radius:5px;background:#f4f7f0d9;box-shadow:0 2px 10px #0006;animation:ott-nudge 2.8s var(--ease-inout) 2s infinite}
@keyframes ott-nudge{0%,62%,100%{transform:translateY(0)}31%{transform:translateY(-6px)}}
.hero-meta{position:absolute;right:clamp(24px,4.2vw,64px);bottom:clamp(36px,7svh,72px);z-index:2;text-align:right;font-size:.62rem;letter-spacing:.14em;color:#b7c9b1;line-height:2}
.hero-meta b{display:block;color:#eef3e9;font-weight:500;letter-spacing:.02em;font-size:.82rem}

/* Static stage keeps the existing composition below the card. */
.ott-stage-inner{padding-top:60px}

/* First-paint defaults that match the real header and dock, so the story layout
   painted before any script runs is the same one the script settles on (no layout shift). */
:root{--nav-height:89px;--dock-h:0px}
@media(max-width:1200px){:root{--nav-height:97px}}
@media(max-width:1024px){:root{--nav-height:87px}}
@media(max-width:800px){:root{--nav-height:65px;--dock-h:70px}}
html.cinematic-enabled .ott-stage{--card-pad:14px;--card-pad-bottom:14px}
@media(max-width:900px){html.cinematic-enabled .ott-stage{--card-pad:10px;--card-pad-bottom:calc(10px + var(--dock-h))}}
/* Pieces wait off-stage until the engine places them. */
html.cinematic-enabled .system-device,html.cinematic-enabled .system-hub{opacity:0}

/* ---------- Cinematic (all screen sizes) ---------- */
html.cinematic-enabled .ott-story{height:var(--story-length,480svh)}
html.cinematic-enabled .ott-stage{position:sticky;top:var(--nav-height,86px);height:calc(100svh - var(--nav-height,86px));overflow:hidden}
html.cinematic-enabled .ott-stage-inner{position:absolute;inset:0;height:100%;padding:0;max-width:none}
html.cinematic-enabled .hero-card{position:absolute;inset:0;z-index:30;padding:var(--card-pad,14px);padding-bottom:var(--card-pad-bottom,14px);pointer-events:none;perspective:1600px}
html.cinematic-enabled .hero-card-frame{height:100%;min-height:0;pointer-events:auto;will-change:transform;backface-visibility:hidden}
html.cinematic-enabled .hero-copy,html.cinematic-enabled .hero-indicator,html.cinematic-enabled .hero-meta{translate:0 calc(var(--util-shift,0px) * -1)}

html.cinematic-enabled .story-chapter{display:block;position:absolute;top:clamp(26px,6.5%,64px);left:0;width:100%;padding:0 24px;opacity:0;z-index:4;will-change:transform,opacity}
html.cinematic-enabled .story-chapter h2{font-size:clamp(2.3rem,min(4.2vw,7.6svh),4.6rem);line-height:1;text-align:center;margin:0}
html.cinematic-enabled .story-chapter .eyebrow{margin-bottom:18px}

html.cinematic-enabled .ott-system{position:absolute;inset:0;width:auto;height:auto;max-width:none;margin:0;display:block;perspective:1300px;transform-style:preserve-3d;will-change:transform}
html.cinematic-enabled .system-hub{position:absolute;left:0;top:0;margin:0;width:164px;height:164px;z-index:3;will-change:transform,opacity}
html.cinematic-enabled .system-device{position:absolute;left:0;top:0;width:220px;height:168px;min-height:0;max-width:none;z-index:2;will-change:transform,opacity}
html.cinematic-enabled .system-connections{display:block;position:absolute;inset:0;width:100%;height:100%;overflow:visible;stroke:#a4cd7c;stroke-width:1.2;fill:none;opacity:0}
html.cinematic-enabled .system-connections .pulse{stroke:#e6ffd0;stroke-width:2;stroke-linecap:round}
html.cinematic-enabled .system-connections .cable-glow,html.cinematic-enabled .system-connections .ring-glow{stroke:#a4cd7c;stroke-width:7;stroke-opacity:.14;stroke-linecap:round}
html.cinematic-enabled .system-connections .pulse-glow{stroke:#c6edac;stroke-width:9;stroke-opacity:.3;stroke-linecap:round}
html.cinematic-enabled .hub-logo{width:112px;height:103px}
html.cinematic-enabled .hub-micro{font-size:.3rem}

html.cinematic-enabled .story-paths{position:absolute;top:auto;bottom:calc(var(--bottom-reserve,90px) + 4%);left:50%;width:min(820px,76vw);max-width:none;margin:0;opacity:0;pointer-events:none;z-index:6}
html.cinematic-enabled .story-paths h3{font-size:clamp(1.7rem,min(2.6vw,4.6svh),2.5rem)}
html.cinematic-enabled .story-paths>a{padding:24px 30px;background:#173527e6}
html.cinematic-enabled .story-bottom{position:absolute;bottom:20px;left:40px;right:40px;padding-top:15px;max-width:none}

/* Runway (pinned horizontal journey) */
html.cinematic-enabled .service-runway{height:var(--runway-length,280svh)}
html.cinematic-enabled .runway-stage{height:calc(100svh - var(--nav-height,86px));position:sticky;top:var(--nav-height,86px);padding:clamp(18px,3.5svh,40px) 0 clamp(14px,2svh,22px);display:flex;flex-direction:column;justify-content:center;overflow:hidden}
html.cinematic-enabled .runway-heading{margin-bottom:clamp(14px,3svh,28px)}
html.cinematic-enabled .runway-heading h2{font-size:clamp(2.2rem,min(4vw,7svh),4rem)}
html.cinematic-enabled .runway-window{overflow:hidden;perspective:1400px;flex-shrink:0;scroll-snap-type:none}
html.cinematic-enabled .runway-strip{padding-bottom:12px;will-change:transform}
html.cinematic-enabled .runway-card{height:clamp(300px,50svh,470px);min-height:0;will-change:transform}
html.cinematic-enabled .runway-card h3{font-size:clamp(1.6rem,min(2.3vw,4.3svh),2.4rem);margin:12px 0 10px}
html.cinematic-enabled .runway-art{height:clamp(90px,16svh,140px);margin:6px 0 0}
html.cinematic-enabled .runway-bottom{margin-top:clamp(8px,1.6svh,14px)}

/* Closing scene breathes a little more. */
html.cinematic-enabled .closing-section{min-height:calc(100svh - var(--nav-height,86px));display:flex;align-items:center}
html.cinematic-enabled .closing-layout{width:min(1240px,calc(100% - 80px))}
html.cinematic-enabled .closing-layout h2{font-size:clamp(3.4rem,7vw,7rem)}
html.cinematic-enabled .compact-faq{padding:120px 0 140px}

/* ---------- Phone & small tablet ---------- */
@media(max-width:900px){
  .hero-card{padding:10px 10px 0}
  .hero-card-frame{min-height:72svh;border-radius:20px}
  .hero-copy{left:22px;right:22px;bottom:30px}
  .hero-copy .eyebrow{font-size:.5rem;letter-spacing:.14em;margin-bottom:16px}
  .hero-copy h1{font-size:clamp(2.6rem,11.6vw,4.2rem);margin-bottom:16px}
  .hero-sub{font-size:.86rem;line-height:1.65;margin-bottom:20px}
  .hero-actions-row .button{display:none}
  .hero-meta{display:none}
  .hero-indicator{bottom:10px}
  .hero-indicator span{display:none}
  .hero-indicator i{width:96px;height:4px}

  html.cinematic-enabled .ott-story{height:var(--story-length,390svh)}
  html.cinematic-enabled .story-chapter{top:14px;padding:0 18px}
  html.cinematic-enabled .story-chapter h2{font-size:clamp(1.85rem,8.6vw,2.7rem);line-height:1.04}
  html.cinematic-enabled .story-chapter .eyebrow{font-size:.5rem;margin-bottom:12px}
  html.cinematic-enabled .story-bottom{display:none}
  html.cinematic-enabled .story-paths{width:calc(100% - 32px);grid-template-columns:1fr;gap:10px;bottom:calc(var(--bottom-reserve,80px) + 6px)}
  html.cinematic-enabled .story-paths>a{padding:18px 20px;background:#173527f2}
  html.cinematic-enabled .story-paths h3{font-size:1.55rem;margin:10px 0 6px}
  html.cinematic-enabled .story-paths h3 br{display:none}
  html.cinematic-enabled .story-paths p{font-size:.72rem}
  html.cinematic-enabled .hub-micro{font-size:.28rem}

  html.cinematic-enabled .service-runway{height:var(--runway-length,300svh)}
  html.cinematic-enabled .runway-stage{padding-bottom:calc(var(--dock-h,0px) + 10px);justify-content:flex-start;padding-top:22px}
  html.cinematic-enabled .runway-card{width:min(78vw,340px);height:clamp(300px,calc(100svh - var(--nav-height,70px) - var(--dock-h,0px) - 200px),430px)}
  html.cinematic-enabled .runway-heading h2{font-size:2.2rem}
  html.cinematic-enabled .runway-heading>div:last-child{max-width:110px}
  html.cinematic-enabled .runway-bottom{display:none}
  html.cinematic-enabled .closing-section{min-height:0}
  html.cinematic-enabled .compact-faq{padding:70px 0 80px}
}

/* Reveal staging (set by JS only for content that starts below the fold). */
[data-rv-pending]:not([data-rv-pending="lines"]){opacity:0}
[data-rv-pending="lines"] .rv-line>span{transform:translate3d(0,108%,0)}
html.cinematic-enabled .story-chapter .rv-line>span{transform:translate3d(0,108%,0)}

@media(prefers-reduced-motion:reduce){
  .hero-indicator i{animation:none}
  [data-rv-pending]{opacity:1!important}
  [data-rv-pending] .rv-line>span{transform:none!important}
}

/* Keep two-line card titles as two lines (hiding the break merged the words). */
.story-paths h3 br,html.cinematic-enabled .story-paths h3 br{display:inline}

/* iOS Safari mis-places a preserve-3d child (with a filter) inside a card whose 3D tilt
   changes every frame: the rack icon flickered everywhere except dead-centre.
   Same tilt, baked into the icon's own transform so nothing nested is 3D. */
.infrastructure-art{perspective:none}
.infrastructure-unit{transform:perspective(700px) rotateX(13deg) rotateY(-20deg) rotateZ(-5deg);transform-style:flat}
