:root {
  --cream: #fff9f2;
  --coral: #ff766f;
  --deep-coral: #e95763;
  --apricot: #ffbd7a;
  --yellow: #ffd579;
  --lilac: #c9b2f6;
  --deep-lilac: #9f82df;
  --plum: #3f2442;
  --soft-plum: #755878;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--plum);
  font-family: "Avenir Next", Avenir, "Segoe UI", sans-serif;
}

a {
  color: inherit;
}

.birthday-page {
  position: relative;
  min-height: 100svh;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(circle at 9% 89%, rgba(255, 189, 122, 0.18), transparent 22rem),
    radial-gradient(circle at 92% 88%, rgba(201, 178, 246, 0.2), transparent 28rem),
    var(--cream);
}

.birthday-page::before {
  content: "";
  position: absolute;
  z-index: -3;
  inset: auto -14vw -38vw 24vw;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 2px solid rgba(159, 130, 223, 0.24);
}

.birthday-shell {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(480px, 1.12fr);
  align-items: center;
  gap: clamp(3rem, 7vw, 8rem);
  width: min(100%, 1540px);
  min-height: 100svh;
  margin: 0 auto;
  padding: clamp(3.5rem, 8vh, 7rem) clamp(1.5rem, 7vw, 7rem);
}

.love-note {
  max-width: 650px;
  animation: reveal 900ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin: 0 0 1.7rem;
  color: var(--deep-coral);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 2.3rem;
  height: 2px;
  background: var(--deep-coral);
}

h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(4.7rem, 7.2vw, 8.3rem);
  font-weight: 500;
  line-height: 0.82;
  letter-spacing: -0.075em;
  text-wrap: balance;
}

h1 em {
  position: relative;
  display: block;
  width: max-content;
  max-width: 100%;
  margin-top: 0.18em;
  color: var(--deep-coral);
  font-weight: 500;
}

h1 em::after {
  content: "";
  position: absolute;
  right: -0.05em;
  bottom: -0.06em;
  left: 0.16em;
  height: 0.12em;
  border-radius: 50%;
  border-top: 3px solid var(--apricot);
  transform: rotate(-1deg);
}

.dedication {
  margin: clamp(2.3rem, 4.5vw, 4rem) 0 1.55rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.35rem, 2vw, 2rem);
  font-style: italic;
  font-weight: 600;
  line-height: 1.45;
}

.message {
  max-width: 38rem;
  margin: 0;
  color: var(--soft-plum);
  font-size: clamp(1rem, 1.22vw, 1.18rem);
  line-height: 1.85;
}

.signature {
  margin: 2.2rem 0 0;
  color: var(--deep-coral);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.45rem;
  font-style: italic;
  font-weight: 700;
}

.signature span {
  display: inline-block;
  margin-left: 0.22rem;
  animation: heartbeat 1.8s ease-in-out infinite;
}

.video-column {
  width: 100%;
  animation: reveal 900ms 180ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.video-card {
  position: relative;
  overflow: hidden;
  padding: clamp(0.8rem, 1.6vw, 1.35rem);
  border: 1px solid rgba(63, 36, 66, 0.09);
  border-radius: clamp(1.5rem, 2.6vw, 2.5rem);
  background: rgba(255, 255, 255, 0.72);
  box-shadow:
    0 2.4rem 6rem rgba(82, 51, 88, 0.15),
    0 0.35rem 1rem rgba(233, 87, 99, 0.08);
  backdrop-filter: blur(14px);
  transform: rotate(1deg);
  transition: transform 350ms ease, box-shadow 350ms ease;
}

.video-card:hover {
  box-shadow:
    0 2.8rem 7rem rgba(82, 51, 88, 0.19),
    0 0.5rem 1.2rem rgba(233, 87, 99, 0.1);
  transform: rotate(0deg) translateY(-0.3rem);
}

.video-label {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.2rem 0.45rem 1rem;
  color: var(--deep-coral);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}

.video-dot {
  width: 0.64rem;
  height: 0.64rem;
  border-radius: 50%;
  background: var(--yellow);
  box-shadow: 0 0 0 0.38rem rgba(255, 213, 121, 0.28);
}

.video-note {
  margin-left: auto;
  color: var(--soft-plum);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
}

.video-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: clamp(1rem, 2vw, 1.8rem);
  background:
    radial-gradient(circle at 72% 52%, var(--yellow) 0 12%, transparent 12.5%),
    radial-gradient(circle at 72% 52%, var(--apricot) 0 27%, transparent 27.5%),
    linear-gradient(135deg, var(--deep-coral), var(--deep-lilac));
}

.video-frame iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.video-poster {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border: 0;
  color: #fffdfa;
  background:
    radial-gradient(circle at 76% 28%, rgba(255, 213, 121, 0.96) 0 8%, rgba(255, 213, 121, 0.22) 8.3% 16%, transparent 16.3%),
    linear-gradient(145deg, rgba(85, 46, 93, 0.15), rgba(85, 46, 93, 0.02)),
    linear-gradient(130deg, #f26b76 0%, #f48983 40%, #bc96e9 100%);
  cursor: pointer;
  font: inherit;
  text-decoration: none;
  text-align: left;
}

.video-poster::before,
.video-poster::after {
  content: "";
  position: absolute;
  right: -6%;
  bottom: -24%;
  left: -6%;
  height: 58%;
  border-radius: 50% 50% 0 0;
  background: rgba(255, 189, 122, 0.58);
  transform: rotate(-5deg);
}

.video-poster::after {
  right: -12%;
  bottom: -31%;
  left: 28%;
  height: 64%;
  background: rgba(90, 48, 92, 0.16);
  transform: rotate(6deg);
}

.video-poster:focus-visible {
  outline: 4px solid var(--plum);
  outline-offset: -7px;
}

.poster-kicker {
  position: absolute;
  z-index: 2;
  top: clamp(1rem, 2.2vw, 1.75rem);
  left: clamp(1rem, 2.4vw, 1.9rem);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}

.poster-kicker::before {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--yellow);
  box-shadow: 0 0 0 0.38rem rgba(255, 213, 121, 0.17);
}

.poster-play {
  position: absolute;
  z-index: 3;
  top: 48%;
  left: 50%;
  display: grid;
  width: clamp(4.4rem, 7vw, 5.9rem);
  height: clamp(4.4rem, 7vw, 5.9rem);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 50%;
  background: rgba(255, 253, 250, 0.92);
  box-shadow: 0 1rem 2.5rem rgba(71, 33, 70, 0.2);
  place-items: center;
  transform: translate(-50%, -50%);
  transition: transform 300ms ease;
}

.video-poster:hover .poster-play {
  transform: translate(-50%, -50%) scale(1.07);
}

.poster-play::before {
  content: "";
  width: 0;
  height: 0;
  margin-left: 0.45rem;
  border-top: 0.8rem solid transparent;
  border-bottom: 0.8rem solid transparent;
  border-left: 1.25rem solid var(--deep-coral);
}

.poster-title {
  position: absolute;
  z-index: 3;
  bottom: clamp(1rem, 2.2vw, 1.75rem);
  left: clamp(1rem, 2.4vw, 1.9rem);
  display: grid;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.45rem, 2.4vw, 2.15rem);
  font-style: italic;
  line-height: 1.05;
}

.poster-title small {
  margin-top: 0.32rem;
  font-family: "Avenir Next", Avenir, "Segoe UI", sans-serif;
  font-size: 0.62rem;
  font-style: normal;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.poster-corner {
  position: absolute;
  z-index: 3;
  right: clamp(1rem, 2.4vw, 1.9rem);
  bottom: clamp(1rem, 2.4vw, 1.9rem);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.video-caption {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.2rem 0.45rem 0.25rem;
}

.video-caption > div {
  display: grid;
  gap: 0.15rem;
}

.video-caption strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.4rem, 2vw, 2rem);
}

.video-caption div > span:last-child {
  color: var(--soft-plum);
  font-size: 0.88rem;
}

.caption-kicker {
  color: var(--deep-coral);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.video-caption a {
  flex: none;
  border-bottom: 1px solid rgba(63, 36, 66, 0.32);
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
  transition: color 180ms ease, border-color 180ms ease;
}

.video-caption a:hover,
.video-caption a:focus-visible {
  border-color: var(--deep-coral);
  color: var(--deep-coral);
}

.closing-line {
  margin: 1.35rem 0 0;
  color: var(--soft-plum);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1rem;
  font-style: italic;
  text-align: center;
}

.sunrise {
  position: absolute;
  z-index: -2;
  border-radius: 50%;
  pointer-events: none;
}

.sunrise-large {
  top: -30vw;
  right: -18vw;
  width: clamp(42rem, 67vw, 74rem);
  aspect-ratio: 1;
  background: linear-gradient(145deg, rgba(255, 189, 122, 0.58), rgba(201, 178, 246, 0.56));
}

.sunrise-small {
  top: -8vw;
  right: 8vw;
  width: clamp(13rem, 25vw, 28rem);
  aspect-ratio: 1;
  background: linear-gradient(145deg, var(--yellow), var(--apricot));
  opacity: 0.85;
}

.orbit {
  position: absolute;
  z-index: -1;
  right: -3rem;
  bottom: -17rem;
  width: min(53vw, 54rem);
  aspect-ratio: 1;
  border: 2px solid rgba(159, 130, 223, 0.22);
  border-radius: 50%;
  pointer-events: none;
}

.petal,
.sparkle {
  position: absolute;
  z-index: 1;
  pointer-events: none;
}

.petal {
  width: 1rem;
  height: 2rem;
  border-radius: 90% 10% 75% 25%;
  background: var(--coral);
  animation: drift 6s ease-in-out infinite alternate;
}

.petal-one {
  top: 12%;
  left: 3%;
  background: var(--lilac);
  transform: rotate(28deg) scale(0.9);
}

.petal-two {
  top: 14%;
  right: 2.6%;
  transform: rotate(18deg) scale(0.75);
  animation-delay: -2s;
}

.petal-three {
  right: 7%;
  bottom: 8%;
  background: var(--apricot);
  transform: rotate(58deg) scale(0.65);
  animation-delay: -4s;
}

.petal-four {
  bottom: 4%;
  left: 42%;
  background: var(--deep-lilac);
  transform: rotate(-25deg) scale(0.55);
}

.sparkle {
  width: 1rem;
  height: 1rem;
  background: var(--deep-lilac);
  clip-path: polygon(50% 0, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0 50%, 39% 39%);
  animation: twinkle 2.6s ease-in-out infinite;
}

.sparkle-one {
  top: 74%;
  left: 65%;
}

.sparkle-two {
  top: 22%;
  left: 50%;
  width: 0.7rem;
  height: 0.7rem;
  background: var(--yellow);
  animation-delay: -1.2s;
}

@keyframes reveal {
  from {
    opacity: 0;
    transform: translateY(1.3rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes drift {
  from {
    margin-top: -0.3rem;
    margin-left: -0.2rem;
  }
  to {
    margin-top: 0.8rem;
    margin-left: 0.45rem;
  }
}

@keyframes twinkle {
  0%,
  100% {
    opacity: 0.35;
    transform: scale(0.75) rotate(0deg);
  }
  50% {
    opacity: 1;
    transform: scale(1.2) rotate(45deg);
  }
}

@keyframes heartbeat {
  0%,
  45%,
  100% {
    transform: scale(1);
  }
  15% {
    transform: scale(1.17);
  }
  28% {
    transform: scale(0.95);
  }
}

@media (max-width: 1080px) {
  .birthday-shell {
    grid-template-columns: 1fr;
    gap: 3.5rem;
    min-height: auto;
    padding-top: 5rem;
    padding-bottom: 5rem;
  }

  .love-note {
    max-width: 760px;
  }

  .video-column {
    max-width: 820px;
  }

  .sunrise-large {
    top: -23rem;
    right: -23rem;
  }
}

@media (max-width: 640px) {
  .birthday-shell {
    gap: 2.8rem;
    padding: 3.25rem 1.15rem 3rem;
  }

  h1 {
    font-size: clamp(4rem, 21vw, 6rem);
  }

  .eyebrow {
    margin-bottom: 1.25rem;
    font-size: 0.66rem;
  }

  .dedication {
    margin-top: 2.5rem;
  }

  .message {
    line-height: 1.7;
  }

  .video-label {
    gap: 0.55rem;
    font-size: 0.62rem;
    letter-spacing: 0.12em;
  }

  .video-note {
    display: none;
  }

  .video-caption {
    align-items: start;
    flex-direction: column;
    gap: 0.8rem;
  }

  .video-caption a {
    font-size: 0.74rem;
  }

  .poster-corner {
    display: none;
  }

  .sunrise-small {
    top: -5rem;
    right: -6rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
