* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: #FFFDF5;
  color: #523722;
  font-family: 'IBM Plex Sans Thai', sans-serif;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; }

/* ---------- Header ---------- */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 24px;
  background: rgba(255, 253, 245, 0);
  transition: background .4s, box-shadow .4s, backdrop-filter .4s;
}
.header.is-scrolled {
  background: rgba(255, 253, 245, .92);
  box-shadow: 0 1px 0 #E3D9CC;
  backdrop-filter: blur(8px);
}
.header__logo-link { display: flex; align-items: center; text-decoration: none; }
.header__logo { height: 34px; display: block; }
.header__rsvp-btn {
  font-family: 'Lekton', monospace;
  font-size: 11px;
  letter-spacing: .1em;
  text-decoration: none;
  background: #523722;
  color: #F5E5B4;
  padding: 9px 18px;
  border-radius: 20px;
  transition: background .2s;
}
.header__rsvp-btn:hover { background: #C38381; }

/* ---------- Hero ---------- */
.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  padding: 120px 24px 64px;
}
.hero__eyebrow {
  font-family: 'Lekton', monospace;
  font-size: 12px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #6B5A4C;
}
.hero__mark {
  width: min(412px, 86vw);
  height: auto;
  display: block;
  margin-top: 30px;
}
.hero__sub {
  font-family: 'Lekton', monospace;
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #898C42;
  margin-top: 26px;
}
.hero__date {
  font-family: 'Lekton', monospace;
  font-weight: 700;
  font-size: clamp(30px, 7vw, 44px);
  letter-spacing: .02em;
  margin-top: 30px;
  color: #523722;
}
.hero__date-th {
  font-family: 'IBM Plex Sans Thai', sans-serif;
  font-weight: 700;
  font-size: 20px;
  margin-top: 8px;
  color: #523722;
}
.hero__venue {
  font-family: 'IBM Plex Sans Thai', sans-serif;
  font-size: 15px;
  color: #6B5A4C;
  margin-top: 6px;
}

/* ---------- Puzzle ---------- */
.puzzle-wrap { margin-top: 30px; width: min(358px, 86vw); }
.puzzle-box {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(82, 55, 34, .18);
  background: #EFE6D6;
  overflow: hidden;
  touch-action: manipulation;
}
.puzzle-tile {
  position: absolute;
  width: calc(100% / 3 - 4px);
  height: calc(100% / 3 - 4px);
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  background-size: 300% 300%;
  transition: top .18s ease, left .18s ease, opacity .8s ease;
  box-shadow: 0 2px 6px rgba(82, 55, 34, .15);
}
.puzzle-win {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding: 18px;
  text-align: center;
  background: linear-gradient(180deg, rgba(82, 55, 34, 0) 40%, rgba(82, 55, 34, .72) 100%);
  z-index: 5;
  opacity: 0;
  transition: opacity .8s ease;
}
.puzzle-win__title {
  font-family: 'IBM Plex Sans Thai', sans-serif;
  font-weight: 600;
  font-size: 28px;
  color: #fff;
}
.puzzle-confetti { position: absolute; z-index: 6; pointer-events: none; }

.puzzle-controls { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; }
.puzzle-moves { font-family: 'Lekton', monospace; font-size: 11px; letter-spacing: .08em; color: #6B5A4C; }
.puzzle-moves b { font-weight: 700; }
.puzzle-actions { display: flex; gap: 8px; }
.puzzle-hint {
  font-family: 'Lekton', monospace;
  font-size: 10px;
  letter-spacing: .06em;
  color: #B7A88F;
  margin-top: 8px;
  text-align: center;
}

/* ---------- Buttons ---------- */
.btn {
  font-family: 'Lekton', monospace;
  font-size: 11px;
  border-radius: 20px;
  padding: 7px 14px;
  cursor: pointer;
  border: 1px solid #898C42;
  transition: background .2s, color .2s, border-color .2s;
}
.btn--olive-solid { background: #898C42; color: #fff; }
.btn--olive-outline { background: transparent; color: #898C42; }

/* ---------- Countdown ---------- */
.countdown { display: flex; gap: 22px; justify-content: center; margin-top: 30px; }
.countdown__unit { min-width: 52px; }
.countdown__unit b {
  font-family: 'Lekton', monospace;
  font-size: 26px;
  font-weight: 700;
  display: block;
  line-height: 1;
}
.countdown__unit span {
  font-family: 'Lekton', monospace;
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #898C42;
}

/* ---------- Schedule (celebration + timeline) ---------- */
.schedule { margin-top: 52px; }
.schedule__eyebrow {
  font-family: 'Lekton', monospace;
  font-size: 10px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: #898C42;
  text-align: center;
  margin-bottom: 6px;
}
.schedule__heading {
  font-family: 'IBM Plex Sans Thai', sans-serif;
  font-weight: 600;
  font-size: 20px;
  color: #523722;
  text-align: center;
  margin-bottom: 16px;
}
.schedule__img-wrap {
  width: 100%;
  max-width: 440px;
  margin: 14px auto 0;
}
.schedule__img { width: 100%; height: auto; display: block; }

/* ---------- Sections / dividers ---------- */
.section { padding: 0 0 88px; }
.section__inner { max-width: 1040px; margin: 0 auto; padding: 0 24px; }
.section__inner--map { max-width: 900px; }

.divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 32px;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}
.divider--wide { max-width: 640px; }
.divider__line { flex: 1; height: 1px; background: #E3D9CC; }
.divider__label {
  font-family: 'Lekton', monospace;
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #898C42;
}

/* ---------- RSVP form ---------- */
.rsvp-card {
  max-width: 560px;
  margin: 0 auto;
  background: #F5E5B4;
  border-radius: 18px;
  padding: 40px 34px;
}
.rsvp-card__heading {
  font-family: 'IBM Plex Sans Thai', sans-serif;
  font-weight: 400;
  font-size: clamp(28px, 6vw, 40px);
  text-align: center;
  line-height: 1.1;
}

.rsvp-card form > .field-row { margin-top: 28px; }
.rsvp-card form > .field,
.rsvp-card form > .guest-type-block { margin-top: 24px; }

.field label {
  display: block;
  font-family: 'IBM Plex Sans Thai', sans-serif;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .04em;
  margin-bottom: 7px;
  color: #523722;
}
.field--label-10 > label { margin-bottom: 10px; }
.field--label-14 > label { margin-bottom: 14px; }
.field-row .field:nth-child(2) { margin-top: 18px; }

.field input[type="text"] {
  width: 100%;
  border: 1px solid #e2d3a8;
  background: #fffdf6;
  border-radius: 10px;
  padding: 13px 14px;
  font-family: 'IBM Plex Sans Thai', sans-serif;
  font-size: 15px;
  color: #523722;
}
.field input[type="text"]:focus { outline: none; border-color: #898C42; }
.field input.is-invalid { border-color: #C38381; box-shadow: 0 0 0 3px rgba(195, 131, 129, .25); }

/* ---------- Side picker ---------- */
.side-picker { display: flex; gap: 12px; }
.side-card {
  flex: 1;
  text-align: center;
  border: 1px solid #e2d3a8;
  background: #fffdf6;
  color: #523722;
  border-radius: 14px;
  padding: 24px 12px;
  cursor: pointer;
  transition: .2s;
}
.side-card__icon { font-size: 32px; line-height: 1; }
.side-card__label { margin-top: 8px; font-family: 'IBM Plex Sans Thai', sans-serif; font-size: 14px; font-weight: 500; }
.side-card.is-selected { background: #898C42; color: #fff; border-color: #898C42; }

/* ---------- Guest type ---------- */
.guest-type-block #guest-type-label {
  display: block;
  font-family: 'IBM Plex Sans Thai', sans-serif;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .04em;
  margin-bottom: 10px;
  color: #523722;
}
.guest-type-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.guest-type-card {
  text-align: center;
  border: 1px solid #e2d3a8;
  background: #fffdf6;
  color: #523722;
  border-radius: 12px;
  padding: 16px 8px;
  cursor: pointer;
  transition: .2s;
}
.guest-type-card--wide { grid-column: 1 / 3; }
.guest-type-card__icon { font-size: 22px; }
.guest-type-card__label { margin-top: 6px; font-family: 'IBM Plex Sans Thai', sans-serif; font-size: 13px; }
.guest-type-card.is-selected { background: #898C42; color: #fff; border-color: #898C42; }

/* ---------- Headcount stepper ---------- */
.stepper-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 4px;
  border-bottom: 1px solid #e2d3a8;
}
.stepper-row + .stepper-row { border-bottom: none; }
.stepper-row__label { font-family: 'IBM Plex Sans Thai', sans-serif; font-size: 15px; color: #523722; }
.stepper-row__sublabel { font-family: 'Lekton', monospace; font-size: 11px; color: #B7A88F; }
.stepper { display: flex; align-items: center; gap: 16px; }
.stepper__btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid #898C42;
  font-size: 18px;
  cursor: pointer;
}
.stepper__btn--outline { background: #fffdf6; color: #898C42; }
.stepper__btn--solid { background: #898C42; color: #fff; }
.stepper__val { font-family: 'Lekton', monospace; font-size: 20px; min-width: 22px; text-align: center; color: #523722; }
.guest-summary {
  margin-top: 18px;
  text-align: center;
  font-family: 'Lekton', monospace;
  font-size: 12px;
  letter-spacing: .04em;
  color: #898C42;
  background: #fffdf6;
  border-radius: 10px;
  padding: 12px;
}

.btn--submit {
  width: 100%;
  margin-top: 30px;
  background: #523722;
  color: #F5E5B4;
  border: none;
  border-radius: 30px;
  padding: 16px;
  font-family: 'IBM Plex Sans Thai', sans-serif;
  font-size: 16px;
  letter-spacing: .05em;
  cursor: pointer;
  transition: .25s;
}
.btn--submit:hover { background: #C38381; color: #fff; }
.btn--submit:disabled { opacity: .6; cursor: default; }

.btn--decline {
  width: 100%;
  margin-top: 12px;
  background: transparent;
  color: #8A7A63;
  border: 1px solid #d9c79b;
  border-radius: 30px;
  padding: 14px;
  font-family: 'IBM Plex Sans Thai', sans-serif;
  font-size: 15px;
  cursor: pointer;
  transition: .25s;
}
.btn--decline:hover { background: #EFE0AE; color: #523722; }
.btn--decline:disabled { opacity: .6; cursor: default; }

/* ---------- RSVP success ---------- */
.rsvp-success { text-align: center; padding: 20px 0; }
.rsvp-success__logo { height: 70px; display: block; margin: 0 auto; }
.rsvp-success__title { font-family: 'IBM Plex Sans Thai', sans-serif; font-size: 26px; margin: 14px 0 6px; font-weight: 600; color: #523722; }
.rsvp-success__text { font-size: 16px; color: #6B5A4C; }
.cal-actions {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.btn--calendar,
.btn--calendar-alt {
  border-radius: 30px;
  padding: 13px 26px;
  font-family: 'IBM Plex Sans Thai', sans-serif;
  font-size: 15px;
  text-decoration: none;
  cursor: pointer;
  transition: background .2s, color .2s, border-color .2s;
}
.btn--calendar { background: #898C42; color: #fff; border: none; }
.btn--calendar:hover { background: #C38381; }
.btn--calendar-alt {
  background: transparent;
  color: #6B5A4C;
  border: 1px solid #C9BBA6;
  font-size: 14px;
  padding: 11px 22px;
}
.btn--calendar-alt:hover { border-color: #898C42; color: #898C42; }

/* ---------- Dress code ---------- */
.dress-code {
  max-width: 640px;
  margin: 0 auto;
  padding: 0 24px 60px;
  text-align: center;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 1.1s ease, transform 1.1s ease;
}
.dress-code.is-visible { opacity: 1; transform: none; }
.dress-code__eyebrow {
  font-family: 'Lekton', monospace;
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #523722;
  margin-bottom: 14px;
}
.dress-code__swatches { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }
.swatch { width: 80px; height: 80px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, .06); flex-shrink: 0; }
.swatch--olive { background: #898C42; width: 82px; height: 82px; }
.swatch--rose { background: #C38381; }
.swatch--brown { background: #523722; width: 81px; height: 81px; }
.swatch--cream { background: #F5E5B4; width: 77px; height: 77px; }
.swatch--slate { background: #696969; width: 80px; height: 80px; }
.dress-code__note {
  font-family: 'Lekton', monospace;
  font-size: 11px;
  color: #B7A88F;
  margin-top: 12px;
}
.dress-code__note-en {
  display: inline-block;
  margin-left: 6px;
  color: #0f0f0f;
  font-family: 'Lekton', monospace;
  font-size: 12px;
}

/* ---------- Couple video ---------- */
.couple-video-wrap { line-height: 0; max-width: 640px; margin: 0 auto; padding: 0 24px 88px; }
.couple-video {
  width: 100%;
  max-width: 340px;
  display: block;
  margin: 0 auto;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(82, 55, 34, .15);
}

/* ---------- Getting there / map ---------- */
.venue-photo {
  position: relative;
  width: 100%;
  margin: 0 auto 16px;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(82, 55, 34, .15);
}
.venue-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.venue-photo__caption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 28px 20px 20px;
  background: linear-gradient(180deg, rgba(82, 55, 34, 0) 0%, rgba(82, 55, 34, .75) 100%);
  text-align: center;
}
.venue-photo__name { font-family: 'IBM Plex Sans Thai', sans-serif; font-weight: 600; font-size: 16px; color: #fff; }
.btn--direction {
  display: inline-block;
  margin-top: 12px;
  border-radius: 30px;
  padding: 9px 16px;
  border: 1px solid #F5E5B4;
  background: #F5E5B4;
  color: #523722;
  text-decoration: none;
  transition: background .2s, border-color .2s, color .2s;
}
.btn--direction:hover { background: #C38381; border-color: #C38381; color: #fff; }

.venue-map {
  width: 100%;
  margin: 0 auto;
  aspect-ratio: 2 / 1;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(82, 55, 34, .15);
}
.venue-map img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---------- Footer ---------- */
.footer {
  background: #523722;
  color: #F5E5B4;
  text-align: center;
  padding: 70px 24px;
}
.footer__logo { height: 80px; display: block; margin: 0 auto; }
.footer__meta {
  font-family: 'Lekton', monospace;
  letter-spacing: .14em;
  text-transform: uppercase;
  font-size: 11px;
  margin-top: 18px;
  opacity: .85;
}
.footer__hashtag {
  margin-top: 18px;
  font-family: 'Lekton', monospace;
  letter-spacing: .08em;
  font-size: 18px;
}
