/* Thirdy's cinematic intro — adapted from Halina Travels */
html.intro-lock,
html.intro-lock body { overflow: hidden; }

#intro {
  position: fixed;
  inset: 0;
  z-index: 99999;
  overflow: hidden;
  opacity: 0;
  transition: opacity .55s ease;
  background: #2f1017;
  isolation: isolate;
}
#intro.live { opacity: 1; }

.intro-sky {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120% 80% at 78% 22%, rgba(214, 165, 92, .48), transparent 58%),
    radial-gradient(90% 70% at 22% 78%, rgba(122, 37, 53, .48), transparent 62%),
    linear-gradient(170deg, #2f1017 0%, #57202b 42%, #8c3f3c 74%, #d9a75f 130%);
  animation: intro-bloom 4s ease-out both;
}
@keyframes intro-bloom {
  from { transform: scale(1.12); filter: brightness(.72); }
  to { transform: scale(1); filter: brightness(1); }
}

.intro-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
.intro-fg {
  position: absolute;
  inset: -10%;
  pointer-events: none;
  overflow: hidden;
}
.intro-cloud {
  position: absolute;
  opacity: 0;
  will-change: transform, opacity;
}
.intro-cloud.c1 {
  width: 68vw;
  top: 46%;
  left: -70vw;
  filter: blur(14px);
  animation: intro-sweep-a 3.35s cubic-bezier(.3,0,.4,1) .05s both;
}
.intro-cloud.c2 {
  width: 34vw;
  top: 8%;
  left: -40vw;
  filter: blur(7px);
  animation: intro-sweep-b 3.2s cubic-bezier(.35,0,.35,1) .2s both;
}
.intro-cloud.c3 {
  width: 92vw;
  top: 24%;
  left: -100vw;
  filter: blur(22px);
  animation: intro-sweep-c 2.15s cubic-bezier(.4,0,.2,1) .9s both;
}
@keyframes intro-sweep-a {
  0% { opacity:0; transform:translate3d(0,0,0) scale(1); }
  14% { opacity:.55; }
  80% { opacity:.4; }
  100% { opacity:0; transform:translate3d(200vw,-8vh,0) scale(1.25); }
}
@keyframes intro-sweep-b {
  0% { opacity:0; transform:translate3d(0,0,0); }
  20% { opacity:.75; }
  85% { opacity:.5; }
  100% { opacity:0; transform:translate3d(190vw,12vh,0) scale(1.4); }
}
@keyframes intro-sweep-c {
  0% { opacity:0; transform:translate3d(0,0,0) scale(1); }
  35% { opacity:.92; }
  70% { opacity:.7; }
  100% { opacity:0; transform:translate3d(215vw,-14vh,0) scale(1.6); }
}

.intro-word {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  padding: 32px;
  text-align: center;
  color: #fff;
  pointer-events: none;
  opacity: 0;
  transform: translateY(22px) scale(.97);
  transition: opacity .9s cubic-bezier(.2,.7,.3,1), transform 1.1s cubic-bezier(.2,.7,.3,1);
  text-shadow: 0 10px 40px rgba(25, 7, 11, .55);
}
.intro-word.in { opacity:1; transform:none; }
.intro-name {
  display: flex;
  align-items: baseline;
  justify-content: center;
  flex-wrap: wrap;
  column-gap: .22em;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 600;
  font-size: clamp(48px, 7.2vw, 104px);
  letter-spacing: -.025em;
  line-height: .98;
}
.intro-brand { white-space: nowrap; }
.intro-property-wrap {
  display: inline-grid;
  min-width: 5.7em;
  min-height: 1em;
  align-items: baseline;
  justify-items: start;
  color: #f1d19c;
  font-style: italic;
  font-weight: 400;
  white-space: nowrap;
}
.intro-property {
  grid-area: 1 / 1;
  display: inline-block;
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
  transition: opacity .28s ease, transform .36s cubic-bezier(.2,.7,.3,1), filter .28s ease;
}
.intro-property.swapping {
  opacity: 0;
  transform: translateY(14px);
  filter: blur(5px);
}
.intro-tag {
  font-family: 'Jost', system-ui, sans-serif;
  font-size: clamp(14px, 1.55vw, 21px);
  font-weight: 400;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: rgba(255,255,255,.82);
  margin-top: 24px;
}
.intro-rule {
  width: 54px;
  height: 1px;
  margin: 18px auto 0;
  background: #d9a75f;
  opacity: .85;
}
.intro-skip {
  position: absolute;
  right: 24px;
  bottom: 24px;
  min-width: 92px;
  min-height: 44px;
  padding: 11px 18px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.42);
  background: rgba(47,16,23,.38);
  color: #fff;
  font: 500 14px/1 'Jost', system-ui, sans-serif;
  cursor: pointer;
  backdrop-filter: blur(7px);
  transition: background .2s ease, border-color .2s ease;
}
.intro-skip:hover,
.intro-skip:focus-visible { background:rgba(47,16,23,.68); border-color:#d9a75f; outline:none; }

#intro.lift .intro-sky,
#intro.lift .intro-canvas {
  transition: transform 1s cubic-bezier(.4,0,.2,1), opacity 1s ease;
  transform: scale(1.14);
}
#intro.lift .intro-word {
  transition: transform 1s cubic-bezier(.4,0,.2,1), opacity .8s ease;
  transform: translateY(-40px) scale(1.06);
  opacity: 0;
}
#intro.done { opacity:0; pointer-events:none; }

@media (max-width: 700px) {
  .intro-word { padding: 24px; }
  .intro-name { display:grid; row-gap:10px; font-size:clamp(46px, 15vw, 72px); }
  .intro-property-wrap { min-width:0; justify-items:center; }
  .intro-tag { margin-top:22px; letter-spacing:.15em; }
  .intro-skip { right:16px; bottom:16px; }
  .intro-cloud.c1 { width:110vw; }
  .intro-cloud.c2 { width:64vw; }
  .intro-cloud.c3 { width:140vw; }
}
@media (prefers-reduced-motion: reduce) {
  #intro { display:none !important; }
  html.intro-lock, html.intro-lock body { overflow:auto; }
}
