:root {
  --cream: #fff5e8;
  --cream-soft: #fffaf1;
  --blush: #f6b8c8;
  --blush-light: #ffdce5;
  --burgundy: #6f1731;
  --burgundy-deep: #3d0c1c;
  --gold: #d9a441;
  --navy: #111827;
  --navy-soft: #1d2435;
  --white: rgba(255, 255, 255, 0.86);
  --glass: rgba(255, 255, 255, 0.58);
  --glass-dark: rgba(28, 23, 38, 0.58);
  --shadow: 0 24px 70px rgba(61, 12, 28, 0.18);
  --radius: 28px;
}

* { box-sizing: border-box; }

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--navy);
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 15% 10%, rgba(246, 184, 200, 0.45), transparent 28rem),
    radial-gradient(circle at 85% 25%, rgba(217, 164, 65, 0.22), transparent 24rem),
    linear-gradient(135deg, #fff8ee 0%, #fbe2e8 48%, #f8eed9 100%);
  min-height: 100vh;
  overflow-x: hidden;
}

body.locked {
  overflow: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(111, 23, 49, 0.035) 1px, transparent 1px), linear-gradient(90deg, rgba(111, 23, 49, 0.035) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, black, transparent 78%);
  z-index: -3;
}

h1, h2, h3 {
  font-family: "Playfair Display", Georgia, serif;
  color: var(--burgundy-deep);
  line-height: 1.02;
  margin: 0;
}

h1 { font-size: clamp(3.3rem, 9vw, 7.7rem); letter-spacing: -0.07em; }
h2 { font-size: clamp(2.35rem, 5.8vw, 5rem); letter-spacing: -0.045em; }
h3 { font-size: clamp(1.55rem, 3vw, 2.35rem); letter-spacing: -0.025em; }
p { line-height: 1.78; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }

.glass {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.76), rgba(255, 255, 255, 0.36));
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
}

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

.ambient span {
  position: absolute;
  width: 9px;
  height: 9px;
  background: var(--gold);
  border-radius: 999px;
  box-shadow: 0 0 24px rgba(217, 164, 65, 0.75);
  animation: floatParticle 13s linear infinite;
  opacity: 0.55;
}

.ambient span::before {
  content: "♥";
  position: absolute;
  color: var(--blush);
  font-size: 18px;
  transform: translate(-45%, -55%);
}

.ambient span:nth-child(1) { left: 8%; animation-delay: -2s; animation-duration: 18s; }
.ambient span:nth-child(2) { left: 25%; animation-delay: -8s; animation-duration: 22s; }
.ambient span:nth-child(3) { left: 43%; animation-delay: -4s; animation-duration: 16s; }
.ambient span:nth-child(4) { left: 62%; animation-delay: -10s; animation-duration: 24s; }
.ambient span:nth-child(5) { left: 78%; animation-delay: -6s; animation-duration: 19s; }
.ambient span:nth-child(6) { left: 92%; animation-delay: -12s; animation-duration: 21s; }

@keyframes floatParticle {
  from { transform: translateY(110vh) rotate(0deg) scale(0.75); }
  to { transform: translateY(-20vh) rotate(360deg) scale(1.15); }
}

.lock-screen {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  background:
    radial-gradient(circle at 20% 15%, rgba(246, 184, 200, 0.32), transparent 24rem),
    radial-gradient(circle at 80% 85%, rgba(217, 164, 65, 0.22), transparent 24rem),
    linear-gradient(140deg, #0d1323 0%, #321124 48%, #6f1731 100%);
  color: var(--cream-soft);
  transition: opacity 900ms ease, transform 900ms ease, visibility 900ms ease;
}

.lock-screen.unlocked {
  opacity: 0;
  transform: scale(1.06);
  visibility: hidden;
}

.lock-card {
  width: min(100%, 560px);
  padding: clamp(2rem, 6vw, 4rem);
  border-radius: 38px;
  text-align: center;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.06));
  border-color: rgba(255, 255, 255, 0.18);
}

.lock-card h1 { color: var(--cream-soft); font-size: clamp(2.8rem, 8vw, 5.8rem); }
.lock-card p { color: rgba(255, 250, 241, 0.82); }

.eyebrow {
  color: var(--burgundy);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.lock-card .eyebrow { color: var(--gold); }

.password-form {
  display: grid;
  gap: 0.9rem;
  margin-top: 2rem;
}

.password-form input, .calculator input {
  width: 100%;
  border: 1px solid rgba(111, 23, 49, 0.18);
  border-radius: 999px;
  padding: 1rem 1.2rem;
  outline: none;
  background: rgba(255, 255, 255, 0.68);
  color: var(--burgundy-deep);
}

.password-form input {
  text-align: center;
  background: rgba(255, 255, 255, 0.12);
  color: white;
  border-color: rgba(255, 255, 255, 0.25);
}

.password-form input::placeholder { color: rgba(255, 255, 255, 0.6); }

.button, .password-form button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  padding: 0.95rem 1.45rem;
  cursor: pointer;
  font-weight: 800;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.button:hover, .password-form button:hover {
  transform: translateY(-2px);
}

.primary, .password-form button {
  color: var(--cream-soft);
  background: linear-gradient(135deg, var(--burgundy), #a83257 48%, var(--gold));
  box-shadow: 0 14px 38px rgba(111, 23, 49, 0.32), 0 0 30px rgba(217, 164, 65, 0.16);
}

.secondary {
  color: var(--burgundy);
  background: rgba(255, 255, 255, 0.66);
  border: 1px solid rgba(111, 23, 49, 0.16);
}

.big { padding: 1.08rem 1.8rem; font-size: 1rem; }

.password-message, .tiny-message {
  min-height: 1.5rem;
  color: var(--burgundy);
  font-weight: 800;
}

.lock-card .password-message { color: var(--blush-light); }

.site.is-hidden { display: none; }
.site { animation: siteReveal 900ms ease both; }

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

.site-header {
  position: sticky;
  top: 1rem;
  z-index: 10;
  width: min(1120px, calc(100% - 2rem));
  margin: 1rem auto 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0.85rem 0.75rem 1.2rem;
  border-radius: 999px;
}

.brand {
  color: var(--burgundy-deep);
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 800;
  font-size: 1.18rem;
}

.nav-menu {
  display: flex;
  gap: 0.2rem;
  align-items: center;
}

.nav-menu a {
  border-radius: 999px;
  padding: 0.65rem 0.82rem;
  color: rgba(17, 24, 39, 0.78);
  font-size: 0.92rem;
  font-weight: 700;
}

.nav-menu a:hover { background: rgba(255, 255, 255, 0.64); color: var(--burgundy); }

.menu-toggle {
  display: none;
  background: transparent;
  border: 0;
  padding: 0.4rem;
}

.menu-toggle span {
  display: block;
  width: 23px;
  height: 2px;
  margin: 5px 0;
  background: var(--burgundy);
  border-radius: 9px;
}

.section {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
  padding: clamp(4.5rem, 9vw, 8rem) 0;
}

.hero {
  min-height: calc(100vh - 6rem);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.82fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
}

.hero-subtitle {
  max-width: 720px;
  color: var(--burgundy);
  font-size: clamp(1.22rem, 2.2vw, 1.65rem);
  font-weight: 700;
}

.hero-text {
  max-width: 720px;
  color: rgba(17, 24, 39, 0.78);
  font-size: 1.05rem;
}

.secret-word, .inline-secret {
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  padding: 0;
  font-family: inherit;
}

.secret-word { border-bottom: 2px solid rgba(217, 164, 65, 0.55); }
.inline-secret { color: var(--burgundy); font-weight: 800; text-align: left; }

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin: 2rem 0 0;
}

.hero-photos {
  position: relative;
  min-height: 540px;
}

.photo-placeholder {
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
  min-height: 210px;
  border: 1px dashed rgba(111, 23, 49, 0.28);
  border-radius: 26px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.62), rgba(255, 220, 229, 0.35)),
    repeating-linear-gradient(-45deg, rgba(111, 23, 49, 0.035) 0 8px, transparent 8px 18px);
  color: rgba(111, 23, 49, 0.62);
  text-align: center;
  font-weight: 800;
  padding: 1rem;
  box-shadow: 0 18px 48px rgba(111, 23, 49, 0.12);
}

.photo-placeholder.has-photo {
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.82);
  background: rgba(255, 255, 255, 0.38);
}

.photo-placeholder img {
  width: 100%;
  height: 100%;
  min-height: inherit;
  display: block;
  object-fit: cover;
  transition: transform 500ms ease, filter 500ms ease;
}

.photo-card:hover .photo-placeholder img,
.hero-photos .photo-placeholder:hover img {
  transform: scale(1.045);
  filter: saturate(1.04) contrast(1.03);
}

.main-photo {
  min-height: 480px;
  border-radius: 42px;
  transform: rotate(1.5deg);
}

.floating-photo {
  position: absolute;
  min-height: 118px;
  width: 150px;
  animation: softBob 6s ease-in-out infinite;
}

.floating-photo.one { top: 6%; left: -8%; transform: rotate(-8deg); }
.floating-photo.two { right: -7%; top: 32%; transform: rotate(8deg); animation-delay: -2s; }
.floating-photo.three { left: 8%; bottom: 1%; transform: rotate(5deg); animation-delay: -4s; }

@keyframes softBob {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -12px; }
}

.stats-strip {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  border-radius: var(--radius);
  padding: 1.3rem;
}

.stats-strip div {
  min-height: 116px;
  display: grid;
  align-content: center;
  padding: 1rem;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.46);
}

.stats-strip strong {
  color: var(--burgundy);
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(1.6rem, 3vw, 2.35rem);
  line-height: 1;
}

.stats-strip span { color: rgba(17, 24, 39, 0.66); font-weight: 700; }

.section-heading {
  max-width: 760px;
  margin-bottom: clamp(2rem, 5vw, 4rem);
}

.section-heading p:not(.eyebrow) {
  color: rgba(17, 24, 39, 0.72);
  font-size: 1.08rem;
}

.reason-picker, .calculator {
  border-radius: var(--radius);
  padding: clamp(1.4rem, 4vw, 2.4rem);
}

.reason-picker {
  display: grid;
  justify-items: center;
  gap: 1rem;
  text-align: center;
}

.random-reason {
  width: min(100%, 680px);
  min-height: 112px;
  display: grid;
  place-items: center;
  border-radius: 26px;
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.58);
  color: var(--burgundy-deep);
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(1.45rem, 3vw, 2.2rem);
  box-shadow: inset 0 0 0 1px rgba(111, 23, 49, 0.08);
}

.random-reason.pop { animation: reasonPop 420ms ease both; }

@keyframes reasonPop {
  0% { opacity: 0; transform: scale(0.94); box-shadow: 0 0 0 rgba(217, 164, 65, 0); }
  70% { transform: scale(1.025); box-shadow: 0 0 46px rgba(217, 164, 65, 0.35); }
  100% { opacity: 1; transform: scale(1); }
}

.reasons-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-top: 1.4rem;
}

.reason-card {
  min-height: 142px;
  display: flex;
  align-items: center;
  border-radius: 24px;
  padding: 1.1rem;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.68), rgba(255, 220, 229, 0.35));
  border: 1px solid rgba(255, 255, 255, 0.75);
  color: rgba(17, 24, 39, 0.78);
  font-weight: 700;
  box-shadow: 0 18px 44px rgba(111, 23, 49, 0.1);
}

.reason-card span {
  color: var(--gold);
  font-weight: 900;
  margin-right: 0.55rem;
}

.calculator-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.calculator label {
  display: grid;
  gap: 0.45rem;
  color: rgba(17, 24, 39, 0.74);
  font-weight: 800;
}

.calculator .big { margin-top: 1.4rem; }

.calculation-steps {
  display: grid;
  gap: 0.65rem;
  margin-top: 1rem;
}

.step-line {
  border-radius: 999px;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.55);
  color: var(--burgundy);
  font-weight: 800;
  animation: siteReveal 340ms ease both;
}

.result-card {
  margin-top: 1.4rem;
  border-radius: 28px;
  padding: clamp(1.3rem, 3vw, 2rem);
  background: linear-gradient(145deg, rgba(111, 23, 49, 0.92), rgba(61, 12, 28, 0.9));
  color: var(--cream-soft);
  box-shadow: 0 25px 70px rgba(61, 12, 28, 0.28);
}

.result-card h3 { color: var(--gold); }
.result-card p, .result-card li { color: rgba(255, 250, 241, 0.84); }
.result-card ul { display: grid; gap: 0.45rem; padding-left: 1.2rem; }
.result-card .tiny-message { color: var(--blush-light); }

.gallery-grid {
  columns: 3 250px;
  column-gap: 1rem;
}

.photo-card {
  break-inside: avoid;
  margin: 0 0 1rem;
  border-radius: 28px;
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.75);
  box-shadow: 0 18px 48px rgba(111, 23, 49, 0.1);
}

.photo-card .photo-placeholder { min-height: 230px; }
.photo-card .photo-placeholder.tall { min-height: 360px; }
.photo-card .photo-placeholder.wide { min-height: 190px; }

figcaption {
  padding: 0.8rem 0.45rem 0.2rem;
  color: rgba(17, 24, 39, 0.72);
  font-weight: 800;
}

.letter-section {
  width: min(900px, calc(100% - 2rem));
}

.letter-card {
  position: relative;
  border-radius: 34px;
  padding: clamp(2rem, 6vw, 4.5rem);
  background:
    linear-gradient(90deg, rgba(111, 23, 49, 0.035) 1px, transparent 1px),
    linear-gradient(#fffaf1, #fff2e1);
  background-size: 34px 34px, auto;
  box-shadow: 0 30px 90px rgba(111, 23, 49, 0.18);
  border: 1px solid rgba(217, 164, 65, 0.24);
}

.letter-card::before {
  content: "";
  position: absolute;
  inset: 1rem;
  border: 1px solid rgba(217, 164, 65, 0.25);
  border-radius: 24px;
  pointer-events: none;
}

.letter-card p {
  color: rgba(17, 24, 39, 0.78);
  font-size: 1.05rem;
}

.signature {
  color: var(--burgundy) !important;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.8rem !important;
  font-weight: 800;
}

.ending {
  text-align: center;
}

.ending h2 { margin-bottom: 1.4rem; }

.floating-heart {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 12;
  width: 58px;
  height: 58px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  color: white;
  background: linear-gradient(135deg, var(--burgundy), var(--blush));
  box-shadow: 0 18px 46px rgba(111, 23, 49, 0.35), 0 0 28px rgba(246, 184, 200, 0.42);
  font-size: 1.45rem;
}

.heart-note {
  position: fixed;
  right: 1rem;
  bottom: 5.2rem;
  z-index: 12;
  max-width: 240px;
  border-radius: 20px;
  padding: 0.9rem 1rem;
  background: rgba(255, 255, 255, 0.88);
  color: var(--burgundy);
  box-shadow: var(--shadow);
  font-weight: 900;
  opacity: 0;
  transform: translateY(10px);
  transition: 220ms ease;
  pointer-events: none;
}

.heart-note.show {
  opacity: 1;
  transform: translateY(0);
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(13, 19, 35, 0.72);
  backdrop-filter: blur(10px);
}

.modal-card {
  position: relative;
  width: min(100%, 560px);
  border-radius: 34px;
  padding: clamp(2rem, 6vw, 3.5rem);
  text-align: center;
  animation: reasonPop 380ms ease both;
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.68);
  color: var(--burgundy);
  cursor: pointer;
  font-size: 1.5rem;
}

.modal-hearts {
  color: var(--gold);
  font-size: 1.6rem;
  letter-spacing: 0.5rem;
  margin-bottom: 1rem;
  animation: softBob 2.8s ease-in-out infinite;
}

@media (max-width: 820px) {
  h1 { font-size: clamp(3rem, 15vw, 5rem); }

  .site-header {
    border-radius: 26px;
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .menu-toggle { display: block; }

  .nav-menu {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    padding-top: 0.75rem;
  }

  .nav-menu.open { display: flex; }
  .nav-menu a { padding: 0.8rem 1rem; }

  .hero {
    grid-template-columns: 1fr;
    padding-top: 4rem;
  }

  .hero-photos { min-height: 430px; }
  .main-photo { min-height: 360px; }
  .floating-photo { width: 122px; min-height: 95px; }
  .floating-photo.one { left: 0; }
  .floating-photo.two { right: 0; }

  .stats-strip { grid-template-columns: 1fr 1fr; }

  .calculator-grid { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .section, .stats-strip, .site-header { width: min(100% - 1rem, 1120px); }
  .section { padding: 4rem 0; }
  .lock-card { border-radius: 28px; }
  .hero-actions { flex-direction: column; }
  .button { width: 100%; }
  .stats-strip { grid-template-columns: 1fr; }
  .hero-photos { min-height: 360px; }
  .main-photo { min-height: 300px; border-radius: 30px; }
  .floating-photo.three { bottom: -1rem; }
  .random-reason { font-size: 1.35rem; }
  .gallery-grid { columns: 1; }
}
