/* Ambient gradient — base = modern look (docs/.../before) */
html {
  scroll-behavior: auto; /* JS soft-scroll owns wheel; avoid fighting native smooth */
  overscroll-behavior-y: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  min-height: 100vh;
  background: linear-gradient(120deg, #fff0f5, #fce4ec, #f3e5f5);
  background-size: 600% 600%;
  animation: gradientShift 20s ease infinite;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Sections — taller stages so each flick covers less of the story */
.center-screen {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.hidden-section {
  display: none;
  opacity: 0;
  text-align: center;
  min-height: 100svh;
  box-sizing: border-box;
  padding: clamp(64px, 12vh, 120px) 20px clamp(80px, 16vh, 160px);
  flex-direction: column;
  justify-content: center;
  align-items: center;
  will-change: opacity, transform;
}

#section-celebration.is-open,
#section-cake.is-open,
#section-letter.is-open {
  display: flex;
}

#section-letter {
  padding-bottom: clamp(96px, 18vh, 200px);
}

/* Gift */
#gift-box-container {
  font-size: 80px;
  cursor: pointer;
  animation: float 2s ease-in-out infinite;
}

.tap-text {
  font-size: 12px;
  opacity: 0.6;
}

@keyframes float {
  0%,100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* Memories breathing */
.memories {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
  max-width: 400px;
  margin: auto;
}

.memories img {
  width: 100%;
  border-radius: 15px;
  animation: breathe 4s ease-in-out infinite;
}

.memories img:nth-child(2) { animation-delay: 1s; }
.memories img:nth-child(3) { animation-delay: 2s; }
.memories img:nth-child(4) { animation-delay: 3s; }

@keyframes breathe {
  0%,100% { transform: scale(1); }
  50% { transform: scale(1.04); }
}

/* Buttons */
.cta-btn {
  margin-top: 30px;
  padding: 12px 30px;
  border-radius: 999px;
  background: #ff6b6b;
  color: white;
  font-weight: bold;
}

/* Cake */
.cake {
  font-size: 80px;
  cursor: pointer;
}

/* Letter */
.letter {
  background: white;
  padding: 30px;
  border-radius: 20px;
  max-width: 500px;
  width: min(500px, 100%);
  margin: auto;
  box-shadow: 0 18px 48px rgba(255, 107, 135, 0.12);
}

.signature {
  margin-top: 20px;
  color: #ff6b6b;
  text-align: right;
}

/* Hearts */
#hearts-container {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.heart {
  position: absolute;
  bottom: -20px;
  font-size: 20px;
  animation: floatUp linear forwards;
}

/* Celebrate button */
.celebrate-btn {
  margin-bottom: 30px;
  padding: 10px 26px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ff9a9e, #fad0c4);
  color: #fff;
  font-weight: bold;
  font-size: 16px;
  box-shadow: 0 10px 25px rgba(255, 105, 135, 0.4);
  transition: transform 0.3s ease;
}

.celebrate-btn:hover {
  transform: scale(1.1);
}


@keyframes floatUp {
  to {
    transform: translateY(-110vh) translateX(var(--drift));
    opacity: 0;
  }
}

#typewriter{white-space:pre-line}.memories img{aspect-ratio:1;object-fit:cover}.celebrate-btn{display:block;margin:30px auto 0}

html{overflow-x:hidden}body{max-width:100vw}h1,h2,h3,p,.choice,.pill,.say,.ticket{overflow-wrap:anywhere}

/* Landing stage — neutral until look resolves */
.landing-stage{
  position:relative;
  width:min(640px,100%);
  padding:clamp(28px,5vw,48px) clamp(18px,4vw,36px);
  box-sizing:border-box;
}

/* --------------------------------------------------------------------------
   VINTAGE look — deep classical paper / ornate / sepia polaroid
   Fallback: .mec-vintage before ornaments.js sets data-look
   -------------------------------------------------------------------------- */
body.mec-vintage:not([data-look="modern"]),
body[data-look="vintage"]{
  margin:0;
  animation:none;
  color:var(--v-ink,#4b3427);
}

body.mec-vintage:not([data-look="modern"]) #section-landing,
body[data-look="vintage"] #section-landing{
  padding:80px 24px 48px;
  box-sizing:border-box;
  text-align:center;
  position:relative;
}

body.mec-vintage:not([data-look="modern"]) .landing-stage,
body[data-look="vintage"] .landing-stage{
  border:1px solid var(--v-gold,#c4a35a);
  outline:1px solid color-mix(in srgb,var(--v-gold,#c4a35a) 55%,#d8c49a);
  outline-offset:-9px;
  background:
    radial-gradient(ellipse at 50% 0%,#fff9ebcc,transparent 58%),
    linear-gradient(180deg,var(--v-parchment,#f6ecd8),var(--v-paper-deep,#efe2c8));
  box-shadow:
    0 18px 42px #4b34271f,
    inset 0 0 48px #7d383908;
}

body.mec-vintage:not([data-look="modern"]) .landing-stage::before,
body.mec-vintage:not([data-look="modern"]) .landing-stage::after,
body[data-look="vintage"] .landing-stage::before,
body[data-look="vintage"] .landing-stage::after{
  content:"";
  position:absolute;
  width:min(72px,18vw);
  height:min(72px,18vw);
  pointer-events:none;
  z-index:2;
  background:url("/assets/vintage/svg/corner.svg") no-repeat center/contain;
  opacity:.92;
}
body.mec-vintage:not([data-look="modern"]) .landing-stage::before,
body[data-look="vintage"] .landing-stage::before{top:6px;left:6px}
body.mec-vintage:not([data-look="modern"]) .landing-stage::after,
body[data-look="vintage"] .landing-stage::after{top:6px;right:6px;transform:scaleX(-1)}

body.mec-vintage:not([data-look="modern"]) #section-landing h1,
body.mec-vintage:not([data-look="modern"]) #section-celebration h2,
body.mec-vintage:not([data-look="modern"]) #section-cake h2,
body[data-look="vintage"] #section-landing h1,
body[data-look="vintage"] #section-celebration h2,
body[data-look="vintage"] #section-cake h2{
  font-size:clamp(30px,7vw,46px);
  line-height:1.3;
  max-width:620px;
  text-wrap:balance;
  color:var(--v-wine,#7d3839);
  text-shadow:
    0 0 28px color-mix(in srgb,var(--v-gold,#c4a35a) 45%,transparent),
    0 1px 0 #fff8e8aa,
    0 0 2px #c4a35a55;
  letter-spacing:-.02em;
}

body.mec-vintage:not([data-look="modern"]) #section-cake h2,
body[data-look="vintage"] #section-cake h2{
  font-size:clamp(24px,5.5vw,34px);
}

body.mec-vintage:not([data-look="modern"]) #opening-text,
body[data-look="vintage"] #opening-text{
  max-width:440px;
  margin-inline:auto;
  line-height:1.9;
  color:var(--v-ink,#4b3427);
}

body.mec-vintage:not([data-look="modern"]) .vintage-eyebrow,
body[data-look="vintage"] .vintage-eyebrow{
  font-size:10px;
  line-height:1.7;
  letter-spacing:.15em;
  text-transform:uppercase;
  color:var(--v-dusty-rose,#9a6b6c);
  margin:0 0 20px;
}

body.mec-vintage:not([data-look="modern"]) h1,
body.mec-vintage:not([data-look="modern"]) h2,
body[data-look="vintage"] h1,
body[data-look="vintage"] h2{
  color:var(--v-wine,#7d3839);
}

body.mec-vintage:not([data-look="modern"]) .hidden-section,
body[data-look="vintage"] .hidden-section{
  padding:70px 22px 80px;
  gap:0;
}

/* Polaroid album — warm sepia, thick bottom white */
body.mec-vintage:not([data-look="modern"]) .memories,
body[data-look="vintage"] .memories{
  width:min(420px,100%);
  margin:12px auto 18px;
  gap:18px;
}

body.mec-vintage:not([data-look="modern"]) .memories img,
body[data-look="vintage"] .memories img{
  border-radius:0;
  background:
    linear-gradient(180deg,#fffaf0 0%,#f4ead6 100%);
  padding:8px 8px 26px;
  border:1px solid var(--v-line,#b99b75);
  box-shadow:
    0 10px 22px #49301e22,
    inset 0 0 0 1px #fff8e888;
  animation:none;
  filter:sepia(.28) saturate(.78) contrast(1.04) brightness(.97);
}
body.mec-vintage:not([data-look="modern"]) .memories img:nth-child(odd),
body[data-look="vintage"] .memories img:nth-child(odd){transform:rotate(-2.4deg)}
body.mec-vintage:not([data-look="modern"]) .memories img:nth-child(even),
body[data-look="vintage"] .memories img:nth-child(even){transform:rotate(2.2deg)}
body.mec-vintage:not([data-look="modern"]) .memories img:nth-child(3),
body[data-look="vintage"] .memories img:nth-child(3){transform:rotate(1.6deg)}
body.mec-vintage:not([data-look="modern"]) .memories img:nth-child(4),
body[data-look="vintage"] .memories img:nth-child(4){transform:rotate(-1.8deg)}

/* Ornate letter panel */
body.mec-vintage:not([data-look="modern"]) .letter,
body[data-look="vintage"] .letter{
  background:
    radial-gradient(ellipse at 20% 10%,#fff9ebaa,transparent 55%),
    linear-gradient(165deg,var(--v-parchment,#f6ecd8),#efe2c8);
  border:1px solid var(--v-gold,#c4a35a);
  border-radius:1px;
  color:var(--v-ink,#4b3427);
  box-shadow:0 16px 36px #49301e1c, inset 0 0 40px #7d383908;
  max-width:600px;
  width:min(600px,100%);
  text-align:left;
  padding:clamp(28px,5vw,48px) clamp(22px,5vw,42px) clamp(32px,5vw,48px);
}
body.mec-vintage:not([data-look="modern"]) .letter h3,
body[data-look="vintage"] .letter h3{
  line-height:1.5;
  color:var(--v-wine,#7d3839);
  text-shadow:0 0 18px color-mix(in srgb,var(--v-gold,#c4a35a) 35%,transparent);
}
body.mec-vintage:not([data-look="modern"]) #typewriter,
body[data-look="vintage"] #typewriter{line-height:1.9}
body.mec-vintage:not([data-look="modern"]) .date,
body[data-look="vintage"] .date{
  font-size:12px;
  letter-spacing:.04em;
  color:var(--v-dusty-rose,#9a6b6c);
  margin-bottom:22px;
}
body.mec-vintage:not([data-look="modern"]) .signature,
body[data-look="vintage"] .signature{
  color:var(--v-wine,#7d3839);
  font-style:italic;
}

body.mec-vintage:not([data-look="modern"]) #gift-box-container,
body[data-look="vintage"] #gift-box-container{
  font-size:72px;
  margin-top:12px;
  filter:sepia(.55) saturate(.55);
  animation:float 2.6s ease-in-out infinite;
}
body.mec-vintage:not([data-look="modern"]) .tap-text,
body[data-look="vintage"] .tap-text{
  font-size:12px;
  opacity:1;
  letter-spacing:.06em;
  color:#6b5139;
}
body.mec-vintage:not([data-look="modern"]) .cake,
body[data-look="vintage"] .cake{
  filter:sepia(.45) saturate(.65);
  animation:float 2.8s ease-in-out infinite;
}
body.mec-vintage:not([data-look="modern"]) #hearts-container,
body[data-look="vintage"] #hearts-container{
  opacity:.48;
  filter:sepia(.55) saturate(.45);
}
body.mec-vintage:not([data-look="modern"]) .read-letter,
body[data-look="vintage"] .read-letter{
  font-size:13px;
  padding:9px 14px;
  margin-top:18px;
}
body.mec-vintage:not([data-look="modern"]) .cta-btn,
body.mec-vintage:not([data-look="modern"]) .celebrate-btn,
body.mec-vintage:not([data-look="modern"]) .read-letter,
body[data-look="vintage"] .cta-btn,
body[data-look="vintage"] .celebrate-btn,
body[data-look="vintage"] .read-letter{
  border-radius:1px;
  background:var(--v-wine,#7d3839);
  color:var(--v-cream,#fff8e8);
  border:1px solid #6a2d2f;
  box-shadow:3px 3px 0 #49301e20, 0 0 0 1px color-mix(in srgb,var(--v-gold,#c4a35a) 40%,transparent);
  cursor:pointer;
  background-image:linear-gradient(180deg,color-mix(in srgb,var(--v-wine,#7d3839) 92%,#fff) 0%,var(--v-wine,#7d3839) 100%);
}
body.mec-vintage:not([data-look="modern"]) .celebrate-btn:hover,
body[data-look="vintage"] .celebrate-btn:hover{
  transform:translateY(-1px) scale(1.03);
}
body.mec-vintage:not([data-look="modern"]) #gift-box-container:focus-visible,
body.mec-vintage:not([data-look="modern"]) .cake:focus-visible,
body[data-look="vintage"] #gift-box-container:focus-visible,
body[data-look="vintage"] .cake:focus-visible{
  outline:2px solid var(--v-wine,#7d3839);
  outline-offset:5px;
}

body.mec-vintage:not([data-look="modern"]) #section-celebration > p,
body.mec-vintage:not([data-look="modern"]) #wish-text,
body[data-look="vintage"] #section-celebration > p,
body[data-look="vintage"] #wish-text{
  color:var(--v-ink,#4b3427);
}

/* --------------------------------------------------------------------------
   MODERN look — restore minimalist pink/rounded from before/
   Keep Vietnamese copy; strip ornate hooks
   -------------------------------------------------------------------------- */
body[data-look="modern"]{
  margin:0;
  background: linear-gradient(120deg, #fff0f5, #fce4ec, #f3e5f5);
  background-size: 600% 600%;
  animation: gradientShift 20s ease infinite;
  color:#374151;
  font-family:Nunito,sans-serif;
}

body[data-look="modern"] .vintage-eyebrow,
body[data-look="modern"] .vintage-rule,
body[data-look="modern"] .vintage-frame-ornament-bl,
body[data-look="modern"] .vintage-frame-ornament-br{
  display:none!important;
}

body[data-look="modern"].vintage-vignette::after,
body[data-look="modern"] .vintage-vignette::after{
  display:none!important;
  content:none!important;
}

body[data-look="modern"] .landing-stage{
  background:transparent;
  border:0;
  outline:0;
  box-shadow:none;
  padding:0;
  width:auto;
  max-width:none;
}
body[data-look="modern"] .landing-stage::before,
body[data-look="modern"] .landing-stage::after{
  content:none!important;
  display:none!important;
}

body[data-look="modern"] h1,
body[data-look="modern"] h2,
body[data-look="modern"] h3{
  color:inherit;
  text-shadow:none;
  letter-spacing:normal;
}
body[data-look="modern"] .font-header,
body[data-look="modern"] h1.font-header,
body[data-look="modern"] h2.font-header,
body[data-look="modern"] h3.font-header{
  font-family:Pacifico,cursive;
  color:#ff6b6b;
}

body[data-look="modern"] #opening-text{
  color:#6b7280;
  line-height:1.625;
}

body[data-look="modern"] .memories{
  max-width:400px;
  gap:15px;
  margin:auto;
  width:auto;
}
body[data-look="modern"] .memories img{
  border-radius:15px;
  background:transparent;
  padding:0;
  border:0;
  box-shadow:none;
  filter:none;
  transform:none;
  animation:breathe 4s ease-in-out infinite;
}
body[data-look="modern"] .memories img:nth-child(2){animation-delay:1s}
body[data-look="modern"] .memories img:nth-child(3){animation-delay:2s}
body[data-look="modern"] .memories img:nth-child(4){animation-delay:3s}

body[data-look="modern"] .letter,
body[data-look="modern"] .letter.vintage-frame{
  position:relative;
  background:white;
  padding:30px;
  border-radius:20px;
  border:0;
  outline:0;
  max-width:500px;
  width:min(500px,100%);
  margin:auto;
  box-shadow:0 18px 48px rgba(255,107,135,.12);
  color:#374151;
  text-align:left;
}
body[data-look="modern"] .letter.vintage-frame::before,
body[data-look="modern"] .letter.vintage-frame::after{
  content:none!important;
  display:none!important;
}
body[data-look="modern"] .letter h3{
  color:#ff6b6b;
  text-shadow:none;
}
body[data-look="modern"] .date{
  color:#9ca3af;
  margin-bottom:12px;
}
body[data-look="modern"] .signature{
  color:#ff6b6b;
  font-style:normal;
}

body[data-look="modern"] #gift-box-container{
  font-size:80px;
  margin-top:0;
  filter:none;
  animation:float 2s ease-in-out infinite;
}
body[data-look="modern"] .tap-text{
  font-size:12px;
  opacity:.6;
  letter-spacing:normal;
  color:inherit;
}
body[data-look="modern"] .cake{
  filter:none;
  animation:none;
}
body[data-look="modern"] #hearts-container{
  opacity:1;
  filter:none;
}

body[data-look="modern"] .cta-btn{
  margin-top:30px;
  padding:12px 30px;
  border-radius:999px;
  background:#ff6b6b;
  color:#fff;
  font-weight:bold;
  border:0;
  box-shadow:none;
  background-image:none;
}
body[data-look="modern"] .celebrate-btn{
  margin-bottom:30px;
  padding:10px 26px;
  border-radius:999px;
  background:linear-gradient(135deg,#ff9a9e,#fad0c4);
  color:#fff;
  font-weight:bold;
  font-size:16px;
  box-shadow:0 10px 25px rgba(255,105,135,.4);
  border:0;
  background-image:linear-gradient(135deg,#ff9a9e,#fad0c4);
}
body[data-look="modern"] .celebrate-btn:hover{transform:scale(1.1)}
body[data-look="modern"] .read-letter{
  font-size:14px;
  padding:10px 18px;
  margin-top:18px;
  border-radius:999px;
  background:#ff6b6b;
  color:#fff;
  border:0;
  box-shadow:none;
  background-image:none;
}

body[data-look="modern"] #section-celebration > p,
body[data-look="modern"] #wish-text{
  color:inherit;
}
body[data-look="modern"] #wish-text{
  color:#9ca3af;
}
body[data-look="modern"] .text-pink-500{
  color:#ec4899;
}

body[data-look="modern"] #gift-box-container:focus-visible,
body[data-look="modern"] .cake:focus-visible{
  outline:2px solid #ff6b6b;
  outline-offset:5px;
}

@media (prefers-reduced-motion: reduce) {
  body,
  #gift-box-container,
  .memories img,
  .heart,
  body[data-look="vintage"] #gift-box-container,
  body[data-look="vintage"] .cake,
  body.mec-vintage:not([data-look="modern"]) #gift-box-container,
  body.mec-vintage:not([data-look="modern"]) .cake {
    animation: none !important;
  }
  .celebrate-btn {
    transition: none;
  }
}

@media (max-width:480px){
  body[data-look="vintage"] .landing-stage::before,
  body[data-look="vintage"] .landing-stage::after,
  body.mec-vintage:not([data-look="modern"]) .landing-stage::before,
  body.mec-vintage:not([data-look="modern"]) .landing-stage::after{
    width:52px;height:52px;
  }
}
