/* ==========================================================================
   Wiyada & Marley — Wedding site
   Pure static CSS. Design tokens first, then components, then sections.
   ========================================================================== */
@import url("../fonts/fonts.css");

:root {
  /* Palette — warm sand editorial */
  --cream: hsl(40 30% 95%);        /* #f6f4f0 page */
  --cream-2: hsl(38 28% 90%);
  --paper: hsl(0 0% 100%);
  --ink: hsl(0 0% 4%);             /* #0a0a0a */
  --ink-2: hsl(0 0% 17%);          /* #2c2c2c */
  --ink-3: hsl(0 0% 28%);          /* #474747 */
  --muted: hsl(0 0% 45%);
  --line: hsl(30 10% 80%);
  --gold: hsl(38 52% 42%);          /* from the Sawadee Ka artwork */
  --gold-soft: hsl(38 55% 88%);
  --night: hsl(225 60% 7%);

  --serif: "Instrument Serif", "Times New Roman", serif;
  --caslon: "Libre Caslon Condensed", "Instrument Serif", serif;
  --sans: "Source Sans 3", system-ui, -apple-system, "Segoe UI", sans-serif;

  --wrap: 1240px;
  --gutter: clamp(20px, 4vw, 48px);
  --section-y: clamp(80px, 11vw, 160px);
  --radius: 18px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px hsl(30 20% 20% / .06), 0 12px 40px -12px hsl(30 30% 20% / .18);
  --ease: cubic-bezier(.22, .8, .24, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink-2);
  font: 400 clamp(16px, 1.05vw, 18px)/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
/* subtle paper grain for texture */
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 100; opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
img, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
p { margin: 0 0 1em; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 4px; }

.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
.section { padding-block: var(--section-y); position: relative; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Typography ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  font: 500 12px/1 var(--sans); letter-spacing: .24em; text-transform: uppercase; color: var(--muted);
  margin-bottom: 22px;
}
.eyebrow::before { content: ""; width: 28px; height: 1px; background: currentColor; opacity: .6; }
.display {
  font: 400 clamp(44px, 6.4vw, 96px)/.98 var(--serif);
  letter-spacing: -.02em; color: var(--ink); margin: 0 0 24px;
}
.display em { font-style: italic; color: var(--ink-3); }
.lede { font-size: clamp(18px, 1.35vw, 21px); color: var(--ink-3); max-width: 60ch; }
.h3 { font: 400 clamp(28px, 2.6vw, 38px)/1.1 var(--serif); letter-spacing: -.01em; color: var(--ink); margin: 0 0 10px; }
strong { color: var(--ink); font-weight: 600; }

/* ---------- Buttons ---------- */
.btn {
  --bg: var(--ink); --fg: var(--cream);
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 26px; border-radius: 999px; border: 1px solid var(--bg);
  background: var(--bg); color: var(--fg); text-decoration: none; cursor: pointer;
  font: 600 13px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase;
  transition: transform .4s var(--ease), background .3s, color .3s, box-shadow .4s var(--ease);
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 24px -10px hsl(0 0% 0% / .45); }
.btn .arrow { transition: transform .4s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }
.btn--ghost { --bg: transparent; --fg: var(--ink); border-color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--cream); }
.btn--light { --bg: var(--cream); --fg: var(--ink); }

/* ---------- Header / Nav ---------- */
.site-header {
  position: fixed; inset: 0 0 auto; z-index: 50;
  transition: background .4s, box-shadow .4s, transform .5s var(--ease);
}
.site-header.is-scrolled { background: hsl(40 30% 95% / .86); backdrop-filter: blur(14px) saturate(1.4); box-shadow: 0 1px 0 var(--line); }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; font: 400 26px/1 var(--serif); color: var(--ink); }
.brand img { width: 22px; height: 22px; }
.nav__links { display: flex; align-items: center; gap: clamp(16px, 2.4vw, 34px); list-style: none; margin: 0; padding: 0; }
.nav__links a {
  position: relative; text-decoration: none; font: 500 12px/1 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--ink-2);
}
.nav__links a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform .45s var(--ease); }
.nav__links a:hover::after, .nav__links a.is-active::after { transform: scaleX(1); transform-origin: left; }
.nav__rsvp { padding: 11px 18px !important; border: 1px solid var(--ink); border-radius: 999px; }
.nav__rsvp::after { display: none; }
.nav__rsvp:hover { background: var(--ink); color: var(--cream) !important; }

.lang {
  display: inline-flex; padding: 3px; border-radius: 999px; background: hsl(0 0% 100% / .6);
  border: 1px solid var(--line); backdrop-filter: blur(8px);
}
.lang a {
  padding: 7px 11px; border-radius: 999px; text-decoration: none;
  font: 600 11px/1 var(--sans); letter-spacing: .12em; color: var(--muted); transition: background .3s, color .3s;
}
.lang a[aria-current="true"] { background: var(--ink); color: var(--cream); }
.lang a:not([aria-current="true"]):hover { color: var(--ink); }

.nav__toggle { display: none; width: 44px; height: 44px; border: 0; background: none; cursor: pointer; position: relative; }
.nav__toggle span { position: absolute; left: 11px; right: 11px; height: 1.5px; background: var(--ink); transition: transform .4s var(--ease), opacity .3s; }
.nav__toggle span:nth-child(1) { top: 17px; }
.nav__toggle span:nth-child(2) { top: 26px; }
.nav-open .nav__toggle span:nth-child(1) { transform: translateY(4.5px) rotate(45deg); }
.nav-open .nav__toggle span:nth-child(2) { transform: translateY(-4.5px) rotate(-45deg); }

@media (max-width: 900px) {
  .nav__toggle { display: block; }
  .nav__menu {
    position: fixed; inset: 72px 0 auto; background: var(--cream); padding: 28px var(--gutter) 36px;
    border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
    transform: translateY(-12px); opacity: 0; visibility: hidden; transition: all .4s var(--ease);
  }
  .nav-open .nav__menu { transform: none; opacity: 1; visibility: visible; }
  .nav__links { flex-direction: column; align-items: flex-start; gap: 22px; }
  .nav__links a { font-size: 14px; }
  .site-header { background: hsl(40 30% 95% / .9); backdrop-filter: blur(14px); }
}

/* ---------- Hero ---------- */
.hero { padding-top: 120px; padding-bottom: clamp(48px, 7vw, 96px); overflow: hidden; }
.hero__title {
  font: 400 clamp(64px, 13.5vw, 220px)/.86 var(--serif); letter-spacing: -.035em; color: var(--ink);
  margin: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 .14em;
}
.hero__title .amp { font-style: italic; color: var(--gold); font-size: .8em; }
.hero__meta {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px;
  margin-top: clamp(18px, 2vw, 28px); padding-top: 18px; border-top: 1px solid var(--line);
  font: 500 12px/1.4 var(--sans); letter-spacing: .22em; text-transform: uppercase; color: var(--ink-3);
}
.hero__grid {
  display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(28px, 4vw, 64px);
  align-items: stretch; margin-top: clamp(36px, 5vw, 72px);
}
.hero__media { position: relative; border-radius: var(--radius); overflow: hidden; min-height: 520px; box-shadow: var(--shadow); }
.hero__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 40%; transform: scale(1.06); transition: transform 2.4s var(--ease); }
.is-loaded .hero__media img { transform: scale(1); }
.hero__copy { display: flex; flex-direction: column; justify-content: center; }
.hero__copy .display { font-size: clamp(40px, 4.6vw, 72px); }
.hero__copy p { color: var(--ink-3); max-width: 46ch; }
.hero__actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 18px; }

.countdown { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 28px 0 8px; max-width: 420px; }
.countdown div { background: var(--paper); border-radius: var(--radius-sm); padding: 14px 6px 12px; text-align: center; box-shadow: 0 1px 0 var(--line); }
.countdown b { display: block; font: 400 34px/1 var(--serif); color: var(--ink); font-variant-numeric: tabular-nums; }
.countdown span { font: 600 10px/1 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }

/* ---------- Welcome strip (family + video + sawadee) ---------- */
.welcome { padding-top: 0; }
.welcome__grid { display: grid; grid-template-columns: 1.6fr .9fr .9fr; gap: clamp(14px, 2vw, 24px); }
.tile { position: relative; border-radius: var(--radius); overflow: hidden; background: var(--cream-2); box-shadow: var(--shadow); }
.tile img, .tile video { width: 100%; height: 100%; object-fit: cover; }
.tile--family { aspect-ratio: 3 / 2; }
.tile--video { aspect-ratio: auto; }
.tile--sawadee { background: var(--paper); display: grid; place-items: center; padding: 18px; }
.tile--sawadee img { object-fit: contain; }

/* ---------- Audio player ---------- */
.player {
  margin-top: clamp(14px, 2vw, 24px);
  display: grid; grid-template-columns: auto auto 1fr auto; align-items: center; gap: clamp(14px, 2vw, 28px);
  padding: 18px clamp(18px, 2.4vw, 32px); border-radius: var(--radius);
  background: var(--ink); color: var(--cream); position: relative; overflow: hidden;
}
.player::before { content: ""; position: absolute; inset: 0; background: url("../media/footer-gradient.jpg") center/cover; opacity: .28; mix-blend-mode: screen; }
.player > * { position: relative; }
.player__play {
  width: 58px; height: 58px; border-radius: 50%; border: 0; cursor: pointer; display: grid; place-items: center;
  background: var(--cream); color: var(--ink); transition: transform .35s var(--ease);
}
.player__play:hover { transform: scale(1.07); }
.player__play svg { width: 22px; height: 22px; }
.player__play .i-pause { display: none; }
.is-playing .player__play .i-play { display: none; }
.is-playing .player__play .i-pause { display: block; }
.player__label small { display: block; font: 600 10px/1 var(--sans); letter-spacing: .26em; text-transform: uppercase; opacity: .65; margin-bottom: 6px; }
.player__label strong { font: 400 28px/1 var(--serif); color: var(--cream); font-weight: 400; }
.player__track { display: flex; align-items: center; gap: 14px; }
.player__bar { flex: 1; height: 28px; display: flex; align-items: center; cursor: pointer; }
.player__bar-inner { width: 100%; height: 3px; border-radius: 3px; background: hsl(0 0% 100% / .22); position: relative; }
.player__fill { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--cream); border-radius: 3px; }
.player__fill::after { content: ""; position: absolute; right: -6px; top: 50%; width: 12px; height: 12px; margin-top: -6px; border-radius: 50%; background: var(--cream); }
.player__time { font: 500 13px/1 var(--sans); font-variant-numeric: tabular-nums; opacity: .85; white-space: nowrap; }
.eq { display: flex; gap: 3px; align-items: flex-end; height: 22px; }
.eq i { width: 3px; height: 30%; background: var(--cream); border-radius: 2px; opacity: .8; }
.is-playing .eq i { animation: eq 1s ease-in-out infinite; }
.eq i:nth-child(2) { animation-delay: -.3s !important; }
.eq i:nth-child(3) { animation-delay: -.6s !important; }
.eq i:nth-child(4) { animation-delay: -.15s !important; }
@keyframes eq { 0%, 100% { height: 25%; } 50% { height: 100%; } }

/* ---------- Story ---------- */
.story__grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 6vw, 96px); align-items: start; }
.story__photos { position: sticky; top: 100px; display: grid; grid-template-columns: 1.1fr .9fr; gap: 16px; align-items: end; }
.story__photos .tile:first-child { aspect-ratio: 4 / 5; }
.story__photos .tile:last-child { aspect-ratio: 2 / 3; transform: translateY(48px); }
.timeline { list-style: none; margin: 40px 0 0; padding: 0; counter-reset: s; }
.timeline li { position: relative; padding: 0 0 34px 64px; counter-increment: s; }
.timeline li::before {
  content: "0" counter(s); position: absolute; left: 0; top: 2px;
  font: 400 italic 30px/1 var(--serif); color: var(--gold);
}
.timeline li::after { content: ""; position: absolute; left: 16px; top: 42px; bottom: 8px; width: 1px; background: var(--line); }
.timeline li:last-child::after { display: none; }
.timeline h3 { font: 600 12px/1 var(--sans); letter-spacing: .22em; text-transform: uppercase; color: var(--ink); margin: 8px 0 10px; }
.timeline p { margin: 0; color: var(--ink-3); }
.timeline mark { background: linear-gradient(transparent 62%, var(--gold-soft) 62%); color: var(--ink); padding: 0 2px; }

/* ---------- Venue ---------- */
.venue { background: var(--paper); }
.venue__grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: clamp(40px, 6vw, 88px); align-items: center; }
.facts { list-style: none; padding: 0; margin: 28px 0; border-top: 1px solid var(--line); }
.facts li { display: grid; grid-template-columns: 150px 1fr; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.facts b { font: 600 12px/1.6 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--ink); }
.address { display: flex; gap: 12px; align-items: flex-start; color: var(--ink-3); margin: 0 0 26px; }
.address svg { flex: none; margin-top: 4px; }

.carousel { position: relative; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); aspect-ratio: 3 / 2; background: var(--cream-2); }
.carousel__track { display: flex; height: 100%; transition: transform .9s var(--ease); }
.carousel__track img { flex: 0 0 100%; width: 100%; height: 100%; object-fit: cover; }
.carousel__btn {
  position: absolute; top: 50%; translate: 0 -50%; width: 48px; height: 48px; border-radius: 50%; border: 0; cursor: pointer;
  background: hsl(0 0% 0% / .32); backdrop-filter: blur(6px); display: grid; place-items: center; transition: background .3s, transform .3s var(--ease);
}
.carousel__btn:hover { background: hsl(0 0% 0% / .55); transform: scale(1.06); }
.carousel__btn img { width: 40px; height: 40px; }
.carousel__btn--prev { left: 16px; }
.carousel__btn--next { right: 16px; }
.carousel__dots { position: absolute; left: 0; right: 0; bottom: 16px; display: flex; justify-content: center; gap: 8px; }
.carousel__dots button { width: 8px; height: 8px; padding: 0; border-radius: 99px; border: 0; background: hsl(0 0% 100% / .55); cursor: pointer; transition: width .4s var(--ease), background .3s; }
.carousel__dots button[aria-current="true"] { width: 26px; background: #fff; }

/* ---------- Hotels ---------- */
.hotels__head { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 80px); align-items: end; margin-bottom: clamp(36px, 5vw, 64px); }
.hotels__head p { color: var(--ink-3); }
.hotels__grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: clamp(16px, 2vw, 24px); }
.hotels__aerial { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); min-height: 420px; position: relative; }
.hotels__aerial img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1.6s var(--ease); }
.hotels__aerial:hover img { transform: scale(1.04); }
.hotels__aerial figcaption { position: absolute; left: 18px; bottom: 18px; padding: 9px 14px; border-radius: 999px; background: hsl(0 0% 100% / .88); font: 600 11px/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--ink); }
.hotels__list { display: grid; gap: clamp(16px, 2vw, 24px); }
.hotel {
  background: var(--paper); border-radius: var(--radius); padding: clamp(24px, 3vw, 36px); box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 10px; transition: transform .5s var(--ease);
}
.hotel:hover { transform: translateY(-4px); }
.hotel__tag { align-self: flex-start; font: 600 10px/1 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--gold); background: var(--gold-soft); padding: 7px 10px; border-radius: 999px; }
.hotel p { color: var(--ink-3); margin: 0 0 8px; }
.hotel .btn { align-self: flex-start; margin-top: auto; }
.travel-note { display: flex; gap: 14px; align-items: flex-start; padding: 18px 20px; border-radius: var(--radius-sm); background: var(--cream-2); color: var(--ink-2); margin-top: 18px; }

/* ---------- Dress code ---------- */
.dress { background: var(--ink); color: hsl(40 20% 86%); overflow: hidden; }
.dress .display, .dress strong { color: var(--cream); }
.dress .display em { color: var(--gold-soft); }
.dress .eyebrow { color: hsl(40 20% 70%); }
.dress__grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 6vw, 96px); align-items: center; }
.dress__art { position: relative; }
.dress__art .tile { aspect-ratio: 816 / 1158; max-width: 460px; box-shadow: 0 30px 80px -30px #000; }
.dress__jirayu { position: absolute; right: -4%; bottom: -6%; width: 34%; max-width: 190px; filter: drop-shadow(0 18px 24px hsl(0 0% 0% / .45)); animation: bob 5s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-10px) rotate(-1.5deg); } }
.dress__theme { font: 400 italic clamp(40px, 5vw, 72px)/1 var(--serif); color: var(--gold-soft); margin: 4px 0 22px; letter-spacing: -.01em; }
.dress__rules { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 12px; }
.dress__rules li { display: flex; gap: 14px; align-items: baseline; }
.dress__rules li::before { content: "✦"; color: var(--gold); font-size: 13px; }

/* ---------- Schedule ---------- */
.schedule__head { text-align: center; max-width: 720px; margin: 0 auto clamp(48px, 6vw, 80px); }
.schedule__head .eyebrow::after { content: ""; width: 28px; height: 1px; background: currentColor; opacity: .6; }
.schedule__head p { color: var(--ink-3); }
.agenda { list-style: none; margin: 0 auto; padding: 0; max-width: 900px; position: relative; }
.agenda::before { content: ""; position: absolute; left: 170px; top: 8px; bottom: 8px; width: 1px; background: var(--line); }
.agenda li { display: grid; grid-template-columns: 150px 1fr; gap: 40px; padding: 0 0 38px; position: relative; }
.agenda li::before { content: ""; position: absolute; left: 165px; top: 12px; width: 11px; height: 11px; border-radius: 50%; background: var(--cream); border: 1.5px solid var(--ink); transition: background .4s; }
.agenda li.is-in::before { background: var(--gold); border-color: var(--gold); }
.agenda time { font: 400 34px/1 var(--serif); color: var(--ink); text-align: right; font-variant-numeric: tabular-nums; }
.agenda time small { display: block; font: 600 10px/1.8 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.agenda h3 { font: 400 28px/1.1 var(--serif); color: var(--ink); margin: 0 0 8px; }
.agenda p { color: var(--ink-3); margin: 0; }
.agenda ul { margin: 6px 0 0; padding: 0; list-style: none; color: var(--ink-3); }
.agenda ul li { display: block; padding: 0 0 4px 18px; position: relative; }
.agenda ul li::before { content: "—"; position: absolute; left: 0; top: 0; width: auto; height: auto; border: 0; background: none; color: var(--gold); }
.agenda .card { background: var(--paper); border-radius: var(--radius-sm); padding: 20px 24px; box-shadow: 0 1px 0 var(--line); transition: transform .5s var(--ease), box-shadow .5s var(--ease); }
.agenda li:hover .card { transform: translateX(6px); box-shadow: var(--shadow); }

/* ---------- Gift ---------- */
.gift { text-align: center; padding-block: clamp(70px, 9vw, 130px); }
.gift .display { font-size: clamp(40px, 5.6vw, 84px); max-width: 16ch; margin-inline: auto; }
.gift p { color: var(--ink-3); }

/* ---------- RSVP ---------- */
.rsvp { background: var(--paper); }
.rsvp__grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(40px, 6vw, 96px); align-items: start; }
.rsvp__media { position: sticky; top: 100px; border-radius: var(--radius); overflow: hidden; aspect-ratio: 3 / 4; box-shadow: var(--shadow); }
.rsvp__media img { width: 100%; height: 100%; object-fit: cover; object-position: center 35%; }
.rsvp__deadline { display: inline-flex; gap: 10px; align-items: center; padding: 10px 16px; border-radius: 999px; background: var(--gold-soft); color: var(--ink); font: 600 12px/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; margin: 6px 0 30px; }
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 20px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field--full { grid-column: 1 / -1; }
.field label { font: 600 11px/1 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--ink-2); }
.field input, .field select, .field textarea {
  width: 100%; font: 400 16px/1.4 var(--sans); color: var(--ink); background: var(--cream);
  border: 1px solid transparent; border-radius: var(--radius-sm); padding: 15px 16px; transition: border-color .3s, background .3s, box-shadow .3s;
  appearance: none;
}
.field textarea { min-height: 130px; resize: vertical; }
.field select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%232c2c2c' stroke-width='1.5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 16px center; padding-right: 40px; cursor: pointer; }
.field input:hover, .field select:hover, .field textarea:hover { background: var(--cream-2); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; background: var(--paper); border-color: var(--ink); box-shadow: 0 0 0 4px hsl(38 52% 42% / .12); }
.field input:user-invalid, .field select:user-invalid { border-color: hsl(4 70% 50%); }
.form__actions { grid-column: 1 / -1; display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-top: 6px; }
.form__status { font-size: 15px; color: var(--ink-3); margin: 0; }
.form__status.is-ok { color: hsl(150 45% 30%); }
.form__status.is-err { color: hsl(4 65% 45%); }
.btn[disabled] { opacity: .6; pointer-events: none; }
.hp { position: absolute; left: -9999px; }
.rsvp__thanks { display: none; padding: 40px 32px; border-radius: var(--radius); background: var(--cream); text-align: center; }
.rsvp__thanks .display { font-size: clamp(40px, 4vw, 60px); }
.is-sent .form { display: none; }
.is-sent .rsvp__thanks { display: block; animation: rise .8s var(--ease) both; }

/* ---------- FAQ ---------- */
.faq__grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(40px, 6vw, 96px); align-items: start; }
.faq__photo { margin-top: 32px; border-radius: var(--radius); overflow: hidden; aspect-ratio: 4 / 5; max-width: 440px; box-shadow: var(--shadow); }
.faq__photo img { width: 100%; height: 100%; object-fit: cover; }
.faq details { border-bottom: 1px solid var(--line); }
.faq details:first-child { border-top: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 20px;
  padding: 24px 0; font: 400 clamp(22px, 2vw, 28px)/1.2 var(--serif); color: var(--ink);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary i { flex: none; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); position: relative; transition: transform .45s var(--ease), background .3s; }
.faq summary i::before, .faq summary i::after { content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 1.5px; background: var(--ink); translate: -50% -50%; }
.faq summary i::after { rotate: 90deg; transition: rotate .45s var(--ease); }
.faq details[open] summary i { background: var(--ink); }
.faq details[open] summary i::before, .faq details[open] summary i::after { background: var(--cream); }
.faq details[open] summary i::after { rotate: 0deg; }
.faq summary:hover i { transform: rotate(90deg); }
.faq .answer { padding: 0 60px 26px 0; color: var(--ink-3); animation: rise .5s var(--ease) both; }

/* ---------- Contact / Footer ---------- */
.contact { color: var(--cream); background: var(--night) url("../media/footer-gradient.jpg") center/cover; overflow: hidden; }
.contact::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, hsl(225 60% 7% / .2), hsl(225 60% 5% / .85)); }
.contact > * { position: relative; }
.contact .display { color: #fff; }
.contact .eyebrow { color: hsl(0 0% 100% / .7); }
.contact__grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(40px, 6vw, 96px); align-items: end; }
.contact p { color: hsl(0 0% 100% / .78); max-width: 52ch; }
.contact__links { display: grid; gap: 12px; }
.contact__link {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 24px; border-radius: var(--radius-sm);
  background: hsl(0 0% 100% / .08); border: 1px solid hsl(0 0% 100% / .14); backdrop-filter: blur(10px);
  text-decoration: none; color: #fff; transition: background .3s, transform .45s var(--ease);
}
.contact__link:hover { background: hsl(0 0% 100% / .16); transform: translateX(4px); }
.contact__link small { display: block; font: 600 10px/1 var(--sans); letter-spacing: .22em; text-transform: uppercase; opacity: .65; margin-bottom: 6px; }
.contact__link span { font: 400 22px/1.15 var(--serif); }
.farewell { margin-top: clamp(80px, 10vw, 140px); padding-top: 28px; border-top: 1px solid hsl(0 0% 100% / .18); display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 24px; }
.farewell__big { font: 400 clamp(52px, 9vw, 150px)/.9 var(--serif); letter-spacing: -.03em; color: #fff; margin: 0; }
.farewell__big em { display: block; font-size: .36em; letter-spacing: 0; opacity: .7; margin-bottom: 8px; }
.footer-nav { display: flex; gap: 22px; flex-wrap: wrap; list-style: none; margin: 0; padding: 0; }
.footer-nav a { text-decoration: none; font: 600 11px/1 var(--sans); letter-spacing: .2em; text-transform: uppercase; opacity: .75; }
.footer-nav a:hover { opacity: 1; }

/* ---------- Reveal animation ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: .1s; }
.reveal[data-delay="2"] { transition-delay: .2s; }
.reveal[data-delay="3"] { transition-delay: .3s; }
.no-js .reveal { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .welcome__grid { grid-template-columns: 1fr 1fr; }
  .tile--family { grid-column: 1 / -1; }
  .player { grid-template-columns: auto 1fr; }
  .player__track { grid-column: 1 / -1; }
  .eq { display: none; }
}
@media (max-width: 860px) {
  .hero__grid, .story__grid, .venue__grid, .hotels__head, .hotels__grid, .dress__grid, .rsvp__grid, .faq__grid, .contact__grid { grid-template-columns: 1fr; }
  .hero__media { min-height: 0; aspect-ratio: 4 / 5; }
  .story__photos, .rsvp__media { position: relative; top: 0; }
  .story__photos .tile:last-child { transform: translateY(32px); }
  .story__photos { margin-bottom: 32px; }
  .rsvp__media { aspect-ratio: 4 / 3; }
  .hotels__aerial { min-height: 300px; }
  .dress__art { max-width: 420px; }
  .faq__photo { display: none; }
  .agenda::before { left: 7px; }
  .agenda li { grid-template-columns: 1fr; gap: 12px; padding-left: 36px; }
  .agenda li::before { left: 2px; top: 10px; }
  .agenda time { text-align: left; font-size: 28px; }
  .agenda time small { display: inline; margin-left: 10px; }
  .agenda ul li { padding-left: 18px; }
}
@media (max-width: 560px) {
  .form { grid-template-columns: 1fr; }
  .facts li { grid-template-columns: 1fr; gap: 4px; }
  .faq .answer { padding-right: 0; }
  .welcome__grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .player__label strong { font-size: 24px; }
  .countdown b { font-size: 28px; }
  .hero__meta { font-size: 11px; letter-spacing: .16em; }
}

/* ---------- Small refinements ---------- */
.emoji { font-size: .55em; vertical-align: .18em; white-space: nowrap; }
.dress__jirayu { border-radius: 6px; rotate: 4deg; }
.contact .display em { color: hsl(40 60% 85%); }

/* ==========================================================================
   v2 — Thai fonts, 3-language switcher, language hint, mobile polish
   ========================================================================== */
:root {
  --serif: "Instrument Serif", "Taviraj", "Times New Roman", serif;
  --sans: "Source Sans 3", "Sarabun", system-ui, -apple-system, "Segoe UI", sans-serif;
  --header-h: 72px;
}
section[id], #top { scroll-margin-top: calc(var(--header-h) + 8px); }

/* ---------- Language switcher (header) ---------- */
.nav__right { display: flex; align-items: center; gap: 8px; }
.lang-wrap { position: relative; }
.lang { align-items: center; gap: 2px; padding: 4px; }
.lang__globe { color: var(--ink-3); margin: 0 4px 0 6px; flex: none; }
.lang a { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 6px 10px 6px 7px; font-size: 12px; }
.flag { width: 20px; height: 20px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 1px hsl(0 0% 0% / .12); flex: none; }
.lang a:not([aria-current="true"]) .flag { opacity: .85; }
.lang.is-hinting { animation: lang-nudge 1.6s var(--ease) 2; }
@keyframes lang-nudge {
  0%, 100% { box-shadow: 0 0 0 0 hsl(0 0% 4% / 0); }
  30% { box-shadow: 0 0 0 6px hsl(0 0% 4% / .12); }
  60% { box-shadow: 0 0 0 10px hsl(0 0% 4% / 0); }
}

/* ---------- First-visit language hint bubble ---------- */
.lang-hint {
  position: absolute; top: calc(100% + 12px); right: 0; z-index: 60;
  width: max-content; max-width: min(300px, calc(100vw - 2 * var(--gutter)));
  display: flex; align-items: center; gap: 12px;
  padding: 12px 12px 12px 16px; border-radius: 14px;
  background: var(--ink); color: var(--cream); box-shadow: 0 18px 40px -14px hsl(0 0% 0% / .5);
  font: 500 15px/1.4 var(--sans);
  animation: hint-in .6s var(--ease) both;
}
.lang-hint[hidden] { display: none; }
.lang-hint::before { content: ""; position: absolute; top: -6px; right: 28px; width: 12px; height: 12px; background: var(--ink); transform: rotate(45deg); border-radius: 2px; }
.lang-hint__text { margin: 0; }
.lang-hint__text a { color: #fff; font-weight: 700; text-underline-offset: 3px; }
.lang-hint__close { flex: none; min-width: 44px; min-height: 36px; border: 0; border-radius: 999px; background: var(--cream); color: var(--ink); font: 700 13px/1 var(--sans); cursor: pointer; }
@keyframes hint-in { from { opacity: 0; transform: translateY(-6px) scale(.97); } to { opacity: 1; transform: none; } }

/* ---------- Language buttons inside the mobile menu ---------- */
.menu-langs { display: none; }
.menu-langs p { margin: 0 0 12px; font: 600 12px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.menu-langs div, .footer-langs { display: flex; flex-wrap: wrap; gap: 8px; }
.menu-langs a, .footer-langs a {
  display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 10px 16px 10px 12px;
  border-radius: 999px; border: 1px solid var(--line); background: var(--paper);
  text-decoration: none; font: 600 16px/1 var(--sans); color: var(--ink);
}
.menu-langs a[aria-current="true"], .footer-langs a[aria-current="true"] { background: var(--ink); color: var(--cream); border-color: var(--ink); }
.menu-langs .flag, .footer-langs .flag { width: 24px; height: 24px; }

/* ---------- Footer language row ---------- */
.footer-langs { width: 100%; align-items: center; margin-top: 8px; }
.footer-langs > span { font: 600 11px/1 var(--sans); letter-spacing: .2em; text-transform: uppercase; opacity: .75; margin-right: 6px; }
.footer-langs a { background: hsl(0 0% 100% / .08); border-color: hsl(0 0% 100% / .2); color: #fff; }
.footer-langs a[aria-current="true"] { background: #fff; color: var(--ink); border-color: #fff; }

/* ---------- Floating RSVP (mobile only) ---------- */
.fab-rsvp {
  position: fixed; z-index: 45; right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom));
  display: none; align-items: center; gap: 8px; padding: 15px 22px; border-radius: 999px;
  background: var(--ink); color: var(--cream); text-decoration: none; font: 700 14px/1 var(--sans); letter-spacing: .08em; text-transform: uppercase;
  box-shadow: 0 14px 30px -10px hsl(0 0% 0% / .55);
  transform: translateY(140%); transition: transform .5s var(--ease);
}
.fab-rsvp.is-visible { transform: none; }

/* ---------- Thai typography: room for tone marks, no italics/tracking ---------- */
:lang(th) body, html:lang(th) { line-height: 1.8; }
html:lang(th) .display { line-height: 1.25; letter-spacing: 0; }
html:lang(th) .display em, html:lang(th) .dress__theme { font-style: normal; }
html:lang(th) .eyebrow, html:lang(th) .facts b, html:lang(th) .timeline h3, html:lang(th) .field label,
html:lang(th) .nav__links a, html:lang(th) .btn, html:lang(th) .hero__meta { letter-spacing: .04em; }
html:lang(th) .timeline h3, html:lang(th) .facts b { font-size: 15px; }
html:lang(th) .field label { font-size: 14px; }
html:lang(th) .nav__links a { font-size: 14px; }
html:lang(th) .btn { font-size: 15px; }
html:lang(th) .agenda h3, html:lang(th) .faq summary, html:lang(th) .h3 { line-height: 1.4; }
html:lang(th) .farewell__big { line-height: 1.15; }
html:lang(th) .farewell__big em { font-style: normal; }

/* ---------- Mobile polish ---------- */
@media (max-width: 900px) {
  .menu-langs { display: block; margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--line); }
  .nav__menu { max-height: calc(100dvh - var(--header-h)); overflow-y: auto; }
  .nav__links a { font-size: 16px; padding: 4px 0; }
  .nav__rsvp { padding: 12px 20px !important; }
}
@media (max-width: 860px) {
  body { font-size: 17px; }
  .fab-rsvp { display: inline-flex; }
  .hero { padding-top: 96px; }
  .hero__meta { justify-content: flex-start; gap: 6px 18px; }
  .hero__meta span:last-child { display: none; }
  .hero__media { aspect-ratio: 1 / 1; }
  .hero__media img { object-position: center 30%; }
  .hero__actions .btn { flex: 1 1 auto; min-height: 50px; }
  .rsvp__media { display: none; }
  .contact__link span { font-size: 19px; overflow-wrap: anywhere; }
  .player { padding: 14px 16px; gap: 12px 14px; }
  .player__play { width: 52px; height: 52px; }
  .btn { min-height: 48px; }
  .faq summary { padding: 20px 0; }
  .story__photos .tile:last-child { transform: translateY(24px); }
  .footer-nav { gap: 16px 22px; }
  .farewell { margin-top: 64px; }
}
@media (max-width: 560px) {
  :root { --header-h: 64px; }
  .nav { height: 64px; gap: 10px; }
  .nav__menu { inset: 64px 0 auto; }
  .brand { font-size: 22px; }
  .lang { padding: 3px; }
  .lang a { padding: 6px 8px 6px 6px; gap: 5px; min-height: 38px; }
  .lang__globe { display: none; }
  .nav__toggle { width: 40px; }
  .hero__title { font-size: clamp(54px, 17vw, 80px); }
  .display { font-size: clamp(40px, 11vw, 56px); }
  .hero__copy .display { font-size: clamp(36px, 10vw, 48px); }
  .welcome__grid .tile--video, .welcome__grid .tile--sawadee { aspect-ratio: 3 / 4; }
  .facts li { padding: 12px 0; }
  .agenda h3 { font-size: 24px; }
  .gift .display { font-size: clamp(36px, 10vw, 52px); }
}
@media (max-width: 370px) {
  .lang a span { display: none; }   /* very small phones: flags only */
  .lang a { padding: 6px; }
}

/* Readability: bigger small-print for older guests (esp. Thai script) */
@media (max-width: 860px) {
  .eyebrow { font-size: 12.5px; }
  .hotel__tag, .contact__link small, .agenda time small, .player__label small { font-size: 11.5px; }
  .footer-nav a { font-size: 12.5px; }
}
html:lang(th) .eyebrow { font-size: 14px; }
html:lang(th) .hotel__tag, html:lang(th) .contact__link small, html:lang(th) .agenda time small,
html:lang(th) .player__label small, html:lang(th) .rsvp__deadline, html:lang(th) .countdown span { font-size: 13px; letter-spacing: .02em; }
html:lang(th) .footer-nav a, html:lang(th) .footer-langs > span { font-size: 14px; letter-spacing: .04em; }
html:lang(th) .hero__meta { font-size: 14px; }

/* ---------- Jirayu standing on the hero divider line ---------- */
.hero__head { position: relative; }
.hero__kid {
  position: absolute; z-index: 2; pointer-events: auto;
  right: clamp(0px, 2vw, 32px);
  bottom: calc(-1 * clamp(18px, 2vw, 28px) - 2px);   /* feet land on the divider line below the title */
  height: clamp(190px, 24vw, 340px); width: auto;
  filter: drop-shadow(0 10px 8px hsl(30 25% 20% / .18));
  transform-origin: 50% 100%;
  animation: kid-in 1.1s var(--ease) .5s both;
}
.hero__kid:hover { animation: kid-wiggle .9s var(--ease); }
@keyframes kid-in { from { opacity: 0; transform: translateY(24px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes kid-wiggle { 25% { transform: rotate(-4deg); } 55% { transform: rotate(3deg); } 80% { transform: rotate(-1deg); } }
@media (max-width: 860px) {
  .hero__kid { height: clamp(170px, 46vw, 230px); right: 0; }
}
@media (prefers-reduced-motion: reduce) { .hero__kid { animation: none; } }
@media (max-width: 560px) {
  .hero__title { padding-right: 24vw; }   /* names wrap to 2 lines; Jirayu stands beside "Marley" */
  .hero__kid { height: clamp(160px, 48vw, 210px); }
}
