/* ==========================================================================
   Thipwaree & Gabriel · wedding website (v3)
   Halfway between the invitation suite and an editorial site: the invitation's
   rose, blush stripes, cream squares, gold and flowers, with real photography.
   ========================================================================== */

:root {
  /* From the stationery */
  --cream: #F0E6DA;
  --paper: #FAF5EE;
  --white: #FFFDF9;
  --blush: #D9ADAC;
  --blush-soft: #F4E5E1;
  --rose: #C34F64;
  --rose-deep: #A63F54;
  --wine: #64162A;
  --wine-deep: #4E1020;
  --gold: #E9C77B;
  --foil: #B8955A;
  --olive: #B8B264;
  --moss: #5F704B;
  --tangerine: #E77536;
  --ink: #3B2126;
  --ink-soft: #6A4B4F;
  --line: rgba(59, 33, 38, 0.14);

  /* Noto Serif Thai only steps in for Thai characters */
  --font-display: "Cormorant Garamond", "Noto Serif Thai", Garamond, "Times New Roman", serif;
  --font-body: "EB Garamond", "Noto Serif Thai", Garamond, Georgia, serif;
  --font-script: "Pinyon Script", "Snell Roundhand", cursive;
  --font-thai: "Noto Serif Thai", Thonburi, serif;

  --nav-h: 66px;
  --gutter: clamp(18px, 4.5vw, 56px);
  --maxw: 1160px;
  --shadow: 0 24px 50px -30px rgba(100, 22, 42, 0.45);

  /* Hand-drawn blush stripes and the squared border from the invitation */
  --stripes: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='240'%3E%3Cpath fill='%23D9ADAC' d='M11 0Q15 60 11 120T11 240H29Q25 180 29 120T29 0Z'/%3E%3C/svg%3E");
  --squares: repeating-linear-gradient(90deg, var(--rose) 0 14px, var(--cream) 0 28px);
  color-scheme: light;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: clamp(1.06rem, 1rem + 0.25vw, 1.18rem);
  line-height: 1.65;
  font-variant-numeric: lining-nums;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
p { margin: 0 0 0.9em; }
p:last-child { margin-bottom: 0; }
h1, h2, h3 { margin: 0; font-weight: 600; }
ul, ol, dl, dd { margin: 0; padding: 0; list-style: none; }
figure { margin: 0; }
address { font-style: normal; }
[hidden] { display: none !important; }
[lang="th"] { font-family: var(--font-thai); }
:focus-visible { outline: 2px solid var(--rose); outline-offset: 3px; }
section[id], header[id] { scroll-margin-top: var(--nav-h); }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--wine); color: #fff; padding: 10px 16px; }
.skip-link:focus { top: 12px; }
.container { max-width: var(--maxw); margin: 0 auto; position: relative; z-index: 1; }
.container--narrow { max-width: 760px; }
.center { text-align: center; }

/* Small caps label used everywhere (the invitation's letter-spaced capitals) */
.label, .title__eyebrow, .btn, .nav__links a, .countdown small, .facts dt, .event__day, .event__dress,
.hero__kicker, .hero__invite, .hero__place, .dress__hint-label, .tips dt, .hotels span, .field label, .field__label, .footer__meta, .footer__top,
.badge__event, .guest__remove {
  font-family: var(--font-body);
  font-weight: 500;
  text-transform: uppercase;
}

/* ---------- Draft markers ---------- */
.draft-ribbon {
  position: relative; z-index: 60;
  background: var(--wine); color: #F6EADF;
  text-align: center; font-size: 0.85rem; letter-spacing: 0.04em;
  padding: 7px var(--gutter);
}
.is-draft .tbc {
  background: linear-gradient(transparent 10%, rgba(233, 199, 123, 0.65) 10%, rgba(233, 199, 123, 0.65) 90%, transparent 90%);
  color: var(--ink);
  padding: 0 0.15em;
  box-decoration-break: clone; -webkit-box-decoration-break: clone;
}

/* ---------- Type ---------- */
.label { display: block; font-size: 0.78rem; letter-spacing: 0.24em; color: var(--rose); margin-bottom: 0.8em; }
.script { font-family: var(--font-script); font-style: normal; font-weight: 400; text-transform: none; letter-spacing: 0; color: var(--rose); }
.script-accent { font-family: var(--font-script); font-size: clamp(2.1rem, 1.7rem + 1.4vw, 2.9rem); color: var(--rose); line-height: 1.1; margin-bottom: 14px; }
.welcome__hello { font-family: var(--font-display); font-style: italic; font-weight: 500; font-size: clamp(1.9rem, 1.5rem + 1.4vw, 2.6rem); line-height: 1.15; color: var(--rose); margin-bottom: 16px; }
.lead { font-size: clamp(1.18rem, 1.05rem + 0.55vw, 1.4rem); line-height: 1.55; color: var(--ink); }

.title { text-align: center; margin: 0 auto clamp(40px, 6vw, 68px); max-width: 720px; }
.title--left { text-align: left; margin-left: 0; }
.title__eyebrow { font-size: 0.8rem; letter-spacing: 0.3em; color: var(--rose); margin-bottom: 10px; }
.title__main {
  font-family: var(--font-display);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: clamp(2.2rem, 1.5rem + 3vw, 3.9rem);
  line-height: 1.05;
  color: var(--wine);
}
.title__main .script { font-size: 1.3em; text-transform: none; letter-spacing: 0; margin-left: 0.04em; }
.title__lede { margin-top: 16px; color: var(--ink-soft); font-size: 1.1em; }
.title--light .title__eyebrow { color: var(--gold); }
.title--light .title__main { color: #FBF3E8; }
.title--light .script { color: var(--gold); }
.subhead { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); color: var(--wine); margin-bottom: 22px; }

/* Rose and cream squares, like the invitation's border */
.squares { height: 14px; background: var(--squares); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 50px; padding: 14px 30px;
  font-size: 0.86rem; letter-spacing: 0.2em;
  text-decoration: none; white-space: nowrap;
  border: 1.5px solid var(--rose); border-radius: 2px;
  background: transparent; color: var(--rose);
  cursor: pointer;
  transition: background-color 0.25s, color 0.25s, border-color 0.25s, transform 0.2s;
}
.btn:hover { transform: translateY(-1px); }
.btn--rose { background: var(--rose); color: #FFF6EA; }
.btn--rose:hover { background: var(--rose-deep); border-color: var(--rose-deep); }
.btn--line:hover { background: var(--rose); color: #FFF6EA; }
.btn--gold { background: var(--gold); border-color: var(--gold); color: var(--wine); }
.btn--lg { min-height: 58px; padding: 16px 44px; }
.btn[disabled] { opacity: 0.6; cursor: progress; transform: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 22px 0; }

/* ---------- Navigation ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  height: var(--nav-h);
  color: var(--wine);
  background: linear-gradient(180deg, rgba(239, 231, 218, 0.92), rgba(239, 231, 218, 0));
  transition: background-color 0.35s, color 0.35s, box-shadow 0.35s, top 0.2s;
}
.has-ribbon .nav { top: 33px; }
.nav.is-solid { background: rgba(250, 245, 238, 0.97); color: var(--wine); box-shadow: 0 1px 0 var(--line); top: 0; }
.nav__inner {
  height: 100%; max-width: 1320px; margin: 0 auto; padding: 0 var(--gutter);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.nav__brand { display: flex; align-items: center; gap: 12px; text-decoration: none; font-family: var(--font-display); font-weight: 600; font-size: 1.25rem; letter-spacing: 0.1em; }
.nav__brand em { font-family: var(--font-script); font-style: normal; font-weight: 400; font-size: 1.2em; }
.nav__mono { width: 15px; height: auto; }
.nav__mono--light { display: none; }
.nav__links { display: flex; align-items: center; gap: clamp(16px, 1.8vw, 28px); }
.nav__links a {
  text-decoration: none;
  font-size: 0.8rem; letter-spacing: 0.18em;
  padding: 6px 0; border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}
.nav__links a:hover, .nav__links a[aria-current="true"] { border-color: currentColor; }
.nav__links .nav__rsvp { border: 1px solid var(--rose); padding: 9px 18px; background: var(--rose); color: #FFF6EA; }
.nav__toggle { display: none; width: 44px; height: 44px; border: 0; background: none; cursor: pointer; position: relative; margin-right: -10px; color: inherit; }
.nav__burger, .nav__burger::before, .nav__burger::after {
  position: absolute; left: 11px; width: 22px; height: 1.5px; background: currentColor; content: "";
  transition: transform 0.25s, background-color 0.2s;
}
.nav__burger { top: 21px; }
.nav__burger::before { left: 0; top: -7px; }
.nav__burger::after { left: 0; top: 7px; }
.nav.is-open .nav__burger { background: transparent; }
.nav.is-open .nav__burger::before { transform: translateY(7px) rotate(45deg); }
.nav.is-open .nav__burger::after { transform: translateY(-7px) rotate(-45deg); }
@media (max-width: 1080px) {
  .nav__toggle { display: block; }
  .nav.is-open { background: var(--paper); color: var(--wine); top: 0; }
  .nav.is-open .nav__mono--light { display: none; }
  .nav.is-open .nav__mono--dark { display: block; }
  .nav__links {
    position: fixed; inset: 0; z-index: -1;
    flex-direction: column; justify-content: center; gap: 4px;
    padding: calc(var(--nav-h) + 20px) var(--gutter) 40px;
    background: var(--paper) var(--stripes);
    opacity: 0; visibility: hidden;
    transition: opacity 0.25s, visibility 0.25s;
  }
  .nav__links::before { content: ""; position: absolute; inset: 0; z-index: -1; background: rgba(250, 245, 238, 0.93); }
  .nav.is-open .nav__links { opacity: 1; visibility: visible; }
  .nav__links a { display: block; font-size: 1.6rem; letter-spacing: 0.1em; padding: 8px 0; color: var(--wine); border: 0; text-align: center; text-shadow: none; }
  .nav__links .nav__rsvp { margin-top: 16px; font-size: 0.95rem; letter-spacing: 0.24em; padding: 16px 40px; background: var(--rose); color: #FFF6EA; border-color: var(--rose); }
  .nav__links .nav__langs { display: block; margin-top: 26px; }
  body.nav-open { overflow: hidden; }
}
/* Languages: the phone menu has its own flags; on wide screens the hero and footer flags do the job */
.nav__langs { display: none; }

/* ---------- Language flags ---------- */
.lang-switch { display: inline-flex; align-items: center; justify-content: center; gap: 10px; }
.lang-btn {
  width: 34px; height: 34px; padding: 0; flex: none;
  border: 2px solid var(--paper); border-radius: 50%; overflow: hidden; cursor: pointer;
  background: var(--paper); box-shadow: 0 0 0 1px rgba(59, 33, 38, 0.2);
  transition: transform 0.2s, box-shadow 0.2s;
}
.lang-btn svg { display: block; width: 100%; height: 100%; }
.lang-btn:hover { transform: scale(1.08); }
.lang-btn[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--rose); }
.lang-btn:focus-visible { outline: 2px solid var(--rose); outline-offset: 3px; }
.lang-switch--hero {
  position: relative; z-index: 1; padding: 7px 14px; border-radius: 99px;
  background: rgba(250, 245, 238, 0.92); box-shadow: 0 10px 24px -16px rgba(100, 22, 42, 0.5);
  animation: rise 1.1s 0.1s ease-out both;
}
.lang-switch--footer { display: flex; margin: 22px auto 0; }
.lang-switch--footer .lang-btn { border-color: var(--wine); }
.lang-switch--footer .lang-btn[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--gold); }

/* While a translation loads, keep the English hidden (shown anyway after 2.5s if something fails) */
.i18n-wait body { visibility: hidden; animation: i18n-show 0s 2.5s forwards; }
@keyframes i18n-show { to { visibility: visible; } }

/* Thai: no wide tracking, a little more room for tone marks, and no Latin script font */
html[lang="th"] body * { letter-spacing: 0 !important; font-style: normal !important; } /* Thai has no italics */
html[lang="th"] h1, html[lang="th"] h2, html[lang="th"] h3, html[lang="th"] .title__main, html[lang="th"] .event__date,
html[lang="th"] .hero__date, html[lang="th"] .welcome__hello, html[lang="th"] .rsvp__legend { line-height: 1.45; }
html[lang="th"] .script { font-family: var(--font-display); font-style: normal; color: var(--rose); }

/* ---------- Hero: the invitation card on a bed of its own flowers ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px;
  padding: calc(var(--nav-h) + 48px) var(--gutter) 48px;
  overflow: hidden;
  background: #EFE7DA; /* the invitation's cream, same as the flower artwork */
}
.has-ribbon .hero { padding-top: calc(var(--nav-h) + 80px); }
.hero__bg, .hero__bg img { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero__bg img { object-fit: cover; animation: bloom 2.4s ease-out both; }
@keyframes bloom { from { opacity: 0; transform: scale(1.06); } }
.hero__card {
  position: relative; z-index: 1;
  width: min(100%, 540px);
  padding: 10px;
  background: var(--paper);
  box-shadow: 0 30px 60px -28px rgba(100, 22, 42, 0.45), 0 2px 6px rgba(100, 22, 42, 0.08);
  animation: rise 1.1s 0.2s ease-out both;
}
/* Squared border inside the card, as on the printed invitation */
.hero__card::before {
  content: ""; position: absolute; inset: 10px; pointer-events: none;
  --b: 9px;
  background:
    repeating-linear-gradient(90deg, var(--rose) 0 var(--b), transparent 0 calc(var(--b) * 2)) top / 100% var(--b) no-repeat,
    repeating-linear-gradient(90deg, var(--rose) 0 var(--b), transparent 0 calc(var(--b) * 2)) bottom / 100% var(--b) no-repeat,
    repeating-linear-gradient(180deg, var(--rose) 0 var(--b), transparent 0 calc(var(--b) * 2)) left / var(--b) 100% no-repeat,
    repeating-linear-gradient(180deg, var(--rose) 0 var(--b), transparent 0 calc(var(--b) * 2)) right / var(--b) 100% no-repeat;
}
.hero__card-inner { position: relative; padding: clamp(34px, 4.5vw, 48px) clamp(26px, 5vw, 48px) clamp(32px, 4vw, 42px); text-align: center; color: var(--wine); }
.hero__mono { width: 20px; margin: 0 auto 14px; }
.hero__kicker { font-size: 0.8rem; letter-spacing: 0.24em; color: var(--rose); margin-bottom: 12px; }
/* Names in the invitation's capitals, with a script ampersand */
.hero__names { font-family: var(--font-display); font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; font-size: clamp(1.9rem, 1.3rem + 1.8vw, 2.6rem); line-height: 1.15; color: var(--wine); }
.hero__amp { font-family: var(--font-script); font-weight: 400; text-transform: none; letter-spacing: 0; color: var(--rose); font-size: 1.3em; line-height: 0.8; padding: 0 0.08em; }
/* Stacked like the printed invitation: name, ampersand, name */
.hero__name, .hero__amp { display: block; }
.hero__amp { line-height: 1; margin: 4px 0 2px; font-size: 1.1em; }
.hero__invite { font-size: 0.82rem; letter-spacing: 0.16em; color: var(--ink-soft); margin: 14px 0 16px; }
.hero__date { font-family: var(--font-display); font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; font-size: clamp(1.2rem, 1.05rem + 0.6vw, 1.5rem); color: var(--rose); margin-bottom: 4px; }
.hero__date sup { font-size: 0.55em; vertical-align: 0.7em; }
.hero__place { font-size: 0.84rem; letter-spacing: 0.18em; color: var(--ink-soft); margin-bottom: 24px; }
.hero__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
/* The countdown sits under the card, on a strip of paper so it reads over the flowers */
.hero > .countdown {
  position: relative; z-index: 1;
  display: flex; justify-content: center; gap: clamp(18px, 4vw, 40px);
  padding: 12px clamp(20px, 4vw, 34px);
  background: rgba(250, 245, 238, 0.9);
  box-shadow: 0 14px 30px -20px rgba(100, 22, 42, 0.45);
  color: var(--wine);
  animation: rise 1.1s 0.4s ease-out both;
}
.hero > .countdown small { color: var(--rose); }
.countdown span { display: block; text-align: center; font-family: var(--font-display); font-weight: 600; font-size: clamp(1.7rem, 1.4rem + 1vw, 2.3rem); line-height: 1; font-variant-numeric: lining-nums tabular-nums; }
.countdown small { display: block; text-align: center; margin-top: 6px; font-size: 0.72rem; letter-spacing: 0.2em; }
@keyframes rise { from { opacity: 0; transform: translateY(24px); } }
@media (max-width: 760px) {
  .hero { padding: calc(var(--nav-h) + 24px) 22px 34px; gap: 16px; }
  .has-ribbon .hero { padding-top: calc(var(--nav-h) + 52px); }
  .hero__card { width: 100%; max-width: 360px; padding: 8px; }
  .hero__card::before { inset: 8px; --b: 7px; }
  .hero__card-inner { padding: 26px 18px 22px; }
  .hero__mono { width: 15px; margin-bottom: 10px; }
  .hero__kicker { font-size: 0.72rem; letter-spacing: 0.16em; margin-bottom: 8px; }
  /* Stack the names like the printed invitation: name, ampersand, name */
  .hero__names { font-size: clamp(1.7rem, 8vw, 2.1rem); line-height: 1.05; }
  .hero__invite { display: none; }
  .hero__date { font-size: 1.12rem; letter-spacing: 0.06em; margin-top: 12px; }
  .hero__place { font-size: 0.72rem; letter-spacing: 0.12em; margin-bottom: 18px; }
  .hero__actions { flex-wrap: nowrap; gap: 10px; }
  .hero__actions .btn { flex: 1 1 0; min-width: 0; min-height: 46px; padding: 12px 8px; font-size: 0.8rem; letter-spacing: 0.14em; }
  .hero > .countdown { gap: 20px; padding: 10px 20px; }
  .countdown span { font-size: 1.6rem; }
  .countdown small { font-size: 0.66rem; letter-spacing: 0.16em; }
}

/* ---------- Welcome ---------- */
.welcome { position: relative; overflow: hidden; padding: clamp(70px, 10vw, 130px) var(--gutter); text-align: center; background: var(--paper); }
.welcome__flowers { position: absolute; width: clamp(140px, 17vw, 250px); top: 50%; pointer-events: none; opacity: 0.95; }
.welcome__flowers--left { left: -40px; transform: translateY(-50%) rotate(-8deg); }
.welcome__flowers--right { right: -40px; transform: translateY(-50%) scaleX(-1) rotate(-8deg); }
.welcome__mono { width: 22px; margin: 0 auto 16px; }
.welcome__text { font-size: clamp(1.15rem, 1.05rem + 0.4vw, 1.32rem); color: var(--ink-soft); max-width: 620px; margin: 0 auto; }
.welcome__text strong { color: var(--wine); font-weight: 500; }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: clamp(36px, 5vw, 56px); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.facts > div { padding: 24px 12px; }
.facts > div + div { border-left: 1px solid var(--line); }
.facts dt { font-size: 0.74rem; letter-spacing: 0.26em; color: var(--rose); margin-bottom: 6px; }
.facts dd { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.15rem, 1rem + 0.5vw, 1.4rem); line-height: 1.3; color: var(--wine); }
.facts small { font-family: var(--font-body); font-weight: 400; font-size: 0.78em; color: var(--ink-soft); }
@media (max-width: 860px) { .welcome__flowers { display: none; } }
@media (max-width: 620px) {
  .facts { grid-template-columns: 1fr; }
  .facts > div + div { border-left: 0; border-top: 1px solid var(--line); }
}

/* ---------- Sections ---------- */
.section { padding: clamp(80px, 11vw, 140px) var(--gutter); position: relative; }
.section--sand { background: var(--cream); }
.section--blush { background: var(--blush-soft); }
.section--moss { background: var(--moss); color: #F3ECE0; }

/* ---------- Our story ---------- */
.story {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(36px, 7vw, 100px); align-items: center;
  margin-bottom: clamp(70px, 10vw, 130px);
}
.story:last-child { margin-bottom: 0; }
.story--flip .story__photo { order: 2; }
.story__photo { position: relative; }
.story__photo > img { position: relative; z-index: 1; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border: 8px solid var(--white); box-shadow: var(--shadow); }
/* Blush stripes behind each photo, from the invitation front */
.story__photo::before { content: ""; position: absolute; inset: 30px -30px -30px 30px; z-index: 0; background: var(--cream) var(--stripes); background-size: 30px 180px; }
.story__photo--blush::before { inset: 30px 30px -30px -30px; }
.story__title { font-family: var(--font-display); font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; font-size: clamp(1.8rem, 1.4rem + 1.4vw, 2.5rem); color: var(--wine); margin-bottom: 18px; line-height: 1.1; }
.story__text { max-width: 540px; }
.story__text p { color: var(--ink-soft); }
.story__aside { font-family: var(--font-display); font-style: italic; font-weight: 500; font-size: 1.3em; line-height: 1.4; color: var(--rose) !important; padding-left: 18px; border-left: 2px solid var(--blush); }
.story__close { color: var(--wine) !important; font-weight: 500; }
.heart { color: var(--rose); font-size: 1.1em; }
.story__photo--collage { margin-bottom: 70px; }
.story__inset {
  position: absolute; z-index: 2;
  width: 46%; left: -20%; bottom: -70px;
  border: 8px solid var(--white);
  box-shadow: 0 24px 40px -18px rgba(100, 22, 42, 0.5);
}
.story__inset img { aspect-ratio: 4 / 5; object-fit: cover; }
@media (max-width: 820px) {
  .story__photo::before { inset: 16px -16px -16px 16px; background-size: 22px 132px; }
  .story__photo--blush::before { inset: 16px 16px -16px -16px; }
  .story { grid-template-columns: 1fr; }
  .story--flip .story__photo { order: 0; }
  .story__photo { width: 86%; }
  .story--flip .story__photo { margin-left: auto; }
  .story__photo--collage { margin-bottom: 56px; }
  .story__inset { width: 48%; left: -12%; bottom: -56px; border-width: 6px; }
}

/* ---------- The weekend ---------- */
.events { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(16px, 2.5vw, 28px); margin-bottom: 40px; align-items: stretch; }
.event {
  position: relative;
  padding: clamp(34px, 3.5vw, 46px) clamp(22px, 3vw, 34px) clamp(30px, 3vw, 40px);
  background: var(--white);
  text-align: center;
  border: 1px solid var(--line);
}
.event::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 8px; background: var(--squares); background-size: 28px 8px; }
.event--main { background: var(--rose); color: #FFF6EA; border-color: var(--rose); }
.event--main::before { background: repeating-linear-gradient(90deg, var(--cream) 0 14px, transparent 0 28px); }
.event__day { font-size: 0.76rem; letter-spacing: 0.26em; color: var(--rose); margin-bottom: 4px; }
.event--main .event__day { color: var(--gold); }
.event__date { font-family: var(--font-display); font-style: italic; font-weight: 500; font-size: clamp(2rem, 1.7rem + 1.2vw, 2.6rem); line-height: 1.1; color: var(--rose); margin-bottom: 10px; }
.event--main .event__date { color: #FFF6EA; }
.event__title { font-family: var(--font-display); font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.6rem); color: var(--wine); margin-bottom: 10px; }
.event--main .event__title { color: var(--gold); }
.event__meta { color: var(--ink-soft); font-size: 1rem; }
.event--main .event__meta { color: #FFF1E6; }
.event__dress { margin-top: 16px; font-size: 0.74rem; letter-spacing: 0.18em; color: var(--foil); }
.event--main .event__dress { color: var(--gold); }
@media (max-width: 860px) { .events { grid-template-columns: 1fr; } }

/* ---------- Wedding day ---------- */
.day { display: grid; grid-template-columns: 1fr 1fr; background: var(--wine); color: #F6EADF; }
.day__photo { position: relative; min-height: 460px; background: var(--cream) var(--stripes); }
.day__photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 58%; }
.day__body { padding: clamp(70px, 9vw, 120px) clamp(24px, 6vw, 90px); }
.timeline { --time-w: 86px; margin: 0; }
.timeline li {
  position: relative;
  display: grid; grid-template-columns: var(--time-w) 11px 1fr; column-gap: 22px; align-items: center;
  min-height: 54px; padding: 8px 0;
}
.timeline li::before { content: ""; position: absolute; left: calc(var(--time-w) + 22px + 5px); top: 0; bottom: 0; width: 1px; background: rgba(233, 199, 123, 0.35); }
.timeline li:first-child::before { top: 50%; }
.timeline li:last-child::before { bottom: 50%; }
.timeline time { font-family: var(--font-display); font-weight: 600; font-size: 0.86rem; line-height: 1; letter-spacing: 0.12em; color: var(--gold); text-align: right; white-space: nowrap; }
.timeline__dot { position: relative; z-index: 1; width: 11px; height: 11px; border-radius: 50%; background: var(--wine); border: 1.5px solid var(--gold); }
.timeline li:nth-child(2) .timeline__dot { background: var(--gold); }
.timeline span { font-family: var(--font-display); font-weight: 500; font-size: clamp(1.2rem, 1.05rem + 0.5vw, 1.45rem); line-height: 1.25; }
@media (max-width: 900px) {
  .day { grid-template-columns: 1fr; }
  .day__photo { min-height: 0; background: none; padding: 64px var(--gutter) 0; display: flex; justify-content: center; }
  .day__photo img {
    position: static; width: min(56vw, 250px); height: auto; aspect-ratio: 1021 / 1500;
    object-fit: cover; padding: 6px; background: var(--cream);
    box-shadow: 0 0 0 1px rgba(233, 199, 123, 0.6), 0 24px 40px -20px rgba(0, 0, 0, 0.55);
  }
  .day__body { padding-top: 44px; }
  .day .title--left { text-align: center; margin-left: auto; }
}
@media (max-width: 420px) {
  .timeline { --time-w: 72px; }
  .timeline li { column-gap: 16px; }
  .timeline li::before { left: calc(var(--time-w) + 16px + 5px); }
}

/* ---------- The venue ---------- */
.venue__grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(30px, 6vw, 80px); align-items: center; margin-bottom: clamp(56px, 7vw, 90px); }
.venue__photo img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border: 8px solid var(--white); box-shadow: var(--shadow); }
.venue__text .lead { margin-bottom: 26px; }
.accolades { display: grid; gap: 12px; }
.accolades li { position: relative; padding-left: 26px; color: var(--ink-soft); font-size: 1.02rem; line-height: 1.5; }
.accolades li::before { content: "\2726"; position: absolute; left: 0; top: 0.1em; color: var(--foil); font-size: 0.85rem; }
.accolades strong { color: var(--wine); font-weight: 500; }
.venue__find { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(30px, 5vw, 70px); align-items: start; }
.venue__find address { font-size: 1.15rem; line-height: 1.55; }
.note { color: var(--ink-soft); font-size: 1rem; }
.note--light { color: rgba(243, 236, 224, 0.85); margin-top: 26px; }
.taxi { margin-top: 12px; padding: 18px 20px; background: var(--white); border-left: 3px solid var(--rose); font-size: 1.08rem; line-height: 1.8; }
.map { background: var(--white); padding: 8px; box-shadow: var(--shadow); }
.map iframe { display: block; width: 100%; aspect-ratio: 4 / 3.4; border: 0; }
@media (max-width: 900px) { .venue__grid, .venue__find { grid-template-columns: 1fr; } }
@media (max-width: 600px) { .map iframe { aspect-ratio: 1; } }

/* ---------- Dress code (the invitation's striped-ring card) ---------- */
.dress { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(28px, 4vw, 48px); text-align: center; }
.badge {
  width: min(240px, 70vw); aspect-ratio: 1; margin: 0 auto;
  padding: 15px; border-radius: 50%;
  background: repeating-conic-gradient(var(--tangerine) 0 7.5deg, var(--cream) 0 15deg);
  box-shadow: var(--shadow);
}
.badge--main { background: repeating-conic-gradient(var(--rose) 0 7.5deg, var(--cream) 0 15deg); }
.badge__in {
  width: 100%; height: 100%; border-radius: 50%;
  background: var(--white);
  display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 18px;
  box-shadow: inset 0 0 0 3px var(--white), inset 0 0 0 4.5px var(--blush);
}
.badge__event { font-family: var(--font-body); font-weight: 500; text-transform: uppercase; font-size: 0.74rem; letter-spacing: 0.2em; color: var(--rose); max-width: 150px; line-height: 1.4; }
.badge__code { font-family: var(--font-display); font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; font-size: clamp(1.55rem, 1.3rem + 0.8vw, 1.95rem); line-height: 1.05; color: var(--wine); margin-top: 8px; }
.dress__hint { max-width: 290px; margin: 18px auto 0; color: var(--ink-soft); font-size: 1rem; }
.dress__link {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 14px; min-height: 44px; padding: 10px 20px;
  border: 1px solid var(--rose); color: var(--rose); text-decoration: none;
  font-size: 0.78rem; letter-spacing: 0.16em; text-transform: uppercase; white-space: nowrap; transition: background-color 0.2s, color 0.2s;
}
.dress__link::after { content: "\2197"; font-size: 1.1em; letter-spacing: 0; }
.dress__link:hover { background: var(--rose); color: #FFF6EA; }
.notes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: clamp(44px, 6vw, 64px); }
.notes li { padding: 20px 22px; background: var(--cream); border-left: 3px solid var(--rose); color: var(--ink-soft); font-size: 1rem; }
.notes strong { color: var(--wine); font-weight: 500; }
@media (max-width: 860px) {
  .dress, .notes { grid-template-columns: 1fr; }
  .dress { gap: 36px; }
  .badge { width: 190px; padding: 12px; }
  .badge__code { font-size: 1.5rem; }
}

/* ---------- Travel & stay ---------- */
.section--moss .title__eyebrow { color: var(--gold); }
.section--moss .title__main { color: #FBF3E8; }
.section--moss .title__main .script { color: var(--gold); }
.stay-villa { max-width: 780px; margin: 0 auto clamp(50px, 7vw, 80px); padding: clamp(28px, 4vw, 48px); border: 1px solid rgba(233, 199, 123, 0.5); text-align: center; }
.stay-villa .label { color: var(--gold); }
.stay-villa__title { font-family: var(--font-display); font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; font-size: clamp(1.6rem, 1.3rem + 1.2vw, 2.2rem); color: #FBF3E8; margin-bottom: 14px; }
.stay-villa p { color: rgba(243, 236, 224, 0.9); }
.stay-villa strong { color: var(--gold); font-weight: 500; }
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(14px, 2vw, 22px); margin-bottom: clamp(50px, 7vw, 80px); }
.card { padding: 28px 24px; background: rgba(250, 245, 238, 0.07); border-top: 2px solid var(--gold); }
.card__title { font-family: var(--font-display); font-weight: 600; font-size: 1.4rem; color: #FBF3E8; margin-bottom: 10px; }
.card p { color: rgba(243, 236, 224, 0.85); font-size: 1rem; }
.section--moss .subhead { color: #FBF3E8; text-align: center; }
.hotels { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: rgba(243, 236, 224, 0.2); border: 1px solid rgba(243, 236, 224, 0.2); }
.hotels li { background: var(--moss); padding: 20px; }
.hotels strong { display: block; font-family: var(--font-display); font-weight: 600; font-size: 1.2rem; color: #FBF3E8; line-height: 1.25; margin-bottom: 4px; }
.hotels span { font-size: 0.7rem; letter-spacing: 0.2em; color: var(--gold); }
.section--moss .note--light { text-align: center; }
@media (max-width: 960px) { .cards, .hotels { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .cards, .hotels { grid-template-columns: 1fr; } }

/* ---------- Koh Samui favourites ---------- */
.faves { --gap: clamp(24px, 3vw, 44px); counter-reset: fave; display: flex; flex-wrap: wrap; justify-content: center; column-gap: var(--gap); margin-bottom: clamp(60px, 8vw, 100px); }
.faves li { counter-increment: fave; width: calc((100% - 3 * var(--gap)) / 4); padding: 26px 0; border-top: 1px solid var(--line); }
.faves h3 { font-family: var(--font-display); font-weight: 600; font-size: 1.45rem; color: var(--wine); margin-bottom: 8px; display: flex; gap: 12px; align-items: baseline; }
.faves h3::before { content: counter(fave, decimal-leading-zero); font-family: var(--font-display); font-size: 0.85rem; letter-spacing: 0.1em; color: var(--rose); }
.faves p { color: var(--ink-soft); font-size: 1rem; }
.tips { padding: clamp(30px, 4vw, 50px); background: var(--cream); }
.tips .subhead { text-align: center; }
.tips dl { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px 36px; }
.tips dt { font-size: 0.76rem; letter-spacing: 0.2em; color: var(--rose); margin-bottom: 4px; }
.tips dd { color: var(--ink-soft); font-size: 1rem; }
.phrases { margin-top: 30px; padding-top: 22px; border-top: 1px solid var(--line); text-align: center; color: var(--ink-soft); }
.phrases [lang="th"] { color: var(--wine); font-size: 1.2rem; margin-right: 6px; }
@media (max-width: 960px) {
  .faves { display: block; columns: 2; column-gap: var(--gap); }
  .faves li { width: auto; break-inside: avoid; }
}
@media (max-width: 860px) { .tips dl { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .faves { columns: 1; } .tips dl { grid-template-columns: 1fr; } }

/* ---------- Good to know ---------- */
.section--blush { background: var(--blush-soft); }
.faq { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(20px, 3vw, 32px); max-width: 960px; margin: 0 auto; }
.faq__item { padding: clamp(24px, 3vw, 34px); background: var(--white); border-top: 3px solid var(--rose); }
.faq__item h3 { font-family: var(--font-display); font-weight: 600; font-size: 1.5rem; color: var(--wine); margin-bottom: 8px; }
.faq__item p { color: var(--ink-soft); }
.faq__item a { color: var(--rose); }
@media (max-width: 700px) { .faq { grid-template-columns: 1fr; } }

/* ---------- RSVP ---------- */
.rsvp-section { background: var(--cream) var(--stripes); background-size: 34px 204px; }
.rsvp-section .title { background: var(--paper); padding: 30px 26px; max-width: 560px; box-shadow: var(--shadow); }
.rsvp-section .title__main .script { font-size: 1.5em; }
.rsvp-card { background: var(--white); padding: clamp(26px, 5vw, 60px); box-shadow: var(--shadow); }
.rsvp__group { border: 0; padding: 0; margin: 0 0 34px; min-width: 0; }
.rsvp__attending { border: 0; padding: 0; margin: 0; min-width: 0; }
.rsvp__legend { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.4rem, 1.2rem + 0.6vw, 1.75rem); color: var(--wine); margin-bottom: 14px; padding: 0 0 8px; width: 100%; border-bottom: 1px solid var(--line); }
.rsvp__help { color: var(--ink-soft); font-size: 1rem; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; min-width: 0; }
.field-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 16px; }
.field-row--guest { grid-template-columns: 1fr; }
.field-row--guest:has(.guest__age:not([hidden])) { grid-template-columns: 0.5fr 1.5fr; }
.field label, .field__label { font-size: 0.76rem; letter-spacing: 0.14em; color: var(--ink-soft); }
.opt { text-transform: none; letter-spacing: 0; font-family: var(--font-body); font-weight: 400; font-style: italic; font-size: 0.95rem; color: #9A8084; }
.field input, .field textarea {
  width: 100%; font: inherit; font-size: 1.05rem; color: var(--ink);
  background: var(--paper); border: 1px solid rgba(59, 33, 38, 0.22); border-radius: 2px;
  padding: 12px 14px; min-height: 50px;
  transition: border-color 0.2s, background-color 0.2s, box-shadow 0.2s;
}
.field textarea { resize: vertical; min-height: 96px; }
/* iOS Safari gives date pickers a fixed minimum width that pokes out of narrow boxes */
.field input[type="date"] { -webkit-appearance: none; appearance: none; display: block; min-width: 0; max-width: 100%; text-align: left; }
.field input[type="date"]::-webkit-date-and-time-value { text-align: left; margin: 0; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--rose); background: #fff; box-shadow: 0 0 0 3px rgba(195, 79, 100, 0.15); }
.field input::placeholder, .field textarea::placeholder { color: #A99294; }
.was-validated .field :invalid { border-color: #B3261E; background: #FFF6F5; }
.field-error { color: #B3261E; font-size: 0.95rem; margin: 6px 0 0; }
.choices { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.choice { position: relative; cursor: pointer; }
.choice input { position: absolute; opacity: 0; inset: 0; }
.choice__box { display: flex; flex-direction: column; gap: 2px; padding: 18px 20px; height: 100%; border: 1.5px solid rgba(59, 33, 38, 0.2); background: var(--paper); transition: all 0.2s; }
.choice__title { font-family: var(--font-display); font-weight: 600; font-size: 1.35rem; color: var(--wine); }
.choice__sub { font-size: 0.95rem; color: var(--ink-soft); font-style: italic; }
.choice input:checked + .choice__box { border-color: var(--rose); background: #FBEFEF; box-shadow: inset 0 0 0 1px var(--rose); }
.choice input:focus-visible + .choice__box { outline: 2px solid var(--rose); outline-offset: 3px; }
.checks { display: grid; gap: 10px; }
.check { display: flex; align-items: center; gap: 12px; cursor: pointer; padding: 12px 14px; background: var(--paper); border: 1px solid var(--line); }
.check input { width: 20px; height: 20px; accent-color: var(--rose); flex: none; }
.check small { color: var(--ink-soft); margin-left: 6px; font-size: 0.9em; }
.seg { display: flex; flex-wrap: wrap; gap: 8px; }
.plus-one__details { margin-top: 18px; padding: 18px; background: var(--paper); border: 1px solid var(--line); }
.plus-one__details .note { margin: 6px 0 0; font-size: 0.95rem; }
.seg label { position: relative; cursor: pointer; }
.seg input { position: absolute; opacity: 0; inset: 0; }
.seg span { display: inline-flex; align-items: center; min-height: 46px; padding: 8px 18px; border: 1px solid rgba(59, 33, 38, 0.22); border-radius: 99px; background: var(--paper); font-size: 1rem; transition: all 0.2s; }
.seg input:checked + span { background: var(--rose); border-color: var(--rose); color: #FFF6EA; }
.seg input:focus-visible + span { outline: 2px solid var(--rose); outline-offset: 2px; }
.guests { display: grid; gap: 14px; margin: 16px 0; }
.guest { padding: 18px 20px 4px; border: 1px solid var(--line); border-left: 3px solid var(--blush); background: #FFFBF6; }
.guest__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.guest__label { font-family: var(--font-display); font-weight: 600; font-size: 1.2rem; color: var(--rose); }
.guest__remove { border: 0; background: none; cursor: pointer; font-size: 0.85rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-soft); text-decoration: underline; padding: 8px 0 8px 8px; }
.rsvp__more { margin: 0 0 34px; border: 1px solid var(--line); background: #FFFBF6; }
.rsvp__more > summary { cursor: pointer; list-style: none; padding: 16px 18px; font-family: var(--font-display); font-weight: 600; font-size: 1.3rem; color: var(--wine); }
.rsvp__more > summary::-webkit-details-marker { display: none; }
.rsvp__more > summary::after { content: "+"; float: right; color: var(--rose); font-family: var(--font-body); }
.rsvp__more[open] > summary::after { content: "\2212"; }
.rsvp__more > summary small { display: block; font-family: var(--font-body); font-weight: 400; font-size: 0.95rem; color: var(--ink-soft); }
.rsvp__more-body { padding: 0 18px 4px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.rsvp__submit { text-align: center; }
.form-status { margin-top: 14px; min-height: 1.5em; color: var(--ink-soft); }
.form-status.is-error { color: #B3261E; }
.rsvp-thanks { text-align: center; padding: 20px 0; }
.rsvp-thanks img { width: 26px; margin: 0 auto 16px; }
.rsvp-thanks h3 { font-family: var(--font-display); font-weight: 600; font-size: clamp(2rem, 1.6rem + 1.5vw, 2.8rem); color: var(--wine); margin-bottom: 10px; }
.rsvp-thanks p { max-width: 460px; margin-left: auto; margin-right: auto; }
.rsvp-thanks__small { color: var(--ink-soft); font-size: 0.95rem; margin-top: 14px; }
.rsvp-thanks .btn { margin-top: 18px; }
@media (max-width: 640px) {
  .field-row, .field-row--guest:has(.guest__age:not([hidden])) { grid-template-columns: minmax(0, 1fr); }
  .choices { grid-template-columns: 1fr; }
}
.rsvp-fab {
  position: fixed; right: 16px; bottom: calc(22px + env(safe-area-inset-bottom)); z-index: 45;
  display: none; padding: 14px 26px; border-radius: 99px;
  background: var(--rose); color: #FFF6EA;
  font-family: var(--font-display); font-weight: 600; font-size: 0.9rem; letter-spacing: 0.22em; text-decoration: none;
  box-shadow: 0 3px 10px -2px rgba(100, 22, 42, 0.35), 0 1px 2px rgba(100, 22, 42, 0.2);
  transition: opacity 0.25s, transform 0.25s;
}
.rsvp-fab.is-hidden { opacity: 0; transform: translateY(12px); pointer-events: none; }
@media (max-width: 860px) { .rsvp-fab { display: inline-block; } }

/* ---------- Footer ---------- */
.footer { background: var(--wine); color: #F6EADF; text-align: center; padding: 0 0 40px; }
.footer::before { content: ""; display: block; height: 14px; margin-bottom: clamp(56px, 8vw, 84px); background: repeating-linear-gradient(90deg, var(--wine-deep) 0 14px, var(--cream) 0 28px); }
.footer__mono { width: 22px; margin: 0 auto 16px; }
.footer__names { font-family: var(--font-script); font-size: clamp(2.3rem, 1.9rem + 1.6vw, 3.3rem); line-height: 1.1; color: var(--gold); margin-bottom: 8px; }
.footer__names em { font-style: normal; font-size: 0.8em; color: #F6EADF; }
.footer__meta { font-size: 0.8rem; letter-spacing: 0.24em; opacity: 0.85; }
.footer__contact a { color: var(--gold); }
.footer__top { display: inline-block; margin-top: 14px; font-size: 0.76rem; letter-spacing: 0.22em; color: var(--gold); text-decoration: none; }
.footer__credit { margin: 34px var(--gutter) 0; font-size: 0.85rem; opacity: 0.55; }

/* ---------- Motion ---------- */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.9s ease, transform 0.9s ease; }
.js .reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}
@media print {
  .nav, .draft-ribbon, .countdown, .hero__actions, #rsvp, .rsvp-fab { display: none !important; }
}

/* Phones: keep the stationery touches light */
@media (max-width: 760px) {
  .rsvp-section { background: var(--cream); }
  .rsvp-section .title { box-shadow: none; background: transparent; padding: 0; }
}
