/* Baiman Nail — styles
   Palette: pearl, aubergine ink, lacquer red, nude, mist.
   The selected polish colour lives in --pick and tints the hero, chips and form. */

:root {
  --pearl: #F5F0F4;
  --mist: #EAE1EB;
  --ink: #2A1730;
  --ink-soft: #5C4862;
  --lacquer: #B3123F;
  --nude: #E8CFC6;
  --line-green: #06C755;
  --pick: #B3123F;
  --pick-deep: #B3123F;

  --display: "Young Serif", "Trirong", Georgia, serif;
  --body: "Anuphan", "Noto Sans Thai", system-ui, -apple-system, "Segoe UI", sans-serif;

  --step--1: .875rem;
  --step-0: 1rem;
  --step-1: 1.25rem;
  --step-2: 1.6rem;
  --step-3: 2.25rem;
  --step-4: clamp(2.6rem, 5.6vw, 4.6rem);

  --wrap: 1160px;
  --radius-nail: 999px 999px 28px 28px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }

body {
  margin: 0;
  background: var(--pearl);
  color: var(--ink);
  font-family: var(--body);
  font-size: var(--step-0);
  line-height: 1.6;
  font-weight: 400;
}
html[lang="th"] body { line-height: 1.75; }

img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.1; margin: 0; letter-spacing: -.01em; }
html[lang="th"] h1, html[lang="th"] h2, html[lang="th"] h3 { line-height: 1.35; letter-spacing: 0; }
p { margin: 0; }

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }

:focus-visible { outline: 3px solid var(--pick-deep); outline-offset: 3px; border-radius: 4px; }

.skip { position: absolute; left: 1rem; top: -4rem; background: var(--ink); color: #fff; padding: .6rem 1rem; z-index: 100; }
.skip:focus { top: 1rem; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 48px; padding: .7rem 1.4rem;
  border: 2px solid var(--ink); border-radius: 999px;
  background: var(--ink); color: var(--pearl);
  font: 500 var(--step-0)/1.2 var(--body); text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color .2s, color .2s, border-color .2s;
}
.btn:hover { background: var(--pick-deep); border-color: var(--pick-deep); color: #fff; }
.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost:hover { background: var(--ink); border-color: var(--ink); color: var(--pearl); }
.btn--small { min-height: 40px; padding: .45rem 1.05rem; font-size: var(--step--1); }
.btn--line { background: var(--line-green); border-color: var(--line-green); color: #fff; }
.btn--line:hover { background: #05a548; border-color: #05a548; }

/* ---------- header ---------- */
.top { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--pearl) 92%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid color-mix(in srgb, var(--ink) 10%, transparent); }
.top__inner { display: flex; align-items: center; gap: 1.5rem; min-height: 68px; }
.mark { display: inline-flex; align-items: center; gap: .55rem; font-family: var(--display); font-size: 1.35rem; text-decoration: none; white-space: nowrap; }
.mark__dot { width: 14px; height: 20px; border-radius: var(--radius-nail); background: var(--pick); transition: background-color .35s; }
.nav { display: flex; gap: 1.6rem; margin-left: auto; }
.nav a { text-decoration: none; font-weight: 500; }
.nav a:hover { color: var(--lacquer); }
.top__actions { display: flex; align-items: center; gap: .9rem; }
.lang { display: inline-flex; border: 1.5px solid color-mix(in srgb, var(--ink) 25%, transparent); border-radius: 999px; padding: 2px; }
.lang button { border: 0; background: transparent; color: var(--ink); font: 500 var(--step--1)/1 var(--body); padding: .45rem .7rem; border-radius: 999px; cursor: pointer; min-width: 44px; min-height: 34px; }
.lang button[aria-pressed="true"] { background: var(--ink); color: var(--pearl); }

@media (max-width: 760px) {
  .nav { display: none; }
  .top__actions { margin-left: auto; }
  .top__inner { gap: .75rem; }
}

/* ---------- hero ---------- */
.hero { padding: clamp(1rem, 2.5vw, 1.75rem) 0 clamp(3rem, 7vw, 6rem); }
.hero__photo { position: relative; margin: 0 auto clamp(2rem, 5vw, 4rem); border-radius: 30px; overflow: hidden; height: clamp(220px, 36vw, 440px); background: var(--mist); }
.hero__photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 62%; }
.hero__photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 50%, rgba(42,23,48,.65)); }
.hero__photo-name { position: absolute; left: clamp(1.1rem, 3vw, 2rem); bottom: clamp(1rem, 2.5vw, 1.6rem); z-index: 1; color: #fff; font-family: var(--display); font-size: clamp(1.4rem, 3.2vw, 2.4rem); line-height: 1.1; text-shadow: 0 2px 12px rgba(0,0,0,.35); }
@media (max-width: 600px) { .hero__photo { border-radius: 20px; width: calc(100% - 1.5rem); } }
.hero__grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.hero__title { font-size: var(--step-4); max-width: 11ch; }
html[lang="th"] .hero__title { max-width: 13ch; font-size: clamp(2.3rem, 5vw, 4rem); }
.hero__lede { margin-top: 1.5rem; font-size: var(--step-1); color: var(--ink-soft); max-width: 34ch; line-height: 1.55; }
.hero__ctas { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2.2rem; }

.rack { display: grid; gap: 1.1rem; }
.rack__stage {
  margin: 0; position: relative;
  display: grid; grid-template-columns: auto 1fr; align-items: end; gap: 1.5rem;
  padding: 2rem 2rem 0 2.2rem;
  border-radius: 36px;
  background: color-mix(in oklab, var(--pick) 16%, #fff);
  overflow: hidden;
  transition: background-color .45s ease;
  min-height: 360px;
}
.nail { width: clamp(150px, 17vw, 200px); height: auto; margin-bottom: -2px; }
.nail__finger { fill: #E9C3AE; }
.nail__plate { fill: var(--pick); transition: fill .45s ease; }
.rack__name { align-self: center; padding-bottom: 2rem; }
.rack__shade { display: block; font-family: var(--display); font-size: var(--step-3); line-height: 1.05; }
html[lang="th"] .rack__shade { line-height: 1.3; }
.rack__hex { display: block; margin-top: .5rem; color: var(--ink-soft); font-size: var(--step--1); letter-spacing: .04em; }
.rack__label { font-weight: 500; color: var(--ink-soft); }

.rack__swatches { display: grid; grid-template-columns: repeat(8, 1fr); gap: .55rem; }
.swatch {
  aspect-ratio: 2 / 3; width: 100%; min-height: 48px;
  border: 0; padding: 0; cursor: pointer;
  border-radius: var(--radius-nail);
  background: var(--c);
  box-shadow: inset 0 0 0 1px rgba(42, 23, 48, .12), inset 6px 8px 0 -3px rgba(255,255,255,.35);
  transition: transform .2s ease;
}
.swatch:hover { transform: translateY(-4px); }
.swatch[aria-checked="true"] { outline: 2.5px solid var(--ink); outline-offset: 3px; transform: translateY(-6px); }

@media (max-width: 880px) {
  .hero__grid { grid-template-columns: 1fr; }
  .rack__stage { min-height: 0; padding: 1.5rem 1.5rem 0; }
  .nail { width: 130px; }
  .rack__shade { font-size: var(--step-2); }
}
@media (max-width: 420px) {
  .rack__swatches { gap: .35rem; }
  .top .btn--small { display: none; }
  .float-line { width: 52px; height: 52px; right: .75rem; bottom: .75rem; }
}

/* ---------- section heads ---------- */
.section-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 1rem 3rem; align-items: end; margin-bottom: clamp(2rem, 4vw, 3.2rem); }
.section-head h2 { font-size: var(--step-3); }
.section-head p { color: var(--ink-soft); max-width: 52ch; }
@media (max-width: 760px) { .section-head { grid-template-columns: 1fr; } }

/* ---------- prices ---------- */
.menu { padding: clamp(3.5rem, 7vw, 6rem) 0; background: #fff; }
.menu__groups { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.5rem 3rem; }
.menu__group h3 { font-size: var(--step-2); padding-bottom: .8rem; border-bottom: 2px solid var(--ink); margin-bottom: .4rem; }
.menu__list { list-style: none; margin: 0; padding: 0; }
.menu__item { padding: 1rem 0; border-bottom: 1px solid var(--mist); }
.menu__row { display: flex; align-items: baseline; gap: .5rem; }
.menu__name { font-weight: 500; font-size: 1.06rem; }
.menu__dots { flex: 1; border-bottom: 1.5px dotted color-mix(in srgb, var(--ink) 35%, transparent); transform: translateY(-.3em); min-width: 1rem; }
.menu__price { font-family: var(--display); font-size: 1.15rem; white-space: nowrap; }
.menu__price small { font-family: var(--body); font-size: .8rem; color: var(--ink-soft); margin-right: .2rem; }
.menu__note { color: var(--ink-soft); font-size: var(--step--1); margin-top: .2rem; }
@media (max-width: 960px) { .menu__groups { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .menu__groups { grid-template-columns: 1fr; } }

/* ---------- gallery ---------- */
.gallery { padding: clamp(3.5rem, 7vw, 6rem) 0; }
.gallery__grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 200px; grid-auto-flow: dense; gap: .8rem; }
.tile { position: relative; border-radius: 22px; overflow: hidden; background: var(--mist); display: flex; align-items: flex-end; padding: 1rem; }
.tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tile::after { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 60%, rgba(42,23,48,.6)); }
.tile span { position: relative; z-index: 1; text-shadow: 0 1px 6px rgba(0,0,0,.35); color: #fff; font-weight: 500; font-size: var(--step--1); }
.tile--port { grid-row: span 2; }
.tile--land { grid-column: span 2; grid-row: span 2; }
.gallery__more { margin-top: 1.6rem; }
.gallery__more a { font-weight: 500; text-underline-offset: 4px; }
@media (max-width: 860px) { .gallery__grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 150px; gap: .6rem; } .tile { border-radius: 16px; padding: .75rem; } }

/* ---------- designs & colours ---------- */
.designs { padding: clamp(3.5rem, 7vw, 6rem) 0; background: #fff; }
.row-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: 2rem 0 1rem; }
.section-head + .row-head { margin-top: 0; }
.row-head h3 { font-size: var(--step-2); }
.row-nav { display: flex; gap: .5rem; }
.row-btn { width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid color-mix(in srgb, var(--ink) 30%, transparent); background: transparent; color: var(--ink); font: 400 1.5rem/1 var(--body); cursor: pointer; display: grid; place-items: center; padding-bottom: 3px; }
.row-btn:hover { background: var(--ink); color: var(--pearl); }
.row { list-style: none; margin: 0; padding: 0 0 .75rem; display: grid; grid-auto-flow: column; grid-auto-columns: clamp(200px, 22vw, 260px); gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scrollbar-width: thin; }
.row:focus-visible { outline-offset: 6px; }
.card { position: relative; scroll-snap-align: start; aspect-ratio: 3 / 4; border-radius: 20px; overflow: hidden; background: var(--mist); display: flex; align-items: flex-end; padding: .9rem; min-width: 0; }
.card--wide { aspect-ratio: 1 / 1; }
.row:has(.card--wide) { grid-auto-columns: clamp(240px, 28vw, 340px); }
.card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 60%, rgba(42,23,48,.6)); }
.card span { position: relative; z-index: 1; color: #fff; font-weight: 500; font-size: var(--step--1); line-height: 1.35; text-shadow: 0 1px 6px rgba(0,0,0,.35); }
@media (max-width: 600px) { .row { grid-auto-columns: 62%; } .row:has(.card--wide) { grid-auto-columns: 78%; } .row-head h3 { font-size: var(--step-1); } }

/* ---------- booking ---------- */
.book { padding: clamp(3.5rem, 7vw, 6rem) 0; background: var(--ink); color: var(--pearl); }
.book__grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.book h2 { font-size: var(--step-3); }
.steps { margin: 2rem 0 0; padding: 0; list-style: none; counter-reset: s; display: grid; gap: 1.2rem; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 2.4rem 1fr; gap: .8rem; align-items: start; color: color-mix(in srgb, var(--pearl) 85%, transparent); }
.steps li::before {
  content: counter(s); display: grid; place-items: center;
  width: 2.4rem; height: 3rem; border-radius: var(--radius-nail);
  background: var(--pick-deep); color: #fff; font-family: var(--display); font-size: 1.1rem;
  transition: background-color .35s;
}
.book__alt { margin-top: 2rem; color: color-mix(in srgb, var(--pearl) 75%, transparent); }
.book__alt a { color: var(--pearl); font-weight: 500; text-underline-offset: 4px; }

.form { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem 1.2rem; background: var(--pearl); color: var(--ink); border-radius: 30px; padding: clamp(1.4rem, 3vw, 2.2rem); }
.field { display: grid; gap: .4rem; align-content: start; }
.field--full { grid-column: 1 / -1; }
.field label, .label { font-weight: 500; font-size: var(--step--1); }
.opt { color: var(--ink-soft); font-weight: 400; }
.field input, .field select, .field textarea {
  width: 100%; min-height: 48px; padding: .7rem .9rem;
  border: 1.5px solid color-mix(in srgb, var(--ink) 28%, transparent); border-radius: 14px;
  background: #fff; color: var(--ink); font: 400 1rem/1.4 var(--body);
}
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px color-mix(in srgb, var(--pick) 35%, transparent); }
.field__err { display: none; color: #A0102F; font-size: .85rem; }
.field.is-invalid input, .field.is-invalid select { border-color: #A0102F; }
.field.is-invalid .field__err { display: block; }
.form__colour { display: flex; align-items: center; gap: .6rem; min-height: 48px; }
.form__chip { width: 22px; height: 32px; border-radius: var(--radius-nail); background: var(--pick); box-shadow: inset 0 0 0 1px rgba(42,23,48,.15); transition: background-color .35s; }
.form__change { margin-left: .4rem; font-size: var(--step--1); text-underline-offset: 3px; }
.form__actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: .3rem; }
.form__status { min-height: 1.5em; font-size: var(--step--1); color: var(--ink-soft); }
@media (max-width: 880px) { .book__grid { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .form { grid-template-columns: 1fr; } }

/* ---------- visit ---------- */
.visit { padding: clamp(3.5rem, 7vw, 6rem) 0; }
.visit__grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(2rem, 5vw, 4rem); align-items: stretch; }
.visit h2 { font-size: var(--step-3); }
.visit__addr { font-style: normal; margin-top: 1.4rem; font-size: var(--step-1); max-width: 28ch; line-height: 1.5; }
.hours { margin: 1.8rem 0 0; display: grid; grid-template-columns: auto 1fr; gap: .5rem 2rem; max-width: 26rem; }
.hours dt { font-weight: 500; }
.hours dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.visit__links { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2rem; }
.visit__media { display: grid; grid-template-columns: .75fr 1.25fr; gap: .8rem; }
.visit__photo { width: 100%; height: 100%; min-height: 340px; object-fit: cover; border-radius: 30px; }
@media (max-width: 600px) { .visit__media { grid-template-columns: 1fr; } .visit__photo { min-height: 0; aspect-ratio: 4 / 3; border-radius: 20px; } }
.visit__media.no-map { grid-template-columns: 1fr; }
.visit__media.no-map .visit__photo { min-height: 0; aspect-ratio: 4 / 3; object-position: 50% 70%; }
.visit__phone { margin-top: 1.2rem; font-family: var(--display); font-size: var(--step-2); }
.visit__phone a { text-decoration: none; }
.visit__phone a:hover { color: var(--lacquer); }
.visit__addr[hidden], .visit__links a[hidden] { display: none; }
.map { border-radius: 30px; overflow: hidden; min-height: 340px; background: var(--mist); }
.map { position: relative; }
.map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; z-index: 1; }
.map-card { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .6rem; padding: 1.5rem; text-align: center; text-decoration: none; color: var(--ink);
  background: radial-gradient(circle at 50% 42%, #fff 0 18%, transparent 19%), repeating-linear-gradient(0deg, transparent 0 38px, rgba(42,23,48,.06) 38px 40px), repeating-linear-gradient(90deg, transparent 0 38px, rgba(42,23,48,.06) 38px 40px), var(--mist); }
.map-card__pin { width: 40px; height: 54px; filter: drop-shadow(0 6px 8px rgba(42,23,48,.25)); }
.map-card__place { font-family: var(--display); font-size: var(--step-1); line-height: 1.25; max-width: 18ch; }
.map-card__cta { margin-top: .3rem; padding: .55rem 1.1rem; border-radius: 999px; background: var(--ink); color: var(--pearl); font-weight: 500; font-size: var(--step--1); }
.map-card:hover .map-card__cta { background: var(--pick-deep); }
@media (max-width: 860px) { .visit__grid { grid-template-columns: 1fr; } }

/* ---------- footer ---------- */
.foot { border-top: 1px solid color-mix(in srgb, var(--ink) 12%, transparent); padding: 2rem 0 5.5rem; }
.foot__inner { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 2rem; }
.mark--foot { font-size: 1.15rem; }
.social { list-style: none; display: flex; gap: .5rem; margin: 0 0 0 auto; padding: 0; }
.social a { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid color-mix(in srgb, var(--ink) 25%, transparent); }
.social a:hover { background: var(--ink); color: var(--pearl); }
.social svg { width: 20px; height: 20px; fill: currentColor; }
.foot__small { width: 100%; color: var(--ink-soft); font-size: var(--step--1); }

/* ---------- floating LINE button ---------- */
.float-line {
  position: fixed; right: 1rem; bottom: 1rem; z-index: 30;
  display: grid; place-items: center; width: 60px; height: 60px; border-radius: 50%;
  background: var(--line-green); color: #fff; text-decoration: none;
  font: 600 .8rem/1 var(--body); letter-spacing: .02em;
  box-shadow: 0 6px 18px rgba(6, 199, 85, .35);
}
.float-line:hover { background: #05a548; }
.float-line { transition: opacity .25s, transform .25s; }
.float-line.is-hidden { opacity: 0; transform: translateY(12px); pointer-events: none; }

/* ---------- 404 ---------- */
.lost { min-height: 70vh; display: grid; place-items: center; text-align: center; padding: 3rem 1.25rem; }
.lost h1 { font-size: var(--step-4); }
.lost p { margin: 1rem auto 2rem; color: var(--ink-soft); max-width: 40ch; }
