:root {
  --surface: rgba(255, 250, 246, 0.8);
  --surface-strong: rgba(255, 247, 242, 0.94);
  --line: rgba(126, 84, 88, 0.15);
  --text: #43262c;
  --muted: #7d5a60;
  --accent: #c86f7d;
  --accent-deep: #96525d;
  --shadow: 0 18px 50px rgba(101, 53, 60, 0.12);
  --radius-lg: 28px;
  --radius-md: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Manrope", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top, rgba(255, 220, 225, 0.8), transparent 34%),
    radial-gradient(circle at bottom right, rgba(194, 225, 232, 0.45), transparent 28%),
    linear-gradient(180deg, #fffdfa 0%, #fff7f2 52%, #fdf0ed 100%);
  overflow-x: hidden;
}

body.is-locked {
  overflow: hidden;
}

img {
  display: block;
  width: 100%;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.entry-screen {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 24px;
  background: linear-gradient(160deg, rgba(255, 246, 242, 0.98), rgba(249, 228, 231, 0.96));
  transition: opacity 0.7s ease, visibility 0.7s ease;
}

.entry-screen.is-hidden {
  opacity: 0;
  visibility: hidden;
}

.entry-screen__glow {
  position: absolute;
  width: 44vw;
  height: 44vw;
  max-width: 260px;
  max-height: 260px;
  border-radius: 50%;
  filter: blur(10px);
  opacity: 0.55;
}

.entry-screen__glow--left {
  top: 8%;
  left: -8%;
  background: rgba(237, 189, 204, 0.78);
}

.entry-screen__glow--right {
  right: -8%;
  bottom: 10%;
  background: rgba(193, 225, 232, 0.7);
}

.entry-card {
  position: relative;
  width: min(100%, 440px);
  padding: 30px 24px;
  border: 1px solid rgba(117, 69, 77, 0.12);
  border-radius: 32px;
  background: rgba(255, 252, 249, 0.82);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
  text-align: center;
}

.eyebrow {
  margin: 0 0 10px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-deep);
}

.entry-card h1,
.hero h2,
.section-heading h3,
.promise-box h3,
.final-section h3 {
  margin: 0;
  font-family: "Cormorant Garamond", serif;
  font-weight: 700;
  line-height: 0.98;
}

.entry-card h1 {
  font-size: clamp(2.3rem, 8vw, 3.3rem);
}

.entry-copy,
.entry-note,
.hero__lead,
.hero__card p,
.counter-note,
.promise-box p,
.final-section p,
.message-card__back {
  line-height: 1.7;
  color: var(--muted);
}

.entry-button,
.surprise-button,
.message-card,
.gallery-button {
  font: inherit;
}

.entry-button,
.surprise-button,
.gallery-button {
  border: 0;
  border-radius: 999px;
  color: #fff9f7;
  font-weight: 700;
}

.entry-button,
.surprise-button {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-deep) 100%);
  box-shadow: 0 14px 28px rgba(150, 82, 93, 0.26);
}

.entry-button {
  width: 100%;
  margin-top: 22px;
  padding: 16px 18px;
}

.entry-note {
  margin: 14px 0 0;
  font-size: 0.9rem;
}

.petals {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.petal {
  position: absolute;
  top: -10%;
  width: 12px;
  height: 18px;
  border-radius: 12px 12px 12px 2px;
  background: linear-gradient(180deg, rgba(245, 195, 206, 0.9), rgba(218, 134, 154, 0.85));
  opacity: 0.72;
  animation: fall linear forwards;
}

.page-shell {
  position: relative;
  z-index: 1;
  width: min(100%, 520px);
  margin: 0 auto;
  padding: max(18px, env(safe-area-inset-top)) 18px max(28px, env(safe-area-inset-bottom));
}

.hero,
.counter-section,
.message-section,
.gallery-section,
.promise-section,
.final-section {
  position: relative;
  margin-top: 18px;
}

.hero {
  overflow: hidden;
  padding: 26px;
  min-height: calc(100vh - 36px);
  border: 1px solid var(--line);
  border-radius: 34px;
  background: linear-gradient(180deg, rgba(255, 249, 245, 0.82), rgba(255, 244, 241, 0.72));
  box-shadow: var(--shadow);
  display: grid;
  align-content: space-between;
}

.hero__ornament {
  position: absolute;
  border-radius: 50%;
  filter: blur(8px);
  opacity: 0.45;
}

.hero__ornament--top {
  inset: -34px auto auto -22px;
  width: 160px;
  height: 160px;
  background: radial-gradient(circle, rgba(239, 195, 203, 0.95), transparent 66%);
}

.hero__content,
.hero__card {
  position: relative;
  z-index: 1;
}

.hero h2 {
  font-size: clamp(3.3rem, 14vw, 5rem);
  margin-bottom: 18px;
}

.hero__lead {
  margin: 0;
  font-size: 1rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.hero-chip {
  padding: 12px 16px;
  border-radius: 999px;
  border: 1px solid rgba(121, 77, 86, 0.14);
  background: rgba(255, 251, 249, 0.8);
  color: var(--text);
  text-decoration: none;
  font-size: 0.94rem;
  font-weight: 700;
}

.hero__card,
.counter-section,
.message-section,
.gallery-section,
.promise-box,
.final-section {
  padding: 22px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--surface);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
}

.hero__card {
  margin-top: 26px;
}

.hero__card-title {
  margin: 0 0 8px;
  font-weight: 800;
  color: var(--text);
}

.section-heading {
  margin-bottom: 18px;
}

.section-heading h3,
.promise-box h3,
.final-section h3 {
  font-size: clamp(2rem, 9vw, 3rem);
}

.counter-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.counter-card {
  padding: 18px 14px;
  border-radius: var(--radius-md);
  background: var(--surface-strong);
  border: 1px solid rgba(121, 77, 86, 0.08);
  text-align: center;
}

.counter-value {
  display: block;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(2.2rem, 10vw, 3.2rem);
  font-weight: 700;
}

.counter-label {
  color: var(--muted);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.counter-note {
  margin: 16px 0 0;
}

.message-grid {
  display: grid;
  gap: 12px;
}

.message-card {
  position: relative;
  min-height: 132px;
  padding: 20px;
  border: 1px solid rgba(121, 77, 86, 0.1);
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, rgba(255, 250, 246, 0.96), rgba(255, 244, 241, 0.86));
  text-align: left;
  color: var(--text);
  overflow: hidden;
}

.message-card__front,
.message-card__back {
  display: block;
  transition: transform 0.55s ease, opacity 0.55s ease;
}

.message-card__front {
  font-weight: 800;
  line-height: 1.5;
}

.message-card__back {
  position: absolute;
  inset: 20px;
  opacity: 0;
  transform: translateY(16px);
}

.message-card.is-open .message-card__front {
  opacity: 0;
  transform: translateY(-14px);
}

.message-card.is-open .message-card__back {
  opacity: 1;
  transform: translateY(0);
}

.gallery-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 82%;
  gap: 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding-bottom: 6px;
}

.gallery-track::-webkit-scrollbar {
  display: none;
}

.photo-card {
  margin: 0;
  padding: 10px;
  border-radius: 28px;
  background: rgba(255, 252, 249, 0.9);
  border: 1px solid rgba(121, 77, 86, 0.1);
  box-shadow: var(--shadow);
  scroll-snap-align: center;
}

.photo-card img {
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center;
  border-radius: 22px;
}

.gallery-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
}

.gallery-button {
  min-height: 42px;
  padding: 0 14px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-deep) 100%);
}

.gallery-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex: 1;
}

.gallery-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(150, 82, 93, 0.18);
  transition: transform 0.3s ease, background-color 0.3s ease;
}

.gallery-dot.is-active {
  background: var(--accent);
  transform: scale(1.15);
}

.promise-box {
  text-align: center;
}

.surprise-button {
  margin-top: 18px;
  padding: 15px 22px;
}

.final-section {
  margin-bottom: 18px;
  text-align: center;
}

.signature {
  margin-top: 18px;
  font-family: "Cormorant Garamond", serif;
  font-size: 2rem;
  color: var(--accent-deep);
}

.heart-burst {
  position: fixed;
  z-index: 20;
  pointer-events: none;
  font-size: 18px;
  animation: burst 1.9s ease-out forwards;
}

.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

@keyframes fall {
  0% {
    transform: translate3d(0, 0, 0) rotate(0deg);
  }

  100% {
    transform: translate3d(var(--drift), 115vh, 0) rotate(240deg);
  }
}

@keyframes burst {
  0% {
    opacity: 0;
    transform: translate3d(0, 0, 0) scale(0.4);
  }

  15% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    transform: translate3d(var(--burst-x), var(--burst-y), 0) scale(1.4);
  }
}

@media (min-width: 560px) {
  .page-shell {
    width: min(100%, 620px);
  }

  .gallery-track {
    grid-auto-columns: 56%;
  }
}

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