/* ═══════════════════════════════════════════════════════════
   Mei & Nattapart — 28.11.2026
   Design tokens
   ═══════════════════════════════════════════════════════════ */
:root {
  --paper:      #FCFAF6;   /* card surface            */
  --paper-alt:  #F4EEE4;   /* alternating section     */
  --shell:      #EDE6DA;   /* page behind the card    */
  --ink:        #4a473f;   /* primary text            */
  --ink-muted:  #8a8275;   /* secondary text          */
  --green:      #5f7458;   /* accent — links, eyebrow */
  --green-soft: #8c9f86;   /* accent — borders        */
  --gold:       #bd9a5f;   /* ornament                */
  --rose:       #dca9a2;   /* ampersand, date         */
  --line:       #E6DECF;   /* hairlines               */

  --serif: 'Cormorant Garamond', Georgia, serif;
  --sans:  'Jost', 'Noto Sans Thai', 'Noto Sans JP', -apple-system, sans-serif;

  --card-w: 480px;
}

/* ─── Reset & base ─────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--shell);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--green); }
a:hover { color: var(--green-soft); }

img { display: block; max-width: 100%; }

button { font: inherit; }

/* ─── Animations ───────────────────────────────────────── */
@keyframes bob      { 0%,100% { transform: translateY(0); }   50% { transform: translateY(6px); } }
@keyframes kenburns { 0% { transform: scale(1); }            100% { transform: scale(1.09); } }
@keyframes fadeDown { 0% { opacity: 0; transform: translateY(-14px); } 100% { opacity: 1; transform: translateY(0); } }
@keyframes fall {
  0%   { transform: translateY(-24px) translateX(0) rotate(0deg);      opacity: 0; }
  10%  { opacity: .8; }
  100% { transform: translateY(108svh) translateX(40px) rotate(320deg); opacity: .15; }
}

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

/* ═══════════════════════════════════════════════════════════
   Shared pieces
   ═══════════════════════════════════════════════════════════ */
.eyebrow {
  font-family: 'Jost', sans-serif;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: .42em;
  font-size: .66rem;
  color: var(--green);
  margin: 0 0 1.4rem;
}
.eyebrow--light {
  color: rgba(255,255,255,.95);
  text-shadow: 0 1px 10px rgba(60,50,40,.5);
  margin: 0;
}

.h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.9rem;
  margin: .2rem 0 0;
}

.muted { color: var(--ink-muted); font-size: .95rem; }
.tight { margin: .2rem 0 0; }

/* Hairline · dot · hairline ornament */
.rule {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 2rem auto 0;
}
.rule--60 { width: 60%; }
.rule--70 { width: 70%; margin: 1.8rem auto 1.6rem; }
.rule span { height: 1px; flex: 1; background: var(--line); }
.rule i     { width: 7px; height: 7px; border: 1px solid var(--gold); border-radius: 50%; }

/* Outline pill button */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--sans);
  font-weight: 400;
  letter-spacing: .1em;
  text-transform: uppercase;
  font-size: .72rem;
  color: var(--green);
  background: transparent;
  border: 1px solid var(--green-soft);
  padding: 11px 20px;
  border-radius: 40px;
  text-decoration: none;
  cursor: pointer;
  transition: background .25s ease, color .25s ease;
}
.btn:hover { background: var(--green-soft); color: #fff; }
.btn svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.5; }

/* ═══════════════════════════════════════════════════════════
   Opening overlay
   ═══════════════════════════════════════════════════════════ */
.intro {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(165deg, #FCFAF6 0%, #F4EEE4 60%, #EDE6DA 100%);
  text-align: center;
  padding: 30px;
  opacity: 1;
  transition: opacity .9s ease;
}
.intro.is-closing { opacity: 0; }
.intro.is-gone    { display: none; }

.intro__inner { max-width: 340px; }

.monogram {
  width: 108px; height: 108px;
  margin: 0 auto 26px;
  border: 1px solid var(--gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 5px #FCFAF6, 0 0 0 6px #e3d5b8;
}
.monogram span {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.7rem;
  color: var(--gold);
  line-height: 1;
}

.intro .eyebrow { margin: 0 0 10px; }

.intro__names {
  font-family: var(--serif);
  font-size: 2rem;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.3;
}
.intro__date {
  font-family: var(--serif);
  font-size: 1.2rem;
  letter-spacing: .14em;
  color: var(--rose);
  margin-top: 4px;
}
.intro__prompt { font-size: .8rem; color: var(--ink-muted); margin: 0 0 16px; }

.intro__langs { display: flex; justify-content: center; gap: 10px; }

.pill {
  font-weight: 400;
  font-size: .85rem;
  color: var(--green);
  background: transparent;
  border: 1px solid var(--green-soft);
  border-radius: 40px;
  padding: 10px 22px;
  cursor: pointer;
  transition: background .25s ease, color .25s ease;
}
.pill:hover { background: var(--green-soft); color: #fff; }
.pill--th { font-family: 'Noto Sans Thai', sans-serif; }
.pill--en { font-family: 'Jost', sans-serif; letter-spacing: .06em; }
.pill--ja { font-family: 'Noto Sans JP', sans-serif; }

/* ═══════════════════════════════════════════════════════════
   Card shell
   ═══════════════════════════════════════════════════════════ */
.card {
  max-width: var(--card-w);
  margin: 0 auto;
  background: var(--paper);
  position: relative;
  overflow: hidden;
  box-shadow: 0 30px 80px -30px rgba(70,60,45,.45);
}

.section {
  position: relative;
  padding: 70px 30px;
  text-align: center;
}
.section--alt { background: var(--paper-alt); }

/* ═══════════════════════════════════════════════════════════
   Hero
   ═══════════════════════════════════════════════════════════ */
.hero {
  position: relative;
  min-height: 100svh;
  overflow: hidden;
}
.hero__bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(150deg, #d9cdb8 0%, #b9ae9a 45%, #8d9a84 100%);
  background-size: cover;
  background-position: center 28%;
  animation: kenburns 24s ease-in-out infinite alternate;
}
.hero__scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
    rgba(40,34,28,.18) 0%,
    rgba(40,34,28,0)   22%,
    rgba(252,250,246,0) 55%,
    rgba(252,250,246,.94) 100%);
}
.hero__top {
  position: absolute;
  top: 26px;
  left: 0; right: 0;
  text-align: center;
  animation: fadeDown 1.2s ease both;
}
.hero__tick { width: 34px; height: 1px; background: rgba(255,255,255,.7); margin: 10px auto 0; }

.hero__scroll {
  position: absolute;
  bottom: 26px;
  left: 0; right: 0;
  text-align: center;
  color: var(--green);
  font-size: .62rem;
  letter-spacing: .3em;
  text-transform: uppercase;
}
.hero__arrow {
  display: block;
  font-size: 1.2rem;
  margin-top: 4px;
  animation: bob 1.8s ease-in-out infinite;
}

/* Language switcher over the hero */
.langbar {
  position: absolute;
  top: 20px;
  right: 14px;
  display: flex;
  gap: 6px;
}
.langbtn {
  font-size: .62rem;
  padding: 5px 10px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,.55);
  cursor: pointer;
  background: rgba(60,50,40,.38);
  color: #fff;
  transition: background .25s ease, color .25s ease;
}
.langbtn.is-active { background: rgba(255,255,255,.92); color: var(--ink); }
.langbtn--th { font-family: 'Noto Sans Thai', sans-serif; }
.langbtn--en { font-family: 'Jost', sans-serif; letter-spacing: .06em; }
.langbtn--ja { font-family: 'Noto Sans JP', sans-serif; }

/* ═══════════════════════════════════════════════════════════
   Invitation
   ═══════════════════════════════════════════════════════════ */
.parents {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  margin: 0 auto;
  max-width: 420px;
}
.parents__side {
  font-family: var(--serif);
  font-size: 1.15rem;
  color: var(--ink);
  line-height: 1.55;
}
.parents__amp {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.7rem;
  color: var(--gold);
}

.lede {
  color: var(--ink-muted);
  font-size: .95rem;
  margin: 1.8rem 0 2.3rem;
  line-height: 1.7;
}

.couple { font-family: var(--serif); color: var(--ink); }
.couple__bride {
  font-size: clamp(2.1rem, 9vw, 3rem);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: .01em;
}
.couple__amp {
  font-style: italic;
  font-size: 2rem;
  color: var(--rose);
  display: block;
  margin: .35rem 0;
  line-height: 1;
}
.couple__groom {
  font-size: clamp(1.7rem, 7.4vw, 2.4rem);
  font-weight: 500;
  line-height: 1.25;
}

/* ═══════════════════════════════════════════════════════════
   Program
   ═══════════════════════════════════════════════════════════ */
.datestrip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  max-width: 400px;
  margin: 0 auto 1.4rem;
}
.datestrip__dow,
.datestrip__mon { font-family: var(--serif); font-size: 1.35rem; color: var(--ink); }
.datestrip__day {
  font-family: var(--serif);
  font-size: 3.8rem;
  font-weight: 500;
  line-height: 1;
  color: var(--green);
}
.datestrip__bar  { width: 1px; height: 54px; background: var(--line); }
.datestrip__year {
  display: block;
  font-size: .9rem;
  color: var(--ink-muted);
  font-family: 'Jost', sans-serif;
  letter-spacing: .1em;
}

.time { font-family: var(--serif); font-size: 1.5rem; letter-spacing: .05em; }
.venueline { margin-top: 1.4rem; font-size: 1.02rem; }
.venueline strong { font-weight: 400; font-family: var(--serif); font-size: 1.35rem; }

.countdown {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin: 2.4rem auto 0;
}
.countdown__cell { min-width: 58px; }
.countdown__num  { font-family: var(--serif); font-size: 2rem; color: var(--ink); line-height: 1; }
.countdown__lbl  {
  font-size: .6rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-top: 6px;
}

.dress { margin-top: 2.2rem; }
.dress .eyebrow { margin: 0 0 .9rem; }
.dress__swatches { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }
.dress__swatches span {
  width: 26px; height: 26px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.06);
}

/* ═══════════════════════════════════════════════════════════
   Gallery
   ═══════════════════════════════════════════════════════════ */
.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 1.6rem;
}
.grid figure {
  margin: 0;
  min-width: 0;
  overflow: hidden;
  border-radius: 6px;
  cursor: pointer;
  background: var(--paper-alt);
}
.grid__wide { grid-column: span 2; }
.grid figure:not(.grid__wide) { height: 180px; }
.grid figure:not(.grid__wide) img { height: 100%; object-fit: cover; }
.grid img {
  width: 100%;
  height: auto;
  transition: transform .5s ease;
}
.grid figure:hover img { transform: scale(1.03); }

/* Graceful state when a photo file is missing */
.img-missing {
  min-height: 180px;
  background: linear-gradient(150deg, #EFE7DA 0%, #E3DCCC 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}
.img-missing::after {
  content: attr(data-placeholder);
  font-family: var(--serif);
  font-style: italic;
  font-size: .95rem;
  color: var(--ink-muted);
}
.img-missing img { display: none; }

/* ═══════════════════════════════════════════════════════════
   Location
   ═══════════════════════════════════════════════════════════ */
.addr { margin: 0; font-size: .92rem; }

.mapframe {
  margin: 1.6rem 0 1.4rem;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 12px 30px -16px rgba(70,60,45,.4);
}
.mapframe iframe {
  display: block;
  width: 100%;
  height: 300px;
  border: 0;
  filter: saturate(.9);
}

.notice {
  max-width: 380px;
  margin: 1.8rem auto 0;
  border: 1px solid #e3c9c3;
  background: #faf1ef;
  border-radius: 10px;
  padding: 16px 20px;
}
.notice p { font-size: .86rem; color: var(--ink); margin: 0; line-height: 1.65; }

/* ═══════════════════════════════════════════════════════════
   How to get there
   ═══════════════════════════════════════════════════════════ */
.boat {
  margin: 0 auto 1rem;
  max-width: 380px;
  overflow: hidden;
  border-radius: 10px;
  box-shadow: 0 12px 30px -16px rgba(70,60,45,.4);
}
.boat__caption {
  font-size: .88rem;
  color: var(--ink);
  max-width: 340px;
  margin: 0 auto 2rem;
  line-height: 1.65;
}

.routes {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 380px;
  margin: 0 auto;
  text-align: left;
}
.route {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 18px 20px;
  background: var(--paper);
}
.route__head { display: flex; align-items: baseline; gap: 10px; }
.route__n {
  font-family: var(--serif);
  font-size: 1.5rem;
  color: var(--gold);
  line-height: 1;
}
.route__title { font-size: .95rem; font-weight: 400; color: var(--ink); line-height: 1.5; }
.route__desc  { font-size: .86rem; color: var(--ink-muted); margin: .5rem 0 0; line-height: 1.65; }
.route__times {
  font-family: var(--serif);
  font-size: .98rem;
  color: var(--green);
  margin: .55rem 0 0;
  letter-spacing: .03em;
  line-height: 1.7;
}
.route .mapframe { margin: 1rem 0 .2rem; box-shadow: 0 10px 24px -14px rgba(70,60,45,.4); }
.route .mapframe iframe { height: 200px; }
.route__cta { display: flex; justify-content: center; margin-top: .9rem; }
.route__cta .btn { padding: 10px 18px; }

/* ═══════════════════════════════════════════════════════════
   Timeline
   ═══════════════════════════════════════════════════════════ */
.timeline { max-width: 320px; margin: 0 auto; text-align: left; }
.tl-row {
  display: grid;
  grid-template-columns: 56px 14px 1fr;
  gap: 12px;
  align-items: start;
}
.tl-row__time {
  font-family: var(--serif);
  font-size: 1.15rem;
  color: var(--green);
  text-align: right;
  line-height: 1.4;
}
.tl-row__spine {
  display: flex;
  flex-direction: column;
  align-items: center;
  align-self: stretch;
}
.tl-row__dot {
  width: 8px; height: 8px;
  border: 1px solid var(--gold);
  border-radius: 50%;
  margin-top: 7px;
  flex: 0 0 auto;
  background: var(--paper);
}
.tl-row__line { width: 1px; flex: 1; background: var(--line); margin-top: 4px; }
.tl-row:last-child .tl-row__line { background: transparent; }
.tl-row__label {
  font-size: .92rem;
  color: var(--ink);
  padding-bottom: 1.35rem;
  line-height: 1.5;
}

/* ═══════════════════════════════════════════════════════════
   Footer
   ═══════════════════════════════════════════════════════════ */
.footer {
  padding: 52px 30px 120px;
  text-align: center;
  background: var(--paper);
}
.footer__names { font-family: var(--serif); font-size: 1.6rem; color: var(--green); }
.footer__date  { font-family: var(--serif); font-style: italic; font-size: 1.3rem; color: var(--rose); line-height: 1.4; }
.footer__note  { margin-top: 1.4rem; font-size: .82rem; line-height: 1.7; }

/* ═══════════════════════════════════════════════════════════
   Bottom navigation
   ═══════════════════════════════════════════════════════════ */
.nav {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: max(14px, env(safe-area-inset-bottom));
  z-index: 60;
  width: min(var(--card-w), calc(100% - 28px));
  background: rgba(255,255,255,.86);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--line);
  border-radius: 40px;
  display: flex;
  justify-content: space-around;
  padding: 9px 6px;
  box-shadow: 0 14px 34px -16px rgba(70,60,45,.5);
}
.nav a {
  flex: 1;
  text-align: center;
  text-decoration: none;
  color: var(--ink-muted);
  font-size: .56rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  transition: color .25s ease;
}
.nav a:hover,
.nav a.is-active { color: var(--green); }
.nav svg {
  width: 19px; height: 19px;
  display: block;
  margin: 0 auto 3px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.4;
}

/* ═══════════════════════════════════════════════════════════
   Petals
   ═══════════════════════════════════════════════════════════ */
.petals {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 50;
  overflow: hidden;
}
.petal {
  position: absolute;
  top: -24px;
  width: 16px;
  height: 16px;
  animation: fall linear infinite;
}

/* ═══════════════════════════════════════════════════════════
   Lightbox
   ═══════════════════════════════════════════════════════════ */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(40,34,28,.92);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 80;
  padding: 24px;
  cursor: pointer;
}
.lightbox.is-open { display: flex; }
.lightbox img { max-width: 100%; max-height: 88vh; border-radius: 4px; }
.lightbox__close {
  position: absolute;
  top: 18px; right: 20px;
  background: none;
  border: none;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
  line-height: 1;
}
