:root {
  --bg: #fff7fb;
  --surface: rgba(255, 255, 255, 0.78);
  --surface-strong: #ffffff;
  --ink: #23151d;
  --muted: #6f5864;
  --line: rgba(102, 45, 74, 0.14);
  --rose: #d92863;
  --rose-deep: #9f174d;
  --plum: #4b1532;
  --mint: #87d7c4;
  --gold: #f3b65e;
  --shadow: 0 24px 80px rgba(159, 23, 77, 0.18);
  --radius: 8px;
  font-family: "Manrope", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 15%, rgba(135, 215, 196, 0.32), transparent 24rem),
    radial-gradient(circle at 88% 5%, rgba(243, 182, 94, 0.28), transparent 22rem),
    linear-gradient(135deg, #fff7fb 0%, #fff1f5 48%, #f7fbff 100%);
}

body {
  min-height: 100%;
  margin: 0;
}

button,
input {
  font: inherit;
}

.page-shell {
  width: min(1120px, calc(100% - 32px));
  min-height: 100svh;
  margin: 0 auto;
  padding: 56px 0;
  display: grid;
  gap: 28px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 440px);
  gap: 28px;
  align-items: end;
}

.hero__copy {
  padding: 28px 0;
}

.eyebrow,
.card-label {
  margin: 0;
  color: var(--rose-deep);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2 {
  font-family: "Playfair Display", Georgia, serif;
  letter-spacing: 0;
}

h1 {
  margin: 8px 0 14px;
  max-width: 100%;
  font-size: clamp(3.8rem, 9vw, 7rem);
  line-height: 0.92;
  color: var(--plum);
  overflow-wrap: anywhere;
  text-wrap: balance;
}

.lead {
  max-width: 680px;
  margin: 0;
  color: var(--muted);
  font-size: clamp(1.05rem, 2.4vw, 1.35rem);
  line-height: 1.55;
}

.date-card,
.summary-card,
.valentine-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
}

.date-card {
  padding: 24px;
}

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

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

input[type="date"] {
  width: 100%;
  min-height: 52px;
  border: 1px solid rgba(75, 21, 50, 0.18);
  border-radius: var(--radius);
  padding: 0 14px;
  color: var(--ink);
  background: #fff;
}

input[type="date"]:focus-visible,
button:focus-visible {
  outline: 3px solid rgba(217, 40, 99, 0.28);
  outline-offset: 3px;
}

button {
  min-height: 52px;
  border: 0;
  border-radius: var(--radius);
  padding: 0 22px;
  color: #fff;
  background: linear-gradient(135deg, var(--rose), var(--rose-deep));
  font-weight: 800;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
  box-shadow: 0 14px 34px rgba(217, 40, 99, 0.28);
}

button:hover {
  filter: brightness(1.04);
}

button:active {
  transform: translateY(1px);
  box-shadow: 0 8px 22px rgba(217, 40, 99, 0.22);
}

.form-hint,
.form-error,
.muted {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.form-error {
  min-height: 1.5em;
  color: #a40035;
  font-weight: 700;
}

.results {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(240px, 0.7fr);
  gap: 18px;
}

.summary-card,
.valentine-card {
  position: relative;
  overflow: hidden;
  padding: 24px;
}

.summary-card--main {
  grid-row: span 2;
  min-height: 360px;
  display: grid;
  align-content: space-between;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.82), rgba(255, 238, 246, 0.88)),
    var(--surface-strong);
}

.big-number,
.anniversary-number {
  margin-top: 12px;
  color: var(--plum);
  font-size: clamp(4rem, 13vw, 8.2rem);
  font-weight: 800;
  line-height: 0.9;
}

.anniversary-number {
  font-size: clamp(3.2rem, 9vw, 5.6rem);
}

.big-number-label {
  margin: 8px 0 0;
  color: var(--rose-deep);
  font-size: 1.2rem;
  font-weight: 800;
}

.duration-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 28px 0 0;
}

.duration-grid div {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 12px;
  background: rgba(255, 255, 255, 0.66);
}

.duration-grid dt {
  color: var(--plum);
  font-size: clamp(1.45rem, 4vw, 2.25rem);
  font-weight: 800;
  line-height: 1;
}

.duration-grid dd {
  margin: 8px 0 0;
  color: var(--muted);
}

.valentine-card {
  grid-column: 2;
  min-height: 210px;
  color: #fff;
  background:
    radial-gradient(circle at 85% 10%, rgba(255, 255, 255, 0.28), transparent 11rem),
    linear-gradient(145deg, #d92863 0%, #8b174d 56%, #4b1532 100%);
}

.valentine-card .card-label,
.valentine-card .muted {
  color: rgba(255, 255, 255, 0.78);
}

.valentine-card h2 {
  position: relative;
  margin: 8px 0;
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  line-height: 1;
  z-index: 1;
  text-wrap: balance;
}

.valentine-card p {
  position: relative;
  z-index: 1;
  margin: 0;
  line-height: 1.55;
}

.valentine-card strong {
  color: #fff4ba;
  font-size: 1.28em;
}

.heart-stage {
  position: absolute;
  inset: 0;
  perspective: 760px;
  pointer-events: none;
}

.heart {
  position: absolute;
  width: 70px;
  aspect-ratio: 1;
  background: linear-gradient(145deg, #ff7aa8, #b91352 60%, #72143d);
  transform: rotate(45deg);
  transform-style: preserve-3d;
  filter: drop-shadow(0 18px 18px rgba(46, 10, 28, 0.32));
  animation: float-heart 5200ms ease-in-out infinite;
}

.heart::before,
.heart::after {
  content: "";
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: inherit;
}

.heart::before {
  left: -50%;
}

.heart::after {
  top: -50%;
}

.heart--one {
  right: 28px;
  top: 30px;
}

.heart--two {
  right: 112px;
  bottom: 20px;
  width: 42px;
  opacity: 0.76;
  animation-delay: -1200ms;
}

.heart--three {
  right: -14px;
  bottom: 56px;
  width: 96px;
  opacity: 0.32;
  animation-delay: -2600ms;
}

.valentine-content {
  position: relative;
  max-width: 320px;
}

@keyframes float-heart {
  0%,
  100% {
    transform: translate3d(0, 0, 26px) rotate(45deg) rotateX(0deg) rotateY(-18deg);
  }

  50% {
    transform: translate3d(-8px, -14px, 58px) rotate(45deg) rotateX(14deg) rotateY(22deg);
  }
}

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

@media (max-width: 1040px) {
  .page-shell {
    width: min(100% - 32px, 760px);
  }

  .hero {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .hero__copy {
    padding: 12px 0 0;
  }

  .date-card {
    max-width: 100%;
  }

  h1 {
    font-size: clamp(3.6rem, 14vw, 6.6rem);
  }
}

@media (max-width: 820px) {
  .page-shell {
    width: min(100% - 24px, 620px);
    padding: 28px 0;
  }

  .hero,
  .results {
    grid-template-columns: 1fr;
  }

  .hero__copy {
    padding: 12px 0 0;
  }

  .summary-card--main,
  .valentine-card {
    grid-row: auto;
    grid-column: auto;
  }
}

@media (max-width: 680px) {
  .duration-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  button {
    width: 100%;
  }
}

@media (max-width: 560px) {
  .date-card,
  .summary-card,
  .valentine-card {
    padding: 18px;
  }

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

  h1 {
    font-size: clamp(3.1rem, 18vw, 4.8rem);
  }

  .big-number {
    font-size: clamp(3.5rem, 24vw, 6.4rem);
  }

  .valentine-card h2 {
    font-size: clamp(2rem, 12vw, 3rem);
  }

  .heart--one {
    right: 16px;
    width: 56px;
  }

  .heart--two {
    right: 72px;
    width: 34px;
  }

  .heart--three {
    width: 72px;
  }
}
