﻿:root {
  --bg: #fff7fb;
  --bg-strong: #ffe5ee;
  --surface: rgba(255, 255, 255, 0.78);
  --surface-strong: rgba(255, 255, 255, 0.93);
  --text: #44263a;
  --muted: #765c6d;
  --accent: #ff6fa8;
  --accent-strong: #ff3d86;
  --accent-soft: #fff0a8;
  --shadow: 0 18px 50px rgba(226, 84, 138, 0.16);
  --radius-xl: 28px;
  --radius-lg: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Manrope', system-ui, sans-serif;
  color: var(--text);
  background: radial-gradient(circle at top, #fffefe 0%, var(--bg) 40%, #ffd9e8 100%);
  overflow-x: hidden;
}

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

button {
  font: inherit;
}

.app {
  position: relative;
  z-index: 1;
  width: min(100%, 760px);
  margin: 0 auto;
  padding: max(20px, env(safe-area-inset-top)) 16px max(28px, env(safe-area-inset-bottom));
}

.bg-glow,
.sparkles::before,
.sparkles::after {
  position: fixed;
  pointer-events: none;
}

.bg-glow {
  width: 280px;
  height: 280px;
  border-radius: 50%;
  filter: blur(30px);
  opacity: 0.48;
}

.bg-glow--one {
  top: -60px;
  right: -80px;
  background: #ffc0da;
}

.bg-glow--two {
  bottom: 8%;
  left: -110px;
  background: #ffe0a8;
}

.sparkles::before,
.sparkles::after {
  content: '';
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(255,255,255,0.9) 0 2px, transparent 3px),
    radial-gradient(circle at 80% 14%, rgba(255,255,255,0.8) 0 2px, transparent 3px),
    radial-gradient(circle at 70% 72%, rgba(255,255,255,0.8) 0 2px, transparent 3px),
    radial-gradient(circle at 12% 82%, rgba(255,255,255,0.9) 0 2px, transparent 3px);
  opacity: 0.55;
}

.card,
.mini-card,
.photo-card {
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: var(--surface);
  border: 1px solid rgba(255,255,255,0.85);
  box-shadow: var(--shadow);
}

.card {
  border-radius: var(--radius-xl);
  padding: 24px 18px;
  margin-bottom: 16px;
}

.hero {
  text-align: center;
  padding-top: 28px;
}

.hero-badge {
  display: inline-block;
  margin-bottom: 16px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,0.88);
  color: var(--accent-strong);
  font-weight: 700;
  font-size: 0.92rem;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent-strong);
  font-size: 0.83rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

h1,
h2,
p,
figure {
  margin-top: 0;
  margin-bottom: 0;
}

h1 {
  font-size: clamp(2rem, 8vw, 4.15rem);
  line-height: 1.03;
  margin-bottom: 14px;
}

h1 span {
  color: var(--accent-strong);
}

.lead,
.card p,
.mini-card p,
.hero-photo-note p,
.mood-message,
.section-note,
.photo-card figcaption,
.photo-quote p {
  color: var(--muted);
  line-height: 1.72;
  font-size: 1rem;
}

.section-head {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}

.hero-photo-note {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 14px;
  text-align: left;
  margin: 24px 0;
  padding: 16px;
  border-radius: 22px;
  background: rgba(255,255,255,0.72);
}

.bear-icon {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: linear-gradient(180deg, #fff6cf, #ffe1a7);
  font-size: 1.8rem;
}

.photo-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.photo-card {
  overflow: hidden;
  border-radius: 24px;
}

.photo-card img {
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.photo-card figcaption {
  padding: 14px 16px 16px;
  background: rgba(255,255,255,0.9);
}

.photo-card--wide img {
  aspect-ratio: 4 / 3;
}

.photo-card--quote {
  display: grid;
  place-items: stretch;
  min-height: 220px;
  background: linear-gradient(160deg, rgba(255,255,255,0.95), rgba(255,236,214,0.98));
}

.photo-quote {
  display: grid;
  align-content: center;
  gap: 12px;
  height: 100%;
  padding: 22px;
}

.photo-quote span {
  font-size: 1.8rem;
}

.photo-quote p {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
}

.primary-btn,
.secondary-btn {
  width: 100%;
  border: 0;
  border-radius: 999px;
  padding: 16px 20px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.primary-btn {
  color: white;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  box-shadow: 0 12px 24px rgba(255, 63, 133, 0.26);
}

.secondary-btn {
  color: var(--accent-strong);
  background: rgba(255, 255, 255, 0.95);
}

.primary-btn:active,
.secondary-btn:active,
.mood-btn.is-active {
  transform: scale(0.98);
}

.hidden {
  display: none;
}

.letter-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 12px;
}

.signature {
  margin: 0;
  font-family: 'Marck Script', cursive;
  font-size: 1.8rem;
  color: var(--accent-strong);
}

.closing {
  margin-bottom: 0;
  font-weight: 700;
  color: var(--text) !important;
}

.reasons-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-bottom: 16px;
}

.mini-card {
  border-radius: var(--radius-lg);
  padding: 18px;
}

.accent-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.9), rgba(255,246,205,0.95));
}

.mini-card span {
  font-size: 1.6rem;
}

.mini-card h2,
.final-card h2,
.memory-card h2,
.mood-lift-card h2,
.photo-story h2 {
  margin: 12px 0 8px;
  font-size: 1.25rem;
}

.promise-list {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.promise-item {
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255,255,255,0.8);
  font-weight: 600;
  color: var(--text);
}

.mood-actions {
  display: grid;
  gap: 10px;
  margin: 18px 0 12px;
}

.mood-message {
  margin: 0;
  min-height: 78px;
  padding: 16px;
  border-radius: 20px;
  background: rgba(255,255,255,0.78);
}

.final-card {
  text-align: center;
  background: var(--surface-strong);
}

.hearts-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.floating-heart {
  position: absolute;
  bottom: -40px;
  font-size: 22px;
  opacity: 0.9;
  animation: floatUp linear forwards;
  will-change: transform, opacity;
}

.revealed {
  animation: riseIn 0.5s ease;
}

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

@keyframes floatUp {
  from {
    transform: translate3d(0, 0, 0) scale(0.85);
    opacity: 0;
  }
  15% {
    opacity: 0.95;
  }
  to {
    transform: translate3d(var(--drift), -115vh, 0) scale(1.2);
    opacity: 0;
  }
}

@media (min-width: 640px) {
  .app {
    padding-left: 22px;
    padding-right: 22px;
  }

  .card {
    padding: 28px;
  }

  .photo-grid,
  .reasons-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .photo-card--wide,
  .photo-card--quote {
    grid-column: span 2;
  }

  .mood-actions {
    grid-template-columns: repeat(3, 1fr);
  }
}

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

  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
