/* =========================================================================
   Tableory — public site
   Palette is authoritative: Charcoal #1F1F1F · Bronze #B08D6B ·
   Soft White #F9F7F4 · Warm Gray #A7A29A · Olive #3C4A3F
   Espresso #3B2F28 · Sand #DCCDBF · Sage #7F8C7A · Stone #EAE6E1

   Contrast rules baked into the tokens:
   - Bronze #B08D6B on Soft White = 2.86:1 — never used for text on light.
   - Warm Gray #A7A29A on Soft White = 2.37:1 — never used for text on light.
   - Bronze Deep #8A6A4A = 4.63:1 on Soft White  -> bronze text on light.
   - Warm Gray 700 #6E6A63 = 5.03:1 on Soft White -> muted text on light.
   - On Charcoal: Bronze 5.39 · Warm Gray 6.50 · Sand 10.62 — all fine.
   ========================================================================= */

/* ---------- 1. Tokens: full light palette on bare :root ---------- */
:root {
  color-scheme: light;

  /* raw brand */
  --charcoal:    #1F1F1F;
  --bronze:      #B08D6B;
  --bronze-deep: #8A6A4A;
  --soft-white:  #F9F7F4;
  --warm-gray:   #A7A29A;
  --warm-gray-700: #6E6A63;
  --olive:       #3C4A3F;
  --espresso:    #3B2F28;
  --sand:        #DCCDBF;
  --sage:        #7F8C7A;
  --stone:       #EAE6E1;

  /* semantic — light */
  --bg:          #F9F7F4;
  --bg-elev:     #FFFFFF;
  --bg-sunken:   #F1EEE9;
  --bg-invert:   #1F1F1F;
  --text:        #1F1F1F;
  --text-muted:  #6E6A63;
  --text-invert: #F9F7F4;
  --text-on-invert-muted: #A7A29A;
  --accent:      #8A6A4A;   /* bronze text on light */
  --accent-line: #B08D6B;   /* bronze as a non-text rule / fill */
  --accent-soft: #EFE5DA;
  --border:      #DFD9D1;
  --border-strong: #C9C1B6;
  --btn-bg:      #1F1F1F;
  --btn-fg:      #F9F7F4;
  --btn-bg-hover:#3B2F28;
  --focus:       #8A6A4A;
  --shadow-sm:   0 1px 2px rgba(31,31,31,.05), 0 6px 18px -12px rgba(31,31,31,.28);
  --shadow-md:   0 2px 4px rgba(31,31,31,.05), 0 24px 48px -28px rgba(31,31,31,.35);
  --header-bg:   rgba(249,247,244,.86);
  --darkband-edge: transparent;

  /* type */
  --font-display: "Outfit", "Trebuchet MS", "Segoe UI", system-ui, sans-serif;
  --font-body: "IBM Plex Sans Thai", "IBM Plex Sans", "Noto Sans Thai",
               "Leelawadee UI", "Sarabun", system-ui, -apple-system,
               "Segoe UI", Roboto, Arial, sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", "IBM Plex Mono", Menlo, Consolas, monospace;

  /* scale */
  --step--1: clamp(.8125rem, .78rem + .16vw, .875rem);
  --step-0:  clamp(1rem, .96rem + .2vw, 1.0625rem);
  --step-1:  clamp(1.125rem, 1.06rem + .32vw, 1.25rem);
  --step-2:  clamp(1.375rem, 1.26rem + .54vw, 1.625rem);
  --step-3:  clamp(1.625rem, 1.42rem + .95vw, 2.125rem);
  --step-4:  clamp(2rem, 1.62rem + 1.8vw, 3rem);
  --step-5:  clamp(2.375rem, 1.78rem + 2.8vw, 4rem);

  --wrap: 1140px;
  --gutter: clamp(1.15rem, 4vw, 2.5rem);
  --section-y: clamp(4rem, 9vw, 7.5rem);
  --radius: 4px;
  --radius-lg: 8px;
}

/* ---------- 2. Dark: system preference, unless the user forced light ---- */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg:          #1F1F1F;
    --bg-elev:     #272522;
    --bg-sunken:   #191817;
    --bg-invert:   #F9F7F4;
    --text:        #F9F7F4;
    --text-muted:  #A7A29A;
    --text-invert: #1F1F1F;
    --text-on-invert-muted: #6E6A63;
    --accent:      #B08D6B;
    --accent-line: #B08D6B;
    --accent-soft: #2E2A26;
    --border:      #3A3733;
    --border-strong: #514C46;
    --btn-bg:      #B08D6B;
    --btn-fg:      #1F1F1F;
    --btn-bg-hover:#DCCDBF;
    --focus:       #DCCDBF;
    --shadow-sm:   0 1px 2px rgba(0,0,0,.4), 0 6px 18px -12px rgba(0,0,0,.6);
    --shadow-md:   0 2px 4px rgba(0,0,0,.4), 0 24px 48px -28px rgba(0,0,0,.75);
    --header-bg:   rgba(31,31,31,.86);
    --darkband-edge: #3A3733;
  }
}

/* ---------- 3. Dark: explicitly chosen ---------- */
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg:          #1F1F1F;
  --bg-elev:     #272522;
  --bg-sunken:   #191817;
  --bg-invert:   #F9F7F4;
  --text:        #F9F7F4;
  --text-muted:  #A7A29A;
  --text-invert: #1F1F1F;
  --text-on-invert-muted: #6E6A63;
  --accent:      #B08D6B;
  --accent-line: #B08D6B;
  --accent-soft: #2E2A26;
  --border:      #3A3733;
  --border-strong: #514C46;
  --btn-bg:      #B08D6B;
  --btn-fg:      #1F1F1F;
  --btn-bg-hover:#DCCDBF;
  --focus:       #DCCDBF;
  --shadow-sm:   0 1px 2px rgba(0,0,0,.4), 0 6px 18px -12px rgba(0,0,0,.6);
  --shadow-md:   0 2px 4px rgba(0,0,0,.4), 0 24px 48px -28px rgba(0,0,0,.75);
  --header-bg:   rgba(31,31,31,.86);
  --darkband-edge: #3A3733;
}

/* ---------- 4. Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.78;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.16;
  letter-spacing: -.012em;
  margin: 0 0 .6em;
  text-wrap: balance;
}
h1 { font-size: var(--step-5); }
h2 { font-size: var(--step-4); }
h3 { font-size: var(--step-2); }
h4 { font-size: var(--step-1); }
p  { margin: 0 0 1.1em; }
p:last-child, ul:last-child, ol:last-child { margin-bottom: 0; }
ul, ol { margin: 0 0 1.1em; padding-inline-start: 1.25em; }
li + li { margin-top: .4em; }
a { color: inherit; text-underline-offset: .22em; text-decoration-thickness: 1px; }
strong, b { font-weight: 600; }
hr { border: 0; border-top: 1px solid var(--border); margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }

/* Focus — always visible, never removed */
:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: 2px;
}
.on-dark :focus-visible { outline-color: var(--sand); }

::selection { background: var(--bronze); color: #1F1F1F; }

/* ---------- 5. Layout ---------- */
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.wrap-narrow { max-width: 760px; }
.section { padding-block: var(--section-y); }
.section--tight { padding-block: clamp(3rem, 6vw, 4.5rem); }
.section--sunken { background: var(--bg-sunken); }
.scroll-x { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* Dark bands keep their own colours in both themes */
.on-dark {
  background: var(--charcoal);
  color: var(--soft-white);
  /* in dark mode the page is charcoal too: keep the band's edge readable */
  border-block: 1px solid var(--darkband-edge);
}
.on-dark .muted, .on-dark .lede { color: var(--warm-gray); }
.on-dark .eyebrow { color: var(--bronze); }
.on-dark a { color: var(--sand); }
.on-olive { background: var(--olive); color: var(--soft-white); }
.on-olive .eyebrow { color: var(--sand); }
.on-olive .muted { color: var(--sand); }

/* ---------- 6. Type helpers ---------- */
.eyebrow {
  font-family: var(--font-display);
  font-size: .75rem;
  font-weight: 500;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 1.1rem;
  display: block;
  line-height: 1.5;
}
.eyebrow--rule { display: flex; align-items: center; gap: .85rem; }
.eyebrow--rule::after {
  content: ""; flex: 1; height: 1px; background: var(--border-strong); max-width: 90px;
}
.on-dark .eyebrow--rule::after, .on-olive .eyebrow--rule::after { background: rgba(249,247,244,.32); }
.lede { font-size: var(--step-1); color: var(--text-muted); max-width: 62ch; }
.muted { color: var(--text-muted); }
.small { font-size: var(--step--1); }
.num {
  font-family: var(--font-display);
  font-variant-numeric: tabular-nums;
  letter-spacing: -.02em;
}

/* ---------- 7. Logo mark (pure CSS, 174 x 213 geometry) ---------- */
.mark {
  position: relative;
  width: var(--mark-size, 30px);
  aspect-ratio: 174 / 213;
  flex: none;
  color: var(--accent-line);
}
.mark > i { position: absolute; background: currentColor; display: block; }
.mark .bar    { left: 0;     width: 100%;  top: 0;     height: 10.8%; }
.mark .rule-l { left: 0;     width: 43.2%; top: 22.1%; height: 6.6%; }
.mark .rule-r { left: 56.8%; width: 43.2%; top: 22.1%; height: 6.6%; }
.mark .stem-l { left: 34.9%; width: 8.3%;  top: 22.1%; bottom: 0; }
.mark .stem-r { left: 56.8%; width: 8.3%;  top: 22.1%; bottom: 0; }
/* Solid variant: hairlines break below ~28px */
.mark.solid .rule-l, .mark.solid .rule-r { display: none; }
.mark.solid .bar { height: 20%; }
.mark.solid .stem-l { left: 34.9%; width: 30.2%; top: 20%; }
.mark.solid .stem-r { display: none; }

.brand { display: inline-flex; align-items: center; gap: .7rem; text-decoration: none; color: inherit; }
.brand .wordmark {
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 500;
  letter-spacing: .26em;
  text-transform: uppercase;
  line-height: 1;
  padding-inline-end: .26em; /* balance the trailing tracking */
  color: var(--text);
}
.on-dark .brand .wordmark, .site-footer .brand .wordmark { color: var(--soft-white); }

/* ---------- 8. Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .82rem 1.5rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: .9375rem;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .18s ease, color .18s ease, border-color .18s ease, transform .18s ease;
}
.btn:hover { background: var(--btn-bg-hover); }
.btn:active { transform: translateY(1px); }
.btn--ghost {
  background: transparent; color: var(--text); border-color: var(--border-strong);
}
.btn--ghost:hover { background: transparent; border-color: var(--text); }
.btn--sm { padding: .55rem 1rem; font-size: .875rem; }
/* On permanently-dark bands the palette is fixed, not token-driven */
.on-dark .btn, .on-olive .btn { background: var(--bronze); color: var(--charcoal); }
.on-dark .btn:hover, .on-olive .btn:hover { background: var(--sand); }
.on-dark .btn--ghost, .on-olive .btn--ghost {
  background: transparent; color: var(--soft-white); border-color: rgba(249,247,244,.34);
}
.on-dark .btn--ghost:hover, .on-olive .btn--ghost:hover { border-color: var(--soft-white); background: transparent; }
.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; }

/* ---------- 9. Header ---------- */
.skip-link {
  position: absolute; left: 50%; top: 0; transform: translate(-50%, -140%);
  z-index: 100; background: var(--charcoal); color: var(--soft-white);
  padding: .7rem 1.2rem; border-radius: 0 0 var(--radius) var(--radius);
  text-decoration: none;
}
.skip-link:focus { transform: translate(-50%, 0); }

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--header-bg);
  -webkit-backdrop-filter: saturate(150%) blur(12px);
  backdrop-filter: saturate(150%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex; align-items: center; gap: 1rem;
  min-height: 68px;
}
.site-nav { margin-inline-start: auto; }
.nav-list {
  display: flex; align-items: center; gap: clamp(1rem, 2.2vw, 1.9rem);
  list-style: none; margin: 0; padding: 0;
}
.nav-list li + li { margin-top: 0; }
.nav-list a {
  text-decoration: none; color: var(--text-muted); font-size: .9375rem;
  padding-block: .35rem; transition: color .18s ease;
}
.nav-list a:hover { color: var(--text); }
.nav-list a[aria-current="page"] { color: var(--text); font-weight: 500; }
.header-tools { display: flex; align-items: center; gap: .5rem; margin-inline-start: 1rem; }

.toggle-group {
  display: inline-flex; border: 1px solid var(--border-strong); border-radius: var(--radius);
  overflow: hidden;
}
.toggle-group button {
  background: transparent; border: 0; cursor: pointer;
  font-family: var(--font-display); font-size: .75rem; font-weight: 500;
  letter-spacing: .1em; text-transform: uppercase;
  padding: .4rem .6rem; color: var(--text-muted); line-height: 1.6;
}
.toggle-group button[aria-pressed="true"] { background: var(--text); color: var(--bg); }
.toggle-group button:focus-visible { outline-offset: -2px; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; padding: 0;
  background: transparent; border: 1px solid var(--border-strong);
  border-radius: var(--radius); cursor: pointer; color: var(--text-muted);
}
.icon-btn:hover { color: var(--text); border-color: var(--text); }
.icon-btn svg { width: 17px; height: 17px; }
:root[data-theme="dark"] .theme-icon-dark, .theme-icon-light { display: block; }
.theme-icon-dark { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-icon-light { display: none; }
  :root:not([data-theme="light"]) .theme-icon-dark { display: block; }
}
:root[data-theme="dark"] .theme-icon-light { display: none; }
:root[data-theme="dark"] .theme-icon-dark { display: block; }
:root[data-theme="light"] .theme-icon-light { display: block; }
:root[data-theme="light"] .theme-icon-dark { display: none; }

.nav-toggle { display: none; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  .site-nav {
    display: none; margin: 0;
    position: absolute; left: 0; right: 0; top: 100%;
    background: var(--bg); border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
  }
  .site-nav.open { display: block; }
  .nav-list {
    flex-direction: column; align-items: stretch; gap: 0;
    padding: .5rem var(--gutter) 1.25rem;
  }
  .nav-list li { border-top: 1px solid var(--border); }
  .nav-list a { display: block; padding: .95rem 0; font-size: 1.0625rem; }
  .nav-list .nav-cta { margin-top: 1rem; border-top: 0; }
  .nav-list .nav-cta .btn { width: 100%; }
  .header-tools { margin-inline-start: auto; }
}

/* ---------- 10. Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background: var(--charcoal); color: var(--soft-white);
  padding-block: clamp(4.5rem, 11vw, 9rem);
  border-top: 0; /* the sticky header already draws a line here */
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(120% 90% at 78% 8%, rgba(176,141,107,.20), transparent 58%),
    radial-gradient(90% 70% at 4% 96%, rgba(60,74,63,.42), transparent 62%);
  pointer-events: none;
}
.hero > * { position: relative; }
.hero h1 { font-size: var(--step-5); font-weight: 500; letter-spacing: -.02em; max-width: 17ch; }
.hero .lede { color: var(--sand); max-width: 54ch; font-size: var(--step-1); }
.hero-grid { display: grid; gap: clamp(2.5rem, 6vw, 4rem); }
@media (min-width: 900px) {
  .hero-grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); align-items: center; }
}
.hero-meta {
  margin-top: 2.5rem; padding-top: 1.5rem;
  border-top: 1px solid rgba(249,247,244,.16);
  color: var(--warm-gray); font-size: var(--step--1);
}
.hero-meta strong { color: var(--sand); font-weight: 500; }

/* Hero side panel: a small honest "what a booking looks like" card */
.panel {
  background: rgba(249,247,244,.04);
  border: 1px solid rgba(249,247,244,.14);
  border-radius: var(--radius-lg);
  padding: clamp(1.25rem, 3vw, 1.75rem);
  backdrop-filter: blur(2px);
}
.panel-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 1rem;
  padding-bottom: .9rem; margin-bottom: .9rem;
  border-bottom: 1px solid rgba(249,247,244,.14);
}
.panel-title { font-family: var(--font-display); font-size: 1rem; font-weight: 500; }
.tag {
  font-family: var(--font-display); font-size: .6875rem; font-weight: 500;
  letter-spacing: .12em; text-transform: uppercase;
  padding: .25rem .55rem; border-radius: 2px;
  background: rgba(176,141,107,.18); color: var(--sand);
  border: 1px solid rgba(176,141,107,.4); white-space: nowrap;
}
.kv { display: grid; grid-template-columns: auto 1fr; gap: .55rem 1rem; font-size: var(--step--1); }
.kv dt { color: var(--warm-gray); }
.kv dd { margin: 0; text-align: end; color: var(--soft-white); }
.kv dd.pos { color: var(--sage); }
.meter {
  margin-top: 1.1rem; height: 6px; border-radius: 3px;
  background: rgba(249,247,244,.12); overflow: hidden;
}
.meter > span { display: block; height: 100%; background: var(--bronze); border-radius: 3px; }
.meter-label {
  display: flex; justify-content: space-between; gap: 1rem;
  margin-top: .55rem; font-size: .75rem; color: var(--warm-gray);
}

/* ---------- 11. Generic grids & cards ---------- */
.grid { display: grid; gap: clamp(1rem, 2.4vw, 1.5rem); }
.grid-2 { grid-template-columns: 1fr; }
@media (min-width: 680px) { .grid-2 { grid-template-columns: repeat(2, minmax(0,1fr)); } }

.feature {
  position: relative;
  padding-top: 1.6rem;
  border-top: 1px solid var(--border);
}
.feature .idx {
  font-family: var(--font-display); font-size: .75rem; letter-spacing: .14em;
  color: var(--accent); display: block; margin-bottom: .75rem;
  font-variant-numeric: tabular-nums;
}
.feature h3 { font-size: var(--step-1); margin-bottom: .45rem; }
.feature p { color: var(--text-muted); margin-bottom: 0; font-size: var(--step-0); }
.feature-grid { display: grid; gap: clamp(1.75rem, 3.4vw, 2.6rem) clamp(1.75rem, 4vw, 3.25rem); }
@media (min-width: 700px) { .feature-grid { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (min-width: 1000px) { .feature-grid { grid-template-columns: repeat(3, minmax(0,1fr)); } }

/* Section header block */
.section-head { max-width: 68ch; margin-bottom: clamp(2.25rem, 5vw, 3.5rem); }
.section-head h1, .section-head h2 { margin-bottom: .5em; }
.page-title { font-size: var(--step-4); }

/* Two-column compare */
.compare { display: grid; gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
@media (min-width: 760px) { .compare { grid-template-columns: 1fr 1fr; } }
.compare > div { background: var(--bg-elev); padding: clamp(1.5rem, 3.4vw, 2.25rem); }
.compare .them { background: var(--bg-sunken); }
.compare h3 { font-size: var(--step-1); margin-bottom: 1rem; }
.compare ul { list-style: none; padding: 0; margin: 0; }
.compare li { padding-inline-start: 1.6rem; position: relative; color: var(--text-muted); }
.compare li + li { margin-top: .7rem; }
.compare li::before {
  content: ""; position: absolute; inset-inline-start: 0; top: .72em;
  width: .7rem; height: 1px; background: var(--border-strong);
}
.compare .us li::before { background: var(--accent-line); height: 2px; top: .68em; }

/* Stat line */
.stat-row { display: grid; gap: clamp(1.5rem, 4vw, 2.5rem); }
@media (min-width: 700px) { .stat-row { grid-template-columns: repeat(3, minmax(0,1fr)); } }
.stat .n { font-family: var(--font-display); font-size: var(--step-4); font-weight: 500; line-height: 1.05; display: block; letter-spacing: -.02em; }
.stat p { margin: .6rem 0 0; font-size: var(--step--1); }

/* Math table */
.table { width: 100%; border-collapse: collapse; font-size: var(--step-0); min-width: 420px; }
.table th, .table td { text-align: start; padding: .8rem 1rem; border-bottom: 1px solid var(--border); }
.table th { font-family: var(--font-display); font-weight: 500; font-size: var(--step--1); letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted); }
.table td:last-child, .table th:last-child { text-align: end; font-variant-numeric: tabular-nums; }
.table tr:last-child td { border-bottom: 0; font-weight: 600; }
.on-dark .table th, .on-dark .table td,
.on-olive .table th, .on-olive .table td { border-color: rgba(249,247,244,.16); }
.on-dark .table th { color: var(--warm-gray); }
.on-olive .table th { color: var(--sand); } /* warm gray on olive is only 3.7:1 */

/* Venue list */
.venues { display: grid; gap: 1px; background: var(--border); border-block: 1px solid var(--border); }
@media (min-width: 700px) { .venues { grid-template-columns: 1fr 1fr; } }
.venue { background: var(--bg); padding: clamp(1.5rem, 3.4vw, 2.25rem); }
.venue h3 { font-size: var(--step-2); margin-bottom: .2rem; }
.venue .where { color: var(--accent); font-size: var(--step--1); margin-bottom: .9rem; display: block; }
.venue p { color: var(--text-muted); margin: 0; }

/* ---------- 12. Pricing ---------- */
.tiers { display: grid; gap: clamp(1rem, 2.4vw, 1.5rem); align-items: start; }
@media (min-width: 900px) { .tiers { grid-template-columns: repeat(3, minmax(0,1fr)); } }
.tier {
  background: var(--bg-elev); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: clamp(1.5rem, 3.2vw, 2rem);
  display: flex; flex-direction: column; height: 100%;
}
.tier--featured {
  border-color: var(--accent-line); box-shadow: var(--shadow-md);
  position: relative;
}
.tier--featured::before {
  content: ""; position: absolute; inset-inline: -1px; top: -1px; height: 3px;
  background: var(--accent-line); border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.tier-name { font-family: var(--font-display); font-size: var(--step-2); margin: 0 0 .25rem; font-weight: 500; }
.tier-for { color: var(--text-muted); font-size: var(--step--1); margin: 0 0 1.4rem; min-height: 3em; }
.price { display: flex; align-items: baseline; gap: .4rem; flex-wrap: wrap; margin-bottom: .35rem; }
.price .amount { font-family: var(--font-display); font-size: var(--step-4); font-weight: 500; letter-spacing: -.03em; line-height: 1; }
.price .per { color: var(--text-muted); font-size: var(--step--1); }
.tier .note { font-size: var(--step--1); color: var(--text-muted); margin-bottom: 1.6rem; }
.tier ul { list-style: none; padding: 0; margin: 0 0 1.75rem; font-size: var(--step-0); }
.tier li { position: relative; padding-inline-start: 1.6rem; color: var(--text-muted); }
.tier li + li { margin-top: .6rem; }
.tier li::before {
  content: ""; position: absolute; inset-inline-start: 0; top: .62em;
  width: .55rem; height: .55rem; border-inline-start: 1.5px solid var(--accent-line);
  border-bottom: 1.5px solid var(--accent-line); transform: rotate(-45deg);
}
.tier .btn { margin-top: auto; }
.tier-foot { margin-top: 1rem; font-size: var(--step--1); color: var(--text-muted); text-align: center; }

.pill-row { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.75rem; }
.pill {
  border: 1px solid var(--border-strong); border-radius: 100px;
  padding: .4rem .95rem; font-size: var(--step--1); color: var(--text-muted);
}
.on-dark .pill { border-color: rgba(249,247,244,.28); color: var(--sand); }

/* FAQ */
.faq { border-top: 1px solid var(--border); }
.faq details { border-bottom: 1px solid var(--border); }
.faq summary {
  cursor: pointer; list-style: none; padding: 1.25rem 2.5rem 1.25rem 0;
  position: relative; font-family: var(--font-display); font-size: var(--step-1);
  font-weight: 500;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; inset-inline-end: .5rem; top: 1.75rem;
  width: 10px; height: 10px; border-inline-end: 1.5px solid var(--accent-line);
  border-bottom: 1.5px solid var(--accent-line); transform: rotate(45deg);
  transition: transform .2s ease;
}
.faq details[open] summary::after { transform: rotate(-135deg); top: 1.95rem; }
.faq .answer { padding: 0 0 1.5rem; color: var(--text-muted); max-width: 72ch; }

/* ---------- 13. Forms ---------- */
.form-grid { display: grid; gap: 1.1rem; }
@media (min-width: 640px) { .form-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; } }
.field label {
  display: block; font-family: var(--font-display); font-size: var(--step--1);
  font-weight: 500; margin-bottom: .45rem;
}
.field .hint { color: var(--text-muted); font-weight: 400; }
.field input, .field select, .field textarea {
  width: 100%; padding: .78rem .9rem;
  background: var(--bg-elev); color: var(--text);
  border: 1px solid var(--border-strong); border-radius: var(--radius);
  transition: border-color .16s ease, box-shadow .16s ease;
}
.field textarea { min-height: 140px; resize: vertical; }
.field input:hover, .field textarea:hover, .field select:hover { border-color: var(--text-muted); }
.field input:focus-visible, .field textarea:focus-visible, .field select:focus-visible {
  outline: 2px solid var(--focus); outline-offset: 1px; border-color: var(--focus);
}
.notice {
  border: 1px dashed var(--border-strong); border-radius: var(--radius);
  padding: 1rem 1.15rem; color: var(--text-muted); font-size: var(--step--1);
  background: var(--bg-sunken);
}
.contact-grid { display: grid; gap: clamp(2rem, 5vw, 3.5rem); align-items: start; }
@media (min-width: 940px) { .contact-grid { grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); } }
.side-card {
  background: var(--bg-elev); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: clamp(1.5rem, 3.2vw, 2rem);
}
.side-card + .side-card { margin-top: 1.25rem; }
.side-card h2, .side-card h3 { font-size: var(--step-1); margin-bottom: .6rem; }
.side-card dl { margin: 0; }
.side-card dt {
  font-family: var(--font-display); font-size: .6875rem; letter-spacing: .16em;
  text-transform: uppercase; color: var(--text-muted); margin-top: 1.1rem;
}
.side-card dt:first-child { margin-top: 0; }
.side-card dd { margin: .2rem 0 0; }

/* ---------- 14. CTA band & footer ---------- */
.cta-band { text-align: center; }
.cta-band h2 { max-width: 20ch; margin-inline: auto; }
.cta-band .lede { margin-inline: auto; margin-bottom: 2rem; }
.cta-band .btn-row { justify-content: center; }

.site-footer { border-top: 1px solid var(--darkband-edge); background: var(--charcoal); color: var(--soft-white); padding-block: clamp(3rem, 6vw, 4.5rem) 2rem; }
.footer-grid { display: grid; gap: 2.5rem; }
@media (min-width: 800px) { .footer-grid { grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, .8fr)); } }
.site-footer h2 { font-family: var(--font-display); font-size: .6875rem; letter-spacing: .18em; text-transform: uppercase; color: var(--warm-gray); margin: 0 0 1rem; font-weight: 500; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li + li { margin-top: .6rem; }
.site-footer a { color: var(--sand); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.footer-tagline { color: var(--warm-gray); max-width: 34ch; margin-top: 1rem; font-size: var(--step--1); }
.footer-bottom {
  margin-top: clamp(2.5rem, 5vw, 3.5rem); padding-top: 1.5rem;
  border-top: 1px solid rgba(249,247,244,.16);
  display: flex; flex-wrap: wrap; gap: .75rem 1.5rem; justify-content: space-between;
  color: var(--warm-gray); font-size: var(--step--1);
}

/* ---------- 15. Language switching (no JS needed to read the page) ------ */
:root[data-lang="th"] [data-i18n="en"] { display: none; }
:root[data-lang="en"] [data-i18n="th"] { display: none; }

/* ---------- 16. Thai typography guards — keep last so they win ---------- *
   Thai has no word spaces: tracking destroys readability and pushes
   vowels / tone marks off their consonants. Never letter-space Thai. */
/* :not(:root) so <html lang="th"> does not strip tracking from the whole page.
   Bilingual content is authored as sibling elements, each carrying its own
   lang attribute, so a Thai element never wraps a Latin one. */
[lang="th"]:not(:root), [lang="th"]:not(:root) * { letter-spacing: normal; }
[lang="th"]:not(:root) { line-height: 1.78; }
h1[lang="th"], h2[lang="th"], h3[lang="th"], h4[lang="th"],
.tier-name[lang="th"], .panel-title[lang="th"] { line-height: 1.34; }
.eyebrow[lang="th"] { text-transform: none; font-size: .8125rem; line-height: 1.6; }
.num[lang="th"], [lang="th"]:not(:root) .num { letter-spacing: -.02em; }
.wordmark[lang="th"] { letter-spacing: .26em; }

/* ---------- 17. Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- 18. Print ---------- */
@media print {
  .site-header, .cta-band, .nav-toggle { display: none; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
  body { background: #fff; color: #000; }
}
