:root {
  --cream: #fff8ef;
  --blush: #f8dce3;
  --rose: #a83d58;
  --wine: #632337;
  --lavender: #d9c6ed;
  --gold: #c79b45;
  --ink: #34202a;
  --muted: #765f68;
  --paper: rgba(255, 250, 244, 0.86);
  --shadow: 0 24px 80px rgba(93, 35, 52, 0.18);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(217, 198, 237, 0.34), transparent 32rem),
    linear-gradient(135deg, #fffaf3 0%, #fde8ed 48%, #fff7ef 100%);
  font-family: "Inter", system-ui, sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
}

body.gate-locked {
  min-height: 100svh;
  overflow: hidden;
}

body.modal-open {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

.gate-locked .site-header,
.gate-locked main {
  visibility: hidden;
}

.access-gate {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  padding: 22px;
  background:
    linear-gradient(90deg, rgba(46, 20, 31, 0.82), rgba(88, 37, 54, 0.5)),
    url("assets/romantic-hero.png") center / cover;
  place-items: center;
}

body:not(.gate-locked) .access-gate {
  display: none;
}

.access-card {
  width: min(680px, 100%);
  padding: clamp(28px, 6vw, 56px);
  color: var(--wine);
  background: rgba(255, 250, 245, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.52);
  border-radius: 8px;
  box-shadow: 0 30px 90px rgba(31, 12, 21, 0.34);
  backdrop-filter: blur(18px);
}

.access-card h2 {
  margin-bottom: 22px;
}

.gate-countdown-copy {
  margin: 0 0 14px;
  color: var(--muted);
  font-weight: 800;
}

.gate-timer {
  display: grid;
  grid-template-columns: repeat(4, minmax(54px, 1fr));
  gap: 8px 10px;
  margin: 0 0 24px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid rgba(199, 155, 69, 0.18);
  border-radius: 8px;
}

.gate-timer span {
  color: var(--wine);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(1.9rem, 5vw, 3rem);
  font-weight: 700;
  line-height: 1;
}

.gate-timer small {
  align-self: center;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
}

.access-card label {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
  font-weight: 800;
}

.password-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
}

.password-row input {
  width: 100%;
  min-height: 50px;
  padding: 0 16px;
  color: var(--wine);
  background: #fff;
  border: 1px solid rgba(168, 61, 88, 0.2);
  border-radius: 999px;
  outline: 0;
  font: inherit;
}

.password-row input:focus {
  border-color: var(--rose);
  box-shadow: 0 0 0 4px rgba(168, 61, 88, 0.1);
}

.gate-error {
  margin: 14px 0 0;
  color: var(--rose);
  font-weight: 800;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 18px clamp(18px, 5vw, 64px);
  color: #fff;
  transition: background 240ms ease, box-shadow 240ms ease, color 240ms ease;
}

.site-header.scrolled {
  color: var(--wine);
  background: rgba(255, 248, 239, 0.9);
  box-shadow: 0 10px 34px rgba(77, 31, 47, 0.1);
  backdrop-filter: blur(18px);
}

.brand {
  font-family: "Parisienne", "Brush Script MT", cursive;
  font-size: clamp(1.55rem, 3vw, 2.15rem);
  white-space: nowrap;
}

nav {
  display: flex;
  gap: clamp(14px, 2vw, 28px);
  font-size: 0.9rem;
  font-weight: 700;
}

nav a {
  opacity: 0.88;
}

.music-toggle,
.primary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 999px;
  border: 0;
  cursor: pointer;
}

.music-toggle {
  gap: 8px;
  padding: 10px 15px;
  color: inherit;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.34);
  backdrop-filter: blur(12px);
}

.site-header.scrolled .music-toggle {
  background: rgba(255, 255, 255, 0.64);
  border-color: rgba(99, 35, 55, 0.14);
}

.music-toggle[aria-pressed="true"] .music-icon {
  animation: pulseNote 1.8s ease-in-out infinite;
}

.hero {
  position: relative;
  display: grid;
  align-items: center;
  min-height: 100svh;
  padding: 130px clamp(22px, 7vw, 92px) 82px;
  color: #fff;
  background-image: url("assets/romantic-hero.png");
  background-position: center;
  background-size: cover;
  isolation: isolate;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(46, 20, 31, 0.68) 0%, rgba(88, 37, 54, 0.34) 48%, rgba(255, 214, 221, 0.16) 100%),
    linear-gradient(180deg, rgba(32, 13, 22, 0.26), rgba(32, 13, 22, 0.5));
}

.hero-content {
  max-width: 770px;
}

.eyebrow,
.section-kicker {
  margin: 0 0 12px;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  line-height: 0.98;
  letter-spacing: 0;
}

h1 {
  max-width: 760px;
  font-size: clamp(4rem, 10vw, 8.8rem);
  text-wrap: balance;
}

h2 {
  color: var(--wine);
  font-size: clamp(2.35rem, 5vw, 4.9rem);
  text-wrap: balance;
}

h3 {
  color: var(--wine);
  font-size: clamp(1.55rem, 3vw, 2.05rem);
}

.hero-copy {
  max-width: 650px;
  margin: 24px 0 0;
  color: rgba(255, 255, 255, 0.92);
  font-size: clamp(1.04rem, 2vw, 1.35rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

.primary-button,
.ghost-button {
  padding: 13px 22px;
  font-weight: 800;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.primary-button {
  color: var(--wine);
  background: linear-gradient(135deg, #fff8ef, #ffdfe8);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.2);
}

.ghost-button {
  color: #fff;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.42);
}

.primary-button:hover,
.ghost-button:hover,
.memory-card:hover,
.reason-card:hover {
  transform: translateY(-3px);
}

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 26px;
  display: grid;
  width: 28px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 999px;
  transform: translateX(-50%);
  place-items: start center;
  padding-top: 9px;
}

.scroll-cue span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #fff;
  animation: scrollDot 1.7s ease-in-out infinite;
}

.section {
  padding: clamp(72px, 10vw, 132px) clamp(20px, 6vw, 86px);
}

.section-heading {
  max-width: 780px;
  margin: 0 auto 36px;
  text-align: center;
}

.letter-section {
  display: grid;
  place-items: center;
}

.letter-paper {
  width: min(940px, 100%);
  padding: clamp(28px, 6vw, 70px);
  background: var(--paper);
  border: 1px solid rgba(199, 155, 69, 0.18);
  border-radius: 8px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.letter-paper p {
  color: var(--muted);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(1.22rem, 2vw, 1.5rem);
}

.typewriter {
  min-height: 10lh;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 18px;
}

.memory-card {
  min-width: 0;
  padding: 0;
  overflow: hidden;
  color: var(--wine);
  text-align: left;
  background: #fffaf5;
  border: 1px solid rgba(168, 61, 88, 0.13);
  border-radius: 8px;
  box-shadow: 0 18px 42px rgba(99, 35, 55, 0.11);
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.memory-card:hover {
  box-shadow: 0 24px 54px rgba(99, 35, 55, 0.17);
}

.photo {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center;
  background: #f4dce4;
}

.caption {
  display: block;
  min-height: 64px;
  padding: 16px;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.25rem;
  font-weight: 700;
}

.journey-section {
  background: rgba(255, 250, 244, 0.6);
}

.timeline {
  position: relative;
  display: grid;
  max-width: 980px;
  margin: 0 auto;
  padding: 0;
  list-style: none;
}

.timeline::before {
  position: absolute;
  top: 14px;
  bottom: 14px;
  left: 50%;
  width: 1px;
  background: linear-gradient(var(--gold), var(--blush), var(--gold));
  content: "";
}

.timeline-item {
  position: relative;
  width: calc(50% - 34px);
  margin-bottom: 28px;
  padding: 24px;
  background: #fffaf5;
  border: 1px solid rgba(199, 155, 69, 0.2);
  border-radius: 8px;
  box-shadow: 0 14px 42px rgba(99, 35, 55, 0.09);
}

.timeline-item:nth-child(even) {
  justify-self: end;
}

.timeline-item::after {
  position: absolute;
  top: 28px;
  width: 13px;
  height: 13px;
  border: 4px solid #fffaf5;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 1px rgba(199, 155, 69, 0.28);
  content: "";
}

.timeline-item:nth-child(odd)::after {
  right: -41px;
}

.timeline-item:nth-child(even)::after {
  left: -40px;
}

.timeline-date {
  color: var(--rose);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.timeline-item p,
.wish-panel p,
.final-note p,
.video-frame p {
  color: var(--muted);
}

.reason-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.reason-card {
  position: relative;
  min-height: 250px;
  padding: 26px;
  overflow: hidden;
  color: var(--wine);
  text-align: left;
  background: linear-gradient(160deg, #fffaf5, #fce6ef);
  border: 1px solid rgba(168, 61, 88, 0.12);
  border-radius: 8px;
  box-shadow: 0 18px 45px rgba(99, 35, 55, 0.1);
  cursor: pointer;
}

.reason-card span {
  display: inline-grid;
  width: 44px;
  height: 44px;
  margin-bottom: 22px;
  color: #fff;
  background: var(--rose);
  border-radius: 50%;
  font-size: 1.3rem;
  place-items: center;
}

.reason-card strong {
  display: block;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.7rem;
}

.reason-card p {
  max-height: 0;
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  opacity: 0;
  transition: max-height 300ms ease, opacity 300ms ease, margin 300ms ease;
}

.reason-card.is-open p,
.reason-card:hover p {
  max-height: 120px;
  margin-top: 12px;
  opacity: 1;
}

.wishes-section {
  background:
    linear-gradient(rgba(255, 248, 239, 0.88), rgba(255, 248, 239, 0.92)),
    url("assets/memories/memory-12.jpeg") center / cover fixed;
}

.wish-panel,
.final-note {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.wish-panel p,
.final-note p {
  font-size: clamp(1.02rem, 2vw, 1.25rem);
}

.countdown-note {
  margin-top: 20px;
  color: var(--rose) !important;
  font-weight: 800;
}

.celebration-timer {
  display: grid;
  grid-template-columns: repeat(4, minmax(70px, 1fr));
  gap: 10px 14px;
  max-width: 620px;
  margin: 36px auto 0;
  padding: 18px;
  background: rgba(255, 255, 255, 0.54);
  border: 1px solid rgba(199, 155, 69, 0.18);
  border-radius: 8px;
  box-shadow: 0 18px 48px rgba(99, 35, 55, 0.09);
}

.celebration-timer span {
  color: var(--wine);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 700;
}

.celebration-timer small {
  align-self: center;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.video-frame {
  max-width: 840px;
  margin: 0 auto;
  padding: 14px;
  text-align: center;
  background: #fffaf5;
  border: 1px solid rgba(168, 61, 88, 0.13);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

video {
  display: block;
  width: 100%;
  max-height: 520px;
  object-fit: cover;
  border-radius: 6px;
  background: var(--wine);
}

.final-section {
  min-height: 75svh;
  display: grid;
  place-items: center;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(77, 27, 45, 0.92), rgba(168, 61, 88, 0.78)),
    url("assets/memories/memory-19.jpeg") center / cover;
}

.final-note h2,
.final-note p,
.final-note .section-kicker,
.final-note strong {
  color: #fff;
}

.final-note strong {
  display: block;
  margin-top: 28px;
  font-family: "Parisienne", "Brush Script MT", cursive;
  font-size: clamp(2rem, 5vw, 3.8rem);
  font-weight: 400;
}

.lightbox,
.surprise {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  padding: 24px;
  background: rgba(31, 12, 21, 0.76);
  backdrop-filter: blur(14px);
  place-items: center;
}

.lightbox[hidden],
.surprise[hidden] {
  display: none;
}

.lightbox img {
  width: min(920px, 100%);
  max-height: 76svh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.34);
}

.lightbox p {
  max-width: 720px;
  color: #fff8ef;
  text-align: center;
}

.lightbox-close,
.surprise-close {
  position: fixed;
  top: 18px;
  right: 18px;
  display: grid;
  width: 46px;
  height: 46px;
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.7rem;
  place-items: center;
}

.surprise-card {
  position: relative;
  width: min(680px, 100%);
  padding: clamp(30px, 6vw, 58px);
  text-align: center;
  background: #fffaf5;
  border-radius: 8px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.28);
}

.surprise-card p {
  color: var(--muted);
}

.surprise-card .surprise-close {
  position: absolute;
  color: var(--wine);
  background: rgba(168, 61, 88, 0.08);
  border-color: rgba(168, 61, 88, 0.1);
}

.ambient-hearts,
.burst-layer {
  position: fixed;
  inset: 0;
  z-index: 55;
  pointer-events: none;
  overflow: hidden;
}

.ambient-hearts {
  z-index: 5;
}

.heart,
.confetti {
  position: absolute;
  animation-timing-function: ease-in;
  animation-fill-mode: forwards;
}

.heart {
  color: rgba(168, 61, 88, 0.36);
  animation-name: floatHeart;
}

.confetti {
  width: 9px;
  height: 15px;
  border-radius: 2px;
  animation-name: confettiFall;
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 700ms ease, transform 700ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes scrollDot {
  0%,
  100% {
    transform: translateY(0);
    opacity: 0.4;
  }
  50% {
    transform: translateY(18px);
    opacity: 1;
  }
}

@keyframes pulseNote {
  50% {
    transform: scale(1.18);
  }
}

@keyframes floatHeart {
  from {
    transform: translate3d(0, 0, 0) rotate(0deg);
    opacity: 0;
  }
  15% {
    opacity: 1;
  }
  to {
    transform: translate3d(var(--drift), -110vh, 0) rotate(28deg);
    opacity: 0;
  }
}

@keyframes confettiFall {
  from {
    transform: translate3d(0, -10vh, 0) rotate(0deg);
    opacity: 1;
  }
  to {
    transform: translate3d(var(--drift), 108vh, 0) rotate(720deg);
    opacity: 0;
  }
}

@media (max-width: 980px) {
  .site-header {
    gap: 14px;
  }

  nav {
    display: none;
  }

  .gallery,
  .reason-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .timeline::before {
    left: 8px;
  }

  .timeline-item,
  .timeline-item:nth-child(even) {
    justify-self: stretch;
    width: auto;
    margin-left: 34px;
  }

  .timeline-item:nth-child(odd)::after,
  .timeline-item:nth-child(even)::after {
    left: -32px;
    right: auto;
  }
}

@media (max-width: 620px) {
  .site-header {
    padding: 14px 16px;
  }

  .brand {
    font-size: 1.45rem;
  }

  .music-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  .music-toggle {
    width: 44px;
    padding: 0;
  }

  .hero {
    min-height: 100svh;
    padding: 118px 20px 74px;
    background-position: 55% center;
  }

  h1 {
    font-size: clamp(3.35rem, 18vw, 4.75rem);
  }

  .hero-copy {
    font-size: 1rem;
  }

  .primary-button,
  .ghost-button {
    width: 100%;
  }

  .password-row {
    grid-template-columns: 1fr;
  }

  .gate-timer {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .gallery,
  .reason-grid {
    grid-template-columns: 1fr;
  }

  .reason-card {
    min-height: 210px;
  }

  .celebration-timer {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

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