/* ═══════════════════════════════════════════════
   CHERRY BLOSSOM — style.css (clean rewrite)
   Mobile-first · No conflicting rules
═══════════════════════════════════════════════ */

/* ── Reset ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

/* ── Base ── */
html {
  height: auto;
  scrollbar-gutter: stable;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Noto Serif SC', serif;
  background: #fff;
  color: #333;
  overflow-x: hidden;
  -webkit-user-select: none;
  user-select: none;
  touch-action: pan-y; /* always allow vertical scroll */
}

input, textarea {
  -webkit-user-select: text;
  user-select: text;
}

img {
  -webkit-user-drag: none;
  display: block;
  max-width: 100%;
}

/* ── Custom cursor ── */
* { cursor: url('images/cursor.svg') 16 16, auto; }
a, button { cursor: url('images/cursor.svg') 16 16, pointer; }

/* ── Page wrapper ── */
.wrap {
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  background: #fff;
  overflow-x: clip;   /* ← use clip instead of hidden */
  overflow-y: visible; /* ← never create internal scroll */
}
/* ── Desktop shell ── */
@media (min-width: 480px) {
  body {
    background: #EEEAE6;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
  }
  .wrap {
    width: 520px;
    min-width: 520px;
    max-width: 520px;
    box-shadow: 0 8px 48px rgba(0,0,0,.15), 0 20px 80px rgba(0,0,0,.10);
  }
}

/* ═══════════════════════════════════════════════
   LOADER
═══════════════════════════════════════════════ */
#loader {
  position: fixed;
  inset: 0;
  background: #fff;
  z-index: 9999999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s ease;
  pointer-events: none;
}

.loader-text {
  font-family: 'Lato', sans-serif;
  font-size: 11px;
  color: rgba(200,160,60,0.7);
  letter-spacing: 5px;
  font-weight: 300;
  animation: pulse 1.5s ease-in-out infinite;
}

/* ═══════════════════════════════════════════════
   ENTRANCE
═══════════════════════════════════════════════ */
#entrance {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 99999;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  overflow: hidden;
  transition: opacity 0.6s ease;
}

@media (min-width: 480px) {
  #entrance {
    left: 50%;
    transform: translateX(-50%);
    width: 520px;
    right: auto;
  }
}

/* Side text */
.ent-side-txt {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-family: 'Lato', sans-serif;
  font-size: 6px;
  color: rgba(180,150,100,.25);
  letter-spacing: 3px;
  writing-mode: vertical-rl;
  font-weight: 300;
  z-index: 1;
}

/* Content block */
.ent-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  padding: 0 16px;
  margin-top: -40px;
}

/* Wedding Invitation heading */
.ent-above {
  margin-bottom: 24px;
  width: 100%;
  text-align: center;
}

.ent-wedding-inv {
  font-family: 'Dancing Script', cursive;
  font-size: 80px;
  font-weight: 700;
  color: #e8637f;
  line-height: 0.95;
  font-style: italic;
  letter-spacing: -2px;
  display: block;
  transform: rotate(-2deg);
  text-shadow: 1px 1px 0 rgba(232,99,127,.15);
  will-change: transform;
}

@media (max-width: 370px) {
  .ent-wedding-inv { font-size: 62px; }
}

@media (min-width: 480px) {
  .ent-wedding-inv { font-size: 100px; }
}

/* Polaroid */
.ent-pol-outer {
  transform: rotate(-1.5deg);
  animation: polFloat 3.5s ease-in-out infinite;
  display: inline-block;
  will-change: transform;
}

@keyframes polFloat {
  0%,100% { transform: rotate(-1.5deg) translateY(0); }
  50%      { transform: rotate(-1.5deg) translateY(-8px); }
}

.ent-pol {
  width: 270px;
  background: #fff;
  padding: 10px 10px 0;
  position: relative;
  border: 1px solid rgba(200,160,60,.3);
  box-shadow: 0 0 0 3px rgba(200,160,60,.07), 0 12px 36px rgba(0,0,0,.12);
}

.ent-pol::before {
  content: '';
  position: absolute;
  inset: -1px;
  background:
    linear-gradient(to right, rgba(200,160,60,.65) 10px, transparent 10px) top left / 100% 1px no-repeat,
    linear-gradient(to left,  rgba(200,160,60,.65) 10px, transparent 10px) top right / 100% 1px no-repeat,
    linear-gradient(to right, rgba(200,160,60,.65) 10px, transparent 10px) bottom left / 100% 1px no-repeat,
    linear-gradient(to left,  rgba(200,160,60,.65) 10px, transparent 10px) bottom right / 100% 1px no-repeat,
    linear-gradient(to bottom, rgba(200,160,60,.65) 10px, transparent 10px) top left / 1px 100% no-repeat,
    linear-gradient(to top,   rgba(200,160,60,.65) 10px, transparent 10px) bottom left / 1px 100% no-repeat,
    linear-gradient(to bottom, rgba(200,160,60,.65) 10px, transparent 10px) top right / 1px 100% no-repeat,
    linear-gradient(to top,   rgba(200,160,60,.65) 10px, transparent 10px) bottom right / 1px 100% no-repeat;
  pointer-events: none;
  z-index: 5;
}

@media (max-width: 370px) {
  .ent-pol { width: 230px; }
}

.ent-tape {
  position: absolute;
  width: 32px; height: 13px;
  background: rgba(220,185,100,.28);
  border: 0.5px solid rgba(200,160,60,.2);
  border-radius: 1px;
  z-index: 6;
}
.ent-tape-tl { top: -6px; left: -9px; transform: rotate(-18deg); }
.ent-tape-tr { top: -6px; right: -9px; transform: rotate(18deg); }

.ent-pol-photo {
  width: 250px;
  height: 220px;
  overflow: hidden;
  position: relative;
  background: #f5f0e8;
}

@media (max-width: 370px) {
  .ent-pol-photo { width: 210px; height: 190px; }
}

.ent-pol-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
}

.ent-pol-divider {
  height: 0.5px;
  background: linear-gradient(to right, transparent, rgba(200,160,60,.4), transparent);
  margin: 0 14px;
}

.ent-pol-caption {
  padding: 12px 10px 18px;
  text-align: center;
  position: relative;
}

.ent-pol-seal {
  position: absolute;
  bottom: -14px; left: 50%; transform: translateX(-50%);
  width: 28px; height: 28px; border-radius: 50%;
  background: linear-gradient(135deg, #d4a840 0%, #c89020 50%, #a87010 100%);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; color: rgba(255,240,200,.95);
  box-shadow: 0 2px 8px rgba(180,130,20,.25);
  border: 1px solid rgba(200,160,60,.35);
  z-index: 7;
}

.ent-pol-title {
  font-family: 'Dancing Script', cursive;
  font-size: 24px; color: #c8637f;
  font-weight: 700; line-height: 1.2; margin-bottom: 3px;
}

.ent-pol-date {
  font-family: 'Lato', sans-serif;
  font-size: 8px; color: rgba(200,160,60,.7);
  letter-spacing: 3px; font-weight: 300;
}

/* Below polaroid */
.ent-below { margin-top: 26px; text-align: center; }

.ent-names {
  font-family: 'Cormorant Garamond', serif;
  font-size: 24px;
  color: #444;
  font-style: italic;
  letter-spacing: 1px;
  margin-bottom: 4px;
}

.ent-names-zh {
  font-family: 'Lato', sans-serif;
  font-size: 10px; color: rgba(200,160,60,.6);
  letter-spacing: 3px; font-weight: 300; margin-bottom: 18px;
}

.ent-tap-hint {
  font-family: 'Lato', sans-serif;
  font-size: 13px;
  color: rgba(200,160,60,0.6);
  letter-spacing: 3px;
  font-weight: 300;
  animation: pulse 2s ease-in-out infinite;
}

/* Entrance petals */
#entrance-petals {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 99998;
  overflow: hidden;
}

.entrance-petal {
  position: absolute;
  top: -10px;
  pointer-events: none;
  will-change: transform;
  animation: entranceFall linear infinite;
}

@keyframes entranceFall {
  0%   { transform: translateY(-20px) rotate(0deg); opacity: 0; }
  15%  { opacity: 0.6; }
  85%  { opacity: 0.5; }
  100% { transform: translateY(110vh) rotate(300deg) translateX(15px); opacity: 0; }
}

/* ═══════════════════════════════════════════════
   MUSIC BUTTON
═══════════════════════════════════════════════ */
#music-btn {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 9999;
  width: 36px; height: 36px;
  background: #e8637f;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(232,99,127,0.3);
  border: none;
}

@media (min-width: 480px) {
  #music-btn { right: calc(50% - 240px + 16px); }
}

/* ═══════════════════════════════════════════════
   FLOATING PETALS (main page)
═══════════════════════════════════════════════ */
.petal {
  position: fixed;
  top: -20px;
  pointer-events: none;
  z-index: 999;
  will-change: transform;
  animation: fall linear forwards;
}

@keyframes fall {
  0%   { transform: translateY(0) rotate(0deg) translateX(0); opacity: 0.7; }
  25%  { transform: translateY(25vh) rotate(90deg) translateX(20px); opacity: 0.6; }
  50%  { transform: translateY(50vh) rotate(180deg) translateX(-15px); opacity: 0.5; }
  75%  { transform: translateY(75vh) rotate(270deg) translateX(10px); opacity: 0.3; }
  100% { transform: translateY(110vh) rotate(360deg) translateX(-5px); opacity: 0; }
}

/* ═══════════════════════════════════════════════
   SECTION 1 — HERO
═══════════════════════════════════════════════ */
.hero {
  position: relative;
  background: #fff;
}

.hero-photo {
  width: 100%;
  height: 660px;
  position: relative;
  overflow: hidden;
}

.hero-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.yellow-flower {
  position: absolute;
  font-size: 18px;
  opacity: 0.7;
  pointer-events: none;
  animation: drift 4s ease-in-out infinite;
  will-change: transform;
}

@keyframes drift {
  0%, 100% { transform: rotate(-10deg) translateY(0); }
  50%       { transform: rotate(10deg) translateY(-6px); }
}

.hero-brand {
  padding: 20px 24px 0;
  position: relative;
}

.love-you-cn {
  font-family: 'Dancing Script', cursive;
  font-size: 38px;
  font-weight: 700;
  color: #e8637f;
  line-height: 1;
  display: inline-block;
}

.tagline-cn {
  font-size: 12px;
  color: #7ab3c8;
  letter-spacing: 1px;
  margin-top: 10px;
  font-weight: 300;
  margin-bottom: 10px;
}

.invitation-vertical {
  position: absolute;
  right: 16px;
  top: 68px;
  font-family: 'Lato', sans-serif;
  font-size: 12px;
  letter-spacing: 4px;
  color: #e8637f;
  writing-mode: vertical-rl;
  font-weight: 300;
}

/* Names */
.names-section {
  padding: 28px 44px 20px 28px;
  border-top: 1px solid #f0d0db;
  margin-top: 16px;
  position: relative;
}

.names-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.name-cn {
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px;
  font-weight: 400;
  color: #333;
}

.heart-dot { width: 20px; height: 20px; flex-shrink: 0; }

.names-body {
  font-size: 12px;
  color: #666;
  line-height: 2.2;
  font-weight: 300;
  letter-spacing: 0.5px;
}

.date-highlight { font-weight: 400; color: #e8637f; }

/* Photo blocks */
.photo-block {
  width: 100%;
  height: 300px;
  background: linear-gradient(135deg, #fce4ec, #f8bbd0);
  position: relative;
  overflow: hidden;
}

.photo-block img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}

/* Quote */
.quote-banner {
  padding: 20px 28px;
  text-align: center;
}

.quote-hashtag {
  font-family: 'Lato', sans-serif;
  font-size: 12px;
  color: #e8637f;
  letter-spacing: 3px;
  margin-bottom: 14px;
  font-weight: 300;
}

.quote-body {
  font-size: 11px;
  font-style: italic;
  color: #888;
  line-height: 2.2;
  font-weight: 300;
}

/* ═══════════════════════════════════════════════
   SECTION 2 — LOVE STORY
═══════════════════════════════════════════════ */
.section-story {
  background: #fff;
  position: relative;
}

.story-header {
  padding: 30px 24px 0;
  display: flex;
  align-items: flex-end;
  gap: 10px;
}

.love-you-sm {
  font-family: 'Dancing Script', cursive;
  font-size: 52px;
  font-weight: 700;
  color: #e8637f;
  line-height: 1;
  margin-left: 8px;
}

.love-you-en {
  display: flex;
  flex-direction: column;
  padding-bottom: 6px;
}

.love-you-en .love-hash {
  font-family: 'Lato', sans-serif;
  font-size: 11px;
  color: #ccc;
  font-weight: 300;
}

.love-you-en .love-text {
  font-family: 'Lato', sans-serif;
  font-size: 12px;
  color: #333;
  font-weight: 300;
  letter-spacing: 2px;
  line-height: 1.1;
}

.love-tagline {
  font-family: 'Dancing Script', cursive;
  font-size: 18px;
  color: #7ab3c8;
  padding-left: 28px;
  margin-top: 2px;
  margin-bottom: 14px;
}

/* Polaroid (story section) */
.polaroid-wrap {
  padding: 0 24px 16px;
  position: relative;
}

.polaroid {
  background: #fff;
  border: 1px solid #eee;
  box-shadow: 4px 4px 12px rgba(0,0,0,0.08);
  padding: 6px 6px 28px;
  transform: rotate(-1.5deg);
}

.polaroid-inner {
  width: 100%;
  height: 240px;
  overflow: hidden;
  position: relative;
}

.polaroid-inner img {
  width: 100%; height: 100%;
  object-fit: cover;
}

.polaroid-deco {
  position: absolute;
  bottom: 24px; right: 36px;
  display: flex; gap: 6px;
}

.star-deco  { color: #e8637f; font-size: 14px; }
.flower-deco { color: #e8637f; font-size: 12px; }

.married-label {
  text-align: center;
  font-family: 'Lato', sans-serif;
  font-size: 11px;
  color: #7ab3c8;
  letter-spacing: 4px;
  padding: 8px 0 16px;
  font-weight: 300;
}

.story-text {
  padding: 0 28px 20px;
  font-size: 12px;
  font-style: italic;
  color: #888;
  line-height: 2.4;
  font-weight: 300;
  text-align: center;
}

/* Two photo grid */
.two-photo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 0 24px;
  margin-bottom: 16px;
}

.two-photo-grid .photo-block { height: 180px; }

/* Photo frame */
.photo-frame-styled {
  margin: 0 24px;
  position: relative;
}

.photo-frame-inner {
  width: 100%;
  height: 220px;
  overflow: hidden;
  position: relative;
  border-radius: 4px;
}

.photo-frame-inner img {
  width: 100%; height: 100%;
  object-fit: cover;
}

.frame-accent {
  position: absolute;
  top: -8px; right: -8px;
  width: 60%; height: 80%;
  border: 2px solid #e8637f;
  border-radius: 4px;
  z-index: -1;
}

/* Dividers */
.divider {
  height: 1px;
  background: linear-gradient(to right, transparent, #f0c0d0, transparent);
  margin: 8px 28px;
}

.section-padding { height: 12px; }

/* ═══════════════════════════════════════════════
   SECTION 3 — DATE & VENUE
═══════════════════════════════════════════════ */
.section-info {
  background: #fff;
  padding: 20px 0;
}

.info-header {
  padding: 0 24px;
  display: flex;
  align-items: flex-end;
  gap: 8px;
}

.info-tag {
  font-family: 'Lato', sans-serif;
  font-size: 10px;
  color: #ccc;
  letter-spacing: 3px;
  font-weight: 300;
  padding-bottom: 8px;
}

.info-tagline {
  font-family: 'Dancing Script', cursive;
  font-size: 12px;
  color: #7ab3c8;
  padding-left: 27px;
  margin: 7px 0 24px;
}

/* Calendar */
.calendar-wrap {
  margin: 0 24px 24px;
  border: 1px solid #f5d0dc;
  border-radius: 8px;
  overflow: hidden;
}

.calendar-header {
  display: flex;
  align-items: baseline;
  padding: 14px 16px 8px;
  gap: 4px;
}

.cal-month-num {
  font-family: 'Lato', sans-serif;
  font-size: 48px;
  font-weight: 700;
  color: #e8637f;
  line-height: 1;
}

.cal-divider { color: #ddd; font-size: 28px; font-weight: 300; padding: 0 4px; }

.cal-info { display: flex; flex-direction: column; }

.cal-month-name {
  font-family: 'Lato', sans-serif;
  font-size: 11px;
  color: #999;
  letter-spacing: 2px;
  font-weight: 700;
}

.cal-year {
  font-family: 'Cormorant Garamond', serif;
  font-size: 18px;
  color: #e8637f;
  font-weight: 700;
  font-style: italic;
}

.cal-grid { padding: 0 12px 16px; }

.cal-days-header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  border-bottom: 1px solid #f5e0e8;
  padding-bottom: 6px;
  margin-bottom: 8px;
}

.cal-day-label {
  font-family: 'Lato', sans-serif;
  font-size: 10px;
  color: #7ab3c8;
  font-weight: 400;
  padding: 4px 0;
}

.cal-day-label.weekend { color: #e8637f; }

.cal-dates {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  text-align: center;
}

.cal-date {
  font-family: 'Lato', sans-serif;
  font-size: 12px;
  color: #666;
  width: 28px; height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: auto;
  font-weight: 300;
  border-radius: 50%;
}

.cal-date.weekend { color: #e8637f; }
.cal-date.empty   { color: transparent; }

/* Info blocks */
.info-block {
  padding: 0 24px 20px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.info-content {
  flex: 1;
  font-size: 13px;
  color: #7ab3c8;
  line-height: 2;
  font-weight: 300;
  padding-top: 4px;
}

/* Map */
.map-block {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #f0d0dc;
  position: relative;
  margin-bottom: 12px;
}

.map-visual {
  width: 100%;
  height: 140px;
  background: linear-gradient(135deg, #e8f4ff, #ddeeff, #e0f0f8);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.map-road-h {
  position: absolute;
  height: 8px;
  background: #fff;
  border-radius: 4px;
  opacity: 0.9;
}

.map-road-v {
  position: absolute;
  width: 8px;
  background: #fff;
  border-radius: 4px;
  opacity: 0.9;
}

.map-block-bldg {
  position: absolute;
  background: #c8ddf0;
  border-radius: 3px;
}

.map-pin {
  width: 30px; height: 36px;
  position: relative;
  z-index: 2;
}

/* ═══════════════════════════════════════════════
   SECTION 4 — RSVP
═══════════════════════════════════════════════ */
.section-promise { background: #fff; }

.full-photo {
  width: 100%;
  height: 320px;
  position: relative;
  overflow: hidden;
}

.full-photo img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}

.sparkle {
  position: absolute;
  font-size: 12px;
  color: #e8637f;
  pointer-events: none;
  animation: twinkle 2s ease-in-out infinite;
  will-change: transform;
}

@keyframes twinkle {
  0%, 100% { opacity: 0.3; transform: scale(1); }
  50%       { opacity: 1; transform: scale(1.2); }
}

.thanks-script {
  font-family: 'Dancing Script', cursive;
  font-size: 38px;
  color: #e8637f;
  font-weight: 600;
  letter-spacing: 2px;
}

/* ═══════════════════════════════════════════════
   SCROLL REVEAL
═══════════════════════════════════════════════ */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ═══════════════════════════════════════════════
   ANIMATIONS
═══════════════════════════════════════════════ */
@keyframes pulse {
  0%, 100% { opacity: 0.4; }
  50%       { opacity: 1; }
}

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

@keyframes layerFadeIn {
  0%   { opacity: 0; transform: translateY(-12px); }
  100% { opacity: 1; transform: translateY(0); }
}




