/* ─────────────────────────────────────────────
   Birthday surprise — photographic invitation
   Direction: cool sage + pine ink + hot vermillion
───────────────────────────────────────────── */

:root {
  --ink: #101814;
  --ink-soft: #3a4a42;
  --chalk: #eef1ee;
  --paper: #ffffff;
  --sage: #e8ece9;
  --pine: #1c3d32;
  --flame: #ff4d2e;
  --flame-deep: #e03d22;
  --mist: rgba(238, 241, 238, 0.92);

  --font-sans: "Bricolage Grotesque", system-ui, sans-serif;
  --font-serif: "Fraunces", Georgia, serif;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --spring: cubic-bezier(0.34, 1.45, 0.64, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--paper);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

/* Music dock — dancer above player, pinned bottom-right */
.spot-dock {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 35;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  pointer-events: none;
}

.spot-dock > * {
  pointer-events: auto;
}

.spot-dancer {
  --dancer-size: clamp(132px, 27vw, 195px);
  width: var(--dancer-size);
  height: var(--dancer-size);
  flex-shrink: 0;
  /* Always sit on the player: slight overlap so feet rest on the bar */
  margin-bottom: calc(var(--dancer-size) * -0.28);
  position: relative;
  z-index: 0;
  pointer-events: none;
  background: transparent;
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.35));
  transition: transform 0.35s var(--ease), opacity 0.35s ease;
}

.spot-dancer.is-idle {
  opacity: 0.85;
  transform: translateY(2px);
}

.spot-dancer.is-dancing {
  opacity: 1;
  transform: translateY(0);
}

.spot-dancer dotlottie-player {
  width: 100%;
  height: 100%;
  display: block;
  background: transparent !important;
}

.spot-dancer dotlottie-player::part(svg),
.spot-dancer canvas {
  background: transparent !important;
}

/* Spotify-style bar */
.spot-bar {
  position: relative;
  z-index: 2;
  width: min(300px, calc(100vw - 2rem));
  padding: 0.85rem 1rem 0.95rem;
  border-radius: 10px;
  background: #3a221c;
  color: rgba(255, 255, 255, 0.88);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
  user-select: none;
}

.spot-progress-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 0.55rem;
}

.spot-progress {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  outline: none;
  cursor: pointer;
}

.spot-progress::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #f2f2f2;
  border: none;
  box-shadow: 0 0 0 2px rgba(58, 34, 28, 0.9);
  cursor: pointer;
}

.spot-progress::-moz-range-thumb {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #f2f2f2;
  border: none;
  cursor: pointer;
}

.spot-progress::-moz-range-track {
  height: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
}

.spot-times {
  display: flex;
  justify-content: space-between;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.55);
  font-variant-numeric: tabular-nums;
}

.spot-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  margin-top: 0.15rem;
}

.spot-btn {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  color: rgba(255, 255, 255, 0.72);
  border-radius: 50%;
  transition: color 0.2s ease, background 0.2s ease;
}

.spot-btn:hover,
.spot-btn:focus-visible {
  color: #fff;
  outline: none;
}

.spot-btn:focus-visible {
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.35);
}

.spot-btn[aria-pressed="true"] {
  color: #1db954;
}

.spot-play {
  position: relative;
  width: 2.85rem;
  height: 2.85rem;
  border-radius: 50%;
  background: #ececec;
  color: #1a1a1a;
  display: grid;
  place-items: center;
  transition: transform 0.2s var(--ease), background 0.2s ease;
}

.spot-play svg {
  grid-area: 1 / 1;
  display: block;
}

.spot-play .spot-icon-play {
  display: block;
}

.spot-play .spot-icon-pause {
  display: none;
}

.spot-play.is-playing .spot-icon-play {
  display: none;
}

.spot-play.is-playing .spot-icon-pause {
  display: block;
}

.spot-play:hover,
.spot-play:focus-visible {
  transform: scale(1.06);
  background: #fff;
  outline: none;
}

.spot-play:focus-visible {
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.35);
}

.spot-play.is-waiting:not(.is-playing) {
  animation: spotPulse 1.6s ease-in-out infinite;
}

@keyframes spotPulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(236, 236, 236, 0.45);
  }
  50% {
    box-shadow: 0 0 0 10px rgba(236, 236, 236, 0);
  }
}

.spot-meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.1rem;
  margin-top: 0.7rem;
  text-align: center;
  min-width: 0;
}

.spot-title {
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.spot-artist {
  font-size: 0.68rem;
  color: rgba(255, 255, 255, 0.5);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.spot-bar.is-missing .spot-artist {
  color: #ff8f7a;
}

@media (max-width: 720px) {
  .spot-dancer {
    --dancer-size: clamp(110px, 26vw, 150px);
  }
}

@media (max-width: 480px) {
  .spot-dock {
    left: 0.65rem;
    right: 0.65rem;
    bottom: 0.65rem;
    align-items: stretch;
  }

  .spot-bar {
    width: auto;
    min-width: 0;
  }

  .spot-dancer {
    --dancer-size: 96px;
    align-self: center;
  }
}

/* ─── HERO ─── */
.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: center;
  color: #fff8f0;
  overflow: hidden;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, #ff9f43 0%, transparent 55%),
    linear-gradient(165deg, #ff7a18 0%, #e85d04 42%, #c2410c 100%);
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.dollar-rain {
  display: block;
  width: 100%;
  height: 100%;
}

.hero-inner {
  position: relative;
  z-index: 2;
  padding: clamp(2rem, 6vw, 4.5rem);
  max-width: 52rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.75rem;
  animation: rise 1s var(--ease) both;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(32px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.brand {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(2.4rem, 8vw, 5.25rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: #fff;
  text-wrap: balance;
  max-width: 16ch;
  text-shadow: 0 2px 24px rgba(100, 30, 0, 0.35);
}

.tagline {
  font-size: clamp(1.05rem, 2.5vw, 1.35rem);
  font-weight: 400;
  color: rgba(255, 248, 240, 0.88);
  max-width: 28ch;
  line-height: 1.45;
  margin-top: 0.15rem;
  text-shadow: 0 1px 12px rgba(100, 30, 0, 0.3);
}

.hero-head {
  width: clamp(9rem, 28vw, 14rem);
  height: auto;
  margin-top: 0.85rem;
  pointer-events: none;
  user-select: none;
  animation: spin-cw 28s linear infinite;
  filter: drop-shadow(0 10px 22px rgba(80, 20, 0, 0.28));
}

@keyframes spin-cw {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Lightbox close */
.lightbox-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 1.75rem;
  line-height: 1;
  display: grid;
  place-items: center;
  transition: background 0.25s ease;
}

.lightbox-close:hover,
.lightbox-close:focus-visible {
  background: rgba(255, 255, 255, 0.25);
  outline: none;
}

/* ─── ABOUT ─── */
.about {
  position: relative;
  padding: clamp(4rem, 10vw, 7rem) clamp(1.25rem, 5vw, 4rem);
  /* Clear fixed music dock when scrolled to bottom */
  padding-bottom: calc(clamp(4rem, 10vw, 7rem) + 10rem);
  background: #ffffff;
}

@media (max-width: 720px) {
  .about {
    padding-bottom: calc(10rem + env(safe-area-inset-bottom, 0px));
  }
}

@media (max-width: 480px) {
  .about {
    padding-bottom: calc(10rem + env(safe-area-inset-bottom, 0px));
  }
}

.about-frame {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  gap: clamp(2rem, 5vw, 3.5rem);
  padding: clamp(1.25rem, 3vw, 2rem);
  border: 1px solid rgba(28, 36, 48, 0.1);
  background:
    linear-gradient(180deg, #fff 0%, #fffaf6 100%);
  box-shadow: 0 18px 50px rgba(28, 36, 48, 0.06);
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}

.about-frame.is-in {
  opacity: 1;
  transform: translateY(0);
}

@media (min-width: 860px) {
  .about-frame {
    grid-template-columns: minmax(280px, 0.9fr) 1.1fr;
    align-items: stretch;
    gap: clamp(2rem, 4vw, 3rem);
    padding: clamp(1.5rem, 3vw, 2.25rem);
  }
}

.about-photo-wrap {
  position: relative;
  overflow: hidden;
  background: #eee;
  min-height: 320px;
}

.about-photo-btn {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}

.about-photo-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  aspect-ratio: 3 / 4;
  transition: transform 0.7s var(--ease);
}

@media (min-width: 860px) {
  .about-photo-btn img {
    aspect-ratio: auto;
    min-height: 100%;
    position: absolute;
    inset: 0;
  }

  .about-photo-wrap {
    min-height: 100%;
  }
}

.about-photo-btn:hover img,
.about-photo-btn:focus-visible img {
  transform: scale(1.03);
}

.about-photo-btn:focus-visible {
  outline: 3px solid var(--flame);
  outline-offset: 3px;
}

.about-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1rem;
  padding: 0.25rem 0.15rem 0.5rem;
}

.about-title {
  font-family: var(--font-serif);
  font-size: clamp(2.5rem, 7vw, 4.25rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 0.95;
  color: var(--ink);
}

.about-body {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.about-body p {
  color: var(--ink-soft);
  font-size: clamp(1rem, 2.2vw, 1.12rem);
  line-height: 1.65;
  max-width: 38ch;
}

.about-body p:first-child {
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: clamp(1.2rem, 2.6vw, 1.45rem);
  font-style: italic;
}

.about-connect {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: flex-start;
  margin-top: 0.5rem;
  padding: 0.85rem 1.35rem;
  background: var(--ink);
  color: #fff;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 2px;
  transition: background 0.25s ease, transform 0.25s var(--ease);
}

.about-connect:hover,
.about-connect:focus-visible {
  background: var(--flame);
  transform: translateY(-1px);
  outline: none;
}

.about-socials {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-top: 0.75rem;
}

.social-link {
  width: 2.6rem;
  height: 2.6rem;
  display: grid;
  place-items: center;
  color: var(--ink);
  border: 1px solid rgba(28, 36, 48, 0.14);
  border-radius: 2px;
  text-decoration: none;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.social-link:hover,
.social-link:focus-visible {
  color: #fff;
  background: var(--ink);
  border-color: var(--ink);
  outline: none;
}

.social-link.is-disabled {
  opacity: 0.35;
  pointer-events: none;
}

/* ─── CLOSING ─── */
.closing {
  min-height: 65svh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 5rem 1.5rem 6rem;
  background: #ffffff;
}

.closing-line {
  font-family: var(--font-serif);
  font-size: clamp(2.8rem, 10vw, 5.75rem);
  font-weight: 500;
  line-height: 0.95;
  letter-spacing: -0.03em;
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 1s var(--ease), transform 1s var(--ease);
}

.closing-sub {
  margin-top: 1.1rem;
  font-size: 1.15rem;
  color: var(--ink-soft);
  max-width: 26ch;
  line-height: 1.5;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 1s 0.12s var(--ease), transform 1s 0.12s var(--ease);
}

.closing.is-in .closing-line,
.closing.is-in .closing-sub {
  opacity: 1;
  transform: translateY(0);
}

/* ─── LIGHTBOX ─── */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 2rem;
  background: rgba(8, 14, 11, 0.94);
  backdrop-filter: blur(10px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s;
}

.lightbox.is-visible {
  opacity: 1;
  visibility: visible;
}

.lightbox[hidden] {
  display: none !important;
}

.lightbox-figure {
  max-width: min(920px, 92vw);
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  transform: scale(0.96);
  transition: transform 0.4s var(--ease);
}

.lightbox.is-visible .lightbox-figure {
  transform: scale(1);
}

.lightbox-figure img {
  max-height: 75vh;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  border-radius: 2px;
}

.lightbox-figure figcaption {
  font-family: var(--font-serif);
  font-style: italic;
  color: rgba(255, 255, 255, 0.8);
  font-size: 1.2rem;
  text-align: center;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 3rem;
  height: 3rem;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 1.75rem;
  display: grid;
  place-items: center;
  transition: background 0.25s ease;
}

.lightbox-nav:hover,
.lightbox-nav:focus-visible {
  background: rgba(255, 255, 255, 0.22);
  outline: none;
}

.lightbox-nav.prev {
  left: 1rem;
}

.lightbox-nav.next {
  right: 1rem;
}

@media (max-width: 600px) {
  .lightbox-nav {
    top: auto;
    bottom: 1.25rem;
    transform: none;
  }

  .lightbox-nav.prev {
    left: calc(50% - 4rem);
  }

  .lightbox-nav.next {
    right: calc(50% - 4rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .hero-inner,
  .about-frame {
    animation: none !important;
    transition: none !important;
  }

  .hero-head {
    animation: none !important;
  }

  .dollar-rain {
    display: none;
  }

  .about-frame {
    opacity: 1;
    transform: none;
  }
}
