:root {
  --ink: #462d32;
  --muted: #81686d;
  --berry: #bd4961;
  --berry-dark: #96384d;
  --paper: #fffaf7;
  --cream: #f7eee9;
  --line: rgba(103, 54, 65, .16);
  --shadow: 0 24px 70px rgba(109, 55, 67, .12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.7;
}
button { font: inherit; }

.intro {
  min-height: 100svh;
  padding: 72px 24px 38px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.intro::before, .intro::after {
  content: "";
  position: absolute;
  width: 300px;
  height: 300px;
  border: 1px solid var(--line);
  border-radius: 50%;
  z-index: -1;
}
.intro::before { top: -145px; left: -155px; }
.intro::after { right: -170px; bottom: 4%; }
.eyebrow {
  margin: 0 0 20px;
  color: var(--berry);
  font-size: .76rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.heart-mark {
  width: 48px;
  height: 48px;
  margin-bottom: 20px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--berry);
  font-size: 1.7rem;
}
h1, h2 {
  font-family: "Playfair Display", Georgia, serif;
  line-height: 1.08;
  letter-spacing: -.035em;
}
h1 { margin: 0; font-size: clamp(3.25rem, 10vw, 7rem); font-weight: 600; }
h1 em { color: var(--berry); font-weight: 600; }
.lead { max-width: 540px; margin: 28px auto 32px; color: var(--muted); font-size: 1.05rem; }
.primary-button, .game-button {
  border: 0;
  border-radius: 999px;
  background: var(--berry);
  color: white;
  cursor: pointer;
  transition: transform .2s ease, background .2s ease;
}
.primary-button {
  min-width: 208px;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 36px;
}
.primary-button:hover, .game-button:hover { background: var(--berry-dark); transform: translateY(-2px); }
.primary-button:focus-visible, .game-button:focus-visible, .text-button:focus-visible, .floating-heart:focus-visible { outline: 3px solid rgba(189,73,97,.28); outline-offset: 4px; }
.scroll-note { position: absolute; bottom: 26px; margin: 0; color: var(--muted); font-size: .78rem; }

.portraits {
  padding: 86px 24px 100px;
  text-align: center;
  overflow: hidden;
}
.portrait-stack {
  width: min(680px, 100%);
  min-height: 560px;
  margin: 0 auto;
  position: relative;
}
.portrait {
  width: min(55vw, 360px);
  margin: 0;
  position: absolute;
  background: white;
  padding: 10px 10px 42px;
  box-shadow: 0 22px 60px rgba(73, 39, 44, .17);
  border: 1px solid rgba(103, 54, 65, .1);
}
.portrait img {
  width: 100%;
  height: 470px;
  display: block;
  object-fit: cover;
  object-position: center 28%;
}
.portrait figcaption {
  margin-top: 9px;
  font-family: "Playfair Display", serif;
  font-size: 1.15rem;
  font-style: italic;
}
.portrait-sintya { left: 2%; top: 0; transform: rotate(-4deg); z-index: 2; }
.portrait-naufal { right: 2%; top: 48px; transform: rotate(4deg); }
.together-mark {
  width: 70px;
  height: 70px;
  display: grid;
  place-items: center;
  position: absolute;
  left: 50%;
  top: 235px;
  transform: translate(-50%, -50%);
  z-index: 4;
  border-radius: 50%;
  color: white;
  background: var(--berry);
  box-shadow: 0 10px 30px rgba(189, 73, 97, .3);
  font-size: 2rem;
}
.portrait-note {
  margin: 18px 0 0;
  color: var(--berry);
  font-family: "Playfair Display", serif;
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  font-style: italic;
}

.letter-section { padding: 90px 24px; background: var(--cream); }
.letter-card {
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(30px, 7vw, 72px);
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.letter-date { margin: 0 0 38px; color: var(--berry); font-size: .8rem; letter-spacing: .08em; }
.letter-card h2, .game-heading h2, .final-message h2 { margin: 0; font-size: clamp(2.3rem, 6vw, 4rem); }
.letter-copy { margin-top: 36px; }
.letter-copy p { margin: 0 0 20px; color: #624c51; }
.signature { margin: 38px 0 0; text-align: right; color: var(--muted); }
.signature span { font-family: "Playfair Display", serif; color: var(--berry); font-size: 1.35rem; font-style: italic; }

.game-section { padding: 100px 24px; }
.game-heading { max-width: 620px; margin: 0 auto 42px; text-align: center; }
.game-heading p:last-child { color: var(--muted); margin: 18px auto 0; }
.game-card { max-width: 780px; margin: auto; border: 1px solid var(--line); background: white; box-shadow: var(--shadow); }
.game-bar { padding: 16px 20px; display: flex; justify-content: space-between; border-bottom: 1px solid var(--line); font-size: .88rem; }
.game-bar span { color: var(--muted); }
.game-bar strong span { color: var(--berry); }
.game-area {
  height: min(58vh, 450px);
  min-height: 360px;
  position: relative;
  overflow: hidden;
  background: radial-gradient(circle at center, #fff 0%, #fff8f5 100%);
}
.game-start { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; text-align: center; padding: 24px; }
.big-heart { color: var(--berry); font-size: 3rem; animation: pulse 1.7s ease-in-out infinite; }
.game-start p { color: var(--muted); }
.game-button { padding: 12px 28px; }
.game-hint { margin: 0; padding: 13px 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: .8rem; text-align: center; }
.floating-heart {
  position: absolute;
  width: 58px;
  height: 58px;
  border: 0;
  background: transparent;
  color: var(--berry);
  font-size: 2.5rem;
  cursor: pointer;
  animation: pop .25s ease-out, pulse 1.2s ease-in-out infinite .25s;
  filter: drop-shadow(0 5px 6px rgba(189,73,97,.2));
}
.heart-burst { position: fixed; pointer-events: none; color: var(--berry); animation: float-away .8s ease-out forwards; z-index: 10; }

.final-message { max-width: 760px; margin: 0 auto 100px; padding: 74px 24px; text-align: center; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.final-message[hidden] { display: none; }
.final-message.reveal { animation: reveal .7s ease-out; }
.final-message p:not(.eyebrow) { max-width: 570px; margin: 26px auto; color: var(--muted); }
.sparkle { margin-bottom: 22px; color: var(--berry); font-size: 1.5rem; }
.text-button { border: 0; border-bottom: 1px solid var(--berry); padding: 2px 0; background: transparent; color: var(--berry); cursor: pointer; }
footer { padding: 26px 20px; color: var(--muted); text-align: center; font-size: .76rem; }

@keyframes pulse { 50% { transform: scale(1.12); } }
@keyframes pop { from { transform: scale(.25); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes float-away { to { transform: translateY(-70px) scale(1.5); opacity: 0; } }
@keyframes reveal { from { transform: translateY(25px); opacity: 0; } }
@media (max-width: 520px) {
  .intro { padding-inline: 20px; }
  .lead { font-size: .98rem; }
  .letter-section, .game-section { padding: 68px 16px; }
  .portraits { padding: 58px 10px 72px; }
  .portrait-stack { min-height: 420px; }
  .portrait { width: 62vw; max-width: 270px; padding: 7px 7px 34px; }
  .portrait img { height: 350px; }
  .portrait-sintya { left: -4%; }
  .portrait-naufal { right: -4%; top: 34px; }
  .together-mark { width: 56px; height: 56px; top: 178px; font-size: 1.55rem; }
  .letter-card { padding: 30px 22px; }
  .game-area { min-height: 390px; }
  .final-message { margin-inline: 16px; padding-inline: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
