/* นวล สกินคลินิก — porcelain, blush, one clay accent; the skin diagram is the hero of the page. */
@font-face { font-family: "Noto Serif Thai"; src: url("../assets/fonts/noto-serif-thai-thai-300.woff2") format("woff2"); font-weight: 300 500; font-display: swap; unicode-range: U+0E01-0E5B, U+200C-200D, U+25CC; }
@font-face { font-family: "Noto Serif Thai"; src: url("../assets/fonts/noto-serif-thai-latin-300.woff2") format("woff2"); font-weight: 300 500; font-display: swap; unicode-range: U+0000-00FF, U+2000-206F, U+20AC; }
@font-face { font-family: "IBM Plex Sans Thai"; src: url("../assets/fonts/ibm-plex-sans-thai-thai-400.woff2") format("woff2"); font-weight: 400; font-display: swap; unicode-range: U+0E01-0E5B, U+200C-200D, U+25CC; }
@font-face { font-family: "IBM Plex Sans Thai"; src: url("../assets/fonts/ibm-plex-sans-thai-latin-400.woff2") format("woff2"); font-weight: 400; font-display: swap; unicode-range: U+0000-00FF, U+2000-206F; }
@font-face { font-family: "IBM Plex Sans Thai"; src: url("../assets/fonts/ibm-plex-sans-thai-thai-500.woff2") format("woff2"); font-weight: 500; font-display: swap; unicode-range: U+0E01-0E5B, U+200C-200D, U+25CC; }
@font-face { font-family: "IBM Plex Sans Thai"; src: url("../assets/fonts/ibm-plex-sans-thai-latin-500.woff2") format("woff2"); font-weight: 500; font-display: swap; unicode-range: U+0000-00FF, U+2000-206F; }
@font-face { font-family: "IBM Plex Sans Thai"; src: url("../assets/fonts/ibm-plex-sans-thai-thai-600.woff2") format("woff2"); font-weight: 600; font-display: swap; unicode-range: U+0E01-0E5B, U+200C-200D, U+25CC; }
@font-face { font-family: "IBM Plex Sans Thai"; src: url("../assets/fonts/ibm-plex-sans-thai-latin-600.woff2") format("woff2"); font-weight: 600; font-display: swap; unicode-range: U+0000-00FF, U+2000-206F; }

:root {
  --paper: #f8f3ee;      /* porcelain, from the hero frame */
  --paper-2: #f0e6dd;
  --blush: #e3d2c4;
  --ink: #2e2420;
  --ink-2: #5e504a;
  --clay: #9a5440;
  --clay-soft: #c98e78;
  --line: rgba(46, 36, 32, .14);
  --serif: "Noto Serif Thai", "Thonburi", Georgia, serif;
  --sans: "IBM Plex Sans Thai", "Thonburi", system-ui, sans-serif;
  --gutter: clamp(1.15rem, 4.5vw, 4.5rem);
  --ease: cubic-bezier(.22, 1, .36, 1);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--paper); scroll-behavior: smooth; }
html.has-lenis { scroll-behavior: auto; }
body { margin: 0; font-family: var(--sans); font-size: 1.0625rem; line-height: 1.75; color: var(--ink); background: var(--paper); overflow-x: clip; }
h1, h2, h3, p, ul, ol, dl, dd, figure, address, fieldset { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, video, svg { display: block; max-width: 100%; }
a { color: inherit; }
address { font-style: normal; }
.nw { white-space: nowrap; }
button, input, select { font: inherit; color: inherit; }
.skip { position: absolute; left: -999px; top: .5rem; z-index: 100; padding: .5rem .8rem; background: var(--ink); color: var(--paper); }
.skip:focus { left: .5rem; }
:focus-visible { outline: 2px solid var(--clay); outline-offset: 3px; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 2.9rem; padding: .55rem 1.35rem; border-radius: 999px; font-weight: 500; font-size: .98rem; text-decoration: none; border: 1.5px solid transparent; cursor: pointer; transition: background .25s, color .25s, border-color .25s, transform .35s var(--ease); }
.btn--solid { background: var(--ink); color: var(--paper); }
.btn--solid:hover { background: var(--clay); transform: translateY(-2px); }
.btn--line { border-color: var(--ink); }
.btn--line:hover { background: var(--ink); color: var(--paper); }
.btn--text { background: none; text-decoration: underline; text-underline-offset: .3em; padding-inline: .5rem; }
.btn--lg { min-height: 3.4rem; padding-inline: 1.8rem; font-size: 1.05rem; }

/* ---------- Chrome ---------- */
.chrome { position: fixed; inset: 0 0 auto; z-index: 50; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: calc(.7rem + env(safe-area-inset-top)) var(--gutter) .7rem; transition: background .35s, box-shadow .35s; }
.chrome.is-solid { background: rgba(248, 243, 238, .9); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: 0 1px 0 var(--line); }
.brand { display: inline-flex; align-items: baseline; gap: .55rem; text-decoration: none; }
.brand__th { font: 400 1.75rem/1 var(--serif); color: var(--clay); }
.brand__en { font-size: .72rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-2); }
.nav { position: relative; }
.nav__toggle { min-height: 2.6rem; padding: .3rem 1rem; border: 1.5px solid var(--ink); border-radius: 999px; background: transparent; font-weight: 500; cursor: pointer; }
.nav__list { display: none; position: absolute; right: 0; top: calc(100% + .6rem); min-width: 12rem; padding: .5rem; background: var(--paper); border-radius: 16px; box-shadow: 0 24px 48px -24px rgba(46,36,32,.35); }
body.nav-open .nav__list { display: grid; }
.nav__list a { display: block; padding: .55rem .9rem; border-radius: 10px; text-decoration: none; font-weight: 500; }
.nav__list a:hover, .nav__list a.is-current { background: var(--paper-2); color: var(--clay); }
.chrome__cta { display: none; }

/* ---------- Hero ---------- */
.hero { position: relative; display: grid; min-height: 100svh; background: var(--paper); overflow: hidden; }
.hero__video { width: 100%; height: 56svh; object-fit: cover; object-position: 50% 40%; }
.hero__copy { display: grid; gap: 1rem; align-content: start; padding: 1.6rem var(--gutter) 3rem; }
.hero__kicker { font-size: .86rem; font-weight: 500; color: var(--clay); }
.hero__title { font: 300 clamp(2.4rem, 1.6rem + 4.6vw, 5.2rem)/1.22 var(--serif); letter-spacing: -.005em; }
.hero__sub { color: var(--ink-2); max-width: 30em; font-size: clamp(1.02rem, .98rem + .3vw, 1.18rem); }
.hero__actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: .4rem; }

/* ---------- Section heads ---------- */
.section__head { display: grid; gap: .8rem; margin-bottom: 2.2rem; }
.section__title { font: 300 clamp(2rem, 1.5rem + 2.8vw, 3.6rem)/1.25 var(--serif); text-wrap: balance; }
.section__lede { color: var(--ink-2); max-width: 34em; }

/* ---------- Layers ---------- */
.layers { position: relative; padding: 0 var(--gutter) clamp(4rem, 10vh, 7rem); background: linear-gradient(var(--paper), var(--paper-2)); }
.layers__stage { position: sticky; top: calc(3.7rem + env(safe-area-inset-top)); z-index: 2; padding: .5rem 0 .6rem; background: var(--paper); }
.skin { position: relative; width: 100%; max-width: 46rem; margin: 0 auto; }
.skin svg { width: 78%; height: auto; overflow: visible; }
.layer, .fx { transition: opacity .5s var(--ease), filter .5s var(--ease); }
.layer.is-dim { filter: saturate(.25); }
.fx { opacity: 0; }
.skin__labels li { position: absolute; left: 80%; transform: translateY(-50%); display: grid; line-height: 1.25; font-size: .78rem; color: var(--ink-2); transition: color .3s; white-space: nowrap; }
.skin__labels b { font-weight: 600; color: var(--ink); transition: color .3s; }
.skin__labels span { font-size: .72rem; }
.skin__labels li.is-on b { color: var(--clay); }
.skin__labels li.is-dim { opacity: .4; }
.layers__chapters { position: relative; z-index: 1; }
.chapter { --stage-h: calc(min(100vw - 2 * var(--gutter), 46rem) * .78 * 560 / 600 + 1.4rem); min-height: calc(100svh - 3.7rem - var(--stage-h)); display: grid; align-content: center; gap: .55rem; padding: 1.4rem 0 2rem; }
.chapter__layer { font-size: .85rem; font-weight: 600; color: var(--clay); }
.chapter__title { font: 300 clamp(1.7rem, 1.3rem + 2vw, 2.8rem)/1.3 var(--serif); }
.chapter__title span { display: block; font: 500 .9rem var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }
.chapter--intro .chapter__title { font-size: clamp(2rem, 1.5rem + 2.8vw, 3.6rem); }
.chapter__body { color: var(--ink-2); max-width: 30em; }
.chapter__facts { display: flex; flex-wrap: wrap; gap: .4rem 1.6rem; margin-top: .3rem; font-size: .92rem; }
.chapter__facts div { display: flex; gap: .5rem; }
.chapter__facts dt { color: var(--ink-2); }
.chapter__facts dd { font-weight: 600; }
.layers__note { font-size: .9rem; color: var(--ink-2); padding: 1rem 0 0; border-top: 1px solid var(--line); max-width: 34em; }

/* ---------- Finder ---------- */
.finder, .visit, .doctors, .prices, .book { padding: clamp(4.5rem, 12vh, 8rem) var(--gutter); }
.quiz { display: grid; gap: 1.2rem; max-width: 46rem; }
.quiz__step { border: 0; padding: 0; display: none; }
.quiz__step.is-active { display: grid; gap: 1rem; }
.quiz__step legend { display: flex; align-items: baseline; gap: .8rem; padding: 0 0 1rem; font: 300 clamp(1.5rem, 1.2rem + 1.4vw, 2.2rem)/1.3 var(--serif); }
.quiz__step legend span { font: 600 .82rem var(--sans); color: var(--clay); }
.quiz__options { display: grid; gap: .6rem; }
.quiz__options label { position: relative; cursor: pointer; }
.quiz__options input { position: absolute; opacity: 0; inset: 0; }
.quiz__options span { display: block; padding: .9rem 1.2rem; border: 1.5px solid var(--line); border-radius: 14px; background: #fff; font-weight: 500; transition: border-color .2s, background .2s, transform .3s var(--ease); }
.quiz__options label:hover span { border-color: var(--clay-soft); }
.quiz__options input:checked + span { border-color: var(--clay); background: #fbefe8; }
.quiz__options input:focus-visible + span { outline: 2px solid var(--clay); outline-offset: 2px; }
.quiz__result { display: grid; gap: 1rem; }
.result { display: grid; gap: .6rem; padding: 1.4rem 1.4rem 1.6rem; background: #fff; border: 1px solid var(--line); border-radius: 20px; }
.result__layer { justify-self: start; padding: .15rem .7rem; border-radius: 999px; background: var(--paper-2); color: var(--clay); font-size: .82rem; font-weight: 600; }
.result__name { font: 300 clamp(1.6rem, 1.3rem + 1.4vw, 2.4rem)/1.3 var(--serif); }
.result__name small { display: block; font: 500 .85rem var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }
.result__why { color: var(--ink-2); }
.result__meta { display: flex; flex-wrap: wrap; gap: .3rem 1.5rem; font-size: .92rem; }
.result__meta b { font-weight: 600; }
.result--alt { background: transparent; }
.result__note { font-size: .9rem; color: var(--clay); }
.quiz__actions { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
html:not(.js) .quiz__step { display: grid; gap: 1rem; margin-bottom: 1.5rem; }

/* ---------- Visit ---------- */
.visit { background: var(--paper-2); }
.visit__grid { display: grid; gap: 2rem; }
.visit__photo { border-radius: 24px; overflow: hidden; }
.visit__photo img { width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; }
.steps { display: grid; counter-reset: s; }
.steps li { display: grid; gap: .2rem; padding: 1.1rem 0 1.1rem 3rem; border-top: 1px solid var(--line); position: relative; counter-increment: s; }
.steps li::before { content: counter(s, decimal-leading-zero); position: absolute; left: 0; top: 1.15rem; font: 300 1.4rem/1.2 var(--serif); color: var(--clay); }
.steps b { font-weight: 600; }
.steps span { color: var(--ink-2); }

/* ---------- Doctors ---------- */
.docs { display: grid; gap: 2.5rem; }
.doc { display: grid; gap: .5rem; align-content: start; }
.doc__photo { border-radius: 999px 999px 24px 24px; overflow: hidden; background: var(--paper-2); max-width: 26rem; margin-bottom: .6rem; }
.doc__photo img { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 20%; }
.doc__name { font: 400 1.6rem/1.3 var(--serif); }
.doc__role { color: var(--clay); font-weight: 600; font-size: .95rem; }
.doc__text { color: var(--ink-2); max-width: 30em; }

/* ---------- Prices ---------- */
.prices { background: var(--paper-2); }
.price-table { width: 100%; max-width: 52rem; border-collapse: collapse; }
.price-table th, .price-table td { text-align: left; padding: 1rem .3rem; border-bottom: 1px solid var(--line); vertical-align: baseline; }
.price-table thead th { font-size: .82rem; font-weight: 600; color: var(--ink-2); }
.price-table tbody th { font: 400 1.2rem var(--serif); }
.price-table td { color: var(--ink-2); font-size: .95rem; }
.price-table td:last-child, .price-table thead th:last-child { text-align: right; }
.price-table td:last-child { font: 400 1.35rem var(--serif); color: var(--ink); font-variant-numeric: lining-nums tabular-nums; }

/* ---------- Book ---------- */
.book { display: grid; gap: 2rem; }
.book__intro { display: grid; gap: .8rem; }
.book__hours { font-weight: 600; color: var(--clay); }
.booker { display: grid; gap: 1.4rem; padding: clamp(1.2rem, 3vw, 2rem); background: #fff; border: 1px solid var(--line); border-radius: 24px; }
.booker fieldset { border: 0; padding: 0; display: grid; gap: .6rem; min-width: 0; }
.booker legend, .booker__field { font-size: .88rem; font-weight: 600; color: var(--ink-2); padding: 0 0 .5rem; }
.booker__field { display: grid; gap: .4rem; padding: 0; }
.booker select, .booker input[type=text] { min-height: 3rem; padding: .5rem .9rem; border: 1.5px solid var(--line); border-radius: 12px; background: var(--paper); font-weight: 400; color: var(--ink); width: 100%; }
.chips { display: flex; gap: .5rem; overflow-x: auto; padding-bottom: .3rem; scrollbar-width: thin; }
.chips--time { flex-wrap: wrap; overflow: visible; }
.chip { flex: 0 0 auto; display: grid; justify-items: center; gap: 0; min-width: 4.2rem; padding: .5rem .7rem; border: 1.5px solid var(--line); border-radius: 14px; background: var(--paper); cursor: pointer; line-height: 1.3; transition: border-color .2s, background .2s; }
.chip small { font-size: .75rem; color: var(--ink-2); }
.chip b { font-weight: 600; font-size: 1.05rem; }
.chip:hover { border-color: var(--clay-soft); }
.chip[aria-pressed="true"] { border-color: var(--clay); background: #fbefe8; }
.chip:disabled { opacity: .38; cursor: not-allowed; text-decoration: line-through; }
.chips--time .chip { min-width: 4.6rem; font-weight: 500; }
.booker__summary { min-height: 1.6em; font-weight: 500; }
.booker__send { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.booker__send .btn[aria-disabled="true"] { opacity: .4; pointer-events: none; }
html:not(.js) .booker fieldset, html:not(.js) .booker__field, html:not(.js) .booker__summary { display: none; }

/* ---------- Footer ---------- */
.footer { padding: 2.5rem var(--gutter) calc(2.5rem + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); display: grid; gap: .4rem; color: var(--ink-2); font-size: .92rem; }
.footer__brand { font: 400 1.3rem var(--serif); color: var(--ink); }
.footer__brand .brand__th { font-size: 1.6rem; }

/* grid children may shrink */
.book, .visit__grid, .docs, .quiz { grid-template-columns: minmax(0, 1fr); }

/* ---------- Larger screens ---------- */
@media (min-width: 700px) {
  .quiz__options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .docs { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 3rem; }
}
@media (min-width: 900px) {
  .nav__toggle { display: none; }
  .nav__list { display: flex; position: static; min-width: 0; padding: 0; background: none; box-shadow: none; gap: .1rem; }
  .nav__list a { padding: .4rem .8rem; }
  .nav__list a:hover, .nav__list a.is-current { background: none; }
  .chrome__cta { display: inline-flex; min-height: 2.5rem; padding: .35rem 1.1rem; font-size: .92rem; }
  .hero { grid-template-columns: minmax(0, 1fr); align-items: center; }
  .hero__video { position: absolute; inset: 0; height: 100%; object-position: 70% 50%; }
  .hero::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(to right, rgba(248,243,238,.92), rgba(248,243,238,.6) 40%, rgba(248,243,238,0) 65%); }
  .hero__copy { position: relative; z-index: 2; max-width: 42rem; padding-top: 6rem; }
  .layers { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); column-gap: 4rem; align-items: start; }
  .layers__stage { grid-column: 1; grid-row: 1; top: 0; height: 100svh; display: grid; align-content: center; background: none; padding: 0; }
  .layers__chapters { grid-column: 2; grid-row: 1; }
  .chapter { --stage-h: 0px; min-height: 100svh; }
  .skin svg { width: 76%; }
  .skin__labels li { font-size: .9rem; left: 79%; }
  .skin__labels span { font-size: .8rem; }
  .visit__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 4rem; align-items: center; }
  .book { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); column-gap: 4rem; align-items: start; }
  .book__intro { position: sticky; top: 6rem; }
}
@media (min-width: 1400px) {
  .layers, .finder, .visit, .doctors, .prices, .book, .footer { padding-left: calc((100vw - 1300px) / 2); padding-right: calc((100vw - 1300px) / 2); }
  .hero__copy { padding-left: calc((100vw - 1300px) / 2); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .layer, .fx, .chip, .quiz__options span { transition: none; }
}
