/* ========================================================================== 
   PARVARESHI — HOME INTRO EXPERIENCE
   Version: 17.0.0

   Source of truth for:
   1) Branded page loader
   2) Temporary launch announcement modal
   3) Static realistic PNG student integrated with the popup

   IMPORTANT
   - No walking/floating student layer exists.
   - The character belongs to the popup stage and never intercepts clicks.
   - The blue decorative line that existed on top of the V12 popup is removed.
   ========================================================================== */

:root {
  --pv-intro-blue: #1769aa;
  --pv-intro-blue-dark: #10558e;
  --pv-intro-ink: #254968;
  --pv-intro-muted: #6e8294;
  --pv-intro-line: #dbe7ef;
  --pv-intro-soft: #f3f8fc;
  --pv-intro-shadow: 0 28px 80px rgba(22, 62, 92, .18);
}

/* --------------------------------------------------------------------------
   1) LOADER
   -------------------------------------------------------------------------- */
.pv-loader {
  position: fixed;
  inset: 0;
  z-index: 10200;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 50% 42%, rgba(23, 105, 170, .08), transparent 31%),
    linear-gradient(180deg, #ffffff 0%, #f9fcfe 100%);
  opacity: 1;
  visibility: visible;
  transition: opacity .38s ease, visibility .38s ease;
  animation: pvLoaderFailsafe 0s linear 4s forwards;
}

.pv-loader::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .32;
  background-image: radial-gradient(rgba(23, 105, 170, .16) .8px, transparent .8px);
  background-size: 18px 18px;
  mask-image: linear-gradient(to bottom, #000, transparent 64%);
}

.pv-loader.is-leaving {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.pv-loader__inner {
  position: relative;
  z-index: 1;
  min-width: min(320px, 82vw);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.pv-loader__mark {
  position: relative;
  width: 132px;
  height: 132px;
  display: grid;
  place-items: center;
  margin-bottom: 18px;
}

.pv-loader__ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(
    from 10deg,
    transparent 0 35%,
    rgba(23, 105, 170, .18) 35% 70%,
    var(--pv-intro-blue) 70% 82%,
    transparent 82% 100%
  );
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 0);
  mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 0);
  animation: pvLoaderSpin 1.25s linear infinite;
}

.pv-loader__logo-shell {
  width: 106px;
  height: 106px;
  display: grid;
  place-items: center;
  padding: 17px;
  border: 1px solid rgba(23, 105, 170, .12);
  border-radius: 32px;
  background: rgba(255,255,255,.96);
  box-shadow: 0 14px 42px rgba(27, 76, 112, .11);
}

.pv-loader__logo-shell img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.pv-loader__title {
  color: var(--pv-intro-ink);
  font-size: 18px;
  font-weight: 800;
  line-height: 1.7;
}

.pv-loader__status {
  margin-top: 2px;
  color: #8595a3;
  font-size: 12px;
  font-weight: 600;
}

.pv-loader__dots {
  direction: ltr;
  display: flex;
  gap: 5px;
  margin-top: 12px;
}

.pv-loader__dots i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--pv-intro-blue);
  opacity: .25;
  animation: pvLoaderDot 1.05s ease-in-out infinite;
}

.pv-loader__dots i:nth-child(2) { animation-delay: .14s; }
.pv-loader__dots i:nth-child(3) { animation-delay: .28s; }

@keyframes pvLoaderSpin { to { transform: rotate(1turn); } }
@keyframes pvLoaderDot {
  0%, 65%, 100% { opacity: .22; transform: translateY(0); }
  28% { opacity: 1; transform: translateY(-4px); }
}
@keyframes pvLoaderFailsafe {
  to { opacity: 0; visibility: hidden; pointer-events: none; }
}

/* --------------------------------------------------------------------------
   2) ANNOUNCEMENT STAGE — V17

   Composition rules
   - Desktop/tablet: student and card intentionally overlap; no visual gap.
   - The student body is behind the card, so the pointing arm disappears
     naturally behind the notice.
   - The small hand PNG is anchored to the CARD shell, not the full stage.
     It therefore always stays on the top edge at every desktop/tablet width.
   - Mobile: only the student's head/upper torso peeks above the card. The
     card itself covers the rest, so no character pixel can obstruct text.
   -------------------------------------------------------------------------- */
body.pv-announcement-open { overflow: hidden; }

.pv-announcement {
  position: fixed;
  inset: 0;
  z-index: 10100;
  display: grid;
  place-items: center;
  padding: 28px;
}

.pv-announcement[hidden] { display: none !important; }

.pv-announcement__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(17, 39, 56, .46);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
  opacity: 0;
  transition: opacity .26s ease;
}

.pv-announcement__stage {
  --pv-card-width: 760px;
  --pv-student-rail: 180px;

  position: relative;
  z-index: 1;
  width: min(calc(var(--pv-student-rail) + var(--pv-card-width)), 100%);
  margin-inline: auto;
  direction: ltr;
}

.pv-announcement__card-shell {
  position: relative;
  z-index: 3;
  width: min(var(--pv-card-width), calc(100% - var(--pv-student-rail)));
  margin-left: var(--pv-student-rail);
  direction: rtl;
}

.pv-announcement__dialog {
  position: relative;
  z-index: 3;
  width: 100%;
  max-height: min(700px, calc(100dvh - 56px));
  overflow: auto;
  direction: rtl;
  padding: 34px 38px 29px;
  border: 1px solid rgba(23, 105, 170, .14);
  border-radius: 28px;
  outline: 0;
  background:
    radial-gradient(circle at 100% 0, rgba(23, 105, 170, .065), transparent 36%),
    #fff;
  box-shadow: var(--pv-intro-shadow);
  opacity: 0;
  transform: translateY(14px) scale(.975);
  transition: opacity .3s ease, transform .3s cubic-bezier(.2,.72,.25,1);
}

.pv-announcement.is-open .pv-announcement__backdrop { opacity: 1; }
.pv-announcement.is-open .pv-announcement__dialog {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.pv-announcement__dialog::before { content: none; }

/* Close button — mathematically centered CSS X. */
.pv-announcement__close {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 8;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(23, 105, 170, .18);
  border-radius: 12px;
  color: var(--pv-intro-blue);
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 5px 16px rgba(18, 65, 99, .12);
  cursor: pointer;
  transition: color .18s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease;
}

.pv-announcement__close:hover,
.pv-announcement__close:focus-visible {
  color: var(--pv-intro-blue);
  border-color: #bfd8e9;
  background: #eef6fc;
  box-shadow: 0 5px 16px rgba(23, 105, 170, .09);
}

.pv-announcement__close::before,
.pv-announcement__close::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 17px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transform-origin: 50% 50%;
}

.pv-announcement__close::before { transform: translate(-50%, -50%) rotate(45deg); }
.pv-announcement__close::after  { transform: translate(-50%, -50%) rotate(-45deg); }
.pv-announcement__close svg { display: none; }

/* Brand lockup — compact and physically grouped. */
.pv-announcement__brand {
  width: max-content;
  max-width: calc(100% - 58px);
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 7px;
  color: #698196;
  font-size: 12px;
  font-weight: 700;
}

.pv-announcement__brand-logo {
  display: block;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  max-width: 44px;
  object-fit: contain;
}

.pv-announcement__brand-label {
  padding-right: 8px;
  border-right: 1px solid #dfe9f0;
  white-space: nowrap;
  line-height: 1.4;
}

.pv-announcement h2 {
  margin: 22px 0 12px;
  color: var(--pv-intro-ink);
  font-size: clamp(24px, 3vw, 31px);
  line-height: 1.55;
  font-weight: 800;
  letter-spacing: -.3px;
}

.pv-announcement h2 span,
.pv-announcement__copy strong { color: var(--pv-intro-blue); }

.pv-announcement__copy {
  width: 100%;
  max-width: 57ch;
  margin: 0;
  color: #526a7e;
  font-size: 15.5px;
  line-height: 2.15;
  font-weight: 550;
  text-align: justify;
  text-align-last: right;
  text-justify: inter-word;
  word-spacing: normal;
  letter-spacing: normal;
  hyphens: none;
}

.pv-announcement__foot {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 24px;
  padding-top: 19px;
  border-top: 1px solid #e6eef4;
  color: #8091a0;
  font-size: 11.5px;
  font-weight: 650;
}

.pv-announcement__foot > span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--pv-intro-blue);
  box-shadow: 0 0 0 5px rgba(23, 105, 170, .08);
}

/* --------------------------------------------------------------------------
   3) STATIC SCHOOLBOY COMPOSITION
   -------------------------------------------------------------------------- */
.pv-announcement__student-photo {
  position: absolute;
  z-index: 2;
  left: -8px;
  bottom: 8px;
  width: 340px;
  height: 620px;
  overflow: visible;
  pointer-events: none;
  opacity: 0;
  transform: translateY(12px) scale(.988);
  transform-origin: 50% 100%;
  transition: opacity .28s ease .06s, transform .36s cubic-bezier(.2,.75,.22,1) .06s;
}

.pv-announcement.is-open .pv-announcement__student-photo {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.pv-announcement__student-body {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: contain;
  object-position: left bottom;
  user-select: none;
  -webkit-user-drag: none;
  filter: drop-shadow(0 18px 28px rgba(14, 43, 64, .14));
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 78%, rgba(0,0,0,.96) 84%, rgba(0,0,0,.70) 90%, rgba(0,0,0,.30) 96%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 78%, rgba(0,0,0,.96) 84%, rgba(0,0,0,.70) 90%, rgba(0,0,0,.30) 96%, transparent 100%);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
}

/* The hand is card-relative, eliminating the old detached/mid-screen bug. */
.pv-announcement__student-hand {
  position: absolute;
  z-index: 7;
  top: -27px;
  left: 58px;
  width: 72px;
  height: auto;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
  opacity: 0;
  transform: translateY(-5px);
  filter: drop-shadow(0 4px 8px rgba(22, 51, 72, .10));
  transition: opacity .22s ease .14s, transform .28s ease .14s;
}

.pv-announcement.is-open .pv-announcement__student-hand {
  opacity: 1;
  transform: translateY(0);
}

/* --------------------------------------------------------------------------
   TABLET — side composition is preserved, but proportionally tightened.
   -------------------------------------------------------------------------- */
@media (max-width: 1099px) and (min-width: 761px) {
  .pv-announcement { padding: 24px; }

  .pv-announcement__stage {
    --pv-card-width: 610px;
    --pv-student-rail: 160px;
  }

  .pv-announcement__student-photo {
    left: -10px;
    bottom: 10px;
    width: 305px;
    height: 590px;
  }

  .pv-announcement__student-hand {
    top: -24px;
    left: 49px;
    width: 64px;
  }

  .pv-announcement__dialog {
    padding: 31px 30px 26px;
    max-height: calc(100dvh - 48px);
  }

  .pv-announcement h2 {
    font-size: clamp(25px, 3.2vw, 29px);
  }
}

/* --------------------------------------------------------------------------
   MOBILE — dedicated composition.

   The character is deliberately NOT placed beside the card on a narrow
   viewport. A reserved area above the card shows only the head/upper torso.
   Everything below the card's top edge remains behind the card, so content,
   close button and brand can never be covered by the student.
   -------------------------------------------------------------------------- */
@media (max-width: 760px) {
  .pv-announcement {
    place-items: center;
    padding: 16px;
  }

  .pv-announcement__stage {
    --pv-card-width: 100%;
    --pv-student-rail: 0px;
    width: min(560px, 100%);
    padding-top: 126px;
    direction: rtl;
  }

  .pv-announcement__card-shell {
    width: 100%;
    margin-left: 0;
  }

  .pv-announcement__dialog {
    width: 100%;
    max-height: calc(100dvh - 92px);
    padding: 28px 23px 23px;
    border-radius: 24px;
  }

  .pv-announcement__student-photo {
    top: 0;
    bottom: auto;
    left: 24px;
    width: 142px;
    height: 250px;
    overflow: visible;
    transform: translateY(8px) scale(.99);
    transform-origin: 50% 100%;
  }

  .pv-announcement.is-open .pv-announcement__student-photo {
    transform: translateY(0) scale(1);
  }

  .pv-announcement__student-body {
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: left top;
    -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 64%, rgba(0,0,0,.88) 73%, rgba(0,0,0,.40) 84%, transparent 100%);
    mask-image: linear-gradient(to bottom, #000 0%, #000 64%, rgba(0,0,0,.88) 73%, rgba(0,0,0,.40) 84%, transparent 100%);
  }

  /* No detached foreground hand on narrow screens. */
  .pv-announcement__student-hand { display: none; }

  .pv-announcement__close {
    top: 8px;
    left: 8px;
    width: 34px;
    height: 34px;
  }

  .pv-announcement__brand {
    min-height: 42px;
    max-width: calc(100% - 48px);
  }

  .pv-announcement__brand-logo {
    flex-basis: 40px;
    width: 40px;
    height: 40px;
    max-width: 40px;
  }

  .pv-announcement h2 {
    margin: 18px 0 10px;
    font-size: 23px;
    line-height: 1.7;
  }

  .pv-announcement__copy {
    max-width: none;
    font-size: 14px;
    line-height: 2.05;
  }
}

@media (max-width: 480px) {
  .pv-loader__mark { width: 112px; height: 112px; }
  .pv-loader__logo-shell { width: 90px; height: 90px; border-radius: 28px; }
  .pv-loader__title { font-size: 16px; }

  .pv-announcement { padding: 12px; }

  .pv-announcement__stage {
    padding-top: 108px;
  }

  .pv-announcement__dialog {
    max-height: calc(100dvh - 70px);
    padding: 24px 19px 20px;
    border-radius: 22px;
  }

  .pv-announcement__student-photo {
    left: 20px;
    width: 122px;
    height: 218px;
  }

  .pv-announcement__brand { gap: 7px; }

  .pv-announcement__brand-logo {
    flex-basis: 36px;
    width: 36px;
    height: 36px;
    max-width: 36px;
  }

  .pv-announcement__brand-label {
    padding-right: 7px;
    font-size: 10.5px;
  }

  .pv-announcement h2 {
    margin-top: 16px;
    font-size: 20px;
    line-height: 1.72;
    padding-left: 14px;
  }

  .pv-announcement__copy {
    font-size: 13.3px;
    line-height: 2.02;
  }

  .pv-announcement__foot {
    margin-top: 18px;
    padding-top: 15px;
  }
}

/* Short mobile/tablet landscape guardrail. */
@media (max-width: 760px) and (max-height: 650px) {
  .pv-announcement__stage { padding-top: 82px; }
  .pv-announcement__student-photo {
    left: 18px;
    width: 96px;
    height: 170px;
  }
  .pv-announcement__dialog {
    max-height: calc(100dvh - 32px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .pv-loader__ring,
  .pv-loader__dots i { animation: none !important; }

  .pv-loader,
  .pv-announcement__backdrop,
  .pv-announcement__dialog,
  .pv-announcement__student-photo,
  .pv-announcement__student-hand {
    transition-duration: .01ms !important;
  }
}

/* Administrator-provided composite PNGs carry their complete visual frame. */
.pv-announcement__stage--composite {
  width: min(92vw, 920px);
  padding-top: 0;
  direction: rtl;
}
.pv-announcement__card-shell--composite {
  width: auto;
  max-width: min(92vw, 920px);
  margin-left: 0;
}
.pv-announcement__dialog--composite {
  overflow: visible;
  width: auto;
  max-width: min(92vw, 920px);
  max-height: calc(100dvh - 32px);
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.pv-announcement__dialog--composite::before,
.pv-announcement__dialog--composite::after {
  display: none;
}
.pv-announcement__composite,
.pv-announcement__composite img {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: calc(100dvh - 32px);
  height: auto;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  object-fit: contain;
}
.pv-announcement__dialog--composite .pv-announcement__close {
  top: 8px;
  left: 8px;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(23, 105, 170, .18);
  border-radius: 12px;
  color: var(--pv-intro-blue);
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 5px 16px rgba(18, 65, 99, .16);
}
.pv-announcement__dialog--composite .pv-announcement__close:hover,
.pv-announcement__dialog--composite .pv-announcement__close:focus-visible {
  color: #0e568f;
  border-color: rgba(23, 105, 170, .38);
  background: #fff;
  box-shadow: 0 7px 20px rgba(18, 65, 99, .22);
}
@media (max-width: 480px) {
  .pv-announcement__dialog--composite .pv-announcement__close {
    top: 6px;
    left: 6px;
    width: 34px;
    height: 34px;
  }
}
