/* Shubh Bhoomi — shared motion & utility styles for all design samples */
:root { --ease: cubic-bezier(.16, 1, .3, 1); --ease-io: cubic-bezier(.77, 0, .18, 1); }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
html, body { overflow-x: hidden; }
@supports (overflow: clip) { html, body { overflow-x: clip; } } /* clip can't be scrolled by script either */
img { -webkit-user-drag: none; }

/* smooth light/dark swap */
.theme-anim, .theme-anim *, .theme-anim *::before, .theme-anim *::after {
  transition: background-color .6s ease, color .6s ease, border-color .6s ease, fill .6s ease, stroke .6s ease !important;
}

/* ---------- scroll reveals ---------- */
[data-reveal] {
  opacity: 0;
  transition: opacity 1s var(--ease), transform 1.3s var(--ease), clip-path 1.5s var(--ease-io), filter 1.1s var(--ease);
}
[data-reveal=""], [data-reveal="up"] { transform: translate3d(0, 44px, 0); }
[data-reveal="down"] { transform: translate3d(0, -32px, 0); }
[data-reveal="left"] { transform: translate3d(-56px, 0, 0); }
[data-reveal="right"] { transform: translate3d(56px, 0, 0); }
[data-reveal="zoom"] { transform: scale(.92); }
[data-reveal="blur"] { filter: blur(14px); transform: translate3d(0, 18px, 0); }
[data-reveal].is-in { opacity: 1; transform: none; filter: none; }
/* mask reveals clip the CHILDREN, not the observed element itself — Chrome's IntersectionObserver
   treats a fully clipped target as zero-area and would never fire. */
[data-reveal^="mask"] { opacity: 1; }
[data-reveal^="mask"][data-reveal] > * { transition: clip-path 1.5s var(--ease-io), transform 2s var(--ease); transition-delay: inherit; }
[data-reveal="mask"]:not(.is-in) > * { clip-path: inset(100% 0 0 0); }
[data-reveal="mask-x"]:not(.is-in) > * { clip-path: inset(0 100% 0 0); }
[data-reveal="mask-c"]:not(.is-in) > * { clip-path: inset(18% 18% 18% 18%); }
/* while revealing, the slow reveal easing wins over any Tailwind `transition` utility on the same element */
[data-reveal].revealing {
  transition-property: opacity, transform, clip-path, filter !important;
  transition-duration: 1s, 1.3s, 1.5s, 1.1s !important;
  transition-timing-function: var(--ease), var(--ease), var(--ease-io), var(--ease) !important;
}
[data-reveal^="mask"] img { transition: transform 2s var(--ease); }
[data-reveal^="mask"]:not(.is-in) img { transform: scale(1.25); }

/* split-word headings */
[data-split] .sw { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .08em; margin-bottom: -.08em; }
[data-split] .sw > span { display: inline-block; transform: translate3d(0, 110%, 0); transition: transform 1.1s var(--ease); }
[data-split].is-in .sw > span { transform: none; }

/* filter pop-in */
.pop-in { animation: popIn .7s var(--ease) both; }
@keyframes popIn { from { opacity: 0; transform: translateY(18px) scale(.98); } to { opacity: 1; transform: none; } }
.fade-swap { animation: fadeSwap .8s var(--ease) both; }
@keyframes fadeSwap { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ---------- ambient motion ---------- */
.kenburns { animation: kenburns 26s ease-in-out infinite alternate; transform-origin: 60% 40%; }
@keyframes kenburns { from { transform: scale(1.02); } to { transform: scale(1.16) translate(-1.5%, -1%); } }
.marquee { display: flex; width: max-content; animation: marquee 38s linear infinite; }
.marquee:hover { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }
.float-y { animation: floatY 6s ease-in-out infinite; }
@keyframes floatY { 50% { transform: translateY(-12px); } }
.spin-slow { animation: spin 22s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.scroll-cue { animation: cue 2.2s var(--ease) infinite; }
@keyframes cue { 0% { transform: translateY(-100%); } 60%, 100% { transform: translateY(220%); } }

/* intro curtain — colour set per concept via --curtain */
.curtain { position: fixed; inset: 0; z-index: 200; pointer-events: none; background: var(--curtain, #111);
  transform-origin: top; animation: curtain 1.15s .25s var(--ease-io) forwards; }
@keyframes curtain { to { transform: scaleY(0); } }

/* hero line rise on load (no scroll needed) */
.rise > * { opacity: 0; transform: translateY(40px); animation: rise 1.3s var(--ease) forwards; }
.rise > *:nth-child(1) { animation-delay: .9s; } .rise > *:nth-child(2) { animation-delay: 1.05s; }
.rise > *:nth-child(3) { animation-delay: 1.2s; } .rise > *:nth-child(4) { animation-delay: 1.35s; }
.rise > *:nth-child(5) { animation-delay: 1.5s; } .rise > *:nth-child(6) { animation-delay: 1.65s; }
@keyframes rise { to { opacity: 1; transform: none; } }

/* link underline draw */
.u-link { background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size .6s var(--ease); }
.u-link:hover, .group:hover .u-link { background-size: 100% 1px; }

/* scroll progress bar */
[data-progress] { transform: scaleX(0); transform-origin: left; }

/* mobile menu overlay */
[data-menu] { opacity: 0; visibility: hidden; transition: opacity .6s var(--ease), visibility .6s; }
.menu-open [data-menu] { opacity: 1; visibility: visible; }
.menu-open body { overflow: hidden; }
[data-menu] .menu-item { opacity: 0; transform: translateY(30px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.menu-open [data-menu] .menu-item { opacity: 1; transform: none; }

/* hide scrollbar on rails */
.no-bar { scrollbar-width: none; } .no-bar::-webkit-scrollbar { display: none; }

/* accordion */
details > summary { list-style: none; cursor: pointer; } details > summary::-webkit-details-marker { display: none; }
details[open] .acc-icon { transform: rotate(45deg); }
details .acc-body { animation: fadeSwap .6s var(--ease); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  [data-reveal], [data-split] .sw > span, .rise > * { opacity: 1 !important; transform: none !important; clip-path: none !important; filter: none !important; }
  .curtain { display: none; }
}

/* ?static review mode (see common.js) */
.static-mode .curtain { display: none; }
.static-mode [data-reveal], .static-mode [data-split] .sw > span, .static-mode .rise > * { opacity: 1 !important; transform: none !important; clip-path: none !important; filter: none !important; animation: none !important; transition: none !important; }
.static-mode [data-reveal] > * { clip-path: none !important; }

/* ---------- banner slider (see BB.slider in common.js) ---------- */
[data-slide] { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity 1.3s var(--ease), visibility 1.3s; }
[data-slide].is-active { opacity: 1; visibility: visible; z-index: 1; }
[data-slide] .slide-img { transform: scale(1.1); transition: transform 8s cubic-bezier(.2,.6,.3,1); }
[data-slide].is-active .slide-img { transform: scale(1); }
[data-slide] .slide-txt > * { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease), transform 1.1s var(--ease); }
[data-slide].is-active .slide-txt > * { opacity: 1; transform: none; }
[data-slide].is-active .slide-txt > *:nth-child(1) { transition-delay: .35s; } [data-slide].is-active .slide-txt > *:nth-child(2) { transition-delay: .5s; }
[data-slide].is-active .slide-txt > *:nth-child(3) { transition-delay: .65s; } [data-slide].is-active .slide-txt > *:nth-child(4) { transition-delay: .8s; }
/* progress fill inside a dot: <button data-dot><i class="dot-fill"></i></button> */
[data-dot] .dot-fill { display: block; height: 100%; width: 100%; transform: scaleX(0); transform-origin: left; background: currentColor; border-radius: inherit; }
[data-dot].is-active .dot-fill { animation: dotfill var(--dur, 6.5s) linear forwards; }
.is-paused [data-dot].is-active .dot-fill { animation-play-state: paused; }
@keyframes dotfill { to { transform: scaleX(1); } }
@media (prefers-reduced-motion: reduce) { [data-slide] .slide-img { transform: none !important; } [data-dot].is-active .dot-fill { animation: none; transform: scaleX(1); } }
.static-mode [data-dot].is-active .dot-fill { animation: none; transform: scaleX(1); }
.static-mode [data-slide] .slide-txt > * { opacity: 1 !important; transform: none !important; }
