/* ===== Wedding website styles ===== */
:root {
  /* Theme: champagne & dusty-rose backgrounds, espresso text, gold accents */
  --ground: #E9D6C2;          /* main background (champagne) */
  --band: #E1C2B7;            /* dusty rose */
  --card: #F5EBE0;            /* cards and paper */
  --ink: #4A2E22;             /* body text, espresso brown */
  --muted: #634738;           /* secondary text, soft brown */
  --gold: #6B4E16;            /* small gold labels */
  --accent: #86621C;          /* headings & highlights, gold */
  --gold-bright: #B8860B;     /* ornaments only (not for small text) */
  --line: rgba(107, 78, 22, 0.3);
  --serif: 'Cormorant Garamond', 'Battambang', Georgia, serif;
  --script: 'Alex Brush', 'Snell Roundhand', cursive;   /* English script, as on the printed card */
  --sans: 'Jost', 'Battambang', 'Helvetica Neue', Arial, sans-serif;
  /* Khmer fonts, chosen to match the printed invitation */
  --km-sans: 'Battambang', 'Noto Sans Khmer', sans-serif;     /* body text */
  --km-serif: 'Battambang', 'Noto Serif Khmer', serif;
  --km-display: 'Moul', 'Battambang', serif;                  /* bold headings */
  --km-names: 'Moulpali', 'Moul', serif;                      /* couple's names */
  --km-title: 'Metal', 'Battambang', serif;                   /* gold slanted titles */
  --km-intro: 'Taprom', 'Moulpali', serif;                    /* names on the welcome screen */
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; color: var(--ink); font-family: var(--sans); font-size: 1rem; line-height: 1.6;
  background-color: var(--ground);
  /* Blended background: mostly champagne with soft dusty-rose glows down the page */
  background-image:
    radial-gradient(ellipse 70% 14% at 0% 1%, rgba(225, 194, 183, 0.95), rgba(225, 194, 183, 0) 70%),
    radial-gradient(ellipse 55% 12% at 100% 14%, rgba(225, 194, 183, 0.8), rgba(225, 194, 183, 0) 70%),
    radial-gradient(ellipse 60% 12% at 8% 34%, rgba(225, 194, 183, 0.75), rgba(225, 194, 183, 0) 70%),
    radial-gradient(ellipse 55% 12% at 96% 54%, rgba(225, 194, 183, 0.8), rgba(225, 194, 183, 0) 70%),
    radial-gradient(ellipse 65% 12% at 4% 74%, rgba(225, 194, 183, 0.75), rgba(225, 194, 183, 0) 70%),
    radial-gradient(ellipse 60% 10% at 50% 45%, rgba(245, 235, 224, 0.5), rgba(245, 235, 224, 0) 70%);
  background-repeat: no-repeat;
}
img { max-width: 100%; display: block; }
a { color: var(--ink); }
a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
::selection { background: var(--gold); color: var(--card); }
section[id] { scroll-margin-top: 72px; }

/* ---------- Sticky nav + language switch ---------- */
.nav {
  position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 12px;
  padding: 8px 16px; background: rgba(233, 214, 194, 0.94);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line);
}
.nav-links {
  flex: 1; min-width: 0; display: flex; justify-content: center; gap: 4px 22px;
  overflow-x: auto; white-space: nowrap; scrollbar-width: none;
  font-size: 0.8rem; letter-spacing: 0.16em; text-transform: uppercase;
}
.nav-links::-webkit-scrollbar { display: none; }
.nav-links a { text-decoration: none; padding: 12px 4px; }
.lang { display: flex; flex-shrink: 0; border: 1px solid var(--accent); border-radius: 999px; padding: 3px; }
.lang button {
  min-height: 36px; min-width: 48px; padding: 0 12px; border: 0; border-radius: 999px;
  background: transparent; color: var(--ink); font-family: var(--sans); font-size: 0.85rem; cursor: pointer;
}
.lang button[lang="km"] { font-family: var(--km-sans); }
.kicker:lang(en) { font-family: var(--serif); font-weight: 600; color: var(--accent); }
.lang button[aria-pressed="true"] { background: var(--gold); color: var(--card); }
@media (max-width: 760px) { .nav-links { justify-content: flex-start; } }

/* ---------- Shared ---------- */
.wrap { max-width: 1100px; margin: 0 auto; padding-left: 20px; padding-right: 20px; }
.section { padding-top: clamp(80px, 12vw, 136px); }
.section-head { text-align: center; margin-bottom: 40px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.eyebrow { margin: 0; font-size: 0.8rem; letter-spacing: 0.3em; text-transform: uppercase; color: var(--gold); }
.h2 { margin: 0; color: var(--accent); font-family: var(--serif); font-weight: 500; font-size: clamp(2rem, 5vw, 3rem); line-height: 1.15; }
.names { font-family: var(--script); font-weight: 400; }
.btn-solid {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 50px; padding: 0 28px;
  border: 0; border-radius: 999px; background: var(--gold); color: var(--card); text-decoration: none; cursor: pointer;
  font-family: inherit; font-size: 0.9rem; letter-spacing: 0.14em; text-transform: uppercase;
  box-shadow: 0 8px 22px rgba(107, 78, 22, 0.25); transition: transform 200ms ease, box-shadow 200ms ease;
}
.btn-solid:hover { color: var(--card); transform: translateY(-2px); box-shadow: 0 12px 26px rgba(107, 78, 22, 0.3); }

/* ---------- Rumdul graphics ---------- */
.divider { width: clamp(220px, 38vw, 320px); height: auto; aspect-ratio: 240 / 78; overflow: visible; }
.bloom { width: 64px; height: 64px; }
.sway { transform-box: fill-box; transform-origin: 3% 96%; }
@media (prefers-reduced-motion: no-preference) {
  .sway { animation: sway 7s ease-in-out infinite alternate; }
  .sprig-l .sway { animation-delay: -3.5s; }
  .bloom { animation: nod 6s ease-in-out infinite alternate; }
}
@keyframes sway { from { transform: rotate(-2.5deg); } to { transform: rotate(2.5deg); } }
@keyframes nod { from { transform: rotate(-10deg); } to { transform: rotate(10deg); } }

/* ---------- 1. Welcome ---------- */
.welcome {
  position: relative; overflow: hidden;
  min-height: calc(100vh - 61px); min-height: calc(100svh - 61px);
  padding: 96px 24px 88px; text-align: center;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px;
}
.welcome p { margin: 0; }
.kicker { font-size: 0.85rem; letter-spacing: 0.3em; text-transform: uppercase; color: var(--gold); }
.welcome h1 { margin: 0; font-weight: 400; font-size: clamp(3.2rem, 11vw, 7.5rem); line-height: 1.15; }
.gold-text {
  padding: 0 0.12em;
  background: linear-gradient(100deg, #6B4E16 0%, #9A7425 45%, #6B4E16 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.welcome .amp { font-family: var(--script); }
.welcome-line { font-family: var(--serif); font-style: italic; font-size: clamp(1.2rem, 3vw, 1.6rem); color: var(--muted); }
.when { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px 26px; font-family: var(--serif); font-size: clamp(1.2rem, 2.6vw, 1.6rem); font-weight: 500; }
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--gold-bright); }
.scroll-cue {
  position: absolute; bottom: 24px; left: 50%; margin-left: -22px; width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center; border-radius: 50%;
  border: 1px solid var(--line); color: var(--accent);
}
@media (prefers-reduced-motion: no-preference) { .scroll-cue svg { animation: bob 2.2s ease-in-out infinite; } }
@keyframes bob { 0%, 100% { transform: translateY(-3px); } 50% { transform: translateY(4px); } }
.hero-deco { position: absolute; inset: 0; pointer-events: none; }
.sprig { position: absolute; top: 4px; width: clamp(130px, 32vw, 440px); overflow: visible; height: auto; aspect-ratio: 300 / 190; }
.sprig-r { right: -14px; }
.sprig-l { left: -14px; transform: scaleX(-1); }

/* ---------- 2. Invitation (envelope) ---------- */
.envelope { position: relative; width: min(100%, 440px); aspect-ratio: 3 / 2; margin: 0 auto; perspective: 1200px; }
.env-back, .env-front, .env-flap, .env-letter { position: absolute; }
.env-back { inset: 0; background: #D9B3A4; border-radius: 12px; box-shadow: 0 18px 40px rgba(74, 46, 34, 0.18); }
.env-letter {
  left: 7%; right: 7%; top: 8%; bottom: 8%; z-index: 1; background: var(--card); border-radius: 6px;
  display: flex; align-items: flex-start; justify-content: center; padding-top: 8%;
  transition: transform 900ms cubic-bezier(.2,.7,.2,1) 550ms;
}
.env-letter .names { font-size: clamp(1.4rem, 5vw, 2rem); color: var(--accent); }
.env-front {
  inset: 0; z-index: 2; border-radius: 12px; background: #E8CBBE;
  clip-path: polygon(0 0, 50% 54%, 100% 0, 100% 100%, 0 100%);
}
.env-flap {
  left: 0; right: 0; top: 0; height: 56%; z-index: 3; background: #DDB8A9; border-radius: 12px 12px 0 0;
  clip-path: polygon(0 0, 100% 0, 50% 100%); transform-origin: top center;
  transition: transform 700ms ease, z-index 0s linear 350ms;
}
.seal {
  position: absolute; z-index: 4; left: 50%; top: 56%; width: 76px; height: 76px; margin: -38px 0 0 -38px;
  border-radius: 50%; padding: 9px;
  background: radial-gradient(circle at 35% 30%, #FFF8EA, #F1E2CC 70%, #E4CDB0); border: 2px solid #B8902F;
  box-shadow: 0 4px 12px rgba(74, 46, 34, 0.3); transition: opacity 300ms ease, transform 300ms ease;
}
.seal svg { width: 100%; height: 100%; }
.envelope.opened .seal { opacity: 0; transform: scale(0.6); }
.envelope.opened .env-flap { transform: rotateX(180deg); z-index: 0; }
.envelope.opened .env-letter { transform: translateY(-38%); }
.open-wrap { display: flex; justify-content: center; margin-top: 32px; transition: opacity 400ms ease; }
.open-wrap.gone { opacity: 0; pointer-events: none; }
.invite-card {
  max-width: 680px; margin: 48px auto 0; padding: clamp(32px, 6vw, 56px) clamp(22px, 5vw, 56px);
  background: var(--card); border-radius: 18px; text-align: center; scroll-margin-top: 90px;
  border: 1px solid rgba(184, 134, 11, 0.35); box-shadow: 0 18px 44px rgba(74, 46, 34, 0.12);
  display: flex; flex-direction: column; align-items: center; gap: 22px;
  outline: 1px solid rgba(184, 134, 11, 0.25); outline-offset: -12px;
}
.invite-card p { margin: 0; }
.js .invite-card:not(.show) { display: none; }
.invite-card.show { animation: rise 900ms cubic-bezier(.2,.7,.2,1) both; }
.invite-intro { font-family: var(--serif); font-size: clamp(1.1rem, 2.4vw, 1.3rem); max-width: 520px; }
.families { display: flex; flex-wrap: wrap; justify-content: center; gap: 20px 56px; }
.families > div { min-width: 180px; }
.fam-label { color: var(--gold); font-size: 0.85rem; letter-spacing: 0.15em; text-transform: uppercase; margin-bottom: 6px !important; }
.fam-names { font-family: var(--serif); font-size: 1.15rem; }
.card-names { font-size: clamp(2.4rem, 8vw, 3.6rem); color: var(--accent); line-height: 1.2; }
.card-when { font-family: var(--serif); font-size: 1.2rem; font-weight: 600; }
.card-note { color: var(--muted); font-style: italic; font-family: var(--serif); }

/* Invitation card content (matches the printed invitation) */
.parents { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 56px; font-family: var(--serif); font-size: 1.1rem; font-weight: 600; }
.parents > div { min-width: 170px; }
.invite-heading { margin: 0; font-family: var(--serif); font-weight: 600; font-size: clamp(1.4rem, 3.4vw, 1.8rem); color: var(--accent); }
.couple { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px 36px; }
.couple > div { min-width: 170px; }
.couple-label { font-size: 0.8rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold); }
.couple-name { font-family: var(--script); font-size: clamp(2rem, 6.5vw, 2.8rem); line-height: 1.25; color: var(--accent); }
.couple-and { font-family: var(--script); font-size: 2rem; color: var(--gold-bright); }
@media (max-width: 600px) { .couple { flex-direction: column; gap: 4px; } }
.invite-details { display: flex; flex-direction: column; gap: 4px; }
.detail-label { color: var(--gold); font-size: 0.85rem; letter-spacing: 0.2em; text-transform: uppercase; }
.lunar { color: var(--muted); font-size: 0.95rem; }
.lunar-feature { text-align: center; margin: 20px 0 0; }
.card-place { font-family: var(--serif); font-size: 1.1rem; }
.card-thanks { font-family: var(--serif); font-size: 1.2rem; font-weight: 600; color: var(--accent); }
/* Venue contacts */
.venue-time { margin: 8px 0 0; font-weight: 500; color: var(--accent); }

/* ---------- 3. Our Wedding ---------- */
.date-feature { display: flex; justify-content: center; align-items: center; gap: clamp(16px, 4vw, 40px); }
.date-block, .date-mid { display: flex; flex-direction: column; align-items: center; }
.date-block .dow { font-size: 0.8rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold); }
.date-block .day { font-family: var(--serif); font-size: clamp(3.5rem, 12vw, 6rem); font-weight: 500; color: var(--accent); line-height: 1.05; }
.date-mid { padding: 10px clamp(14px, 3vw, 28px); border-left: 1px solid var(--line); border-right: 1px solid var(--line); }
.date-mid .month { font-family: var(--serif); font-size: clamp(1.3rem, 3.5vw, 1.8rem); font-weight: 600; }
.date-mid .year { font-size: 0.9rem; letter-spacing: 0.3em; color: var(--muted); }
.romance { max-width: 640px; margin: 36px auto 0; text-align: center; font-family: var(--serif); font-style: italic; font-size: clamp(1.2rem, 2.6vw, 1.45rem); line-height: 1.7; }

/* ---------- 4. Schedule ---------- */
.days { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 24px 48px; max-width: 960px; margin: 0 auto; }
.day-title { margin: 0 0 8px; text-align: center; font-family: var(--serif); font-weight: 600; font-size: 1.4rem; color: var(--accent); }
.schedule { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.schedule li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 20px; padding: 18px 4px; border-bottom: 1px solid var(--line); }
.schedule .time { margin: 0; flex: 0 0 auto; min-width: 150px; white-space: nowrap; font-family: var(--serif); font-size: 1.2rem; font-weight: 600; color: var(--accent); }
.schedule li > div { flex: 1 1 180px; min-width: 0; }
.schedule h4 { margin: 0; font-family: var(--serif); font-weight: 600; font-size: 1.35rem; line-height: 1.3; }
.schedule .sub { margin: 2px 0 0; color: var(--muted); font-size: 0.95rem; }
.dress { margin: 32px 0 0; text-align: center; font-family: var(--serif); font-style: italic; font-size: 1.2rem; color: var(--muted); }

/* ---------- 5. Venue ---------- */
.location { display: flex; flex-wrap: wrap; gap: 32px; align-items: stretch; }
.location > * { flex: 1 1 320px; min-width: 0; }
.location .info { display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 16px; }
.venue { margin: 0 0 4px; font-family: var(--serif); font-size: 1.5rem; font-weight: 600; }
.addr { margin: 0; color: var(--muted); }
.map-card {
  position: relative; display: block; min-height: 280px; border-radius: 18px; overflow: hidden; text-decoration: none;
  border: 1px solid rgba(184, 134, 11, 0.3); box-shadow: 0 14px 36px rgba(74, 46, 34, 0.12);
}
.map-art { position: absolute; inset: 0; width: 100%; height: 100%; }
.pin { position: absolute; left: 50%; top: 42%; width: 44px; margin-left: -22px; transform: translateY(-60%); }
@media (prefers-reduced-motion: no-preference) { .pin { animation: drop 2.4s ease-in-out infinite; } }
@keyframes drop { 0%, 100% { transform: translateY(-60%); } 50% { transform: translateY(-75%); } }
.map-label {
  position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%); white-space: nowrap;
  background: var(--card); color: var(--ink); padding: 10px 20px; border-radius: 999px; font-size: 0.9rem;
  box-shadow: 0 4px 14px rgba(74, 46, 34, 0.15);
}
.map-card:hover .map-label { color: var(--accent); }

/* ---------- 6. Countdown ---------- */
.countdown { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(8px, 2vw, 16px); max-width: 680px; margin: 0 auto; }
.countdown div { background: var(--card); border-radius: 14px; padding: clamp(14px, 3vw, 24px) 6px; text-align: center; box-shadow: 0 8px 28px rgba(107, 78, 22, 0.14); border: 1px solid rgba(184, 134, 11, 0.25); }
.countdown strong { display: block; font-family: var(--serif); font-size: clamp(1.9rem, 7vw, 3.25rem); font-weight: 600; line-height: 1.1; color: var(--accent); font-variant-numeric: tabular-nums; }
.countdown span { display: block; font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); margin-top: 6px; }
.cd-done { text-align: center; margin: 24px 0 0; font-family: var(--serif); font-size: 1.5rem; color: var(--accent); }

/* ---------- 7. Photos ---------- */
.photo {
  width: 100%; border-radius: 14px; background: rgba(245, 235, 224, 0.55); border: 1px dashed rgba(134, 98, 28, 0.45);
  display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 0.85rem; text-align: center; padding: 16px;
}
img.photo { display: block; border: 0; padding: 0; height: auto; cursor: zoom-in; box-shadow: 0 10px 28px rgba(74, 46, 34, 0.14); }
/* Photos found in the images folder keep their own shape */
.featured-img { width: 100%; max-height: 78vh; object-fit: cover; margin-bottom: 20px; }
.photo-grid { display: grid; gap: 20px; align-items: start; }
.photo-col { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.featured { aspect-ratio: 16 / 9; min-height: 220px; margin-bottom: 20px; }
.masonry { columns: 3 260px; column-gap: 20px; }
.masonry .photo { margin: 0 0 20px; break-inside: avoid; }
.r34 { aspect-ratio: 3 / 4; } .r43 { aspect-ratio: 4 / 3; } .r11 { aspect-ratio: 1 / 1; }
.r45 { aspect-ratio: 4 / 5; } .r32 { aspect-ratio: 3 / 2; } .r23 { aspect-ratio: 2 / 3; }
.lightbox {
  position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center;
  padding: max(24px, env(safe-area-inset-top)) 16px; background: rgba(40, 26, 18, 0.88);
}
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 10px; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4); }
.lb-close {
  position: absolute; top: max(14px, env(safe-area-inset-top)); right: 14px; width: 48px; height: 48px; border-radius: 50%;
  border: 0; background: rgba(245, 235, 224, 0.9); color: var(--ink); display: flex; align-items: center; justify-content: center; cursor: pointer;
}

/* ---------- 8. Closing ---------- */
.closing {
  margin-top: clamp(80px, 12vw, 136px); text-align: center; padding: clamp(56px, 9vw, 96px) 24px 56px;
  background: linear-gradient(to bottom, rgba(225, 194, 183, 0), rgba(225, 194, 183, 0.9) 45%);
  display: flex; flex-direction: column; align-items: center; gap: 14px;
}
.closing p { margin: 0; }
.thanks { margin: 0; font-family: var(--script); font-weight: 400; font-size: clamp(3rem, 10vw, 5rem); line-height: 1.2; color: var(--accent); }
.thanks-msg { max-width: 600px; font-family: var(--serif); font-size: clamp(1.15rem, 2.5vw, 1.35rem); line-height: 1.7; }
.closing-names { font-size: 2.4rem; line-height: 1.2; color: var(--accent); margin-top: 12px !important; }
.closing .meta { font-size: 0.8rem; letter-spacing: 0.25em; text-transform: uppercase; color: var(--muted); }
.to-top { font-size: 0.8rem; letter-spacing: 0.2em; text-transform: uppercase; padding: 12px 4px; }

/* ===== Khmer typography =====
   Khmer has no capitals or italics, and its stacked letters need more line height. */
html:lang(km) body { font-family: var(--km-sans); line-height: 1.9; }
:lang(km) .nav-links, :lang(km) .eyebrow, :lang(km) .kicker, :lang(km) .countdown span, :lang(km) .btn-solid,
:lang(km) .closing .meta, :lang(km) .to-top, :lang(km) .fam-label, :lang(km) .date-block .dow, :lang(km) .date-mid .year {
  letter-spacing: 0; text-transform: none;
}
:lang(km) .nav-links { font-size: 0.95rem; }
:lang(km) .eyebrow, :lang(km) .fam-label, :lang(km) .date-block .dow { font-size: 1rem; }
:lang(km) .kicker { font-family: var(--km-title); color: var(--accent); line-height: 2; font-size: clamp(1.5rem, 4.5vw, 2.1rem); }
/* Khmer names use the Moul display font */
:lang(km) .names, :lang(km) .couple-name { font-family: var(--km-names); line-height: 1.9; }
/* the printed card's names lean forward */
:lang(km) .lean, :lang(km) .env-letter .names { display: inline-block; transform: skewX(-9deg); }
:lang(km) .welcome h1 { font-size: clamp(2.6rem, 9vw, 5.6rem); line-height: 1.8; }
:lang(km) .welcome h1 .lean { line-height: 1.6; }
/* Welcome-screen names use their own font (Taprom), upright, different from the invitation card */
:lang(km) .welcome h1 .names { font-family: var(--km-intro); transform: none; padding: 0.3em 0.12em 0.15em; line-height: 1.5; }
:lang(km) .welcome .amp { font-family: var(--script); font-size: 0.9em; }
:lang(km) .env-letter .names { font-size: clamp(1rem, 3.6vw, 1.4rem); }
:lang(km) .card-names { font-size: clamp(1.6rem, 5vw, 2.4rem); }
:lang(km) .closing-names { font-size: clamp(1.4rem, 4vw, 1.8rem); }
:lang(km) .h2 { font-family: var(--km-title); font-weight: 400; font-size: clamp(1.5rem, 4vw, 2.25rem); line-height: 1.9; }
:lang(km) .thanks { font-family: var(--km-title); font-size: clamp(2rem, 6vw, 3rem); line-height: 1.8; }
:lang(km) .welcome-line, :lang(km) .romance, :lang(km) .dress, :lang(km) .when, :lang(km) .invite-intro,
:lang(km) .card-when, :lang(km) .card-note, :lang(km) .thanks-msg, :lang(km) .fam-names, :lang(km) .cd-done {
  font-family: var(--km-serif); font-style: normal; line-height: 1.9;
}
:lang(km) .romance, :lang(km) .thanks-msg { font-size: clamp(1.05rem, 2.3vw, 1.25rem); }
:lang(km) .invite-intro { font-size: clamp(1rem, 2.2vw, 1.15rem); }
:lang(km) .schedule .time, :lang(km) .schedule h4, :lang(km) .venue, :lang(km) .countdown strong,
:lang(km) .day-title, :lang(km) .date-block .day, :lang(km) .date-mid .month {
  font-family: var(--km-serif); line-height: 1.6;
}
:lang(km) .schedule .time { font-size: 1.05rem; min-width: 172px; }
:lang(km) .schedule h4 { font-size: 1.2rem; font-weight: 700; }
:lang(km) .card-when { font-weight: 700; font-size: 1.2rem; color: var(--accent); }
:lang(km) .parents, :lang(km) .invite-heading, :lang(km) .card-place, :lang(km) .card-thanks, :lang(km) .lunar { font-family: var(--km-serif); }
:lang(km) .parents { font-size: 1.05rem; font-weight: 700; line-height: 1.9; }
:lang(km) .invite-heading { font-family: var(--km-display); font-weight: 400; font-size: clamp(1.1rem, 3vw, 1.4rem); line-height: 2; }
:lang(km) .couple-name { font-size: clamp(1.4rem, 4.2vw, 1.9rem); line-height: 2; }
:lang(km) .couple-and { font-family: var(--km-serif); font-size: 1.05rem; color: var(--muted); }
:lang(km) .couple-label, :lang(km) .detail-label { letter-spacing: 0; text-transform: none; font-size: 1rem; }
:lang(km) .detail-label { font-family: var(--km-display); font-size: 1.05rem; line-height: 2; }
:lang(km) .venue { font-size: 1.25rem; font-weight: 700; }
:lang(km) .day-title { font-size: 1.25rem; font-weight: 700; }

/* ===== Animations =====
   Welcome screen fades in on load; everything else rises into view as you scroll.
   Turned off automatically for visitors who prefer reduced motion. */
@keyframes rise { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: no-preference) {
  .welcome > :not(.hero-deco):not(.scroll-cue) { animation: rise 900ms cubic-bezier(.2,.7,.2,1) both; }
  .welcome > :nth-child(2) { animation-delay: 150ms; }
  .welcome > :nth-child(3) { animation-delay: 300ms; }
  .welcome > :nth-child(4) { animation-delay: 450ms; }
  .welcome > :nth-child(5) { animation-delay: 600ms; }
  .hero-deco { animation: fade 1600ms ease 300ms both; }
  .js-anim .reveal { opacity: 0; transform: translateY(28px); transition: opacity 800ms ease, transform 800ms cubic-bezier(.2,.7,.2,1); }
  .js-anim .reveal.in { opacity: 1; transform: none; }
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .envelope * { transition: none !important; } }
