/* Home hero, film version. Built by hero-v.js; the film rules need .hvh-on, which is only set once the clips are ready. */

/* No flash of the old hero on refresh: until the film is mounted the hero shows only a dark box (its final size on desktop) and the old contents stay hidden.
   If the film never mounts (clips missing, script blocked), the old hero is revealed after 5 s. */
.ss .ss-hero:not(.hvh-on) > * { visibility: hidden; animation: hvh-fb 0s linear 5s forwards; }
@keyframes hvh-fb { to { visibility: visible; } }
.ss .ss-hero:not(.hvh-on), html.ss-on .ss .ss-hero.hs-on:not(.hvh-on) { background: #14100C !important; }

.ss-hero.hvh-on > .hs-wrap:not(.hvh) { display: none; }
.hvh-on .hs-text { pointer-events: none; text-align: left; }
.hvh-on .hs-text .ss-side, .hvh-on .hvh-info .hvh-dots, .hvh-on .hvh-info .hvh-sub { pointer-events: auto; }
/* the old headline stays in the page for search engines and screen readers, but is not drawn */
.ss .ss-hero.hvh-on .hs-text h1 { position: absolute !important; width: 1px !important; height: 1px !important; margin: -1px !important; padding: 0 !important; overflow: hidden !important; clip: rect(0 0 0 0) !important; white-space: nowrap !important; border: 0 !important; filter: none !important; }
.hvh-on .hs-text .hs-sub, .hvh-on .hs-text > .hs-dots { display: none; }

.hvh-stage { position: absolute; inset: 0; overflow: hidden; background: #14100C; pointer-events: auto; z-index: 1; }
.hvh-poster, .hvh-v, .hvh-scrim { position: absolute; inset: 0; width: 100%; height: 100%; }
.hvh-poster { background-size: cover; background-position: 50% 35%; background-repeat: no-repeat; background-color: #14100C; }
.hvh-v { object-fit: cover; object-position: 50% 34%; opacity: 0; transition: opacity .35s ease; pointer-events: none; background: transparent; }
.hvh-v.on { opacity: 1; }
.hvh-scrim { pointer-events: none; background: linear-gradient(180deg, rgba(20,16,12,.46) 0%, rgba(20,16,12,0) 26%), linear-gradient(0deg, rgba(20,16,12,.78) 0%, rgba(20,16,12,.42) 34%, rgba(20,16,12,0) 62%); }
.hvh-link { position: absolute; inset: 0; z-index: 2; border-radius: inherit; }

.hvh-info { font-family: Inter, system-ui, -apple-system, 'Segoe UI', sans-serif; color: #fff; }
.hvh-cnt { font: 800 12px/1 Inter, system-ui, sans-serif; letter-spacing: .16em; text-shadow: 0 1px 6px rgba(0,0,0,.5); opacity: .95; }
.hvh-title { margin-top: 12px; font: 900 clamp(40px, 13vw, 64px)/.94 Inter, system-ui, sans-serif; letter-spacing: -.03em; text-transform: uppercase; text-shadow: 0 2px 18px rgba(0,0,0,.4); }
.hvh-ln { display: block; white-space: nowrap; }
.hvh-ln > span { display: inline-block; will-change: transform, opacity; }
.hvh-sub { display: inline-block; margin-top: 14px; font: 600 14px/1.3 Inter, system-ui, sans-serif; color: #fff; text-decoration: none; text-shadow: 0 1px 8px rgba(0,0,0,.55); opacity: .95; }
.hvh-sub:hover { text-decoration: underline; text-underline-offset: 3px; }
.hvh-sub:focus-visible, .hvh-dot:focus-visible, .hvh-link:focus-visible { outline: 3px solid #E8590C; outline-offset: 2px; border-radius: 8px; }
.hvh-dots { display: flex; gap: 6px; width: min(100%, 300px); margin: 4px 0 0 -2px; padding: 0; }
.hvh-dot { flex: 1; height: 44px; margin: 0; padding: 0; border: 0; background: transparent; cursor: pointer; position: relative; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.hvh-dot i { position: absolute; left: 0; right: 0; top: 20px; height: 4px; border-radius: 2px; background: rgba(255,255,255,.38); overflow: hidden; }
.hvh-dot i::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 2px; background: linear-gradient(90deg, #F6B10A, #E5487B); }
.hvh-dot.on i::after { width: 100%; }
.hvh-dot.run i::after { width: 0; animation: hvh-fill var(--hv-dur, 5.2s) linear forwards; }
@keyframes hvh-fill { from { width: 0; } to { width: 100%; } }

@media (max-height: 700px) { .hvh-title { font-size: clamp(34px, 11vw, 48px); } }

/* ---- desktop: a true full-screen hero. The portrait film sits full height on the right (about 76% of the width, so it is only moderately cropped or enlarged)
   and melts into a blurred copy of its own picture on the far left. The header floats over it, a round button bottom-right opens the story.
   Shading is kept light so the video is not darkened; legibility comes from text shadows.
   --hvh-w / --hvh-up are measured by hero-v.js (scrollbar and header offset); the defaults match the usual values so nothing jumps while loading. ---- */
@media (min-width: 761px) {
  html:has(.ss .ss-hero) { overflow-x: clip; }
  html.ss-on .ss .ss-hero:not(.hvh-on), html.ss-on .ss .ss-hero.hs-on.hvh-on { width: var(--hvh-w, 100vw) !important; margin: calc(-1 * var(--hvh-up, 98px)) 0 0 calc(50% - var(--hvh-w, 100vw) / 2) !important; height: 100svh !important; min-height: 600px; max-height: none; border-radius: 0; }
  html.ss-on .ss-hero.hvh-on .hs-pill, html.ss-on .ss .ss-hero.hs-on.hvh-on .hs-text .ss-side { display: none; }
  html.ss-on .ss-hero.hs-on.hvh-on .hs-text { left: 5vw; right: auto; width: min(1000px, 72vw); top: auto; bottom: 9vh; translate: none; }
  html.ss-on .hs-wrap.hvh::before { display: block; content: ''; position: absolute; inset: -60px; background: var(--hs-img) center / cover no-repeat; filter: blur(46px) saturate(1.3) brightness(1); transform: scale(1.15); transition: opacity .6s; }
  html.ss-on .hs-wrap.hvh::after { display: none; }
  .hvh-info { display: flex; flex-direction: column; align-items: flex-start; }
  .hvh-info::before { content: 'Rangooo Stories'; order: 0; font: 800 14px/1 Inter, system-ui, sans-serif; letter-spacing: .2em; text-transform: uppercase; text-shadow: 0 1px 10px rgba(0,0,0,.6), 0 1px 2px rgba(0,0,0,.4); }
  .hvh-title { order: 1; margin-top: 16px; font-size: min(9.4vw, 16vh); text-shadow: 0 2px 26px rgba(0,0,0,.45), 0 1px 3px rgba(0,0,0,.35); }
  .hvh-sub { order: 2; margin-top: 18px; font-size: 16px; text-shadow: 0 1px 10px rgba(0,0,0,.6), 0 1px 2px rgba(0,0,0,.4); }
  .hvh-cnt { order: 3; margin-top: 22px; font-size: 13px; text-shadow: 0 1px 10px rgba(0,0,0,.6), 0 1px 2px rgba(0,0,0,.4); }
  .hvh-dots { order: 4; width: 260px; margin: 0 0 0 -2px; }
  .hvh-stage { inset: 0 0 0 auto; width: min(76%, calc(100svh * 1.45)); border-radius: 0; box-shadow: none; background: transparent; -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 14%); mask-image: linear-gradient(90deg, transparent 0, #000 14%); }
  .hvh-scrim { background: linear-gradient(180deg, rgba(20,16,12,.22) 0%, rgba(20,16,12,0) 16%), linear-gradient(0deg, rgba(20,16,12,.2), rgba(20,16,12,0) 30%); }
  .hvh-link::after { content: 'Read story'; position: absolute; right: 5vw; bottom: 9vh; width: 112px; height: 112px; box-sizing: border-box; padding: 24px; border-radius: 50%; background: #fff; color: #145C63; font: 800 12px/1.5 Inter, system-ui, sans-serif; letter-spacing: .2em; text-transform: uppercase; display: grid; place-items: center; text-align: center; box-shadow: 0 12px 34px rgba(0,0,0,.3); transition: transform .25s; }
  .hvh-link:hover::after { transform: scale(1.07); }
}
/* wide desktop: the header turns transparent with white text over the film (narrower screens keep the white bar, which fits the nav) */
@media (min-width: 1100px) {
  html.ss-on.hs-top:has(.ss .ss-hero) header.top { position: relative; z-index: 60; background: transparent !important; box-shadow: none !important; border: 0 !important; -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
  html.ss-on.hs-top:has(.ss .ss-hero) header.top * { color: #fff; }
  html.ss-on.hs-top:has(.ss .ss-hero) header.top .brand { filter: drop-shadow(0 1px 4px rgba(0,0,0,.5)); }
  /* the reader chip is white by default, so its name vanished under the white header text: give it the same dark glass as the icon buttons */
  html.ss-on.hs-top:has(.ss .ss-hero) header.top .who-chip { background: rgba(20,16,12,.34) !important; border-color: rgba(255,255,255,.34) !important; box-shadow: none !important; -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
  html.ss-on.hs-top:has(.ss .ss-hero) header.top .brand .wm svg [stroke="#16202C"] { stroke: #fff !important; }
  html.ss-on.hs-top:has(.ss .ss-hero) header.top .brand .wm svg [fill="#16202C"] { fill: #fff !important; }
  html.ss-on.hs-top:has(.ss .ss-hero) header.top button:not(.brand):has(svg) { background: rgba(20,16,12,.34) !important; border-color: rgba(255,255,255,.34) !important; -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
}
@media (min-width: 761px) and (max-width: 1099px) { html.ss-on:has(.ss .ss-hero) header.top { position: relative; z-index: 60; } }
@media (prefers-reduced-motion: reduce) {
  .hvh-v { transition: none; }
  .hvh-dot.run i::after { animation: none; width: 100%; }
}
