:root {
  --bg: #0b0e14;
  --fg: #eef2ff;
  --muted: rgba(238, 242, 255, 0.7);
  --glass: rgba(255, 255, 255, 0.08);
  --glass2: rgba(255, 255, 255, 0.14);
  --shadow: rgba(0, 0, 0, 0.55);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  width: 100%;
  height: 100dvh;
  overflow: hidden;
}

body {
  width: 100vw;
  height: 100dvh;
  overflow: hidden;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica,
    Arial, "Apple Color Emoji", "Segoe UI Emoji";
  background: #000;
  color: var(--fg);
  position: fixed;
  inset: 0;
}

.stage {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100dvh;
}

.frame {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100dvh;
  overflow: hidden;
  background: #000;
}

.photo {
  position: absolute;
  inset: 0;
  width: 100vw;
  height: 100dvh;
  object-fit: contain;
  display: block;
  user-select: none;
  -webkit-user-select: none;
}

/* Mobile portrait: scale video to fit within narrow screens */
@media (max-aspect-ratio: 1/1) {
  video.photo {
    width: auto;
    inset: auto;
    top: 0;
    left: 50%;
    transform: translateX(-50%) scale(0.775);
  }
}

video.photo {
  background: transparent;
}

.photo--bottom {
  transform: translateZ(0);
  opacity: 1;
  transition: opacity 200ms ease;
}

.stage:not(.is-entered) .photo--bottom {
  opacity: 0;
}

.shatter {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.gate {
  position: absolute;
  inset: 0;
  display: block;
  border: 0;
  cursor: pointer;
  touch-action: manipulation;
  background: radial-gradient(800px 600px at 50% 35%, rgba(255, 255, 255, 0.12), transparent),
    linear-gradient(to bottom, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.0));
  color: var(--fg);
  transition: opacity 240ms ease;
}

.gate__icon {
  position: absolute;
  width: 96px;
  height: 96px;
  /* Blend into the printed collage a bit (less “sticker” look) */
  opacity: 0.78;
  /* mix-blend-mode: multiply; */
  filter: none;
  transform-origin: 16px 84px; /* pivot at end of handle (scaled for 96x96 svg) */
  pointer-events: none;
  transition: transform 0.08s ease-out;
}

/* Swing animation on smash */
.gate__icon.is-smashing {
  animation: smash-swat 0.14s cubic-bezier(0.18, 0.9, 0.2, 1) forwards;
}

.gate__label {
  position: absolute;
  transform: translateX(-50%);
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica,
    Arial, "Apple Color Emoji", "Segoe UI Emoji";
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.82);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.55);
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
  white-space: nowrap;
}

@keyframes smash-swat {
  0% {
    transform: rotate(var(--current-rotation, 0deg));
  }
  75% {
    /* fast downward swat */
    transform: rotate(72deg) scale(1.14);
  }
  100% {
    /* tiny settle (still down) */
    transform: rotate(62deg) scale(1.1);
  }
}

.gate:focus-visible {
  outline: 3px solid rgba(124, 92, 255, 0.7);
  outline-offset: -3px;
}

.gate.is-hidden {
  opacity: 0;
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .gate {
    transition: none;
  }
  .gate__icon {
    transition: none;
    animation: none !important;
  }
}

@media (pointer: fine) {
  .gate {
    cursor: none;
  }
}

/* Landing page menu */
.landing {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000 url('./assets/landing-bg.jpg') center center / contain no-repeat;
}

.nav-link {
  position: absolute;
  padding: 12px 32px;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica,
    Arial, "Apple Color Emoji", "Segoe UI Emoji";
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  color: #000;
  background: #fff;
  transition: background 0.15s ease, transform 0.15s ease;
}

.nav-link:hover {
  background: #eee;
  transform: scale(1.05);
}

.nav-link--bottom-left {
  bottom: 10%;
  left: 5%;
}

.nav-link--top-right {
  top: 10%;
  right: 5%;
}

@media (min-width: 768px) {
  .nav-link--bottom-left {
    bottom: 10%;
    left: 7.5%;
  }

  .nav-link--top-right {
    top: 10%;
    right: 7.5%;
  }
}

/* Subpages */
.page {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.page--travel {
  background: #000 url('./assets/travel-bg.jpg') center center / contain no-repeat;
}

.page--itinerary {
  background: #000;
}

/* Frame that matches the itinerary background image aspect ratio (680x1039) */
/* Scales exactly like background-size: contain */
.itinerary-frame {
  position: relative;
  width: 100%;
  height: 100%;
  max-width: calc(100dvh * 680 / 1039);
  max-height: calc(100vw * 1039 / 680);
  aspect-ratio: 680 / 1039;
  background: url('./assets/itinerary-bg.jpg') center center / cover no-repeat;
}

.page__title {
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
  font-size: 48px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #fff;
}

.back-link {
  position: absolute;
  z-index: 10;
  top: 24px;
  left: 24px;
  padding: 12px 24px;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  color: #000;
  background: #fff;
  transition: background 0.15s ease;
}

.back-link:hover {
  background: #eee;
}

/* Content card */
.content-card {
  background-color: rgba(255, 255, 255, 0.75);
  border-radius: 4px;
  padding: 12px;
  max-width: 400px;
  margin: 0 4px;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
  color: #000;
  line-height: 1.5;
}

.content-card__title {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin: 0 0 4px 0;
}

.content-card__title:not(:first-child) {
  margin-top: 12px;
}

.content-card p {
  font-size: 13px;
  margin: 0 0 4px 0;
}

.content-card__note {
  font-style: italic;
  opacity: 0.8;
  margin-top: 12px !important;
}

/* Day cards for itinerary */
.day-card {
  position: absolute;
  background-color: rgba(255, 255, 255, 0.75);
  border-radius: 4px;
  padding: 8px 12px;
  width: 220px;
  min-height: 70px;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
  color: #000;
  line-height: 1.4;
}

.day-card__title {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin: 0 0 4px 0;
}

.day-card p {
  font-size: 14px;
  margin: 0;
}

.desktop-only {
  display: inline;
}

.mobile-only {
  display: none;
}

/* Desktop: position cards inside the frame */
.day-card--thurs {
  top: 5%;
  left: 3%;
}

.day-card--fri {
  top: 14.5%;
  left: 3%;
}

.day-card--sat {
  top: 5%;
  right: 3%;
}

.day-card--sun {
  top: 18.5%;
  right: 3%;
}

/* Mobile day card positions - two left, two right */
@media (max-width: 768px) {
  .desktop-only {
    display: none;
  }

  .mobile-only {
    display: inline;
  }

  .day-card {
    position: fixed;
    width: 140px;
    min-height: 70px;
    padding: 6px 10px;
  }

  .day-card__title {
    font-size: 12px;
    margin-bottom: 2px;
  }

  .day-card p {
    font-size: 11px;
  }

  .day-card--thurs {
    top: 10%;
    left: 5%;
    right: auto;
  }

  .day-card--fri {
    top: 21.5%;
    left: 5%;
    right: auto;
  }

  .day-card--sat {
    top: 10%;
    right: 5%;
    left: auto;
  }

  .day-card--sun {
    top: 23%;
    right: 5%;
    left: auto;
  }
}