/* ======================================================
   Sayonara_Alice.exe — v72.03
   Dual synchronized living-memory gateway
   ------------------------------------------------------
   Desktop: two complete 4:5 memories, side by side.
   Mobile/tablet: one complete memory at a time.
   The two desktop lanes share one five-second master clock.
====================================================== */

.v72-opening {
  --v72-opening-poster-a: var(--v72-opening-poster);
  --v72-opening-poster-b: var(--v72-opening-poster);
  --v72-dual-gap: clamp(6px, .62vw, 12px);
}

/* Two softly blurred memory fields fill the parts of the viewport that
   portrait media cannot cover, without cropping the actual videos. */
.v72-opening-ambient {
  inset: -12%;
  opacity: .7;
  background-image: var(--v72-opening-poster-a);
  background-size: cover;
  background-repeat: no-repeat;
  filter:
    blur(44px)
    brightness(var(--v72-adaptive-ambient-brightness))
    saturate(1.3)
    contrast(1.08);
  transform: scale(1.18);
  transition: opacity .58s ease, filter .72s ease, background-image .2s linear;
}

.v72-opening-ambient--a {
  right: 35%;
  background-image:
    linear-gradient(90deg, rgb(2 4 11 / .76), rgb(2 4 11 / .06)),
    var(--v72-opening-poster-a);
  background-position: center;
}

.v72-opening-ambient--b {
  left: 35%;
  background-image:
    linear-gradient(90deg, rgb(2 4 11 / .05), rgb(2 4 11 / .45)),
    var(--v72-opening-poster-b);
  background-position: center;
}

.v72-dual-memory-stage {
  position: absolute;
  z-index: 3;
  top: 50%;
  right: clamp(8px, 1.1vw, 22px);
  height: min(94vh, 1000px);
  height: min(94svh, 1000px);
  aspect-ratio: 1040 / 686;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--v72-dual-gap);
  transform: translateY(-50%) perspective(1800px) rotateY(-.45deg);
  transform-origin: 76% 50%;
  opacity: 0;
  animation: v72DualStageReveal 1.2s var(--v72-ease) .08s forwards;
  transition: transform 1.05s var(--v72-ease), filter .55s ease, opacity .45s ease;
  filter: saturate(1.04) contrast(1.025);
  will-change: transform, filter;
}

.v72-memory-lane,
.v72-video-portal {
  position: relative;
  min-width: 0;
  width: 100%;
  height: 100%;
}

.v72-memory-lane {
  overflow: hidden;
  border-radius: clamp(8px, .8vw, 15px);
  box-shadow:
    0 38px 105px rgb(0 0 0 / .48),
    0 0 74px rgb(34 116 255 / .13),
    0 0 0 1px rgb(143 242 255 / .075);
  background: #02040b;
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 1.7%, #000 98.3%, transparent 100%);
  mask-image: linear-gradient(180deg, transparent 0%, #000 1.7%, #000 98.3%, transparent 100%);
}

.v72-memory-lane--a .v72-video-portal {
  background: #02040b var(--v72-opening-poster-a) center / contain no-repeat;
}

.v72-memory-lane--b .v72-video-portal {
  background: #02040b var(--v72-opening-poster-b) center / contain no-repeat;
}

.v72-video-portal {
  inset: auto;
  top: auto;
  left: auto;
  aspect-ratio: auto;
  overflow: hidden;
  border-radius: inherit;
  box-shadow: none;
  transform: none;
  opacity: 1;
  animation: none;
  filter: brightness(var(--v72-adaptive-portal-brightness)) saturate(1.03) contrast(1.025);
  transition: filter .72s ease;
}

.v72-opening-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  object-position: 50% 50%;
  opacity: 0;
  transform: scale(1.002);
  transition: opacity .54s ease, transform .9s var(--v72-ease), filter .54s ease;
  filter: brightness(.98);
}

.v72-opening-video.is-visible {
  opacity: 1;
  transform: scale(1);
  filter: brightness(1);
}

.v72-opening.is-video-poster .v72-opening-video,
.v72-opening.is-video-fallback .v72-opening-video {
  opacity: 0;
}

.v72-opening.is-memory-switching .v72-dual-memory-stage {
  filter: saturate(1.12) contrast(1.035) brightness(1.035);
}

.v72-video-sheen {
  background:
    linear-gradient(118deg, rgb(255 255 255 / .055), transparent 18%, transparent 77%, rgb(50 165 255 / .06)),
    linear-gradient(180deg, rgb(0 0 0 / .015), transparent 73%, rgb(0 0 0 / .16));
}

.v72-video-edge {
  border-radius: inherit;
  box-shadow:
    inset 0 0 0 1px rgb(167 248 255 / .06),
    inset 0 0 26px rgb(0 0 0 / .1),
    inset 0 -36px 46px rgb(0 0 0 / .15);
}

/* The copy remains readable while the first memory is allowed to continue
   underneath it. The dark support is a gradient, not a card. */
.v72-opening::before {
  background:
    linear-gradient(
      90deg,
      rgb(1 3 10 / calc(var(--v72-adaptive-shadow) + .08)) 0%,
      rgb(1 3 10 / calc(var(--v72-adaptive-shade) + .06)) 28%,
      rgb(1 3 10 / .5) 43%,
      rgb(1 3 10 / .11) 62%,
      rgb(1 3 10 / .18) 100%
    ),
    linear-gradient(180deg, rgb(0 0 0 / .34), transparent 18%, transparent 77%, rgb(0 0 0 / .88));
}

.v72-opening-shell {
  width: min(1800px, 100%);
  grid-template-columns: minmax(390px, .78fr) minmax(560px, 1.22fr);
  column-gap: clamp(1rem, 2.4vw, 3.8rem);
  padding-left: clamp(2rem, 5.15vw, 6.6rem);
  padding-right: clamp(1rem, 2.4vw, 3rem);
}

.v72-opening-copy {
  z-index: 10;
  max-width: min(640px, 47vw);
  padding-top: clamp(3rem, 8vh, 6rem);
  padding-bottom: clamp(3rem, 7vh, 5rem);
}

.v72-opening-copy::before {
  inset: -3.2rem -5.5rem -3rem -3.5rem;
  background: radial-gradient(
    ellipse at 24% 49%,
    rgb(1 4 12 / .99) 0%,
    rgb(1 4 12 / .78) 38%,
    rgb(1 4 12 / .37) 59%,
    transparent 82%
  );
  filter: blur(15px);
}

.v72-title-sayonara {
  font-size: clamp(3.35rem, 6.6vw, 7.5rem);
}

.v72-title-alice {
  font-size: clamp(4rem, 8vw, 9rem);
}

.v72-opening-side {
  display: none !important;
}

.v72-memory-now {
  color: rgb(139 239 255 / .58);
}

body.is-entering .v72-dual-memory-stage {
  transform: translateY(-50%) perspective(1600px) rotateY(0deg) scale(1.025);
  filter: brightness(1.07) saturate(1.1) contrast(1.035);
}

body.is-entering .v72-opening-video.is-visible {
  transform: scale(1.018);
}

@keyframes v72DualStageReveal {
  from {
    opacity: 0;
    transform: translateY(-48%) perspective(1800px) rotateY(-2deg) scale(.965);
    filter: brightness(.5) saturate(.8) contrast(1.08);
  }
  to {
    opacity: 1;
    transform: translateY(-50%) perspective(1800px) rotateY(-.45deg) scale(1);
  }
}

/* Compact desktops still receive the dual-memory composition. */
@media (min-width: 1101px) and (max-width: 1440px) {
  .v72-dual-memory-stage {
    height: min(92svh, 860px);
    right: 6px;
  }

  .v72-opening-shell {
    grid-template-columns: minmax(375px, .77fr) minmax(540px, 1.23fr);
    padding-left: clamp(2rem, 4.9vw, 4.6rem);
    padding-right: 1rem;
  }

  .v72-opening-copy {
    max-width: 47vw;
  }

  .v72-title-sayonara {
    font-size: clamp(3.25rem, 6.45vw, 6.4rem);
  }

  .v72-title-alice {
    font-size: clamp(3.9rem, 7.8vw, 7.8rem);
  }
}

@media (min-width: 1101px) and (max-height: 760px) {
  .v72-dual-memory-stage {
    height: 92svh;
  }

  .v72-opening-copy {
    padding-top: 2.2rem;
    padding-bottom: 2.2rem;
  }

  .v72-opening-kicker { margin-bottom: .95rem; }
  .v72-opening-subtitle { margin-top: 1.15rem; line-height: 1.45; }
  .v72-opening-actions { margin-top: 1.25rem; }
}

/* Tablet and mobile deliberately show one complete memory. Two portrait
   videos would become decorative thumbnails and lose Alice's expression. */
@media (max-width: 1100px) {
  .v72-opening::before {
    background:
      linear-gradient(180deg, rgb(2 4 11 / .16) 0%, rgb(2 4 11 / .06) 31%, rgb(2 4 11 / .72) 62%, rgb(2 4 11 / .99) 100%),
      linear-gradient(90deg, rgb(2 4 11 / .18), transparent 72%);
  }

  .v72-opening-ambient--a {
    inset: -12%;
    right: -12%;
  }

  .v72-opening-ambient--b,
  .v72-memory-lane--b {
    display: none !important;
  }

  .v72-dual-memory-stage {
    top: 31%;
    left: 50%;
    right: auto;
    width: min(94vw, 490px);
    height: auto;
    aspect-ratio: 512 / 686;
    display: block;
    transform: translate(-50%, -50%);
    animation-name: v72SingleStageReveal;
  }

  .v72-memory-lane {
    border-radius: 0 0 34px 34px;
    -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 77%, transparent 100%);
    mask-image: linear-gradient(180deg, #000 0%, #000 77%, transparent 100%);
  }

  .v72-opening-copy::before {
    inset: -2rem -1.5rem -2rem;
    opacity: calc(var(--v72-adaptive-copy-surface) + .12);
    background: radial-gradient(ellipse at 34% 62%, rgb(1 4 12 / .97), rgb(1 4 12 / .68) 52%, transparent 82%);
  }

  .v72-opening-copy {
    max-width: 100%;
    padding-top: 42vh;
  }

  body.is-entering .v72-dual-memory-stage {
    transform: translate(-50%, -50%) scale(1.045);
  }
}

@keyframes v72SingleStageReveal {
  from { opacity: 0; transform: translate(-50%, -48%) scale(.97); filter: brightness(.55); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1); filter: brightness(1); }
}

@media (max-width: 420px) {
  .v72-dual-memory-stage {
    top: 29.5%;
    width: 100vw;
  }

  .v72-memory-lane { border-radius: 0; }
  .v72-opening-copy { padding-top: 39vh; }
  .v72-memory-now { display: none; }
}

@media (orientation: landscape) and (max-height: 640px) and (max-width: 1100px) {
  .v72-dual-memory-stage {
    top: 50%;
    left: 73%;
    width: auto;
    height: 96svh;
    max-height: none;
    aspect-ratio: 512 / 686;
  }

  .v72-memory-lane {
    border-radius: 18px;
    -webkit-mask-image: none;
    mask-image: none;
  }

  .v72-opening-copy { padding: 2.6rem 0 1.2rem; }
}

@media (prefers-reduced-motion: reduce) {
  .v72-dual-memory-stage {
    opacity: 1;
    animation: none !important;
    transform: translateY(-50%) !important;
  }

  .v72-opening-video {
    display: none;
  }

  @media (max-width: 1100px) {
    .v72-dual-memory-stage {
      transform: translate(-50%, -50%) !important;
    }
  }
}
