/* =========================================================
   AIESEC US 70th Anniversary — Concept 2: "The 70 Portal"
   Loaded AFTER the existing Webflow and anniversary styles.
   ========================================================= */

.page-70th-anniversary {
  --portal-navy: #0a1628;
  --portal-navy-deep: #06101d;
  --portal-red: #c8102e;
  --portal-red-bright: #e11d3f;
  --portal-blue: #002868;
  --portal-blue-bright: #037ef3;
  --portal-white: #ffffff;
}

/* The existing fireworks fight the portal concept, so hide them in this prototype. */
.page-70th-anniversary .anniversary-fireworks-canvas {
  display: none !important;
}

.page-70th-anniversary .anniversary-portal-hero {
  position: relative;
  display: block;
  height: 360svh;
  min-height: 360svh;
  overflow: visible;
  background:
    radial-gradient(ellipse at 17% 48%, rgba(200,16,46,.13) 0%, transparent 47%),
    radial-gradient(ellipse at 82% 48%, rgba(3,126,243,.18) 0%, transparent 50%),
    linear-gradient(120deg, #0b1729 0%, #081426 55%, #071220 100%);
}

.page-70th-anniversary .anniversary-portal-hero__sticky {
  position: sticky;
  top: 0;
  isolation: isolate;
  width: 100%;
  height: 100svh;
  min-height: 650px;
  overflow: hidden;
}

.page-70th-anniversary .anniversary-portal-layout {
  position: relative;
  z-index: 4;
  height: 100svh !important;
  min-height: 650px !important;
  max-height: none !important;
  overflow: visible !important;
}

.page-70th-anniversary .anniversary-portal-copy {
  position: relative;
  z-index: 8;
  transform-origin: center center;
  will-change: opacity, transform;
}

.page-70th-anniversary .portal-title-line {
  display: block;
  overflow: hidden;
  padding-bottom: .025em;
}

.page-70th-anniversary .portal-title-line > span {
  display: block;
  opacity: 0;
  transform: translateY(115%);
  transition:
    transform .82s cubic-bezier(.16,1,.3,1),
    opacity .48s ease;
}

.page-70th-anniversary .portal-title-line:nth-child(2) > span { transition-delay: 80ms; }
.page-70th-anniversary .portal-title-line:nth-child(3) > span { transition-delay: 155ms; }
.page-70th-anniversary .portal-title-line:nth-child(4) > span { transition-delay: 225ms; }

.page-70th-anniversary [data-portal-enter] {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity .64s ease,
    transform .78s cubic-bezier(.16,1,.3,1);
}

.page-70th-anniversary .portal-eyebrow { transition-delay: 110ms; }
.page-70th-anniversary .portal-description { transition-delay: 375ms; }
.page-70th-anniversary .portal-date { transition-delay: 455ms; }
.page-70th-anniversary .portal-cta { transition-delay: 525ms; }

.page-70th-anniversary .anniversary-portal-hero.is-intro-ready .portal-title-line > span,
.page-70th-anniversary .anniversary-portal-hero.is-intro-ready [data-portal-enter] {
  opacity: 1;
  transform: translateY(0);
}

/* =========================
   THE LARGE 70
   ========================= */

.page-70th-anniversary .anniversary-portal-stage {
  --portal-seven-size: clamp(15rem, 25vw, 29rem);
  position: relative;
  width: 46%;
  max-width: 34em;
  height: min(77svh, 48em);
  max-height: 770px;
  padding: 0;
  margin-right: 0;
  flex-shrink: 0;
  justify-content: center;
  align-items: center;
  overflow: visible;
  transform-origin: center center;
  will-change: transform;
}

.page-70th-anniversary .portal-ambient {
  position: absolute;
  z-index: -2;
  width: 64%;
  aspect-ratio: 1;
  border-radius: 50%;
  filter: blur(58px);
  opacity: .34;
  pointer-events: none;
  will-change: transform, opacity;
}

.page-70th-anniversary .portal-ambient--red {
  left: -2%;
  top: 24%;
  background: rgba(200,16,46,.34);
}

.page-70th-anniversary .portal-ambient--blue {
  right: -7%;
  top: 22%;
  background: rgba(3,126,243,.39);
}

.page-70th-anniversary .portal-seven {
  position: absolute;
  z-index: 2;
  left: 0%;
  top: 43%;
  transform: translateY(-50%) rotate(-1deg);
  transform-origin: right center;
  color: var(--portal-red);
  font-family: "Lato", Arial, sans-serif;
  font-size: var(--portal-seven-size);
  font-weight: 900;
  line-height: .72;
  letter-spacing: -.13em;
  user-select: none;
  pointer-events: none;
  opacity: 0;
  text-shadow:
    0 20px 44px rgba(0,0,0,.36),
    0 0 30px rgba(200,16,46,.17);
  will-change: opacity, transform;
}

/* Oval portal during decade exploration — full size, matches original 7+0 pairing */
.page-70th-anniversary .portal-zero {
  position: absolute;
  z-index: 5;
  right: 0%;
  top: 43%;
  width: clamp(15em, 22vw, 24.5em);
  aspect-ratio: .76;
  opacity: 0;
  transform: translateY(-50%) scale(.86);
  transform-origin: left center;
  pointer-events: auto;
  will-change: opacity, transform, width, height;
}

.page-70th-anniversary .portal-zero__rim {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  pointer-events: none;
  transition: -webkit-mask .55s ease, mask .55s ease;
}

/* Solid oval during scroll — the photo window sits on top and covers the center */
.page-70th-anniversary .portal-zero__rim--outer {
  z-index: 1;
  background:
    radial-gradient(ellipse at 38% 29%, rgba(255,255,255,.18), transparent 24%),
    linear-gradient(145deg, #0a438f 0%, #037ef3 33%, #063478 54%, #001b48 79%, #07275c 100%);
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.13),
    inset -19px -23px 34px rgba(0,0,0,.31),
    inset 15px 12px 25px rgba(255,255,255,.07),
    0 27px 67px rgba(0,0,0,.34),
    0 0 46px rgba(3,126,243,.2);
}

/* Finale: identical oval rim, center cut out so the background shows through */
.page-70th-anniversary .portal-zero.is-ring .portal-zero__rim--outer {
  -webkit-mask: radial-gradient(ellipse closest-side, transparent 65.5%, #000 66.5%);
  mask: radial-gradient(ellipse closest-side, transparent 65.5%, #000 66.5%);
}

.page-70th-anniversary .portal-zero.is-ring .portal-window {
  opacity: 0;
  visibility: hidden;
}

.page-70th-anniversary .portal-window {
  position: absolute;
  z-index: 3;
  inset: 17%;
  overflow: hidden;
  border-radius: 50%;
  background: transparent;
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.08),
    0 0 20px rgba(3,126,243,.15);
  --portal-shine-x: 35%;
  --portal-shine-y: 26%;
}

.page-70th-anniversary .portal-photo-stack,
.page-70th-anniversary .portal-photo {
  position: absolute;
  inset: 0;
}

.page-70th-anniversary .portal-photo {
  margin: 0;
  opacity: 0;
  transform: scale(1.02);
  transition: none;
  pointer-events: none;
}

.page-70th-anniversary .portal-photo.is-active {
  opacity: 1;
  transform: scale(1);
}

.page-70th-anniversary .portal-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: contrast(1.04);
}

/* Caption-only darkening — keep image faces readable */
.page-70th-anniversary .portal-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(4, 10, 20, .92) 0%,
    rgba(4, 10, 20, .55) 22%,
    rgba(4, 10, 20, .08) 48%,
    transparent 68%
  );
  pointer-events: none;
}

.page-70th-anniversary .portal-photo figcaption {
  position: absolute;
  z-index: 5;
  left: 9%;
  right: 9%;
  bottom: 10%;
  color: #fff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, .55);
}

.page-70th-anniversary .portal-photo__year {
  display: block;
  color: #fff;
  font-size: clamp(2rem, 3.2vw, 3.5rem);
  font-weight: 900;
  line-height: .95;
  letter-spacing: -.04em;
}

.page-70th-anniversary .portal-photo__caption {
  display: block;
  max-width: 22em;
  margin-top: .42em;
  color: rgba(255, 255, 255, .95);
  font-size: clamp(.72rem, 1vw, .92rem);
  font-weight: 600;
  line-height: 1.35;
}

.page-70th-anniversary .portal-lens-shine {
  position: absolute;
  z-index: 7;
  inset: -17%;
  background:
    radial-gradient(circle at var(--portal-shine-x) var(--portal-shine-y),
      rgba(255,255,255,.14) 0%,
      rgba(255,255,255,.04) 14%,
      transparent 38%);
  mix-blend-mode: screen;
  pointer-events: none;
}

/* Clickable years orbit the 0. */
.page-70th-anniversary .portal-year-orbit {
  position: absolute;
  z-index: 12;
  inset: -9%;
  pointer-events: none;
}

.page-70th-anniversary .portal-year-orbit button {
  position: absolute;
  margin: 0;
  padding: .25em .35em;
  border: 0;
  background: transparent;
  color: rgba(255,255,255,.42);
  font: 700 .61rem/1 "Lato", Arial, sans-serif;
  letter-spacing: .08em;
  cursor: pointer;
  pointer-events: auto;
  transition:
    color .25s ease,
    transform .25s ease,
    text-shadow .25s ease,
    opacity .25s ease;
}

.page-70th-anniversary .portal-year-orbit button:hover,
.page-70th-anniversary .portal-year-orbit button:focus-visible,
.page-70th-anniversary .portal-year-orbit button.is-active {
  color: #fff;
  transform: scale(1.13);
  text-shadow: 0 0 13px rgba(3,126,243,.68);
}

.page-70th-anniversary .portal-year-orbit button:nth-child(1) { left: 2%; top: 54%; }
.page-70th-anniversary .portal-year-orbit button:nth-child(2) { left: 13%; top: 18%; }
.page-70th-anniversary .portal-year-orbit button:nth-child(3) { left: 47%; top: 0%; }
.page-70th-anniversary .portal-year-orbit button:nth-child(4) { right: 7%; top: 21%; }
.page-70th-anniversary .portal-year-orbit button:nth-child(5) { right: -2%; top: 59%; }
.page-70th-anniversary .portal-year-orbit button:nth-child(6) { left: 43%; bottom: 0%; }

/* Typographic lockup below the 70 */
.page-70th-anniversary .portal-wordmark {
  position: absolute;
  z-index: 14;
  left: 50%;
  bottom: 4%;
  width: 92%;
  max-width: 22em;
  opacity: 0;
  transform: translateX(-50%) translateY(12px);
  text-align: center;
  pointer-events: none;
  will-change: opacity, transform;
}

.page-70th-anniversary .portal-wordmark__anniversary {
  font-family: "Lato", Arial, sans-serif;
  font-size: clamp(.95rem, 1.85vw, 1.35rem);
  font-weight: 900;
  letter-spacing: .34em;
  line-height: 1;
  text-indent: .34em;
  text-transform: uppercase;
  background: linear-gradient(
    90deg,
    var(--portal-red) 0%,
    var(--portal-red) 38%,
    var(--portal-blue-bright) 52%,
    var(--portal-blue-bright) 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 4px 14px rgba(0, 0, 0, .38));
}

.page-70th-anniversary .portal-wordmark__leadership {
  position: relative;
  margin-top: .62em;
  padding: 0 12%;
  color: rgba(255, 255, 255, .84);
  font-family: "Lato", Arial, sans-serif;
  font-size: clamp(.48rem, .74vw, .58rem);
  font-weight: 700;
  letter-spacing: .32em;
  line-height: 1;
  text-transform: uppercase;
}

.page-70th-anniversary .portal-wordmark__leadership::before,
.page-70th-anniversary .portal-wordmark__leadership::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 14%;
  height: 1px;
  background: rgba(255, 255, 255, .32);
}

.page-70th-anniversary .portal-wordmark__leadership::before { left: 0; }
.page-70th-anniversary .portal-wordmark__leadership::after { right: 0; }

.page-70th-anniversary .anniversary-portal-hero.is-finale .anniversary-portal-copy {
  visibility: hidden;
  pointer-events: none;
}

.page-70th-anniversary .portal-progress {
  position: absolute;
  z-index: 22;
  right: -2.2em;
  top: 50%;
  width: 2px;
  height: 9em;
  transform: translateY(-50%);
  background: rgba(255,255,255,.12);
  pointer-events: none;
}

.page-70th-anniversary .portal-progress span {
  display: block;
  width: 100%;
  height: 0%;
  background: linear-gradient(var(--portal-red),var(--portal-blue-bright));
  box-shadow: 0 0 9px rgba(3,126,243,.36);
}

.page-70th-anniversary .portal-scroll-cue {
  position: absolute;
  z-index: 25;
  left: 50%;
  bottom: 1.45em;
  display: flex;
  align-items: center;
  gap: .85em;
  transform: translateX(-50%);
  color: rgba(255,255,255,.52);
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  pointer-events: none;
}

.page-70th-anniversary .portal-scroll-cue__track {
  position: relative;
  width: 4.8em;
  height: 1px;
  overflow: hidden;
  background: rgba(255,255,255,.16);
}

.page-70th-anniversary .portal-scroll-cue__track span {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg,var(--portal-red),var(--portal-blue-bright));
  transform: translateX(-100%);
  animation: portalCue 1.8s ease-in-out infinite;
}

@keyframes portalCue {
  0% { transform: translateX(-100%); }
  55%,100% { transform: translateX(100%); }
}

.page-70th-anniversary .portal-cursor-canvas {
  position: absolute;
  z-index: 3;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* =========================
   TABLET / MOBILE
   ========================= */

@media screen and (max-width: 1180px) and (min-width: 992px) {
  .page-70th-anniversary .anniversary-portal-stage {
    width: 43%;
    max-width: 29em;
    --portal-seven-size: clamp(13rem, 23vw, 23rem);
  }

  .page-70th-anniversary .portal-seven {
    font-size: clamp(13rem, 23vw, 23rem);
  }

  .page-70th-anniversary .portal-zero {
    width: clamp(13em, 21vw, 20em);
  }
}

html.is-portal-scroll-lock,
html.is-portal-scroll-lock body {
  overflow: hidden !important;
  overscroll-behavior: none;
  height: 100%;
}

@media screen and (max-width: 991px) {
  /* Locked single viewport — gestures scrub the story; page scroll unlocks at the end */
  .page-70th-anniversary .anniversary-portal-hero.anniversary-hero {
    display: block;
    height: 100svh !important;
    min-height: 100svh !important;
    max-height: 100svh !important;
  }

  .page-70th-anniversary .anniversary-portal-hero__sticky {
    position: relative;
    top: 0;
    height: 100svh;
    min-height: 100svh;
    overflow: hidden;
  }

  .page-70th-anniversary .anniversary-portal-layout.container_em.hero {
    display: block !important;
    position: relative;
    height: 100svh !important;
    min-height: 100svh !important;
    max-height: 100svh !important;
    padding: 0 !important;
    overflow: hidden !important;
    text-align: center;
  }

  .page-70th-anniversary .anniversary-portal-copy.flex-hero.product {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: min(90vw, 22em);
    max-width: 22em;
    max-height: calc(100svh - 7.5em);
    margin: 0;
    z-index: 10;
    pointer-events: auto;
    transform-origin: center center;
    isolation: isolate;
    overflow: visible;
  }

  .page-70th-anniversary .anniversary-portal-copy .flex-vertical-stretch.full-left {
    align-items: center !important;
    gap: .55em;
  }

  .page-70th-anniversary .anniversary-portal-copy .p-1rem,
  .page-70th-anniversary .anniversary-portal-copy .portal-title,
  .page-70th-anniversary .anniversary-portal-copy .portal-description,
  .page-70th-anniversary .anniversary-portal-copy .portal-date {
    text-align: center;
    width: 100%;
  }

  .page-70th-anniversary .anniversary-portal-copy .portal-eyebrow {
    margin-bottom: 0;
    font-size: .85rem;
  }

  .page-70th-anniversary .anniversary-portal-copy .portal-description {
    font-size: .88rem;
    line-height: 1.35;
    margin: 0;
  }

  .page-70th-anniversary .anniversary-portal-copy .portal-date {
    font-size: .9rem;
    margin: 0;
  }

  .page-70th-anniversary .anniversary-portal-copy .portal-title-line > span {
    margin-left: auto;
    margin-right: auto;
  }

  .page-70th-anniversary .anniversary-portal-copy .hero-cta.portal-cta {
    align-items: center;
    width: 100%;
    max-width: 18em;
    margin: .35em auto 0;
    gap: .55em;
  }

  .page-70th-anniversary .anniversary-portal-copy .hero-cta .w-button {
    text-align: center;
    padding-top: .7em;
    padding-bottom: .7em;
  }

  .page-70th-anniversary .portal-title {
    font-size: clamp(1.35rem, 5.6vw, 2rem);
    line-height: 1.12;
    margin: 0;
  }

  .page-70th-anniversary .anniversary-portal-stage.image-hero.product {
    position: absolute !important;
    left: 50% !important;
    top: 50% !important;
    right: auto !important;
    /* Tight stage so 7 and 0 nest like desktop */
    width: min(88vw, 22em) !important;
    padding-right: 0 !important;
    margin: 0 !important;
    transform: translate(-50%, -50%);
    z-index: 2;
    opacity: 0;
    visibility: hidden;
    height: min(58svh, 28em);
    max-height: none;
    --portal-seven-size: clamp(12.5rem, 42vw, 17.5rem);
  }

  .page-70th-anniversary .anniversary-portal-hero.is-finale .anniversary-portal-copy {
    visibility: hidden;
  }

  /* Journey nest: 7 tucked under the oval (like desktop start) */
  .page-70th-anniversary .portal-seven {
    left: -2%;
    top: 46%;
    z-index: 2;
    font-size: clamp(12.5rem, 42vw, 17.5rem);
    letter-spacing: -.16em;
  }

  .page-70th-anniversary .portal-zero {
    right: -4%;
    top: 46%;
    z-index: 5;
    width: clamp(12.5em, 58%, 16.5em);
  }

  /* Finale: open spacing like desktop lockup */
  .page-70th-anniversary .anniversary-portal-hero.is-finale .portal-seven {
    left: 2%;
    letter-spacing: -.12em;
  }

  .page-70th-anniversary .anniversary-portal-hero.is-finale .portal-zero {
    right: 2%;
  }

  .page-70th-anniversary .portal-wordmark {
    z-index: 14;
    bottom: 4%;
    width: 96%;
    max-width: 20em;
  }

  .page-70th-anniversary .portal-year-orbit {
    inset: -10%;
  }

  .page-70th-anniversary .anniversary-portal-hero.is-finale .portal-year-orbit {
    opacity: 0 !important;
    visibility: hidden !important;
  }

  .page-70th-anniversary .portal-wordmark__anniversary {
    font-size: clamp(.85rem, 3.6vw, 1.15rem);
    letter-spacing: .22em;
    text-indent: .22em;
  }

  .page-70th-anniversary .portal-wordmark__leadership {
    font-size: clamp(.45rem, 2.4vw, .55rem);
    letter-spacing: .2em;
    padding: 0 8%;
  }

  .page-70th-anniversary .portal-cursor-canvas {
    display: none;
  }

  .page-70th-anniversary .portal-scroll-cue {
    left: 50%;
    bottom: 1.1em;
    top: auto;
    transform: translateX(-50%);
    font-size: .58rem;
  }

  .page-70th-anniversary .portal-progress {
    right: .75em;
    top: 50%;
    transform: translateY(-50%);
    height: 6em;
  }

  .page-70th-anniversary .portal-year-orbit button {
    font-size: .58rem;
  }

  .page-70th-anniversary .portal-photo__year {
    font-size: clamp(1.75rem, 8vw, 2.6rem);
  }
}

@media screen and (max-width: 767px) {
  .page-70th-anniversary .portal-title {
    font-size: clamp(1.25rem, 5.8vw, 1.75rem);
  }

  .page-70th-anniversary .anniversary-portal-copy .portal-description {
    font-size: .82rem;
  }

  .page-70th-anniversary .anniversary-portal-stage.image-hero.product {
    width: min(92vw, 20em) !important;
    height: min(54svh, 24em);
    --portal-seven-size: clamp(11.5rem, 44vw, 15.5rem);
  }

  .page-70th-anniversary .portal-seven {
    left: -4%;
    top: 46%;
    font-size: clamp(11.5rem, 44vw, 15.5rem);
    letter-spacing: -.18em;
  }

  .page-70th-anniversary .portal-zero {
    right: -6%;
    top: 46%;
    width: clamp(11.5em, 60%, 15em);
  }

  .page-70th-anniversary .portal-wordmark {
    bottom: 4%;
    max-width: 16em;
  }

  .page-70th-anniversary .portal-wordmark__anniversary {
    letter-spacing: .18em;
    text-indent: .18em;
  }

  .page-70th-anniversary .portal-wordmark__leadership {
    letter-spacing: .16em;
    margin-top: .5em;
  }

  .page-70th-anniversary .portal-photo__caption {
    display: none;
  }

  .page-70th-anniversary .portal-photo__year {
    font-size: clamp(1.5rem, 7vw, 2.25rem);
  }

  .page-70th-anniversary .portal-year-orbit {
    inset: -6%;
  }

  .page-70th-anniversary .portal-year-orbit button {
    font-size: .48rem;
  }
}

/* Accessible fallback */
@media (prefers-reduced-motion: reduce) {
  .page-70th-anniversary .anniversary-portal-hero {
    height: auto;
    min-height: 100svh;
  }

  .page-70th-anniversary .anniversary-portal-hero__sticky {
    position: relative;
    height: auto;
    min-height: 100svh;
  }

  .page-70th-anniversary .portal-title-line > span,
  .page-70th-anniversary [data-portal-enter] {
    opacity: 1 !important;
    transform: none !important;
  }

  .page-70th-anniversary .portal-seven,
  .page-70th-anniversary .portal-zero,
  .page-70th-anniversary .portal-wordmark {
    opacity: 1 !important;
    display: block !important;
  }

  .page-70th-anniversary .portal-cursor-canvas,
  .page-70th-anniversary .portal-scroll-cue,
  .page-70th-anniversary .portal-progress,
  .page-70th-anniversary .portal-year-orbit {
    display: none !important;
  }
}
