/* Ora Pay — modern arrival.
   Frosted panels over a blurred hero. Its own file so it can be adjusted or
   removed without touching the approved page styles. */

html.modern-intro-open,
html.modern-intro-open body {
  overflow: hidden;
}

.modern-intro {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 24px;
  isolation: isolate;
  opacity: 1;
  transition: opacity .6s ease;
}

.modern-intro.is-leaving { opacity: 0; pointer-events: none; }

/* The hero photograph, pushed back so the glass has something to refract. */
.mi-bg {
  position: absolute;
  inset: -6%;
  z-index: -2;
  background: #0b3948 url("assets/arrival-hero.png") center / cover no-repeat;
  filter: blur(22px) saturate(1.15);
  transform: scale(1.06);
}

.mi-wash {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(120% 90% at 18% 12%, rgba(235, 94, 85, .30), transparent 60%),
    radial-gradient(120% 90% at 86% 84%, rgba(11, 57, 72, .55), transparent 62%),
    linear-gradient(180deg, rgba(11, 57, 72, .38), rgba(11, 57, 72, .62));
}

/* The glass. */
.mi-brand {
  position: absolute;
  top: clamp(18px, 3.5vw, 34px);
  left: clamp(18px, 3.5vw, 38px);
  display: flex;
  align-items: center;
  gap: 9px;
  color: #fffef9;
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-shadow: 0 2px 14px rgba(11, 57, 72, .4);
}

.mi-brand img {
  /* The mark is dark by default; make it read on the glass. */
  filter: brightness(0) invert(1);
}

.mi-brand sup {
  font-size: .5em;
  vertical-align: super;
  opacity: .85;
}

.mi-stage {
  position: relative;
  width: min(680px, 100%);
  min-height: clamp(260px, 42vh, 360px);
  display: grid;
  place-items: center;
  padding: clamp(26px, 5vw, 46px);
  border-radius: 26px;
  background: rgba(255, 254, 249, .10);
  border: 1px solid rgba(255, 254, 249, .26);
  box-shadow:
    0 26px 70px rgba(11, 57, 72, .38),
    inset 0 1px 0 rgba(255, 254, 249, .34);
  backdrop-filter: blur(26px) saturate(1.5);
  -webkit-backdrop-filter: blur(26px) saturate(1.5);
  overflow: hidden;
}

/* A slow sheen, so the surface reads as glass rather than a flat panel. */
.mi-stage::after {
  content: "";
  position: absolute;
  inset: -40% -60%;
  background: linear-gradient(100deg, transparent 38%, rgba(255, 254, 249, .13) 50%, transparent 62%);
  animation: mi-sheen 7s ease-in-out infinite;
  pointer-events: none;
}

@keyframes mi-sheen {
  0%, 100% { transform: translateX(-24%); }
  50%      { transform: translateX(24%); }
}

.mi-line,
.mi-closer {
  grid-area: 1 / 1;
  margin: 0;
  text-align: center;
  color: #fffef9;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .5s ease, transform .5s ease, filter .5s ease;
  filter: blur(6px);
  pointer-events: none;
}

.mi-line.is-in,
.mi-closer.is-in {
  opacity: 1;
  transform: none;
  filter: blur(0);
  pointer-events: auto;
}

.mi-line.is-out {
  opacity: 0;
  transform: translateY(-14px);
  filter: blur(6px);
}

.mi-line {
  font-size: clamp(25px, 4.6vw, 43px);
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.025em;
  text-wrap: balance;
  text-shadow: 0 2px 20px rgba(11, 57, 72, .3);
}

/* The opening statement carries more words, so it takes a smaller size and a
   lighter weight. The lines after it are short and hit harder. */
.mi-line.mi-opener {
  font-size: clamp(21px, 3.5vw, 34px);
  font-weight: 600;
  line-height: 1.28;
}

.mi-closer {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.mi-closer h2 {
  margin: 0 0 10px;
  font-size: clamp(25px, 4.6vw, 43px);
  line-height: 1.18;
  font-weight: 700;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.mi-closer p {
  margin: 0 0 26px;
  font-size: clamp(16px, 2vw, 19px);
  line-height: 1.6;
  opacity: .88;
  /* The break is authored, so leave the balancing alone or the two sentences
     fight each other for line length. */
  text-wrap: pretty;
  max-width: 44ch;
}

.mi-enter {
  font: inherit;
  font-size: 17px;
  font-weight: 600;
  color: #0b3948;
  background: #fffef9;
  border: 0;
  border-radius: 999px;
  padding: 15px 40px;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(11, 57, 72, .3);
  transition: transform .2s ease, box-shadow .2s ease;
}

.mi-enter:hover { transform: translateY(-2px); box-shadow: 0 14px 36px rgba(11, 57, 72, .38); }
.mi-enter:focus-visible { outline: 3px solid #eb5e55; outline-offset: 3px; }

/* Always available, never in the way. */
.mi-skip {
  position: absolute;
  right: 20px;
  bottom: 18px;
  font: inherit;
  font-size: 13px;
  letter-spacing: .04em;
  color: rgba(255, 254, 249, .8);
  background: transparent;
  border: 1px solid rgba(255, 254, 249, .32);
  border-radius: 999px;
  padding: 9px 18px;
  cursor: pointer;
}

.mi-skip:hover { color: #fffef9; border-color: rgba(255, 254, 249, .62); }
.mi-skip:focus-visible { outline: 2px solid #fffef9; outline-offset: 3px; }

@media (max-width: 600px) {
  .modern-intro { padding: 14px; }
  .mi-stage { border-radius: 20px; min-height: clamp(280px, 52vh, 420px); }
  .mi-line { font-size: 25px; }
  .mi-line.mi-opener { font-size: 21px; }
  .mi-closer h2 { font-size: 25px; }
  .mi-enter { width: 100%; padding: 15px 20px; }
  .mi-skip { right: 14px; bottom: 12px; }
  .mi-brand { font-size: 18px; gap: 7px; }
  .mi-brand img { width: 24px; height: 24px; }
}

/* Nothing here should ever animate for someone who asked it not to. The script
   does not build the intro at all in that case; this is a belt-and-braces stop
   in case it is ever forced with ?intro=1. */
@media (prefers-reduced-motion: reduce) {
  .mi-stage::after { animation: none; }
  .mi-line, .mi-closer { transition: opacity .2s linear; transform: none; filter: none; }
  .mi-line.is-out { transform: none; filter: none; }
}

/* Progress, in the manner of stories: one segment per statement, filling left
   to right for exactly as long as that statement is on screen. Decorative, so
   it is hidden from assistive technology. */
.mi-progress {
  position: absolute;
  top: 14px;
  left: 16px;
  right: 16px;
  display: flex;
  gap: 5px;
  pointer-events: none;
}

.mi-progress i {
  flex: 1;
  height: 3px;
  border-radius: 2px;
  background: rgba(255, 254, 249, .24);
  overflow: hidden;
}

.mi-progress i::after {
  content: "";
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: rgba(255, 254, 249, .95);
}

/* --mi-fill is set by the script to the beat length, so the bar and the words
   always agree. */
.mi-progress i.is-running::after {
  width: 100%;
  transition: width var(--mi-fill, 3000ms) linear;
}

.mi-progress i.is-done::after {
  width: 100%;
}

@media (max-width: 600px) {
  .mi-progress { top: 11px; left: 12px; right: 12px; gap: 4px; }
}

@media (prefers-reduced-motion: reduce) {
  .mi-progress i.is-running::after { transition: none; }
}
