:root {
  color-scheme: light;
  --bg: #fff9f7;
  --paper: #fffefd;
  --ink: #351721;
  --rose: #a52e4e;
  --rose-dark: #84213d;
  --muted: #795e64;
  --line: #ead9dc;
  --pink: #f5e1e5;
  --pink-deep: #ebcbd3;
  --shadow: 0 24px 70px rgb(75 30 43 / 9%);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 32px;
}

body {
  margin: 0;
  background:
    radial-gradient(ellipse at 86% 12%, rgb(246 224 229 / 42%), transparent 27rem),
    var(--bg);
  color: var(--ink);
  font-family: "Avenir Next", "Segoe UI", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

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

button {
  font: inherit;
  cursor: pointer;
}

button:focus-visible,
a:focus-visible {
  outline: 3px solid var(--rose);
  outline-offset: 5px;
}

header {
  width: min(100% - 64px, 1280px);
  min-height: 88px;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.brand {
  flex: 0 0 auto;
  font-size: 24px;
  font-weight: 750;
  letter-spacing: -1.2px;
}

.brand span {
  margin-left: 6px;
  color: var(--rose);
}

nav {
  display: flex;
  align-items: center;
  gap: clamp(18px, 3vw, 36px);
  font-size: 14px;
}

nav a,
footer a {
  transition: color 180ms ease;
}

nav a:hover,
footer a:hover {
  color: var(--rose);
}

.small-button {
  flex: 0 0 auto;
  padding: 11px 17px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgb(255 254 253 / 65%);
  color: var(--ink);
  font-size: 13px;
  transition: border-color 180ms ease, background 180ms ease;
}

.small-button:hover {
  border-color: var(--pink-deep);
  background: var(--paper);
}

.hero {
  width: min(100% - 64px, 1280px);
  min-height: min(690px, calc(100svh - 88px));
  margin: 0 auto;
  padding: 52px 0 76px;
  display: grid;
  grid-template-columns: 1.04fr 0.96fr;
  align-items: center;
  gap: clamp(40px, 8vw, 112px);
}

.hero-copy {
  padding: 12px 0;
}

.eyebrow {
  margin: 0 0 22px;
  color: var(--rose);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 2px;
}

h1 {
  margin: 0;
  font-size: clamp(58px, 7.3vw, 98px);
  font-weight: 700;
  letter-spacing: -0.075em;
  line-height: 0.98;
}

h1 span,
h2 span {
  color: var(--rose);
}

.intro {
  margin: 25px 0 29px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.75;
}

.button {
  min-height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  padding: 15px 23px;
  border: 0;
  border-radius: 999px;
  background: var(--rose);
  box-shadow: 0 9px 22px rgb(165 46 78 / 18%);
  color: #fff;
  font-size: 14px;
  font-weight: 650;
  transition: transform 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.button:hover {
  transform: translateY(-2px);
  background: var(--rose-dark);
  box-shadow: 0 12px 26px rgb(165 46 78 / 24%);
}

.hero-art {
  position: relative;
  width: min(100%, 470px);
  justify-self: center;
  padding: 28px 28px 22px;
}

.flower-photo {
  margin: 0;
  transform: rotate(3deg);
  padding: 12px 12px 0;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.flower-photo img {
  width: 100%;
  aspect-ratio: 0.86;
  display: block;
  object-fit: cover;
}

.flower-photo figcaption {
  padding: 17px 12px 19px;
  font-family: Georgia, serif;
  font-size: 23px;
  font-style: italic;
  text-align: center;
}

.orbit-text {
  position: absolute;
  z-index: 1;
  top: 4px;
  left: -1px;
  transform: rotate(-9deg);
  font-size: 10px;
  letter-spacing: 2px;
}



.sticker {
  position: absolute;
  bottom: -2px;
  left: -24px;
  width: 126px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  transform: rotate(-10deg);
  border: 1px solid rgb(255 255 255 / 70%);
  border-radius: 50%;
  background: var(--pink);
  box-shadow: 0 12px 28px rgb(75 30 43 / 10%);
  font-size: 16px;
  line-height: 1.4;
  text-align: center;
}

.ribbon {
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 28px;
  overflow: hidden;
  padding: 16px 24px;
  background: var(--pink);
  color: var(--ink);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.7px;
}

.ribbon span {
  flex: 0 0 auto;
  white-space: nowrap;
}

.section {
  width: min(100%, 1230px);
  margin: 0 auto;
  padding: 108px 48px;
}

.index {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.2px;
}

.section-heading h2,
.film-heading h2 {
  margin: 0 0 20px;
  font-size: clamp(38px, 4.5vw, 60px);
  font-weight: 650;
  letter-spacing: -0.055em;
  line-height: 1.08;
}

.section-heading > p:last-child,
.film-heading > p:last-child {
  max-width: 430px;
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.75;
}

.letter-section {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  align-items: center;
  gap: clamp(44px, 8vw, 100px);
}

.letter-wrap {
  padding: 14px 12px;
}

.envelope {
  position: relative;
  width: 100%;
  min-height: 290px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 17px;
  transform: rotate(-2deg);
  border: 1px solid #e5c7ce;
  border-radius: 8px;
  background: linear-gradient(145deg, #f8e9ec, #f0d7de);
  box-shadow: 0 18px 40px rgb(75 30 43 / 8%);
  transition: transform 220ms ease, box-shadow 220ms ease;
}

.envelope:hover {
  transform: rotate(0) translateY(-3px);
  box-shadow: 0 22px 44px rgb(75 30 43 / 12%);
}

.envelope::before {
  position: absolute;
  inset: 0 0 auto;
  height: 55%;
  content: "";
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  background: rgb(229 191 201 / 55%);
  pointer-events: none;
}

.seal {
  position: relative;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--rose);
  box-shadow: 0 5px 14px rgb(165 46 78 / 18%);
  color: #fff;
  font-size: 28px;
}

.envelope-label {
  position: relative;
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 12px;
}

.letter {
  padding: clamp(24px, 4vw, 38px);
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  box-shadow: 0 16px 45px rgb(75 30 43 / 6%);
}

.letter p {
  font-size: 15px;
  line-height: 1.85;
}

.letter .handwritten {
  margin-top: 0;
  color: var(--rose);
  font-family: Georgia, serif;
  font-size: 28px;
  font-style: italic;
  line-height: 1.3;
}

.signature {
  margin-bottom: 0;
  color: var(--rose);
  text-align: right;
}

.film-section {
  padding-top: 50px;
}

.film-heading {
  margin-bottom: 38px;
  text-align: center;
}

.film-heading > p:last-child {
  max-width: 510px;
  margin: 0 auto;
}

.film-frame {
  position: relative;
  min-height: 300px;
  aspect-ratio: 16 / 9;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background:
    radial-gradient(ellipse at 50% 115%, rgb(224 169 184 / 38%), transparent 55%),
    linear-gradient(135deg, #f7e9ec, #f2dfe4);
  box-shadow: 0 20px 50px rgb(75 30 43 / 7%);
  text-align: center;
}

#video-placeholder {
  max-width: 460px;
  padding: 28px;
}



.film-frame h3 {
  margin: 0;
  font-size: clamp(20px, 3vw, 27px);
  font-weight: 600;
  letter-spacing: -0.03em;
}

#video-error {
  position: absolute;
  right: 16px;
  bottom: 10px;
  left: 16px;
  color: var(--muted);
  font-size: 13px;
}

.film-frame video {
  width: 100%;
  height: 100%;
  max-height: 650px;
  background: #2c1820;
}

.wishes-section {
  padding-top: 65px;
}

.wish-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-top: 36px;
}

.wish-card {
  min-height: 240px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 25px 23px;
  transform: translateY(0);
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--paper);
  color: var(--ink);
  text-align: left;
  transition: transform 200ms ease, box-shadow 200ms ease, border-color 200ms ease;
}

.wish-card:nth-child(2) {
  background: #f6e5e9;
}

.wish-card:nth-child(4) {
  background: #f9edef;
}

.wish-card:hover {
  transform: translateY(-6px);
  border-color: #dfbdc6;
  box-shadow: 0 16px 34px rgb(75 30 43 / 9%);
}

.card-symbol {
  margin-bottom: 32px;
  color: var(--rose);
  font-size: 48px;
  line-height: 1;
}

.card-title {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.04em;
}

.card-hint {
  margin-top: 14px;
  color: var(--muted);
  font-size: 11px;
}

.finale {
  padding-top: 56px;
  padding-bottom: 100px;
  text-align: center;
}

.finale > p {
  color: var(--muted);
  font-size: 15px;
}

.finale h2 {
  margin: 22px 0;
  font-size: clamp(42px, 6vw, 76px);
  font-weight: 700;
  letter-spacing: -0.065em;
  line-height: 1.08;
}

.finale .button {
  margin-top: 18px;
}

#surprise-message {
  max-width: 450px;
  margin: 24px auto 0;
  line-height: 1.7;
}

footer {
  width: min(100% - 64px, 1134px);
  min-height: 76px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

footer a {
  color: var(--rose);
  font-weight: 700;
}

dialog {
  width: min(480px, calc(100% - 36px));
  padding: 42px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--bg);
  box-shadow: var(--shadow);
  color: var(--ink);
  text-align: center;
}

dialog::backdrop {
  background: rgb(54 21 32 / 55%);
  backdrop-filter: blur(5px);
}

#close-dialog {
  position: absolute;
  top: 10px;
  right: 15px;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 28px;
}

.dialog-heart {
  color: var(--rose);
  font-size: 58px;
}

dialog h2 {
  font-size: 30px;
}

dialog p {
  margin-bottom: 28px;
  color: var(--muted);
  line-height: 1.85;
}

#confetti {
  position: fixed;
  z-index: 100;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.confetto {
  position: absolute;
  top: -25px;
  left: var(--left);
  width: 9px;
  height: 14px;
  animation: fall var(--duration) ease-in forwards;
  background: var(--color);
}

@keyframes fall {
  to {
    transform: translate(var(--drift), 110vh) rotate(720deg);
  }
}

[hidden] {
  display: none !important;
}

@media (max-width: 900px) {
  header,
  .hero {
    width: min(100% - 48px, 760px);
  }

  header {
    min-height: 76px;
  }

  nav {
    gap: 18px;
    font-size: 13px;
  }

  .small-button {
    display: none;
  }

  .hero {
    min-height: auto;
    grid-template-columns: 1fr 0.9fr;
    gap: 32px;
    padding: 44px 0 68px;
  }

  h1 {
    font-size: clamp(54px, 8.5vw, 76px);
  }

  .hero-art {
    padding: 24px 18px 18px;
  }

  .flower-photo {
    transform: rotate(1deg);
  }

  .sticker {
    left: -7px;
    width: 106px;
    font-size: 14px;
  }

  .section {
    padding: 82px 36px;
  }

  .wish-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  html {
    scroll-padding-top: 20px;
  }

  header,
  .hero,
  footer {
    width: calc(100% - 40px);
  }

  header {
    min-height: 70px;
    gap: 14px;
  }

  .brand {
    font-size: 21px;
  }

  nav {
    gap: 14px;
    font-size: 12px;
  }

  nav a:last-child {
    display: none;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 34px;
    padding: 38px 0 52px;
  }

  .hero-copy {
    padding: 0;
  }

  .eyebrow {
    margin-bottom: 18px;
    font-size: 10px;
    letter-spacing: 1.7px;
  }

  h1 {
    font-size: clamp(58px, 13.5vw, 76px);
    letter-spacing: -0.075em;
  }

  .intro {
    margin: 21px 0 24px;
    font-size: 15px;
  }

  .hero-copy > .button {
    width: 100%;
    max-width: 360px;
  }

  .hero-art {
    width: min(82%, 350px);
    padding: 22px 17px 18px;
  }

  .flower-photo img {
    aspect-ratio: 0.88;
  }

  .flower-photo figcaption {
    padding: 14px 10px 16px;
    font-size: 21px;
  }

  .orbit-text {
    left: -12px;
    font-size: 9px;
  }

  

  .sticker {
    bottom: -8px;
    left: -21px;
    width: 100px;
    font-size: 13px;
  }

  .ribbon {
    min-height: 54px;
    justify-content: flex-start;
    gap: 30px;
    padding: 15px 20px;
    font-size: 10px;
  }

  .section {
    padding: 70px 20px;
  }

  .index {
    margin-bottom: 16px;
  }

  .section-heading h2,
  .film-heading h2 {
    font-size: clamp(36px, 9.5vw, 48px);
    letter-spacing: -0.055em;
  }

  .letter-section {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .letter-wrap {
    padding: 10px 8px;
  }

  .envelope {
    min-height: 240px;
  }

  .letter {
    padding: 24px;
  }

  .letter .handwritten {
    font-size: 25px;
  }

  .film-section {
    padding-top: 42px;
  }

  .film-heading {
    margin-bottom: 26px;
  }

  .film-frame {
    min-height: 220px;
    aspect-ratio: 4 / 3;
    border-radius: 12px;
  }

  #video-placeholder {
    padding: 20px;
  }

  .wishes-section {
    padding-top: 44px;
  }

  .wish-grid {
    gap: 12px;
    margin-top: 26px;
  }

  .wish-card {
    min-height: 194px;
    padding: 19px 16px;
  }

  .card-symbol {
    margin-bottom: 25px;
    font-size: 40px;
  }

  .card-title {
    font-size: 19px;
  }

  .card-hint {
    font-size: 10px;
  }

  .finale {
    padding-top: 38px;
    padding-bottom: 72px;
  }

  .finale h2 {
    font-size: clamp(40px, 10vw, 54px);
  }

  footer {
    min-height: 70px;
    font-size: 11px;
  }

  dialog {
    padding: 36px 24px 28px;
  }
}

@media (max-width: 370px) {
  header,
  .hero,
  footer {
    width: calc(100% - 32px);
  }

  nav {
    gap: 10px;
    font-size: 11px;
  }

  .brand {
    font-size: 19px;
  }

  h1 {
    font-size: 56px;
  }

  .wish-card {
    padding: 17px 13px;
  }

  .card-hint {
    font-size: 9px;
  }
}

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

/* Keep photo dimensions and layouts stable on narrow screens. */
.flower-photo img{height:auto}
.hero-copy,.hero-art,.letter-wrap,.section-heading{min-width:0}
.film-frame:has(video:not([hidden])){aspect-ratio:auto;min-height:0;background:#2c1820}
.film-frame video{display:block;height:auto;object-fit:contain}
dialog{max-height:calc(100dvh - 40px);overflow-y:auto}
#close-dialog{min-width:44px;min-height:44px}
@media(min-width:621px) and (max-width:900px){h1{font-size:clamp(45px,7.3vw,65px)}.letter-section{grid-template-columns:1fr;gap:24px}.letter-wrap{max-width:650px;width:100%}}
@media(max-width:620px){.ribbon{justify-content:center}.ribbon span:not(:first-child){display:none}footer{flex-wrap:wrap;padding-block:20px}}
