:root {
  --ink: #fff8f0;
  --muted: #bcaeb8;
  --accent: #ff6b83;
  --accent-soft: #ffb5a7;
  --night: #170c18;
  --panel: rgba(255, 255, 255, 0.055);
  --border: rgba(255, 255, 255, 0.12);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background:
    radial-gradient(circle at 80% 15%, #3b1729 0, transparent 32rem),
    radial-gradient(circle at 5% 90%, #291534 0, transparent 35rem),
    var(--night);
  font-family: "DM Sans", sans-serif;
}

button {
  color: inherit;
  font: inherit;
}

.grain {
  position: fixed;
  z-index: 5;
  inset: 0;
  pointer-events: none;
  opacity: 0.055;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.9'/%3E%3C/svg%3E");
}

.glow {
  position: fixed;
  width: 24rem;
  height: 24rem;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.13;
  pointer-events: none;
}

.glow-one {
  top: -12rem;
  left: -8rem;
  background: #ff667e;
}

.glow-two {
  right: -10rem;
  bottom: -12rem;
  background: #b774ff;
}

main {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: auto 1fr auto;
  width: min(100% - 40px, 1180px);
  min-height: 100vh;
  margin: 0 auto;
}

.topbar,
footer {
  display: flex;
  align-items: center;
  height: 88px;
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.topbar {
  justify-content: space-between;
}

.mark {
  color: var(--ink);
  font-family: "Playfair Display", serif;
  font-size: 1.1rem;
  font-style: italic;
  letter-spacing: normal;
  text-transform: lowercase;
}

#experience {
  display: grid;
  place-items: center;
  min-height: 600px;
  padding: 40px 0;
}

.scene {
  width: 100%;
  animation: arrive 700ms cubic-bezier(.2, .8, .2, 1) both;
}

.eyebrow {
  margin: 0 0 22px;
  color: var(--accent-soft);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

h1 {
  max-width: 920px;
  margin: 0;
  font-family: "Playfair Display", serif;
  font-size: clamp(3.5rem, 9vw, 8.6rem);
  font-weight: 600;
  letter-spacing: -0.055em;
  line-height: 0.93;
}

h1 em {
  color: var(--accent);
  font-weight: inherit;
}

.subline {
  max-width: 540px;
  margin: 30px 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.2rem);
  line-height: 1.7;
}

.action {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin-top: 38px;
  padding: 15px 22px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--panel);
  cursor: pointer;
  backdrop-filter: blur(12px);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.action:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 181, 167, 0.5);
  background: rgba(255, 255, 255, 0.09);
}

.action .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 18px var(--accent);
}

.centered {
  text-align: center;
}

.centered h1,
.centered .subline {
  margin-right: auto;
  margin-left: auto;
}

.constellation {
  position: relative;
  width: min(78vw, 650px);
  height: min(60vh, 480px);
  margin: auto;
}

.star {
  position: absolute;
  width: 9px;
  height: 9px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--ink);
  cursor: pointer;
  box-shadow: 0 0 15px var(--ink);
  animation: pulse 2s infinite alternate;
}

.star::after {
  position: absolute;
  width: 120px;
  color: var(--muted);
  font-size: 0.72rem;
  content: attr(data-word);
  opacity: 0;
  transform: translate(-50%, 15px);
  transition: opacity 200ms ease;
}

.star.found {
  background: var(--accent);
  box-shadow: 0 0 22px var(--accent);
}

.star.found::after {
  opacity: 1;
}

.constellation-message {
  position: absolute;
  inset: 50% auto auto 50%;
  width: 100%;
  font-family: "Playfair Display", serif;
  font-size: clamp(2.4rem, 7vw, 5.4rem);
  line-height: 1;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -40%);
  transition: opacity 500ms, transform 500ms;
}

.constellation-message.visible {
  opacity: 1;
  transform: translate(-50%, -50%);
}

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

.reason {
  min-height: 190px;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: var(--panel);
  text-align: left;
  cursor: pointer;
  transition: transform 220ms ease, background 220ms ease;
}

.reason:hover,
.reason.open {
  transform: translateY(-5px);
  background: rgba(255, 255, 255, 0.1);
}

.reason span {
  display: block;
  color: var(--accent-soft);
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.reason strong {
  display: block;
  margin-top: 62px;
  font-family: "Playfair Display", serif;
  font-size: 1.45rem;
  font-weight: 600;
}

.reason .secret {
  display: none;
  margin-top: 16px;
  color: var(--muted);
  line-height: 1.55;
}

.reason.open strong {
  margin-top: 28px;
}

.reason.open .secret {
  display: block;
  animation: arrive 400ms both;
}

.type-line::after {
  color: var(--accent);
  content: "|";
  animation: blink 700ms infinite;
}

.heart-wrap {
  display: grid;
  place-items: center;
  margin: 32px auto 0;
}

.heart-button {
  width: 170px;
  height: 170px;
  border: 1px solid rgba(255, 107, 131, 0.35);
  border-radius: 50%;
  background: rgba(255, 107, 131, 0.07);
  cursor: pointer;
  transition: transform 150ms ease, background 150ms ease;
}

.heart-button:hover {
  background: rgba(255, 107, 131, 0.13);
}

.heart-button:active {
  transform: scale(0.94);
}

.heart-symbol {
  display: block;
  color: var(--accent);
  font-size: 4rem;
  filter: drop-shadow(0 0 24px rgba(255, 107, 131, 0.5));
  animation: heartbeat 1.4s infinite;
}

.counter {
  margin-top: 20px;
  color: var(--muted);
  font-size: 0.85rem;
}

footer {
  justify-content: flex-end;
}

.definition h1 {
  font-size: clamp(4rem, 11vw, 9rem);
}

.phonetic {
  margin: 18px 0 45px;
  color: var(--muted);
  letter-spacing: 0.08em;
}

.definition-card {
  display: flex;
  gap: 18px;
  max-width: 690px;
  padding-top: 25px;
  border-top: 1px solid var(--border);
  font-family: "Playfair Display", serif;
  font-size: clamp(1.4rem, 3vw, 2rem);
  line-height: 1.45;
}

.definition-card span {
  color: var(--accent);
}

.definition-card p {
  margin: 0;
}

.love-note {
  margin: 28px 0 0 38px;
  color: var(--muted);
}

.love-note em {
  color: var(--accent-soft);
  font-family: "Playfair Display", serif;
  font-size: 1.3rem;
}

.equation {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(12px, 3vw, 38px);
  flex-wrap: wrap;
  font-family: "Playfair Display", serif;
  font-size: clamp(3rem, 9vw, 7.5rem);
  line-height: 1;
}

.equation b {
  color: var(--muted);
  font-family: "DM Sans", sans-serif;
  font-size: 0.5em;
  font-weight: 400;
}

.equation em {
  color: var(--accent);
}

.moment-list {
  width: min(100%, 900px);
  margin-top: 25px;
}

.moment {
  display: grid;
  grid-template-columns: minmax(130px, 0.45fr) 1fr;
  align-items: baseline;
  gap: 30px;
  padding: 24px 0;
  border-bottom: 1px solid var(--border);
  animation: arrive 600ms both;
}

.moment:nth-child(2) { animation-delay: 100ms; }
.moment:nth-child(3) { animation-delay: 200ms; }
.moment:nth-child(4) { animation-delay: 300ms; }

.moment strong {
  color: var(--accent-soft);
  font-family: "Playfair Display", serif;
  font-size: clamp(1.8rem, 4vw, 3.3rem);
  font-style: italic;
  font-weight: 600;
}

.moment span {
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.2rem);
}

.universe {
  position: relative;
}

.orbit {
  position: relative;
  width: 130px;
  height: 130px;
  margin: 0 auto 40px;
  border: 1px solid var(--border);
  border-radius: 50%;
  animation: spin 8s linear infinite;
}

.planet {
  position: absolute;
  inset: 50% auto auto 50%;
  color: var(--accent);
  font-size: 2.8rem;
  filter: drop-shadow(0 0 18px rgba(255, 107, 131, 0.6));
  transform: translate(-50%, -50%);
}

.moon {
  position: absolute;
  top: 5px;
  left: 18px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--ink);
  box-shadow: 0 0 15px var(--ink);
}

.promise-line {
  display: flex;
  align-items: center;
  gap: 24px;
  max-width: 620px;
  margin-top: 38px;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.2rem);
}

.promise-line span {
  flex: 0 0 70px;
  height: 1px;
  background: var(--accent);
}

.promise-line p {
  margin: 0;
}

.floating-heart {
  position: fixed;
  z-index: 10;
  color: var(--accent);
  pointer-events: none;
  animation: float-away 1.5s ease-out forwards;
}

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

@keyframes pulse {
  from { opacity: 0.45; transform: scale(0.8); }
  to { opacity: 1; transform: scale(1.15); }
}

@keyframes blink {
  50% { opacity: 0; }
}

@keyframes heartbeat {
  0%, 38%, 100% { transform: scale(1); }
  12% { transform: scale(1.12); }
  24% { transform: scale(1.03); }
}

@keyframes float-away {
  from { opacity: 1; transform: translate(-50%, -50%) scale(0.8) rotate(0); }
  to { opacity: 0; transform: translate(-50%, -180px) scale(1.6) rotate(22deg); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 720px) {
  main {
    width: min(100% - 28px, 1180px);
  }

  #experience {
    min-height: 560px;
  }

  .topbar {
    height: 70px;
  }

  h1 {
    font-size: clamp(3.2rem, 17vw, 5.3rem);
  }

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

  .reason {
    min-height: 130px;
  }

  .reason strong {
    margin-top: 30px;
  }

  .moment {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  footer {
    height: 70px;
    font-size: 0.62rem;
  }
}

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