/* rangooo finish layer (2026-11-11): the last stylesheet on every page. Small, site-wide consistency fixes. See finish.js. */

/* 1. The header stays with you (Netflix pattern): sticky on every page. Phones: it slides away while you scroll down and comes
   back as soon as you scroll up (finish.js sets html.rg-hd-hide). Over the home film hero it stays transparent (html.hs-top). */
header.top,header.sh{position:sticky!important;top:0!important;z-index:60;transition:transform .32s cubic-bezier(.2,.8,.2,1),box-shadow .25s,background-color .25s}
html.rg-hd-hide:not(.dk-lock) header.top,html.rg-hd-hide:not(.dk-lock) header.sh{transform:translateY(-110%)}
html.rg-hd-solid:not(.hs-top) header.top{background:rgba(255,255,255,.9)!important;-webkit-backdrop-filter:blur(18px) saturate(1.5);backdrop-filter:blur(18px) saturate(1.5);box-shadow:0 1px 0 rgba(20,24,30,.07)}
html.rg-hd-solid header.sh{box-shadow:0 1px 0 rgba(20,24,30,.07)}
html[data-night="1"].rg-hd-solid:not(.hs-top) header.top,html:has(body.ott).rg-hd-solid:not(.hs-top) header.top{background:rgba(14,17,22,.88)!important;box-shadow:0 1px 0 rgba(255,255,255,.06)}

/* 2. Scroll reveals never leave a blank screen: finish.js shows each block well before it reaches the screen,
   and the fade is quicker and lighter (no blur, which is costly on phones). */
html[data-cine] .cine-in{filter:none!important;transition-duration:.45s,.5s,0s!important}
.rg-rv{transition-duration:.45s,.5s!important}
/* the app's whole screen (section.view) is never faded or slid in: the hero and first row show at once, flush to the top */
.view.rg-rv{opacity:1!important;transform:none!important;transition:none!important}
/* the home page (film hero) does not slide in on load either: the 14px slide showed a strip of page colour above the hero */
html.ss-on body>main,html.ss-on body>.wrap>main{animation:none!important}

@media (prefers-reduced-motion:reduce){header.top,header.sh{transition:none}}

/* 2b. Page entry: a quick 0.25s fade instead of a 0.7s fade-and-slide, so every page feels instant. */
html.rang:not(.rang-off) body>main,html.rang:not(.rang-off) body>.wrap>main{animation:rg-fast .25s ease-out both}
@keyframes rg-fast{from{opacity:0}}

/* 2c. Phones, static pages: one header pattern with the home app (logo left, two icons right): Draw + Search.
   Share and Language are in the More sheet. */
@media (max-width:700px){
  header.sh .sh-in .sh-share,header.sh .sh-in .sh-lang{display:none!important}
  header.sh .sh-in .ud-find{display:flex!important;align-items:center;justify-content:center;width:44px;height:44px;margin:0;padding:0!important;border:0!important;
    border-radius:50%!important;background:transparent!important;box-shadow:none!important;color:#16202C!important;font-size:0}
  header.sh .sh-in .ud-find span{position:absolute!important;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
  header.sh .sh-in .ud-find i{position:relative!important;display:block!important;width:22px!important;height:22px!important;margin:0!important;background:none!important;
    border-radius:0!important;box-shadow:none!important;animation:none!important}
  header.sh .sh-in .ud-find i::before{content:"";position:absolute;left:2px;top:2px;width:13px;height:13px;border:2px solid currentColor;border-radius:50%;background:none;animation:none;box-sizing:border-box}
  header.sh .sh-in .ud-find i::after{content:"";position:absolute;width:2px;height:7px;background:currentColor;border-radius:1px;left:16px;top:13px;transform:rotate(-45deg);animation:none}
  html[data-night="1"] header.sh .sh-in .ud-find{color:#F3EEE6!important}
}

/* 2e. Dark pages (html[data-dk-dark], e.g. Bharat Darshan): the header is dark glass with the light logo, not a white bar over a dark hero. */
html[data-dk-dark] body:not(.ott) header.sh{background:rgba(12,15,20,.86)!important;-webkit-backdrop-filter:blur(18px) saturate(1.4);backdrop-filter:blur(18px) saturate(1.4);border-bottom:0!important;box-shadow:0 1px 0 rgba(255,255,255,.06)!important}
html[data-dk-dark] body:not(.ott) header.sh .sh-logo img{content:url(/logo-light.svg)}
html[data-dk-dark] body:not(.ott) header.sh .sh-in :is(.sh-draw,.sh-share,.ud-find,.sh-lang>summary,.sh-nav a,.sh-more>summary){color:#F3EEE6!important}
html[data-dk-dark] body:not(.ott) header.sh .sh-in :is(.sh-draw,.sh-share,.ud-find,.sh-lang>summary) svg{color:inherit!important}
@media (min-width:961px){
  html[data-dk-dark] body:not(.ott) header.sh .sh-in :is(.sh-draw,.sh-share,.ud-find,.sh-lang>summary){background:rgba(255,255,255,.08)!important;border:1px solid rgba(255,255,255,.18)!important;box-shadow:none!important}
  html[data-dk-dark] body:not(.ott) header.sh .sh-nav a[aria-current]{color:#fff!important}
}

/* 2f. Phone guide mode: on a first slide with no character film, the intro and the Start button sit together in the middle
   (the button was pushed to the bottom, leaving a 200px empty gap). */
.gm-s-hero .gm-sbody:not(:has(.ch-card,.ch-film,img,video)){justify-content:center}
.gm-s-hero .gm-sbody:not(:has(.ch-card,.ch-film,img,video)) .gm-cta{margin-top:32px!important}

/* 2g. No floating petals and sparks over reading pages: a clean page, like the rest of the site. */
#rgamb{display:none!important}

/* 2h. Language home pages (/hi/, /te/ ...) on desktop: the headline is the picture top of one card (as on phones),
   not a separate dark pill above the intro box. */
@media (min-width:761px){
  html.rg-static.rang body.rg-langhome main:has(>p.intro)>h1{display:flex!important;align-items:flex-end;min-height:min(46vh,420px);margin-bottom:0!important;
    padding:160px 48px 32px!important;border-radius:28px 28px 0 0!important;color:#fff!important;text-shadow:0 2px 16px rgba(0,0,0,.5);
    background:linear-gradient(180deg,rgba(16,25,34,0) 30%,rgb(22,32,44) 100%),url(/scrollstory/art/garba.webp) center 30%/cover no-repeat,url(/culture-art/p/bharatanatyam.webp) center 30%/cover no-repeat,#16202C!important}
}

/* 2i. Phone series title pages: the action icons always get their own row under Play (with a 0 basis they could stay on
   Play's line at 0px and spill over it), and no breadcrumb above the art. */
@media (max-width:760px){
  html body.ott section.ot-hero.shb-hero .ot-btns .ot-btn:not(.play){flex:1 1 20%!important}
  html body.ott:has(section.shb-hero) nav.crumb{display:none!important}
  /* the key art is a full-width band, edge to edge (it was inset by the page padding) */
  html body.ott section.ot-hero.shb-hero .pp-cover{width:100vw!important;max-width:none!important;margin-left:calc(50% - 50vw)!important}
}

/* 2j. Touch screens: links inside text get a taller tap area without moving the text (e.g. the language links on /about/). */
@media (pointer:coarse){
  .rg main :is(p,li)>a:not([class]){padding-block:8px;margin-block:-8px}
}

/* 2k. Small laptops (961-1099px): over the home film the header is clear glass with white text, as on wider screens (it was a white bar). */
@media (min-width:961px) and (max-width:1099px){
  html.ss-on.hs-top:has(.ss .ss-hero) header.top{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))}
  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)}
}

/* 2d. Story card films: the crow clip sits lower in its frame; keep its face in the wide card. */
.ch-card .ch-v[src*="/crow."]{object-position:50% 64%!important}

/* 3. Phones and tablets: over the dark home film hero the menu pill turns to dark glass (like on dark pages), and back to light below it. */
@media (max-width:960px),(hover:none) and (pointer:coarse) and (max-width:1366px){
  .dk{transition:background-color .35s,border-color .35s,box-shadow .35s}
  html.hs-top .dk{--dk-bg:rgba(22,27,33,.55);--dk-ink:rgba(255,255,255,.86);--dk-on-bg:rgba(255,255,255,.18);--dk-on-ink:#fff;
    border-color:rgba(255,255,255,.16)!important;box-shadow:0 12px 36px rgba(0,0,0,.45),inset 0 1px 0 rgba(255,255,255,.12)!important}
}

/* 3b. Desktop: the home header is the same full-width bar as every other page (it was a floating pill 8px below the top,
   with content scrolling through the gap above it). */
@media (min-width:961px){
  header.top{margin:0!important;border-radius:0!important;border-width:0!important;width:auto!important;max-width:none!important}
  html.rg-hd-solid:not(.hs-top) header.top{box-shadow:0 1px 0 rgba(20,24,30,.08)!important}
}

/* 4. Desktop header on static pages: the same calm row as the home header. Draw, Share and Find a story become round icon
   buttons (their names stay for screen readers and as tooltips); Start a book stays the one filled button. Tablets too. */
/* the Find button is a quiet round icon like Draw and Share (it was an orange pill on tablets); dark pages override below */
@media (min-width:701px){header.sh .sh-in .ud-find{background:#fff!important;color:#16202C!important;border:1px solid #E7E7E1!important;box-shadow:none!important}
  html[data-night="1"] header.sh .sh-in .ud-find{background:rgba(255,255,255,.08)!important;color:#F3EEE6!important;border-color:rgba(255,255,255,.18)!important}}
@media (min-width:701px) and (max-width:960px){
  header.sh .sh-in{gap:8px!important}
  header.sh .sh-in .sh-draw{margin-left:auto!important}
  header.sh .sh-in .sh-lang,header.sh .sh-in .ud-find,header.sh .sh-in .sh-share{margin-left:0!important;margin-right:0!important}
}
@media (min-width:701px){
  :is(body.ott,html[data-dk-dark] body) header.sh .sh-in :is(.sh-draw,.sh-share,.ud-find,.sh-lang>summary){background:rgba(255,255,255,.08)!important;border:1px solid rgba(255,255,255,.18)!important;box-shadow:none!important;color:#F3EEE6!important}
  :is(body.ott,html[data-dk-dark] body) header.sh .sh-in :is(.sh-draw,.sh-share,.ud-find,.sh-lang>summary) svg{color:inherit!important}
}
@media (min-width:701px){
  header.sh .sh-draw,header.sh .sh-share,header.sh .ud-find{width:44px!important;min-width:44px!important;height:44px!important;padding:0!important;
    justify-content:center!important;border-radius:50%!important;gap:0!important}
  header.sh .sh-draw span,header.sh .sh-share span,header.sh .ud-find span{position:absolute!important;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
  header.sh .ud-find i{position:relative!important;display:block!important;width:18px!important;height:18px!important;margin:0!important;background:none!important;
    border-radius:0!important;box-shadow:none!important;animation:none!important}
  header.sh .ud-find i::before{content:"";position:absolute;left:1px;top:1px;width:10px;height:10px;border:2px solid currentColor;border-radius:50%;background:none;animation:none}
  header.sh .ud-find i::after{content:"";position:absolute;width:2px;height:7px;background:currentColor;border-radius:1px;left:13px;top:10px;transform:rotate(-45deg);animation:none}
}
