:root {
  --bg-1: #fff7f4;
  --bg-2: #fdeee8;
  --bg-3: #f8d7da;
  --surface: rgba(255, 255, 255, 0.72);
  --surface-strong: rgba(255, 255, 255, 0.9);
  --text: #4f3240;
  --text-strong: #2f1d27;
  --muted: #8a6774;
  --accent: #f49bb5;
  --accent-2: #d9a6ff;
  --blue: #7bb7ff;
  --blue-strong: #4b8df0;
  --pink: #f39ac4;
  --pink-strong: #e46ca8;
  --border: rgba(140, 87, 108, 0.14);
  --shadow-xl: 0 30px 80px rgba(153, 94, 118, 0.16);
  --shadow-lg: 0 18px 45px rgba(153, 94, 118, 0.12);
  --shadow-md: 0 10px 25px rgba(153, 94, 118, 0.09);
  --radius-xl: 34px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "DM Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 8% 12%, rgba(255, 211, 223, 0.9), transparent 22%),
    radial-gradient(circle at 88% 14%, rgba(221, 197, 255, 0.85), transparent 22%),
    radial-gradient(circle at 78% 82%, rgba(255, 220, 184, 0.9), transparent 18%),
    linear-gradient(180deg, var(--bg-1) 0%, var(--bg-2) 50%, #fff9f7 100%);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

body::before,
body::after {
  content: "";
  position: fixed;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.45;
  pointer-events: none;
  z-index: 0;
}

body::before {
  left: -80px;
  top: 120px;
  background: rgba(244, 155, 181, 0.42);
}

body::after {
  right: -80px;
  bottom: 80px;
  background: rgba(217, 166, 255, 0.38);
}

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

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

button,
input {
  font: inherit;
}

.screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
  position: relative;
  z-index: 1;
}

.gate-card {
  width: min(100%, var(--max));
  background: rgba(255, 250, 248, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 38px;
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  backdrop-filter: blur(18px);
  position: relative;
}

.gate-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.15), transparent 35%),
    linear-gradient(180deg, transparent 70%, rgba(255,255,255,0.18));
  pointer-events: none;
}

.gate-left,
.gate-right {
  padding: 42px;
  position: relative;
  z-index: 1;
}

.gate-left {
  background:
    linear-gradient(145deg, rgba(244,155,181,0.18), rgba(217,166,255,0.12)),
    rgba(255,255,255,0.16);
  border-right: 1px solid rgba(255,255,255,0.5);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 15px;
  border-radius: 999px;
  background: rgba(255,255,255,0.55);
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
  margin-bottom: 20px;
  border: 1px solid rgba(255,255,255,0.7);
  box-shadow: 0 8px 24px rgba(181, 122, 147, 0.08);
}

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

h1,
.hero-title,
h2,
h3 {
  color: var(--text-strong);
}

h1,
.hero-title {
  font-family: "Playfair Display", serif;
  letter-spacing: -0.03em;
}

h1 {
  font-size: clamp(2.8rem, 6vw, 5.3rem);
  line-height: 0.93;
  margin-bottom: 20px;
}

h2 {
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  font-family: "Playfair Display", serif;
  margin-bottom: 12px;
}

h3 {
  font-size: 1.35rem;
  font-family: "Playfair Display", serif;
  margin-bottom: 10px;
}

.lead {
  color: var(--text);
  font-size: 1.08rem;
  line-height: 1.8;
  max-width: 62ch;
}

.small-lead {
  font-size: 1rem;
}

.mini-list {
  display: grid;
  gap: 14px;
  margin-top: 28px;
}

.mini-item {
  padding: 17px 18px;
  border: 1px solid rgba(140, 87, 108, 0.12);
  border-radius: 18px;
  background: rgba(255,255,255,0.28);
  color: var(--text);
  box-shadow: var(--shadow-md);
}

.gate-form {
  display: grid;
  gap: 14px;
}

.label {
  font-size: 0.96rem;
  color: var(--text-strong);
  margin-bottom: 8px;
  display: block;
  font-weight: 700;
}

.input {
  width: 100%;
  border: 1px solid rgba(182, 130, 151, 0.22);
  border-radius: 17px;
  background: rgba(255, 255, 255, 0.6);
  color: var(--text-strong);
  padding: 15px 17px;
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.55);
}

.input::placeholder {
  color: #a38291;
}

.input:focus {
  border-color: rgba(244,155,181,0.7);
  box-shadow:
    0 0 0 4px rgba(244,155,181,0.12),
    inset 0 1px 0 rgba(255,255,255,0.7);
}

.btn {
  border: 0;
  border-radius: 17px;
  padding: 15px 20px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: white;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  box-shadow: 0 16px 34px rgba(227, 145, 193, 0.28);
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 20px 40px rgba(227, 145, 193, 0.34);
}

.btn.secondary {
  background: rgba(255,255,255,0.55);
  border: 1px solid rgba(140, 87, 108, 0.12);
  color: var(--text-strong);
  box-shadow: var(--shadow-md);
}

.help,
.error,
.success {
  font-size: 0.94rem;
  line-height: 1.6;
  border-radius: 16px;
  padding: 14px 15px;
  display: none;
}

.help {
  display: block;
  background: rgba(255,255,255,0.42);
  color: var(--text);
}

.error {
  background: rgba(255, 111, 145, 0.14);
  color: #9e3455;
}

.success {
  background: rgba(123, 212, 168, 0.18);
  color: #2f7b57;
}

.site {
  display: none;
  padding-bottom: 90px;
  position: relative;
  z-index: 1;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(16px);
  background: rgba(255, 248, 246, 0.65);
  border-bottom: 1px solid rgba(140, 87, 108, 0.08);
}

.topbar-inner,
.container {
  width: min(100% - 32px, var(--max));
  margin-inline: auto;
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.brand-title {
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-strong);
}

.brand-sub {
  color: var(--muted);
  font-size: 0.94rem;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.nav a,
.chip {
  padding: 10px 15px;
  border-radius: 999px;
  background: rgba(255,255,255,0.5);
  border: 1px solid rgba(140, 87, 108, 0.1);
  color: var(--muted);
  font-size: 0.94rem;
  transition: transform 0.18s ease, background 0.18s ease;
}

.nav a:hover,
.chip:hover {
  transform: translateY(-1px);
  background: rgba(255,255,255,0.82);
}

.hero {
  padding: 72px 0 36px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 22px;
  align-items: stretch;
}

.hero-card {
  background: var(--surface);
  border: 1px solid rgba(255,255,255,0.75);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  backdrop-filter: blur(14px);
}

.hero-copy {
  padding: 40px;
  background:
    linear-gradient(145deg, rgba(255,255,255,0.3), transparent 60%),
    linear-gradient(180deg, rgba(255,255,255,0.15), rgba(255,255,255,0.06));
  position: relative;
}

.hero-copy::after {
  content: "✿";
  position: absolute;
  right: 28px;
  top: 22px;
  font-size: 1.6rem;
  opacity: 0.35;
}

.hero-title {
  margin-bottom: 16px;
  font-size: clamp(2.3rem, 4vw, 3.7rem);
  line-height: 1.02;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 30px;
}

.stat {
  background: rgba(255,255,255,0.56);
  border: 1px solid rgba(140, 87, 108, 0.08);
  border-radius: 20px;
  padding: 18px;
  box-shadow: var(--shadow-md);
}

.stat strong {
  display: block;
  font-size: 1.5rem;
  color: var(--text-strong);
  margin-bottom: 6px;
  font-family: "Playfair Display", serif;
}

.hero-visual {
  min-height: 100%;
  position: relative;
  display: grid;
  place-items: center;
  padding: 26px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.02)),
    url('assets/paris_eiffelturm.jpeg') center/cover no-repeat;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(88, 52, 67, 0.08), rgba(88, 52, 67, 0.32)),
    linear-gradient(140deg, rgba(244,155,181,0.12), rgba(217,166,255,0.08));
}

.quote {
  position: relative;
  z-index: 1;
  padding: 26px;
  border-radius: 26px;
  background: rgba(255, 250, 248, 0.58);
  border: 1px solid rgba(255,255,255,0.7);
  max-width: 430px;
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-md);
}

.quote p {
  font-size: 1.22rem;
  line-height: 1.8;
  color: var(--text-strong);
  font-family: "Playfair Display", serif;
  margin-bottom: 10px;
}

.quote small {
  color: var(--muted);
}

section {
  padding: 26px 0;
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  align-items: end;
  margin-bottom: 22px;
}

.section-head p {
  color: var(--muted);
  margin-bottom: 0;
}

.life-overview {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 18px;
}

.life-stat-card {
  background: rgba(255,255,255,0.72);
  border: 1px solid rgba(255,255,255,0.82);
  border-radius: 24px;
  box-shadow: var(--shadow-md);
  padding: 22px;
}

.life-stat-label {
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 8px;
}

.life-stat-value {
  font-family: "Playfair Display", serif;
  font-size: 2rem;
  color: var(--text-strong);
  margin-bottom: 6px;
}

.life-stat-sub {
  color: var(--muted);
  font-size: 0.92rem;
}

.shared-journey-card {
  background: rgba(255,255,255,0.74);
  border: 1px solid rgba(255,255,255,0.82);
  border-radius: 26px;
  box-shadow: var(--shadow-md);
  padding: 24px;
  margin-bottom: 22px;
}

.shared-journey-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
}

.shared-badge {
  background: rgba(255,255,255,0.75);
  border: 1px solid rgba(140, 87, 108, 0.08);
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
}

.shared-progress {
  width: 100%;
  height: 18px;
  background: rgba(255,255,255,0.7);
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid rgba(140, 87, 108, 0.08);
}

.shared-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(135deg, var(--blue), var(--pink));
  border-radius: 999px;
  transition: width 0.5s ease;
}

.shared-progress-labels {
  margin-top: 10px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 0.9rem;
}

.life-grid-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.life-card {
  background: rgba(255,255,255,0.82);
  border: 1px solid rgba(255,255,255,0.88);
  border-radius: 28px;
  box-shadow: var(--shadow-lg);
  padding: 24px;
}

.life-card-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
  margin-bottom: 14px;
}

.life-card-head p {
  color: var(--muted);
  margin-bottom: 0;
}

.life-chip {
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 0.88rem;
  font-weight: 700;
  white-space: nowrap;
}

.life-chip-blue {
  background: rgba(123, 183, 255, 0.16);
  color: var(--blue-strong);
}

.life-chip-pink {
  background: rgba(243, 154, 196, 0.16);
  color: var(--pink-strong);
}

.life-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 18px;
}

.legend-box {
  width: 12px;
  height: 12px;
  border-radius: 4px;
  display: inline-block;
  margin-right: 6px;
  vertical-align: middle;
  border: 1px solid rgba(140, 87, 108, 0.12);
}

.legend-blue {
  background: var(--blue);
}

.legend-pink {
  background: var(--pink);
}

.legend-together-blue {
  background: linear-gradient(135deg, #6ca8ff, #d7e8ff);
  border: 2px solid rgba(75, 141, 240, 0.55);
}

.legend-together-pink {
  background: linear-gradient(135deg, #f08abc, #ffd0e6);
  border: 2px solid rgba(228, 108, 168, 0.55);
}

.legend-empty {
  background: rgba(255,255,255,0.55);
}

.life-grid {
  display: grid;
  grid-template-columns: repeat(36, 1fr);
  gap: 4px;
}

.life-cell {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 4px;
  background: rgba(255,255,255,0.55);
  border: 1px solid rgba(140, 87, 108, 0.08);
}

.life-cell.past-blue {
  background: var(--blue);
  border-color: rgba(75, 141, 240, 0.28);
}

.life-cell.past-pink {
  background: var(--pink);
  border-color: rgba(228, 108, 168, 0.28);
}

.life-cell.together-blue {
  background: linear-gradient(135deg, #6ca8ff, #cce1ff);
  border: 2px solid rgba(75, 141, 240, 0.55);
}

.life-cell.together-pink {
  background: linear-gradient(135deg, #f08abc, #ffd0e6);
  border: 2px solid rgba(228, 108, 168, 0.55);
}

.life-card-footer {
  margin-top: 16px;
  color: var(--muted);
  line-height: 1.7;
  font-size: 0.94rem;
}

.timeline {
  display: grid;
  gap: 18px;
}

.memory-card {
  display: grid;
  grid-template-columns: 290px 1fr;
  background: var(--surface-strong);
  border: 1px solid rgba(255,255,255,0.75);
  border-radius: 28px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.memory-media {
  min-height: 100%;
  background: #f0dfe6 center/cover no-repeat;
  position: relative;
}

.memory-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.03), rgba(104, 70, 86, 0.18));
}

.memory-content {
  padding: 26px;
}

.memory-top {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
}

.pill {
  display: inline-flex;
  padding: 8px 13px;
  border-radius: 999px;
  background: rgba(244,155,181,0.18);
  color: #9c4a68;
  border: 1px solid rgba(244,155,181,0.24);
  font-size: 0.9rem;
  font-weight: 700;
}

.memory-meta {
  color: var(--muted);
  font-size: 0.95rem;
}

.memory-text {
  color: var(--text);
  line-height: 1.78;
  margin: 14px 0 18px;
}

.memory-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.memory-tags span {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.65);
  color: var(--muted);
  border: 1px solid rgba(140, 87, 108, 0.08);
  font-size: 0.9rem;
}

.gallery-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

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

.photo-card {
  position: relative;
  overflow: visible;
  border-radius: 14px;
  min-height: 285px;
  cursor: pointer;
  transform: rotate(-1deg);
  transition: transform 0.24s ease;
}

.photo-card:nth-child(2n) {
  transform: rotate(1.5deg);
}

.photo-card:nth-child(3n) {
  transform: rotate(-2deg);
}

.photo-card:hover {
  transform: translateY(-6px) rotate(0deg);
}

.photo-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: white;
  border-radius: 10px;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(140, 87, 108, 0.08);
}

.photo-card::after {
  content: "";
  position: absolute;
  top: 14px;
  left: 50%;
  width: 64px;
  height: 18px;
  transform: translateX(-50%) rotate(-3deg);
  background: rgba(255, 235, 167, 0.62);
  border-radius: 4px;
  z-index: 2;
  box-shadow: 0 2px 4px rgba(0,0,0,0.06);
}

.photo-card img {
  position: absolute;
  inset: 14px 14px 68px 14px;
  width: calc(100% - 28px);
  height: calc(100% - 82px);
  object-fit: cover;
  border-radius: 6px;
  transition: transform 0.4s ease;
  z-index: 1;
}

.photo-card:hover img {
  transform: scale(1.03);
}

.photo-overlay {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 12px;
  background: transparent;
  color: var(--text-strong);
  z-index: 3;
  text-align: center;
}

.photo-overlay strong {
  display: block;
  margin-bottom: 4px;
  font-family: "Playfair Display", serif;
  font-size: 1rem;
}

.photo-overlay span {
  color: var(--muted);
  font-size: 0.88rem;
}

.letter-box {
  padding: 30px;
  border-radius: 28px;
  border: 1px solid rgba(255,255,255,0.82);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.76), rgba(255,249,246,0.92));
  box-shadow: var(--shadow-lg);
  position: relative;
}

.letter-box::before {
  content: "";
  position: absolute;
  inset: 16px;
  border: 1px dashed rgba(190, 133, 153, 0.22);
  border-radius: 18px;
  pointer-events: none;
}

.letter-box p {
  position: relative;
  z-index: 1;
  color: var(--text);
  line-height: 2;
  white-space: pre-line;
  max-width: 72ch;
}

.footer {
  padding: 34px 0 0;
  color: var(--muted);
  text-align: center;
  font-size: 0.96rem;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  place-items: center;
  background: rgba(71, 40, 55, 0.56);
  backdrop-filter: blur(8px);
  padding: 24px;
}

.lightbox-inner {
  width: min(100%, 980px);
  background: rgba(255, 250, 248, 0.95);
  border: 1px solid rgba(255,255,255,0.9);
  border-radius: 28px;
  overflow: hidden;
  box-shadow: var(--shadow-xl);
}

.lightbox-media {
  background: #f7edf1;
  max-height: 72vh;
}

.lightbox-media img {
  width: 100%;
  max-height: 72vh;
  object-fit: contain;
  background: #f7edf1;
}

.lightbox-copy {
  padding: 18px 22px 24px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
}

.lightbox-copy p {
  color: var(--muted);
  margin-bottom: 0;
}

.close-btn {
  background: rgba(255,255,255,0.75);
  color: var(--text-strong);
  border: 1px solid rgba(140, 87, 108, 0.12);
  border-radius: 13px;
  padding: 10px 13px;
  cursor: pointer;
}

@media (max-width: 980px) {
  .gate-card,
  .hero-grid,
  .memory-card,
  .life-grid-layout,
  .life-overview {
    grid-template-columns: 1fr;
  }

  .gate-left {
    border-right: 0;
    border-bottom: 1px solid rgba(255,255,255,0.5);
  }

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

@media (max-width: 720px) {
  .screen,
  .hero {
    padding-top: 20px;
  }

  .gate-left,
  .gate-right,
  .hero-copy,
  .life-card,
  .shared-journey-card,
  .life-stat-card {
    padding: 26px;
  }

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

  .topbar-inner {
    align-items: start;
    flex-direction: column;
  }

  .memory-content {
    padding: 20px;
  }

  .nav {
    width: 100%;
  }

  .nav a {
    text-align: center;
  }

  .photo-card,
  .photo-card:nth-child(2n),
  .photo-card:nth-child(3n) {
    transform: none;
  }

  .photo-card:hover {
    transform: translateY(-4px);
  }

  .life-grid {
    gap: 3px;
  }

  .life-card-head,
  .shared-journey-top {
    flex-direction: column;
    align-items: start;
  }
}