/* Thai Palm — 2026 redesign prototype. Plain modern CSS, no framework. */
/* Self-hosted Google Fonts (latin subset), OFL licensed */
@font-face {
  font-family: 'Fraunces';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fraunces-italic-0.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fraunces-normal-1.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("assets/fraunces-normal-1.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Noto Sans';
  font-style: normal;
  font-weight: 400;
  font-stretch: 100%;
  font-display: swap;
  src: url("assets/noto-sans-normal-2.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Noto Sans';
  font-style: normal;
  font-weight: 500;
  font-stretch: 100%;
  font-display: swap;
  src: url("assets/noto-sans-normal-2.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Noto Sans';
  font-style: normal;
  font-weight: 600;
  font-stretch: 100%;
  font-display: swap;
  src: url("assets/noto-sans-normal-2.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@layer reset, base, layout, components, utilities;

@layer reset {
  *, *::before, *::after { box-sizing: border-box; }
  * { margin: 0; }
  img { display: block; max-width: 100%; height: auto; }
  ul[role="list"] { list-style: none; padding: 0; }
}

@layer base {
  :root {
    color-scheme: light;
    --teak: #3b1d14;
    --teak-2: #5a2c1e;
    --gold: #b8913f;
    --bronze: #7d5f20;
    --gold-2: #d9b871;
    --cream: #faf6ef;
    --sand: #f1e8da;
    --ink: #2a1d17;
    --muted: #6d5c52;
    --radius: 1.25rem;
    --shadow: 0 1px 2px rgb(59 29 20 / .06), 0 12px 32px -12px rgb(59 29 20 / .25);
    --font-display: "Fraunces", "Noto Serif Thai", Georgia, serif;
    --font-body: "Noto Sans", "Noto Sans Thai", system-ui, sans-serif;
    --step-0: clamp(1rem, .96rem + .2vw, 1.125rem);
    --step-1: clamp(1.2rem, 1.1rem + .5vw, 1.45rem);
    --step-2: clamp(1.6rem, 1.3rem + 1.4vw, 2.4rem);
    --step-3: clamp(2.2rem, 1.6rem + 3vw, 4.2rem);
    --space: clamp(4rem, 3rem + 5vw, 7.5rem);
  }
  @view-transition { navigation: auto; }
  html { scroll-behavior: smooth; scroll-padding-top: 5rem; -webkit-text-size-adjust: 100%; }
  @media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
  body { font: 400 var(--step-0)/1.65 var(--font-body); color: var(--ink); background: var(--cream); text-wrap: pretty; }
  h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.1; color: var(--teak); text-wrap: balance; }
  h1 { font-size: var(--step-3); font-weight: 400; letter-spacing: -.02em; }
  h2 { font-size: var(--step-2); letter-spacing: -.01em; }
  h3 { font-size: var(--step-1); }
  a { color: var(--teak-2); text-underline-offset: .2em; }
  :focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 4px; }
}

@layer layout {
  .wrap { width: min(100% - 2.5rem, 72rem); margin-inline: auto; }
  .section { padding-block: var(--space); }
  .section-head { max-width: 40rem; margin-bottom: 3rem; display: grid; gap: .75rem; }
  .section-head p:not(.eyebrow) { color: var(--muted); }
}

@layer components {
  .skip { position: absolute; left: 1rem; top: -4rem; background: var(--teak); color: #fff; padding: .5rem 1rem; border-radius: .5rem; z-index: 99; }
  .skip:focus { top: 1rem; }
  .eyebrow { font-size: .8rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--bronze); }
  .prices .eyebrow, .site-footer .eyebrow { color: var(--gold-2); }

  /* Header */
  .site-header { position: sticky; top: 0; z-index: 50; background: rgb(250 246 239 / .82); backdrop-filter: blur(14px) saturate(1.4); border-bottom: 1px solid rgb(59 29 20 / .08); }
  .header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 4.25rem; }
  .brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; color: var(--teak); }
  .brand strong { display: block; font-family: var(--font-display); font-size: 1.3rem; line-height: 1; }
  .brand small { font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
  .menu-btn { display: grid; place-items: center; inline-size: 2.75rem; block-size: 2.75rem; border: 0; border-radius: 50%; background: var(--sand); color: var(--teak); cursor: pointer; }

  /* Mobile nav = native popover (no JS needed) */
  .nav[popover] { inset: 4.75rem 1rem auto auto; margin: 0; border: 0; padding: 1rem; border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); display: none; flex-direction: column; gap: .25rem; min-width: 14rem;
    opacity: 0; translate: 0 -.5rem; transition: opacity .2s, translate .2s, display .2s allow-discrete, overlay .2s allow-discrete; }
  .nav[popover]:popover-open { display: flex; opacity: 1; translate: 0 0; }
  @starting-style { .nav[popover]:popover-open { opacity: 0; translate: 0 -.5rem; } }
  .nav a:not(.btn) { padding: .7rem .75rem; border-radius: .6rem; text-decoration: none; font-weight: 500; color: var(--ink); }
  .nav a:not(.btn):hover { background: var(--sand); }
  .nav .btn { margin-top: .5rem; }

  @media (width >= 56rem) {
    .menu-btn { display: none; }
    .nav[popover] { all: unset; display: flex; align-items: center; gap: 1.75rem; }
    .nav a:not(.btn) { padding: 0; }
    .nav a:not(.btn):hover { background: none; color: var(--bronze); }
    .nav .btn { margin: 0; }
  }

  /* Buttons */
  .btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; padding: .8rem 1.4rem; border-radius: 999px; font-weight: 600; font-size: .95rem; text-decoration: none; transition: background .2s, transform .2s, box-shadow .2s; }
  .btn:hover { transform: translateY(-1px); }
  .btn-lg { padding: 1rem 1.75rem; font-size: 1rem; }
  .btn-gold { background: var(--bronze); color: #fff; box-shadow: 0 8px 20px -8px rgb(125 95 32 / .7); }
  .btn-gold:hover { background: #664d19; }
  .btn-ghost { color: #fff; border: 1px solid rgb(255 255 255 / .55); backdrop-filter: blur(6px); }
  .btn-ghost:hover { background: rgb(255 255 255 / .12); }
  .btn-outline { border: 1.5px solid var(--teak); color: var(--teak); }
  .btn-outline:hover { background: var(--teak); color: #fff; }
  .cta-row { display: flex; flex-wrap: wrap; gap: .75rem; }

  /* Hero */
  .hero { position: relative; isolation: isolate; min-height: min(92svh, 52rem); display: grid; align-items: end; color: #fff; overflow: clip; }
  .hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
  .hero::after { content: ""; position: absolute; inset: 0; z-index: -1;
    background: linear-gradient(180deg, rgb(30 14 9 / .15) 0%, rgb(30 14 9 / .55) 45%, rgb(30 14 9 / .92) 100%); }
  .hero-content { padding-block: 7rem 3.5rem; display: grid; gap: 1.5rem; max-width: 72rem; }
  .hero h1 { color: #fff; max-width: 20ch; }
  .hero h1 em { font-style: italic; color: var(--gold-2); }
  .hero .eyebrow { color: var(--gold-2); }
  .lead { max-width: 38rem; font-size: var(--step-1); line-height: 1.5; color: rgb(255 255 255 / .88); font-weight: 400; }
  .facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; margin-top: 1rem; max-width: 36rem; border-radius: 1rem; overflow: hidden; background: rgb(255 255 255 / .18); }
  .facts li { padding: .9rem 1rem; background: rgb(30 14 9 / .45); backdrop-filter: blur(8px); }
  .facts strong { display: block; font-family: var(--font-display); font-size: 1.35rem; color: var(--gold-2); }
  .facts span { font-size: .8rem; color: rgb(255 255 255 / .8); }
  .open-status { justify-self: start; font-size: .85rem; font-weight: 600; padding: .35rem .85rem; border-radius: 999px; background: rgb(255 255 255 / .14); }
  .open-status::before { content: "●"; margin-right: .45rem; }
  .open-status[data-state="open"]::before { color: #7ee2a8; }
  .open-status[data-state="closed"]::before { color: #f0a68f; }

  /* Treatment cards — container queries adapt each card to its own width */
  .cards { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 20rem), 1fr)); }
  .card { container-type: inline-size; background: #fff; border-radius: var(--radius); overflow: clip; box-shadow: var(--shadow); display: flex; flex-direction: column; transition: transform .3s, box-shadow .3s; }
  .card:hover { transform: translateY(-4px); }
  .card img { aspect-ratio: 3 / 2; object-fit: cover; width: 100%; transition: scale .6s; }
  .card:hover img { scale: 1.04; }
  .card-body { padding: 1.5rem; display: grid; gap: .6rem; align-content: start; flex: 1; }
  .card-body p:not(.price) { color: var(--muted); font-size: .95rem; }
  .tag { justify-self: start; font-size: .72rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--teak-2); background: var(--sand); padding: .25rem .65rem; border-radius: 999px; }
  .price { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: auto; padding-top: .75rem; border-top: 1px dashed rgb(59 29 20 / .15); }
  .price span { font-weight: 600; font-size: .9rem; color: var(--teak); }
  .price span + span::before { content: "·"; margin-right: .5rem; color: var(--gold); }
  @container (width > 30rem) { .card-body { padding: 2rem; } }

  /* Prices */
  .prices { background: var(--teak); color: #f4ebe0; background-image: radial-gradient(circle at 85% 10%, rgb(184 145 63 / .22), transparent 45%); }
  .prices h2 { color: #fff; }
  .prices-grid { display: grid; gap: 3rem; align-items: start; }
  .prices-grid > div { display: grid; gap: 1rem; justify-items: start; max-width: 28rem; }
  .prices-grid > div p:not(.eyebrow) { color: rgb(244 235 224 / .78); }
  @media (width >= 56rem) { .prices-grid { grid-template-columns: 1fr 1.4fr; } }
  .price-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; background: rgb(255 255 255 / .05); border-radius: var(--radius); overflow: hidden; }
  .price-table th, .price-table td { padding: 1rem .9rem; text-align: right; border-bottom: 1px solid rgb(255 255 255 / .1); }
  .price-table th[scope="row"], .price-table thead th:first-child { text-align: left; font-weight: 500; }
  .price-table thead th { font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; color: var(--gold-2); font-weight: 600; }
  .price-table td { font-family: var(--font-display); font-size: 1.15rem; color: #fff; }
  .price-table tbody tr:hover { background: rgb(255 255 255 / .05); }
  .price-table tfoot td { font-family: var(--font-body); font-size: .85rem; color: var(--gold-2); text-align: left; border: 0; }
  @media (width < 34rem) { .price-table th, .price-table td { padding: .8rem .5rem; font-size: .9rem; } .price-table td { font-size: 1rem; } }

  /* Benefits */
  .benefits { background: var(--sand) url("assets/herbs.webp") center / cover; background-blend-mode: soft-light; }
  .benefit-list { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); counter-reset: b; }
  .benefit-list li { counter-increment: b; background: rgb(255 255 255 / .82); backdrop-filter: blur(6px); border-radius: var(--radius); padding: 1.5rem; display: grid; gap: .5rem; align-content: start; }
  .benefit-list li::before { content: "0" counter(b); font-family: var(--font-display); color: var(--bronze); font-size: 1.1rem; }
  .benefit-list p { color: var(--muted); font-size: .95rem; }

  /* Visit */
  .visit-grid { display: grid; gap: 2rem; }
  .shopfront { border-radius: var(--radius); overflow: clip; box-shadow: var(--shadow); }
  .shopfront img { width: 100%; aspect-ratio: 1400 / 520; object-fit: cover; }
  .visit-card { display: grid; gap: 1.25rem; background: #fff; padding: clamp(1.5rem, 4vw, 2.75rem); border-radius: var(--radius); box-shadow: var(--shadow); }
  .visit-card dl { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); }
  .visit-card dt { font-size: .75rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--bronze); }
  .visit-card address { font-style: normal; }
  .visit-card small { color: var(--muted); }
  .visit-card dd a { font-weight: 600; font-size: 1.15rem; }

  /* Footer + mobile call bar */
  .site-footer { background: #24110b; color: rgb(244 235 224 / .75); padding-block: 3rem 6.5rem; font-size: .92rem; }
  .site-footer a { color: var(--gold-2); }
  .site-footer address { font-style: normal; }
  .footer-grid { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); }
  .footer-grid > div { display: grid; gap: .35rem; }
  .footer-brand { font-family: var(--font-display); font-size: 1.25rem; color: #fff; }
  .site-footer nav { display: grid; gap: .5rem; align-content: start; }
  .site-footer nav a { text-decoration: none; }
  .site-footer nav a:hover { text-decoration: underline; }
  .footer-bottom { margin-top: 2rem; padding-top: 1.25rem; border-top: 1px solid rgb(255 255 255 / .1); font-size: .82rem; }
  .call-bar { position: fixed; inset: auto .75rem .75rem; z-index: 60; display: flex; align-items: center; justify-content: center; gap: .6rem; padding: 1rem; border-radius: 999px; background: var(--bronze); color: #fff; font-weight: 600; text-decoration: none; box-shadow: 0 12px 30px -10px rgb(30 14 9 / .6); }
  @media (width >= 56rem) { .call-bar { display: none; } .site-footer { padding-bottom: 2rem; } }

  /* Scroll-driven reveal (progressive; ignored by older browsers) */
  @supports (animation-timeline: view()) {
    @media (prefers-reduced-motion: no-preference) {
      .card, .benefit-list li, .visit-card { animation: reveal linear both; animation-timeline: view(); animation-range: entry 0% entry 40%; }
      @keyframes reveal { from { opacity: 0; translate: 0 2rem; } }
    }
  }
}

@layer components {
  .nav a[aria-current="page"] { color: var(--bronze); font-weight: 600; }
  .card { position: relative; }
  .card h3 a { color: inherit; text-decoration: none; }
  .stretched::after { content: ""; position: absolute; inset: 0; }
  .stretched:focus-visible { outline: none; }
  .card:has(.stretched:focus-visible) { outline: 3px solid var(--gold); outline-offset: 3px; }
  .more-link { margin-top: 2.5rem; text-align: center; }
  .section-tight { padding-block: clamp(2.5rem, 2rem + 3vw, 4.5rem); }

  /* Inner page hero + breadcrumbs */
  .page-hero { background: var(--sand); padding-block: clamp(2.5rem, 2rem + 4vw, 5rem); border-bottom: 1px solid rgb(59 29 20 / .08);
    background-image: radial-gradient(circle at 90% 0%, rgb(184 145 63 / .18), transparent 50%); }
  .page-hero .wrap { display: grid; gap: 1rem; }
  .page-hero h1 { font-size: var(--step-3); }
  .page-hero .lead { color: var(--muted); font-size: var(--step-1); max-width: 42rem; }
  .breadcrumbs ol { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; font-size: .85rem; color: var(--muted); }
  .breadcrumbs li + li::before { content: "/"; margin-right: .5rem; color: var(--gold); }

  /* Treatments page */
  .toc ul { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 3rem; }
  .toc a { display: inline-block; padding: .5rem 1rem; border-radius: 999px; background: #fff; box-shadow: var(--shadow); text-decoration: none; font-size: .9rem; font-weight: 500; }
  .toc a:hover { background: var(--teak); color: #fff; }
  .treatments { display: grid; gap: clamp(3rem, 2rem + 4vw, 5.5rem); }
  .treatment { display: grid; gap: 1.5rem 3rem; align-items: center; scroll-margin-top: 5.5rem; }
  .treatment-media img { border-radius: var(--radius); box-shadow: var(--shadow); aspect-ratio: 3 / 2; object-fit: cover; width: 100%; }
  .treatment-text { display: grid; gap: .9rem; justify-items: start; }
  .treatment-text p { color: var(--muted); }
  .treatment-text .intro { color: var(--ink); font-size: var(--step-1); line-height: 1.5; }
  .price-lg { border-top: 0; padding-top: 0; }
  .price-lg span { font-size: 1.05rem; background: var(--sand); padding: .35rem .8rem; border-radius: 999px; }
  .price-lg span + span::before { content: none; }
  @media (width >= 56rem) {
    .treatment { grid-template-columns: 1fr 1.1fr; }
    .treatment:nth-child(even) .treatment-media { order: 2; }
  }
  .credit { margin-top: 3rem; font-size: .8rem; color: var(--muted); }

  /* Booking */
  .steps-wrap { display: grid; gap: 2rem; justify-items: start; }
  .steps { list-style: none; padding: 0; display: grid; gap: 1rem; width: 100%; grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); counter-reset: s; }
  .steps li { counter-increment: s; background: #fff; border-radius: var(--radius); padding: 1.75rem; box-shadow: var(--shadow); display: grid; gap: .5rem; align-content: start; }
  .steps li::before { content: counter(s); display: grid; place-items: center; inline-size: 2.25rem; block-size: 2.25rem; border-radius: 50%; background: var(--bronze); color: #fff; font-weight: 600; }
  .steps p { color: var(--muted); }
  .map { border-radius: var(--radius); overflow: clip; box-shadow: var(--shadow); background: var(--sand); }
  .map iframe { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; min-height: 18rem; border: 0; }

  /* Prose (privacy) */
  .prose { max-width: 46rem; display: grid; gap: 1rem; }
  .prose h2 { font-size: var(--step-1); margin-top: 1.25rem; }
  .prose ul { padding-left: 1.25rem; display: grid; gap: .5rem; }
  .prose .updated { color: var(--muted); font-size: .9rem; }

  /* 404 */
  .notfound { padding-block: clamp(4rem, 3rem + 8vw, 9rem); }
  .notfound .wrap { display: grid; gap: 1.25rem; justify-items: start; }
  .notfound .lead { color: var(--muted); }
}

@layer utilities {
  .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}
