/* ─── Reset & Base ─────────────────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  font-family: 'Annie Use Your Telescope', system-ui, sans-serif;
  color: #fff;
  overflow: hidden;
  letter-spacing: 0.075em;
  -webkit-font-smoothing: antialiased;
}

/* ─── Background: Liquid Color Spectrum ────────────────────────────────────── */
/*
  Two-layer structure to keep the hue-rotate animation off the main thread:
  .bg-hue  — positioned wrapper, animates hue-rotate() only (no blur).
             A filter with no blur is compositor-threadable in both Chrome and Firefox,
             so it never competes with the rAF loop on the main thread.
  .bg      — fills .bg-hue, applies static blur(72px) + saturate(). Never animates,
             so the browser can cache the blurred surface and reuse it each frame.
  The 140% × 140% / -20% offset lives on .bg-hue to prevent blur edge halos.
*/
.bg-hue {
  position: fixed;
  top: -20%;
  left: -20%;
  width: 140%;
  height: 140%;
  filter: hue-rotate(0deg);
  animation: hue-cycle 28s linear infinite;
  z-index: 0;
}

@keyframes hue-cycle {
  from { filter: hue-rotate(0deg); }
  to   { filter: hue-rotate(360deg); }
}

.bg {
  width: 100%;
  height: 100%;
  background: #07071a;
  filter: blur(72px) saturate(90%);
}

.blob {
  position: absolute;
  border-radius: 50%;
}

.b1 {
  width: 80%;
  height: 80%;
  background: radial-gradient(circle at center, #ffb3d9, transparent 68%);
  top: -5%;
  left: -5%;
}

.b2 {
  width: 70%;
  height: 70%;
  background: radial-gradient(circle at center, #d4b8ff, transparent 68%);
  top: 25%;
  right: -10%;
}

.b3 {
  width: 65%;
  height: 65%;
  background: radial-gradient(circle at center, #b3eaff, transparent 68%);
  bottom: -5%;
  left: 15%;
}

.b4 {
  width: 55%;
  height: 55%;
  background: radial-gradient(circle at center, #b3f5d6, transparent 68%);
  top: 55%;
  right: 15%;
}

.b5 {
  width: 60%;
  height: 60%;
  background: radial-gradient(circle at center, #ffd9b3, transparent 68%);
  top: 5%;
  left: 38%;
}


/* ─── Layout ───────────────────────────────────────────────────────────────── */
main {
  position: relative;
  z-index: 2;
  height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(0.75rem, 3vh, 2rem) 1rem;
  overflow: hidden;
}

.cards {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 1.25rem;
  width: min(460px, 92vw);
  height: 100%;
  max-height: 100%;
}

/* ─── Card Glass Base ──────────────────────────────────────────────────────── */
.card {
  width: 100%;
  border-radius: 22px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

/* ─── Title Card ───────────────────────────────────────────────────────────── */
.card-title {
  flex-shrink: 0;
  padding: clamp(1.25rem, 3vh, 2.25rem) 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  text-align: center;
}

.card-title h1 {
  font-size: clamp(2.4rem, 8vw, 3.6rem);
  font-weight: 400;
  line-height: 1.1;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.4);
}

.tagline {
  font-size: clamp(1rem, 3vw, 1.2rem);
  font-weight: 400;
  opacity: 0.7;
}

/* ─── Instagram Button ─────────────────────────────────────────────────────── */
.btn-ig {
  margin-top: 0.6rem;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.6rem 1.35rem;
  border-radius: 100px;
  text-decoration: none;
  color: #fff;
  font-size: clamp(1.3rem, 3.5vw, 1.6rem);
  font-weight: 400;
  -webkit-text-stroke: 0.4px rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.45);
  box-shadow:
    0 4px 16px rgba(0, 0, 0, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
  transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
  cursor: pointer;
}

.btn-ig:hover {
  background: rgba(255, 255, 255, 0.26);
  box-shadow:
    0 6px 24px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.38);
  transform: translateY(-1px);
}

.btn-ig:active {
  transform: translateY(0);
  background: rgba(255, 255, 255, 0.2);
}

.btn-ig svg {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
}

/* ─── Slideshow Card ───────────────────────────────────────────────────────── */
.card-slideshow {
  flex: 1;
  min-height: 0; /* allows flex child to shrink below content size */
  padding: 1rem; /* uniform spacing on all sides around the image */
  display: flex;
  flex-direction: column;
}

/*
  .slideshow fills all remaining height inside the card.
  Both slides are absolutely positioned to fill it, so swapping
  opacity between them creates a crossfade with zero layout shift.
*/
.slideshow {
  position: relative;
  flex: 1;
  min-height: 0;
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.25);
}

.slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.9s ease;
}

.slide.active {
  opacity: 1;
}

/* ─── Black Hole ───────────────────────────────────────────────────────────── */
.click-blackhole {
  position: fixed;
  left: 0;
  top: 0;
  width: 0;
  height: 0;
  pointer-events: none;
  z-index: 40;
}

.bh-core {
  position: absolute;
  left: 0; top: 0;
  width: 80px;
  height: 80px;
  transform: translate(-50%, -50%) scale(0);
  border-radius: 50%;
  background: #000;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  pointer-events: none;
}

/* ─── Reduced motion ───────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .bg-hue { animation: none; }
  .slide { transition: none; }
}
