/* BrahmnMitra — animations.css */

/* Liquid glass primitive */
.glass {
  position: relative;
  background: var(--glass-bg);
  backdrop-filter: blur(var(--blur)) saturate(180%);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(180%);
  border: 1px solid var(--glass-stroke);
  box-shadow: var(--glass-shadow), var(--glass-inner);
  overflow: hidden;
  isolation: isolate;
}
.glass::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(
      120% 80% at 8% 0%,
      rgba(255, 255, 255, 0.55),
      transparent 58%
    ),
    radial-gradient(
      90% 70% at 100% 100%,
      rgba(95, 233, 245, 0.16),
      transparent 62%
    );
}
.glass::after {
  content: "";
  position: absolute;
  top: -60%;
  left: -30%;
  width: 55%;
  height: 220%;
  z-index: -1;
  pointer-events: none;
  transform: rotate(18deg);
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.42),
    transparent
  );
  filter: blur(14px);
  opacity: 0;
  transition: opacity 0.5s ease;
  animation: sheen 9s ease-in-out infinite;
}
@keyframes sheen {
  0%,
  100% {
    transform: translateX(-40%) rotate(18deg);
    opacity: 0;
  }
  45% {
    opacity: 0.55;
  }
  70% {
    transform: translateX(320%) rotate(18deg);
    opacity: 0;
  }
}
.glass-strong {
  background: var(--glass-bg-strong);
}

/* Cinematic Stage */
#cinema {
  height: 380vh;
  position: relative;
  background: var(--night-1);
}
.stage {
  position: sticky;
  top: 0;
  height: 100svh;
  overflow: hidden;
}
.bg-night,
.bg-day {
  position: absolute;
  inset: 0;
}
.bg-night {
  background:
    radial-gradient(130% 90% at 50% 18%, #192e4e 0%, #0d1b2e 45%, #050a12 88%),
    linear-gradient(180deg, #070d18 0%, #102036 50%, #1b2c44 100%);
}

.hero-photo {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
}
.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
}
.stage.has-photo .bg-night {
  background:
    linear-gradient(
      180deg,
      rgba(4, 6, 12, 0.62) 0%,
      rgba(11, 20, 55, 0.52) 45%,
      rgba(4, 6, 12, 0.78) 100%
    ),
    radial-gradient(
      120% 90% at 50% 20%,
      rgba(11, 21, 38, 0.3),
      rgba(4, 6, 12, 0.72) 78%
    );
}
.bg-day {
  opacity: 0;
  background: linear-gradient(
    180deg,
    #1353a3 0%,
    #2f7fd6 22%,
    #69adfa 48%,
    #b2d8fc 74%,
    #ffead0 92%,
    #fff4e6 100%
  );
}
.sun {
  position: absolute;
  top: 6%;
  right: 12%;
  width: 48vmin;
  height: 48vmin;
  opacity: 0;
  pointer-events: none;
  background: radial-gradient(
    circle,
    rgba(255, 255, 248, 1) 0%,
    rgba(255, 246, 218, 0.6) 22%,
    rgba(255, 228, 180, 0.22) 44%,
    transparent 70%
  );
  filter: drop-shadow(0 0 45px rgba(255, 210, 140, 0.4));
}
#sky-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-copy {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #f2f7ff;
  padding: 0 20px;
  pointer-events: none;
  will-change: transform, opacity, filter;
  z-index: 4;
}
.hero-copy .eyebrow {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 20px;
  padding: 6px 18px;
  border-radius: var(--r-pill);
  background: rgba(255, 179, 71, 0.12);
  border: 1px solid rgba(255, 179, 71, 0.32);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
}
.hero-copy h1,
.hero-title {
  font-family: var(--display);
  font-weight: 900;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  line-height: 1.05;
  color: #ffffff;
  text-shadow:
    0 4px 28px rgba(4, 6, 14, 0.85),
    0 0 50px rgba(30, 80, 160, 0.3);
}
.hero-brand-name {
  font-size: clamp(2.2rem, 8.5vw, 6.2rem);
  letter-spacing: 0.05em;
  font-weight: 900;
  color: #ffffff;
}
.hero-copy .tagline,
.hero-tagline {
  font-family: var(--body);
  font-size: clamp(1.05rem, 2.3vw, 1.45rem);
  font-weight: 500;
  color: #dbe7f7;
  max-width: 36ch;
  line-height: 1.4;
  letter-spacing: 0.01em;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.7);
}
.hero-copy .sub {
  margin-top: 12px;
  font-size: 14px;
  color: #9ab0cf;
  letter-spacing: 0.04em;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
}

.hero-cta {
  margin-top: 34px;
  display: none;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  pointer-events: auto;
}
body.no-cinema .hero-cta {
  display: flex;
}

.scroll-hint {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  color: #8fa6c8;
  font-size: 10.5px;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  pointer-events: none;
}
.scroll-hint .line {
  width: 1px;
  height: 42px;
  background: linear-gradient(#8fa6c8, transparent);
  animation: drop 2s ease-in-out infinite;
}
@keyframes drop {
  0% {
    transform: scaleY(0.15);
    transform-origin: top;
    opacity: 0.3;
  }
  50% {
    transform: scaleY(1);
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

.skip-intro {
  position: absolute;
  top: calc(env(safe-area-inset-top, 0px) + 84px);
  right: 20px;
  z-index: 8;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--body);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-decoration: none;
  color: #cbdcf3;
  padding: 9px 15px;
  border-radius: var(--r-pill);
  min-height: 38px;
  background: rgba(12, 22, 38, 0.42);
  backdrop-filter: blur(12px) saturate(150%);
  -webkit-backdrop-filter: blur(12px) saturate(150%);
  border: 1px solid rgba(255, 255, 255, 0.16);
  opacity: 0.85;
  transition:
    opacity 0.4s ease,
    transform 0.25s ease,
    background 0.25s ease,
    visibility 0.4s;
}
.skip-intro:hover {
  opacity: 1;
  transform: translateY(-1px);
  background: rgba(12, 22, 38, 0.62);
  color: #fff;
}
.skip-intro .line {
  display: none;
}
.skip-intro.gone {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
body.no-cinema .skip-intro {
  display: none;
}

.window-frame {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 6;
  pointer-events: none;
  opacity: 0;
  width: 19vh;
  height: 30vh;
  margin-left: -9.5vh;
  margin-top: -15vh;
  border-radius: 44% 44% 44% 44% / 40% 40% 40% 40%;
  background: transparent;
  box-shadow:
    0 0 0 1.5vh #e9edf2,
    0 0 0 2.4vh #cbd4de,
    0 0 0 3vh rgba(140, 152, 168, 0.55),
    inset 0 0 3vh rgba(20, 34, 54, 0.35);
  will-change: transform, opacity;
}

#reveal {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  clip-path: inset(50% 50% 50% 50% round 400px);
  background: radial-gradient(
    circle at 50% 30%,
    #12284a 0%,
    #0a162b 48%,
    #04060c 100%
  );
  display: grid;
  place-items: center;
  text-align: center;
  overflow: hidden;
}
#reveal.open {
  pointer-events: auto;
}
#reveal .rcloud {
  position: absolute;
  border-radius: 50%;
  background: rgba(95, 233, 245, 0.22);
  filter: blur(40px);
  opacity: 0.55;
  pointer-events: none;
}
.reveal-inner {
  position: relative;
  max-width: 860px;
  padding: 0 22px;
  will-change: transform, opacity;
}
.reveal-inner .kicker {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 18px;
  background: rgba(95, 233, 245, 0.12);
  border: 1px solid rgba(95, 233, 245, 0.3);
  padding: 6px 16px;
  border-radius: var(--r-pill);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.reveal-inner h2 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.7rem, 4.8vw, 3rem);
  line-height: 1.12;
  letter-spacing: 0.01em;
  color: #ffffff;
}
.reveal-inner .lead {
  margin: 20px auto 0;
  font-size: clamp(1rem, 2vw, 1.18rem);
  color: var(--ink-soft);
  max-width: 56ch;
  line-height: 1.65;
}
.cta-row {
  margin-top: 34px;
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Aurora & Clouds */
.aurora {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}
.aurora span {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.5;
  will-change: transform;
}
.aurora .a1 {
  width: 52vw;
  height: 52vw;
  left: -14vw;
  top: 4%;
  background: radial-gradient(
    circle,
    rgba(95, 233, 245, 0.55),
    transparent 66%
  );
  animation: drift1 30s ease-in-out infinite;
}
.aurora .a2 {
  width: 46vw;
  height: 46vw;
  right: -12vw;
  top: 32%;
  background: radial-gradient(
    circle,
    rgba(138, 123, 255, 0.45),
    transparent 66%
  );
  animation: drift2 36s ease-in-out infinite;
}
.aurora .a3 {
  width: 40vw;
  height: 40vw;
  left: 22%;
  bottom: 2%;
  background: radial-gradient(
    circle,
    rgba(255, 179, 71, 0.38),
    transparent 66%
  );
  animation: drift3 42s ease-in-out infinite;
}
@keyframes drift1 {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(9vw, 7vh) scale(1.14);
  }
}
@keyframes drift2 {
  0%,
  100% {
    transform: translate(0, 0) scale(1.06);
  }
  50% {
    transform: translate(-8vw, -6vh) scale(0.92);
  }
}
@keyframes drift3 {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(6vw, -8vh) scale(1.1);
  }
}

.cloud {
  position: absolute;
  border-radius: 50%;
  background: #fff;
  filter: blur(30px);
  opacity: 0.6;
  pointer-events: none;
  z-index: 0;
  animation: float 30s ease-in-out infinite;
}
@keyframes float {
  0%,
  100% {
    transform: translateX(0);
  }
  50% {
    transform: translateX(70px);
  }
}

/* Keyframes */
@keyframes pulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.5;
    transform: scale(0.82);
  }
}
@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes navIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes railGrow {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}

/* Reduced motion & fallback */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html {
    scroll-behavior: auto !important;
  }
  #cinema {
    height: auto !important;
  }
  .stage {
    position: relative !important;
    height: auto !important;
    min-height: 100svh;
  }
  #sky-canvas,
  .window-frame,
  .scroll-hint {
    display: none !important;
  }
  .bg-day,
  .sun {
    opacity: 1 !important;
  }
  .bg-night {
    opacity: 0 !important;
  }
  .hero-copy {
    position: relative !important;
    inset: auto !important;
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
    min-height: 80svh;
    padding: 100px 20px 60px;
  }
  #reveal {
    position: relative !important;
    inset: auto !important;
    clip-path: none !important;
    pointer-events: auto !important;
    padding: clamp(76px, 10vw, 132px) 20px;
  }
  .reveal-inner {
    opacity: 1 !important;
    transform: none !important;
  }
}
body.no-cinema #cinema {
  height: auto;
}
body.no-cinema .stage {
  position: relative;
  height: auto;
  min-height: 100svh;
}
body.no-cinema #sky-canvas,
body.no-cinema .window-frame,
body.no-cinema .scroll-hint {
  display: none;
}
body.no-cinema .bg-day,
body.no-cinema .sun {
  opacity: 1;
}
body.no-cinema .bg-night {
  opacity: 0;
}
body.no-cinema .hero-copy {
  position: relative;
  inset: auto;
  opacity: 1 !important;
  transform: none !important;
  filter: none !important;
  min-height: 100svh;
}
body.no-cinema #reveal {
  position: relative;
  inset: auto;
  clip-path: none !important;
  pointer-events: auto;
  padding: clamp(76px, 10vw, 132px) 20px;
}
body.no-cinema .reveal-inner {
  opacity: 1 !important;
  transform: none !important;
}

