/* Success screen polish + calmer motion + page ambient */

/* ---- flare: one layer behind the whole pop-up, top to bottom ---- */
.rg__dialog--ok { overflow-x: hidden; }
.rg__dialog--ok .ok__rays { position: absolute; inset: 0; left: 0; right: 0; top: 0; height: auto; z-index: 0; overflow: hidden; -webkit-mask-image: none; mask-image: none; transform: none; animation: okFade 1s ease-out both; }
.rg__dialog--ok .ok__rays video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 0; }
@keyframes okFade { from { opacity: 0; } to { opacity: 1; } }
.rg__dialog--ok .ok { z-index: 1; }
.rg__dialog--ok .rg__x { z-index: 6; }
.rg__dialog--ok .rg__demo { position: relative; z-index: 2; }

/* ---- share row: four buttons; hover no longer scales (it was pushing the dialog into scrollbars) ---- */
.ok__social { gap: 18px; }
.ok__s--ig { --n: 2; }
.ok__s--cp { --n: 3; }
.ok__s--ig svg { background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fd5949 45%, #d6249f 60%, #285aeb 90%); }
.ok__s:hover svg { transform: none; box-shadow: 0 8px 16px -8px rgba(10, 52, 140, .55); filter: brightness(1.06); }
.ok__s svg { transition: box-shadow .2s, filter .2s; }
.ok__s:focus-visible svg { outline: 3px solid #0079fd; outline-offset: 2px; }

/* ---- calmer entrance of the success content ---- */
.ok__badge { animation-duration: .6s; }
.ok__title, .ok__sub, .ok__head, .ok__cta, .ok__later { animation-duration: .45s; }
.ok__dates li { animation-duration: .4s; animation-delay: calc(.8s + var(--n, 0) * 80ms); --dx: -14px; }
.ok__ic img { animation-delay: calc(.95s + var(--n, 0) * 80ms); }
.ok__head { animation-delay: 1.2s; }
.ok__s { animation-delay: calc(1.3s + var(--n, 0) * 70ms); }
.ok__cta { animation-delay: 1.55s; }
.ok__later { animation-delay: 1.7s; }
.ok__cta::after { animation-delay: 2.4s; }

/* ---- page ambient (Remotion loop, fixed behind every section) ---- */
.ambient { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.ambient img, .ambient video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ambient video { opacity: 0; transition: opacity 1.2s; }
.ambient video.is-ready { opacity: 1; }

/* ---- very gentle float on section icons (uses `translate`, so entrance transforms are untouched) ---- */
@keyframes calmDrift { 0%, 100% { translate: 0 0; } 50% { translate: 0 -4px; } }
.why__ic img, .other__ic img, .tl__card img, .g__art, .c1__art, .c3__art, .c2__art { animation: calmDrift 7s ease-in-out infinite; }
.why li:nth-child(2) .why__ic img, .other li:nth-child(2) .other__ic img, .tl__step:nth-child(2) .tl__card img { animation-delay: -1.4s; }
.why li:nth-child(3) .why__ic img, .other li:nth-child(3) .other__ic img, .tl__step:nth-child(3) .tl__card img { animation-delay: -2.8s; }
.why li:nth-child(4) .why__ic img, .other li:nth-child(4) .other__ic img, .tl__step:nth-child(4) .tl__card img { animation-delay: -4.2s; }
.tl__step:nth-child(5) .tl__card img { animation-delay: -5.6s; }
.g2 .g__art, .c2__art { animation-delay: -3s; }

@media (prefers-reduced-motion: reduce) {
  .why__ic img, .other__ic img, .tl__card img, .g__art, .c1__art, .c3__art, .c2__art, .rg__dialog--ok .ok__rays { animation: none !important; }
  .ambient video { display: none; }
}

/* demo strip: match the success dialog's padding so it never adds scroll overflow */
.rg__dialog--ok .rg__demo { margin: 22px -28px -26px; }
@media (max-width: 559.98px) { .rg__dialog--ok .rg__demo { margin: 18px -20px -22px; } }

/* ---- dialog chrome: close + back icons sit above the header animation ---- */
.rg__x, .rg__bk { position: absolute; top: 12px; z-index: 7; width: 40px; height: 40px; display: grid; place-items: center; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .94); color: #1b1f5e; cursor: pointer; box-shadow: 0 0 0 1px rgba(10, 52, 140, .08), 0 4px 12px -2px rgba(10, 52, 140, .22); transition: background .15s, box-shadow .15s, color .15s; }
.rg__x { right: 12px; }
.rg__bk { left: 12px; }
.rg__bk[hidden] { display: none; }
.rg__x:hover, .rg__bk:hover { background: #fff; color: #0079fd; box-shadow: 0 0 0 1px rgba(0, 121, 253, .25), 0 6px 14px -3px rgba(10, 52, 140, .3); }
.rg__x:focus-visible, .rg__bk:focus-visible { outline: 3px solid #0079fd; outline-offset: 2px; }
.rg__bk svg { margin-left: -2px; }
.rg__dialog--ok .rg__x { top: 14px; right: 14px; }

/* ---- college chevron: centred on the field whatever its height ---- */
.rg__chev { top: 50%; translate: 0 -50%; }
/* the field's top gap belongs to the wrapper, so the chevron and the list measure from the input itself */
.rg__cb { margin-top: 22px; }
.rg__cb .rg__input { margin-top: 0; }

/* ---- registered state: Explore NPrep (primary) + Share (secondary) + "already registered" ---- */
.reg-only { display: none; }
.is-registered .reg-only { display: flex; }
.is-registered .price--hero, .is-registered .price--banner, .is-registered .price--bar { display: none; }
.reg-extra { align-items: center; justify-content: center; flex-wrap: wrap; gap: 10px 14px; }
.reg-extra--hero { justify-self: center; margin-top: 16px; }
.reg-extra--banner { justify-self: center; margin-top: 16px; }
@media (min-width: 960px) {
  .reg-extra--hero { justify-self: start; justify-content: flex-start; margin-top: clamp(16px, 1.3vw, 28px); }
  .reg-extra--banner { grid-column: 1 / -1; justify-self: start; justify-content: flex-start; margin-top: 18px; }
}
.btn--ghost { gap: 8px; height: 44px; padding: 0 20px; background: #fff; color: #0079fd; font-size: 15px; box-shadow: inset 0 0 0 1.5px #bcd9fd; }
.btn--ghost:hover { filter: none; background: #f2f8ff; }
.reg-note { display: inline-flex; align-items: center; gap: 8px; padding: 6px 4px; border: 0; background: none; font: inherit; font-size: 15px; font-weight: 700; color: #0e7a4d; cursor: pointer; }
.reg-note u { margin-left: 2px; font-weight: 600; color: #0079fd; text-underline-offset: 3px; }
.reg-bar { align-items: center; gap: 8px; margin: 0; font-size: 15px; font-weight: 700; color: #0e7a4d; }
.btn--bar { white-space: nowrap; }

/* ---- success screen: secondary Share button ---- */
.ok__share2 { display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 50px; margin-top: 10px; border: 0; border-radius: 999px; background: #fff; color: #0079fd; font-family: inherit; font-size: 16px; font-weight: 700; cursor: pointer; box-shadow: inset 0 0 0 1.5px #bcd9fd; animation: rgIn .45s var(--rg-out) 1.7s both; --dx: 0px; transition: background .15s; }
.ok__share2:hover { background: #f2f8ff; }
.ok__share2:focus-visible { outline: 3px solid #0079fd; outline-offset: 2px; }
.rg__reset { margin-left: 6px; padding: 0; border: 0; background: none; font: inherit; font-weight: 700; color: #0079fd; text-decoration: underline; cursor: pointer; }
.rg__reset[hidden] { display: none; }
@media (prefers-reduced-motion: reduce) { .ok__share2 { animation: none; } }

/* ---- hero melts into the next section instead of ending on a hard edge (desktop, where the page has the arena ambient) ---- */
.hero { isolation: isolate; background: none; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(100deg, #e6effc 0%, #f1f6fd 52%, #e4edfa 100%); -webkit-mask-image: linear-gradient(#000 calc(100% - 140px), transparent); mask-image: linear-gradient(#000 calc(100% - 140px), transparent); }

/* ---- Share next to Explore NPrep (hero + banner) ---- */
.cta-row { display: contents; }
.is-registered .cta-row { display: flex; align-items: stretch; gap: 12px; width: 100%; margin-top: 26px; }
.is-registered .cta-row .btn--hero, .is-registered .cta-row .btn--banner { margin-top: 0; flex: 1; width: auto; }
.cta-row .btn--ghost { height: auto; padding: 0 22px; font-size: 17px; }
@media (min-width: 960px) {
  .is-registered .cta-row { width: auto; margin-top: clamp(26px, 2vw, 44px); gap: clamp(12px, 1vw, 22px); }
  .is-registered .cta-row .btn--hero { flex: none; width: clamp(236px, 16vw, 380px); }
  .is-registered .cta-row .btn--banner { flex: none; width: clamp(252px, 19vw, 480px); }
  .is-registered .banner__copy .cta-row { grid-column: 1 / -1; margin-top: 40px; }
  .cta-row .btn--ghost { padding: 0 clamp(24px, 1.9vw, 42px); font-size: clamp(16px, 1.2vw, 26px); }
}
.is-registered .reg-extra--hero, .is-registered .reg-extra--banner { margin-top: 14px; }

/* ---- journey: filled last stop; the Remotion comet lights each stop as it passes (--p is set per step by motion.js) ---- */
.tl__step { --p: 0; }
.tl__dot::after { content: ""; position: absolute; inset: -5px; border-radius: 50%; border: 2px solid #077bf6; opacity: 0; animation: dotPing 4.8s ease-out infinite; }
.tl__step:nth-child(2) .tl__dot::after { animation-delay: .9s; } .tl__step:nth-child(3) .tl__dot::after { animation-delay: 1.8s; }
.tl__step:nth-child(4) .tl__dot::after { animation-delay: 2.7s; } .tl__step:nth-child(5) .tl__dot::after { animation-delay: 3.6s; }
@keyframes dotPing { 0% { transform: scale(.6); opacity: .55; } 55%, 100% { transform: scale(2.1); opacity: 0; } }
.tl__rail { position: absolute; left: 0; top: -34px; width: 100%; height: 80px; pointer-events: none; mix-blend-mode: multiply; opacity: 0; transition: opacity .8s; -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 7%, #000 93%, transparent 100%); mask-image: linear-gradient(90deg, transparent 0, #000 7%, #000 93%, transparent 100%); }
.tl__rail.is-ready { opacity: 1; }
.tl.has-rail .tl__dot::after { display: none; }
.tl.has-rail .tl__dot { transform: scale(calc(1 + var(--p) * .55)); box-shadow: 0 0 0 calc(var(--p) * 9px) rgba(7, 123, 246, calc(var(--p) * .16)), 0 0 calc(var(--p) * 18px) rgba(255, 185, 46, calc(var(--p) * .55)); }
.tl.has-rail .tl__card { translate: 0 calc(var(--p) * -6px); box-shadow: 0 calc(6px + var(--p) * 12px) calc(22px + var(--p) * 12px) rgba(30, 60, 120, calc(.07 + var(--p) * .1)); border-color: rgb(calc(232 - var(--p) * 60), calc(237 - var(--p) * 40), 245); }
.tl.has-rail .tl__card img { scale: calc(1 + var(--p) * .07); }
.tl.has-rail .tl__step time { letter-spacing: calc(var(--p) * .02em); }
@media (prefers-reduced-motion: reduce) { .tl__dot::after { display: none; } }
.is-registered .btn--bar { flex: none; max-width: none; padding: 0 20px; font-size: 15px; }
.reg-bar { flex: 1; min-width: 0; font-size: 14px; line-height: 1.25; }

/* ---- share view (the registered pop-up morphs into an invite sheet) ---- */
.rg__dialog--share .rg__prog { display: none; }
.sh__bubble { position: relative; margin: 16px 0 0; padding: 13px 16px 14px; border-radius: 18px 18px 18px 6px; background: #eaf3ff; font-size: 14.5px; line-height: 1.5; color: #0b1440; }
.sh__txt { margin: 0; }
.sh__lnk { display: block; margin-top: 3px; font-size: 13.5px; font-weight: 700; color: #0079fd; word-break: break-all; }
.sh__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px 6px; margin-top: 20px; }
.sh__t { display: grid; justify-items: center; align-content: start; gap: 6px; padding: 0; border: 0; background: none; font: inherit; font-size: 12px; font-weight: 600; color: #4a5266; text-decoration: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.sh__ic { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; transition: box-shadow .2s, filter .2s; }
.sh__t:hover .sh__ic { box-shadow: 0 10px 18px -8px rgba(10, 52, 140, .55); filter: brightness(1.06); }
.sh__t:active .sh__ic { filter: brightness(.94); }
.sh__t:focus-visible { outline: 3px solid #0079fd; outline-offset: 3px; border-radius: 12px; }
.sh__link { display: flex; align-items: center; gap: 10px; margin-top: 20px; padding: 6px 6px 6px 16px; border: 1.5px solid #cfe3fc; border-radius: 16px; background: #fff; }
.sh__url { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14.5px; color: #4a5266; }
.sh__copy { display: inline-flex; align-items: center; gap: 7px; height: 42px; padding: 0 16px; border: 0; border-radius: 12px; background: #0079fd; color: #fff; font: inherit; font-size: 14.5px; font-weight: 700; cursor: pointer; transition: background .2s; }
.sh__copy:focus-visible { outline: 3px solid #0079fd; outline-offset: 2px; }
.sh__copy .ck { display: none; }
.sh__copy.is-done { background: #1faa6b; }
.sh__copy.is-done .cp { display: none; }
.sh__copy.is-done .ck { display: block; animation: shTick .4s var(--rg-spring, ease-out); }
@keyframes shTick { from { transform: scale(.3); opacity: 0; } to { transform: none; opacity: 1; } }
.sh__msg { min-height: 1.4em; margin: 10px 0 0; text-align: center; font-size: 13.5px; font-weight: 600; color: #0e7a4d; }

/* =====================================================================  MOBILE WEB  ===================================================================== */
@media (max-width: 959.98px) {
  html { -webkit-text-size-adjust: 100%; }
  a, button { -webkit-tap-highlight-color: transparent; }
  .btn { min-height: 44px; }
  /* timeline comet runs down the vertical rail (the same Remotion video, turned 90 degrees; --tl-h is set by motion.js) */
  .tl__rail--v { top: 0; left: 0; width: var(--tl-h, 700px); height: 80px; transform-origin: 0 0; transform: translate(46px, 0) rotate(90deg); }
  .tl.has-rail .tl__card { translate: calc(var(--p) * 6px) 0; }
}
@media (max-width: 639.98px) {
  :root { --rhythm: 56px; }
  .sec h2 { text-wrap: balance; }
}
/* sticky bar: price on the left, a button that never clips */
@media (max-width: 759.98px) {
  .sticky-bar { gap: 12px; }
  .sticky-bar .price--bar { flex: 1; min-width: 0; }
  .btn--bar { flex: none; max-width: none; min-width: 156px; padding: 0 20px; white-space: nowrap; }
}
@media (max-width: 380px) { .price--bar strong { font-size: 24px; } .btn--bar { min-width: 140px; padding: 0 16px; font-size: 15px; } }
/* the pop-up is a bottom sheet on phones: grab handle, notch-safe padding */
@media (max-width: 559.98px) {
  .rg__scene::before, .rg__dialog--ok::before { content: ""; position: absolute; top: 8px; left: 50%; z-index: 8; width: 42px; height: 5px; margin-left: -21px; border-radius: 3px; background: rgba(10, 52, 140, .28); }
  .rg__dialog--ok::before { background: rgba(10, 52, 140, .2); }
  .rg__dialog { padding-bottom: calc(26px + env(safe-area-inset-bottom)); overscroll-behavior: contain; }
  .rg__demo { margin-bottom: calc(-26px - env(safe-area-inset-bottom)); padding-bottom: calc(12px + env(safe-area-inset-bottom)); }
  .rg__x, .rg__bk { top: 16px; }
  .rg__dialog--ok .rg__x { top: 18px; }
  .sh__grid { gap: 14px 4px; }
  .sh__ic { width: 54px; height: 54px; }
}

/* ---- scrollbar: locking page scroll for the pop-up must not make the page jump sideways ---- */
html { scrollbar-gutter: stable; }
@supports not (scrollbar-gutter: stable) { .rg-lock { padding-right: var(--sbw, 0px); } }

/* ---- quick share row on the registered screen (same targets as the invite sheet, icon-only) ---- */
.sh__row { display: flex; justify-content: center; gap: 12px; }
.sh__row .sh__t { animation: rgPop .5s var(--rg-spring) both; animation-delay: calc(1.3s + var(--n, 0) * 60ms); position: relative; }
.sh__row .sh__ic { width: 44px; height: 44px; }
.sh__row .sh__t > span:last-child { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (max-width: 559.98px) { .sh__row { gap: 6px; } .sh__row .sh__ic { width: 42px; height: 42px; } }
@media (prefers-reduced-motion: reduce) { .sh__row .sh__t { animation: none; } }



/* =============================  header: nav centred, Register/Share button only after the hero  ============================= */
@media (min-width: 960px) {
  .hdr { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; }
  .hdr__brand { margin: 0; justify-self: start; }
  .hdr__nav { margin: 0; justify-self: center; }
  .hdr .btn--hdr { justify-self: end; }
}
.btn--hdr { opacity: 0; visibility: hidden; pointer-events: none; transform: translateY(-6px); transition: opacity .3s, transform .3s, visibility 0s .3s, filter .15s; }
.hdr.has-cta .btn--hdr { opacity: 1; visibility: visible; pointer-events: auto; transform: none; transition-delay: 0s; }

/* =============================  prices: struck-through list price, and an amount that never out-shouts the button  ============================= */
.price__was { font-weight: 600; color: #8a92a8; text-decoration: line-through; text-decoration-thickness: 2px; text-decoration-color: #e5484d; }
.price--hero, .price--banner, .price--bar { align-items: baseline; gap: 4px 8px; }
.price--hero { font-size: 16px; } .price--hero strong { font-size: 24px; }
.price--banner { font-size: 15px; } .price--banner strong { font-size: 24px; }
.price--bar strong { font-size: 22px; }
.price--hero .price__was, .price--banner .price__was { font-size: 1.05em; }
@media (min-width: 960px) {
  .price--hero { font-size: clamp(15px, 1.05vw, 20px); } .price--hero strong { font-size: clamp(22px, 1.7vw, 34px); }
  .banner__copy .price--banner { grid-column: 1 / -1; align-self: start; justify-self: start; margin: 18px 0 0; flex-direction: row; gap: 4px 10px; }
  .banner__copy .price--banner span { font-size: clamp(15px, 1.05vw, 20px); line-height: 1.2; }
  .banner__copy .price--banner strong { font-size: clamp(22px, 1.7vw, 34px); line-height: 1; }
}
@media (max-width: 959.98px) { .banner__copy .price--banner strong { font-size: 24px; } }

/* =============================  hero: social proof + "Every Participant Gets"  ============================= */
.hero__proof { display: flex; align-items: center; gap: 14px; margin-top: clamp(20px, 1.8vw, 34px); max-width: 30em; }
.hero__avatars { display: flex; flex: none; }
.hero__avatars img { width: 46px; height: 46px; margin-left: -13px; border: 3px solid #fff; border-radius: 50%; object-fit: cover; background: #dbe6f5; box-shadow: 0 4px 12px -4px rgba(10, 52, 140, .4); }
.hero__avatars img:first-child { margin-left: 0; }
.hero__proof p { margin: 0; font-size: 15px; line-height: 1.45; font-weight: 500; color: #4a5266; }
@media (min-width: 960px) { .hero__avatars img { width: clamp(46px, 3.2vw, 62px); height: clamp(46px, 3.2vw, 62px); margin-left: clamp(-16px, -.9vw, -12px); } .hero__proof p { font-size: clamp(15px, 1.05vw, 21px); } }

.hero__perks { position: relative; z-index: 2; width: min(1200px, calc(100% - 2 * var(--g))); margin: 0 auto; padding: clamp(24px, 3.4vw, 52px) 0 clamp(52px, 6vw, 96px); }
@media (min-width: 1600px) { .hero__perks { width: min(1360px, calc(100% - 2 * var(--g))); } }
.hero__perks h2 { text-align: center; font-size: clamp(26px, 2.6vw, 46px); line-height: 1.15; font-weight: 800; letter-spacing: -.02em; }
.hero__perks .cards2 { margin-top: clamp(22px, 2.4vw, 40px); }



/* =====================  hero scene = full-width background (desktop)  =====================
   The scene (picture and Remotion video share the same 1920:842 frame) is sized like background-size: cover and anchored bottom-right,
   so the podium stays in view at any window shape and the left side is calm space for the headline. */
@media (min-width: 960px) {
  .hero__art { inset: 0; left: 0; container-type: size; -webkit-mask-image: linear-gradient(0deg, transparent 0, #000 12%); mask-image: linear-gradient(0deg, transparent 0, #000 12%); }
  .hero__art .hero__photo, .hero__art .hero__loop { position: absolute; inset: auto; right: calc(-1 * min(max(0px, 100cqh * 1920 / 842 - 100cqw), 0.04 * 100cqh * 1920 / 842)); bottom: 0; left: auto; top: auto; width: max(100cqw, calc(100cqh * 1920 / 842)); height: auto; max-width: none; aspect-ratio: 1920 / 842; object-fit: fill; margin: 0; border-radius: 0; box-shadow: none; transform: none; -webkit-mask-image: none; mask-image: none; }
  .hero__art .hero__photo { transform-origin: 100% 100%; }
}


/* header "Download Study Kit": icon + label, shortened on narrow phones */
.btn--hdr .lbl-short { display: none; }
@media (max-width: 479.98px) { .btn--hdr .lbl-long { display: none; } .btn--hdr .lbl-short { display: inline; } }


/* =====================  hero on phones: the portrait scene is the background, the headline sits on its sky  =====================
   The scene (1000 x 1500) fills the top of the hero; the headline + date chip live in its pale sky, the podium sits below them, and the
   buttons / price / social proof follow underneath. --band = height of the scene = 1.5 x the column width. */
.hero__head { display: contents; }
@media (max-width: 959.98px) {
  .hero__stage { --col: min(100vw, 640px); --room: calc(100vh - 64px - 78px); --band: min(calc(var(--col) * 1.5), max(440px, var(--room))); max-width: 640px; margin: 0 auto; }
  @supports (height: 100svh) { .hero__stage { --room: calc(100svh - 64px - 78px); } }
  .hero__art { position: absolute; top: 0; left: 0; right: 0; z-index: 0; height: var(--band); margin: 0; -webkit-mask-image: linear-gradient(0deg, transparent 0, #000 8%); mask-image: linear-gradient(0deg, transparent 0, #000 8%); }
  .hero__art .hero__photo, .hero__art .hero__loop { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; aspect-ratio: auto; object-fit: cover; object-position: 50% 100%; margin: 0; border-radius: 0; box-shadow: none; transform: none; }
  .hero__copy { position: relative; z-index: 2; padding: 22px var(--g) 52px; }
  .hero__head { display: block; width: 100%; min-height: calc(var(--band) - 44px); }
  .hero h1 { font-size: clamp(28px, 8.4vw, 44px); }
  .hero__head .hero__date { margin-top: 20px; }
  .hero__copy .btn--hero { margin-top: 6px; }
}
