/* ===========================================================================
   Siam Vow Estate — styles.css
   Drama-luxe: blush ground + gold accents + plum/magenta "uplight" accent.
   Hand-written, no framework. Design tokens up top.
   ========================================================================== */

:root {
  /* palette */
  --ground:    #FBF2EF;   /* blush ivory page canvas */
  --cream:     #FFFBF8;
  --blush:     #F3DAD3;
  --blush-2:   #EAC4BC;
  --rose:      #CE8E8B;   /* dusty rose */
  --gold:      #C9A24B;
  --gold-deep: #A07C2C;
  --plum:      #4E2148;   /* deep purple, the "uplight" dark */
  --magenta:   #A8408A;
  --ink:       #2B2724;   /* warm charcoal text */
  --ink-soft:  #6A625C;
  --line:      #E7D6CF;

  /* type */
  --serif: "Cormorant Garamond", "Noto Serif Thai", Georgia, serif;
  --sans:  "Noto Sans Thai", "Inter", system-ui, -apple-system, sans-serif;

  /* rhythm */
  --maxw: 1200px;
  --pad: clamp(20px, 5vw, 64px);
  --r: 14px;
  --shadow: 0 18px 50px -24px rgba(78, 33, 72, 0.35);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--ground);
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
  overflow-x: hidden;
}

h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.08; margin: 0; letter-spacing: -0.01em; }
:lang(th) h1, :lang(th) h2, :lang(th) h3, [data-th] { } /* Thai serif handled by font stack */
p { margin: 0 0 1em; }
a { color: inherit; }
img { max-width: 100%; display: block; }
.thai-font { font-family: "Noto Serif Thai", var(--serif); }

.wrap { max-width: var(--maxw); margin: 0 auto; padding-inline: var(--pad); }
.eyebrow {
  font-family: var(--sans); font-size: 12px; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--gold-deep); font-weight: 600; margin: 0 0 14px;
}
.section { padding-block: clamp(56px, 9vw, 120px); }
.section--tint { background: linear-gradient(180deg, var(--cream), var(--blush)); }
.section--plum { background: radial-gradient(120% 140% at 50% -20%, #6a2e63, var(--plum)); color: #F6E9F2; }
.section--plum .eyebrow { color: #E7B6D8; }

/* ---- buttons ---------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--sans); font-weight: 600; font-size: 15px;
  padding: 13px 26px; border-radius: 999px; border: 1px solid transparent;
  cursor: pointer; text-decoration: none; transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
  min-height: 44px;
}
.btn:active { transform: translateY(1px); }
.btn--gold { background: linear-gradient(135deg, #D9B254, var(--gold-deep)); color: #2A2113; box-shadow: 0 10px 24px -10px rgba(160,124,44,.6); }
.btn--gold:hover { transform: translateY(-2px); }
.btn--ghost { background: transparent; border-color: currentColor; color: inherit; }
.btn--ghost:hover { background: rgba(255,255,255,.12); }
.btn--block { width: 100%; justify-content: center; }

/* ---- nav -------------------------------------------------------------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px var(--pad); transition: background .3s ease, box-shadow .3s ease, padding .3s ease;
}
.nav[data-scrolled="true"] { background: rgba(251,242,239,.92); backdrop-filter: blur(10px); box-shadow: 0 1px 0 var(--line); }
.nav__brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.nav[data-scrolled="false"] .nav__brand { color: #fff; }
.nav__emblem { width: 30px; height: 30px; flex: none; }
.nav__name { font-family: var(--serif); font-weight: 600; font-size: 18px; letter-spacing: .14em; text-transform: uppercase; }
.nav__links { display: flex; gap: 26px; align-items: center; }
.nav__links a { font-size: 14px; text-decoration: none; opacity: .9; }
.nav__links a:hover { opacity: 1; }
.nav[data-scrolled="false"] .nav__links a { color: #fff; }
.nav__right { display: flex; align-items: center; gap: 14px; }
.langtoggle {
  font-family: var(--sans); font-weight: 600; font-size: 13px; letter-spacing: .04em;
  background: rgba(255,255,255,.15); border: 1px solid currentColor; color: inherit;
  padding: 7px 12px; border-radius: 999px; cursor: pointer; min-height: 36px;
}
.nav[data-scrolled="false"] .langtoggle { color: #fff; }
.nav[data-scrolled="true"] .langtoggle { color: var(--ink); background: transparent; }
@media (max-width: 860px) { .nav__links { display: none; } }

/* ---- hero ------------------------------------------------------------- */
.hero { position: relative; min-height: 100svh; display: grid; place-items: center; overflow: hidden; color: #fff; text-align: center; }
.hero__media, .hero__media video, .hero__media img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}
.hero__scrim {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(28,12,26,.55) 0%, rgba(28,12,26,.18) 35%, rgba(28,12,26,.55) 100%),
    radial-gradient(120% 90% at 50% 120%, rgba(78,33,72,.7), transparent 60%);
}
.hero__inner { position: relative; z-index: 2; padding: var(--pad); max-width: 880px; }
.hero__emblem { width: 64px; height: 64px; margin: 0 auto 18px; filter: drop-shadow(0 4px 12px rgba(0,0,0,.4)); }
.hero__name { font-size: clamp(40px, 8vw, 92px); letter-spacing: .04em; text-shadow: 0 6px 30px rgba(0,0,0,.4); }
.hero__th { font-family: "Noto Serif Thai", var(--serif); font-size: clamp(18px, 3.4vw, 30px); font-weight: 500; opacity: .95; margin-top: 6px; }
.hero__tag { font-size: clamp(16px, 2.4vw, 22px); margin: 18px auto 28px; max-width: 620px; opacity: .96; }
.hero__cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero__scrolldown { position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 2; font-size: 12px; letter-spacing: .2em; text-transform: uppercase; opacity: .8; animation: bob 2.4s ease-in-out infinite; }
@keyframes bob { 0%,100%{ transform: translate(-50%,0);} 50%{ transform: translate(-50%,8px);} }

/* ---- reveal ----------------------------------------------------------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s ease, transform .8s ease; }
.reveal.is-in { opacity: 1; transform: none; }

/* ---- generic blocks --------------------------------------------------- */
.lead { font-size: clamp(20px, 3vw, 30px); font-family: var(--serif); max-width: 740px; }
.muted { color: var(--ink-soft); }
.grid { display: grid; gap: 22px; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 820px){ .grid--3 { grid-template-columns: 1fr; } .grid--2 { grid-template-columns: 1fr; } }

.card { background: var(--cream); border: 1px solid var(--line); border-radius: var(--r); padding: 26px; box-shadow: var(--shadow); }
.perk { text-align: left; }
.perk__free { display: inline-block; font-family: var(--sans); font-weight: 700; font-size: 12px; letter-spacing: .12em; color: var(--gold-deep); background: rgba(201,162,75,.14); padding: 5px 11px; border-radius: 999px; margin-bottom: 14px; }
.perk h3 { font-size: 24px; margin-bottom: 8px; }
.urgency { margin-top: 26px; font-family: var(--serif); font-size: 19px; color: var(--magenta); }

/* spaces / figures */
.figrow { display: grid; grid-template-columns: 1.3fr 1fr; gap: 18px; }
.figrow figure { margin: 0; border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow); position: relative; }
.figrow img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 3/2; transition: transform .8s ease; }
.figrow figure:hover img { transform: scale(1.04); }
.figrow figcaption { position: absolute; left: 0; bottom: 0; right: 0; padding: 16px; color: #fff; font-size: 14px; background: linear-gradient(transparent, rgba(0,0,0,.6)); }
@media (max-width: 820px){ .figrow { grid-template-columns: 1fr; } }

/* gallery */
.gallery { columns: 3 240px; column-gap: 16px; }
.gallery figure { margin: 0 0 16px; border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow); break-inside: avoid; }
.gallery img { width: 100%; transition: transform .6s ease; }
.gallery figure:hover img { transform: scale(1.05); }

/* packages */
.pkg { display: grid; grid-template-columns: repeat(3,1fr); gap: 18px; }
.pkg .card { display: flex; flex-direction: column; }
.pkg__price { font-family: var(--serif); font-size: 30px; color: var(--gold-deep); margin: 6px 0 4px; }
.confirm { font-size: 11px; letter-spacing: .08em; color: #B0418A; border: 1px dashed #d9a; padding: 2px 7px; border-radius: 6px; display: inline-block; }
@media (max-width: 820px){ .pkg { grid-template-columns: 1fr; } }

/* ---- calendar --------------------------------------------------------- */
.cal { background: var(--cream); border: 1px solid var(--line); border-radius: var(--r); padding: 22px; box-shadow: var(--shadow); max-width: 460px; }
.cal__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.cal__title { font-family: var(--serif); font-size: 22px; }
.cal__nav { background: var(--blush); border: none; width: 38px; height: 38px; border-radius: 999px; cursor: pointer; font-size: 18px; color: var(--ink); }
.cal__nav:disabled { opacity: .35; cursor: not-allowed; }
.cal__dow, .cal__grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal__dow span { text-align: center; font-size: 11px; letter-spacing: .04em; color: var(--ink-soft); padding-bottom: 6px; }
.cal__day {
  aspect-ratio: 1; border: 1px solid transparent; border-radius: 10px; background: #fff;
  font-family: var(--sans); font-size: 14px; cursor: pointer; position: relative;
  display: grid; place-items: center; color: var(--ink); transition: transform .12s ease;
}
.cal__day .dot { position: absolute; bottom: 6px; width: 6px; height: 6px; border-radius: 999px; }
.cal__day[data-state="open"]   { border-color: #cfe6cf; }
.cal__day[data-state="open"] .dot   { background: #4f9d62; }
.cal__day[data-state="hold"]   { background: #FBF3E2; color: #9a7b2e; }
.cal__day[data-state="hold"] .dot   { background: var(--gold); }
.cal__day[data-state="booked"] { background: #F4E5E5; color: #b98; cursor: not-allowed; text-decoration: line-through; }
.cal__day[data-state="booked"] .dot { background: var(--rose); }
.cal__day[data-empty="true"], .cal__day[data-past="true"] { background: transparent; border: none; color: #cdbfb8; cursor: not-allowed; }
.cal__day[data-state="open"]:hover { transform: translateY(-2px); border-color: var(--gold); }
.cal__day[aria-pressed="true"] { background: linear-gradient(135deg,#D9B254,var(--gold-deep)); color: #fff; box-shadow: 0 8px 18px -8px rgba(160,124,44,.7); }
.cal__legend { display: flex; gap: 16px; margin-top: 14px; font-size: 12px; color: var(--ink-soft); flex-wrap: wrap; }
.cal__legend i { display: inline-block; width: 9px; height: 9px; border-radius: 999px; margin-right: 6px; vertical-align: middle; }
.cal__msg { margin-top: 12px; font-size: 13px; color: var(--magenta); min-height: 18px; }
.cal__msg[data-ok="true"] { color: #4f9d62; }

/* ---- form ------------------------------------------------------------- */
.form { display: grid; gap: 16px; max-width: 520px; }
.field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; font-family: var(--sans); font-size: 15px; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); min-height: 44px;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--gold); border-color: var(--gold); }
.field[data-invalid="true"] input, .field[data-invalid="true"] select { border-color: #c0392b; }
.field__err { color: #c0392b; font-size: 12px; margin-top: 5px; min-height: 14px; }
.form__success { background: linear-gradient(135deg, #fff, var(--blush)); border: 1px solid var(--gold); border-radius: var(--r); padding: 28px; box-shadow: var(--shadow); }
.form__success h3 { color: var(--gold-deep); font-size: 26px; margin-bottom: 8px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 560px){ .two { grid-template-columns: 1fr; } }

/* ---- map -------------------------------------------------------------- */
.mapwrap { display: grid; grid-template-columns: 1.2fr .8fr; gap: 26px; align-items: stretch; }
@media (max-width: 860px){ .mapwrap { grid-template-columns: 1fr; } }
.mapcanvas { position: relative; border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow); background: #EAF0E6; min-height: 360px; }
.mapcanvas svg { width: 100%; height: 100%; display: block; }
.pin {
  position: absolute; transform: translate(-50%, -100%); cursor: pointer; border: none; background: none; padding: 0;
}
.pin__dot { width: 24px; height: 24px; }
.pin__label {
  position: absolute; bottom: 130%; left: 50%; transform: translateX(-50%) translateY(6px);
  background: var(--ink); color: #fff; font-size: 12px; white-space: nowrap; padding: 5px 10px;
  border-radius: 8px; opacity: 0; pointer-events: none; transition: opacity .2s ease, transform .2s ease;
}
.pin:hover .pin__label, .pin:focus-visible .pin__label { opacity: 1; transform: translateX(-50%) translateY(0); }
.pin:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 999px; }
.mapside { display: flex; flex-direction: column; gap: 14px; }
.addr { background: var(--cream); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; }
.addr h3 { font-size: 20px; margin-bottom: 6px; }
.copybtn { font-size: 13px; background: var(--blush); border: none; border-radius: 999px; padding: 7px 14px; cursor: pointer; min-height: 36px; }
.copybtn[data-copied="true"] { background: #cfe6cf; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font-size: 12px; background: rgba(201,162,75,.14); color: var(--gold-deep); padding: 6px 12px; border-radius: 999px; font-weight: 600; }

/* ---- sticky cta + footer --------------------------------------------- */
.sticky {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  display: grid; grid-template-columns: 1fr 1fr; gap: 1px;
  background: var(--line); box-shadow: 0 -8px 24px -12px rgba(0,0,0,.3);
}
.sticky a { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 56px; text-decoration: none; font-weight: 600; font-size: 15px; }
.sticky a.call { background: var(--ink); color: #fff; }
.sticky a.line { background: #06C755; color: #fff; }
.sticky a[data-confirm="true"] { background: #b9a; }
@media (min-width: 769px){ .sticky { display: none; } }
.has-sticky { padding-bottom: 56px; }
@media (min-width: 769px){ .has-sticky { padding-bottom: 0; } }

.contact { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
@media (max-width: 760px){ .contact { grid-template-columns: 1fr; } }
.footer { background: var(--plum); color: #EBD7E6; padding: 40px var(--pad); text-align: center; }
.footer .nav__name { color: #fff; }
.footer a { color: #EBD7E6; }

/* ---- reduced motion --------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
  .hero__scrolldown { animation: none; }
  .figrow img, .gallery img { transition: none; }
}
