/* ============================================================
   Beauty by Yin Tran: Quiet Luxe
   Palette & type are governed by brand-kit.md. Change it first.
   ============================================================ */

/* ---------- Fonts (self-hosted variable woff2, latin subset) ---------- */
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('../assets/fonts/cormorant-garamond.woff2') format('woff2');
}
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: italic;
  font-weight: 300 700;
  font-display: swap;
  src: url('../assets/fonts/cormorant-garamond-italic.woff2') format('woff2');
}
@font-face {
  font-family: 'Jost';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../assets/fonts/jost.woff2') format('woff2');
}

/* ---------- Tokens ---------- */
:root {
  --cream: #F6F1EA;
  --cream-bright: #FBF8F3;   /* derived tint: card faces */
  --sand: #E3D5C5;
  --taupe: #C3A789;
  --mocha: #8A6F58;
  --espresso: #4A3B2E;
  --espresso-deep: #3B2F25;  /* derived shade: inverted band depth */

  --serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --sans: 'Jost', 'Avenir Next', 'Century Gothic', system-ui, sans-serif;

  --measure: 62ch;
  --container: 68rem;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --space-section: clamp(4.5rem, 11vw, 8rem);

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Reset-ish ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
body {
  background: var(--cream);
  color: var(--espresso);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 1.0625rem;
  line-height: 1.68;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--mocha); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--espresso); }
:focus-visible { outline: 2px solid var(--mocha); outline-offset: 3px; border-radius: 2px; }
::selection { background: var(--taupe); color: var(--espresso); }

.skip-link {
  position: absolute; left: -999px; top: 0.5rem; z-index: 99;
  background: var(--espresso); color: var(--cream);
  padding: 0.5rem 1rem; border-radius: 3px; font-size: 0.9rem;
}
.skip-link:focus { left: 0.5rem; color: var(--cream); }

/* ---------- Type ---------- */
h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.08; letter-spacing: 0.005em; }
h1 { font-size: clamp(2.7rem, 7vw, 4.8rem); }
h2 { font-size: clamp(2rem, 4.4vw, 3.1rem); margin-bottom: 0.5em; }
h3 { font-size: 1.45rem; }
p  { max-width: var(--measure); }
em { font-family: var(--serif); font-style: italic; font-size: 1.08em; }

.eyebrow {
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--mocha);
  margin-bottom: 1.1rem;
}

.container { max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }

section { padding-block: var(--space-section); scroll-margin-top: 4.5rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  text-decoration: none;
  padding: 0.85rem 1.9rem;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: background-color 0.25s var(--ease-out), color 0.25s var(--ease-out), border-color 0.25s var(--ease-out);
}
.btn-primary { background: var(--taupe); color: var(--espresso); }
.btn-primary:hover { background: var(--espresso); color: var(--cream); }
.btn-ghost { background: transparent; color: var(--espresso); border-color: var(--taupe); }
.btn-ghost:hover { background: var(--sand); color: var(--espresso); }
.btn-light { background: var(--cream); color: var(--espresso); }
.btn-light:hover { background: var(--taupe); color: var(--espresso); }

/* ---------- Top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--cream) 88%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: box-shadow 0.3s ease;
}
.topbar.scrolled { box-shadow: 0 1px 0 var(--sand); }
.topbar-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding-block: 0.9rem;
}
.wordmark {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.28rem;
  color: var(--espresso);
  text-decoration: none;
  white-space: nowrap;
}
.topnav { display: flex; gap: 1.9rem; }
.topnav a {
  font-size: 0.9rem; font-weight: 400; letter-spacing: 0.06em;
  color: var(--espresso); text-decoration: none;
}
.topnav a:hover { color: var(--mocha); }
.topbar .btn { padding: 0.6rem 1.35rem; font-size: 0.85rem; }
@media (max-width: 46rem) {
  .topnav { display: none; }
}

/* ---------- Hero ---------- */
.hero { padding-block: clamp(4.5rem, 12vw, 8.5rem) clamp(3.5rem, 8vw, 6rem); }
.hero h1 { max-width: 17ch; }
.hero .lede {
  margin-top: 1.6rem;
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  max-width: 52ch;
}
.hero-ctas { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 2.3rem; }

/* the drawn brow-arc under "your" */
.uline { position: relative; display: inline-block; }
.uline svg {
  position: absolute; left: -2%; bottom: -0.18em; width: 104%; height: 0.28em;
  overflow: visible;
}
.uline path {
  stroke: var(--taupe); stroke-width: 7; fill: none; stroke-linecap: round;
  stroke-dasharray: 230; stroke-dashoffset: 230;
  animation: draw-arc 1s var(--ease-out) 0.55s forwards;
}
@keyframes draw-arc { to { stroke-dashoffset: 0; } }

/* trust facts: a plain row, not a stat counter */
.trust {
  display: flex; flex-wrap: wrap; gap: 0.4rem 2.75rem;
  margin-top: clamp(2.8rem, 6vw, 4rem);
  padding-top: 1.6rem;
  border-top: 1px solid var(--sand);
}
.trust li { list-style: none; display: flex; align-items: baseline; gap: 0.6rem; }
.trust li::before {
  content: ''; width: 14px; height: 7px; flex: none; align-self: center;
  border-top: 2px solid var(--taupe); border-radius: 50% 50% 0 0 / 100% 100% 0 0;
}
.trust { padding-left: 0; }
.trust span { font-size: 0.95rem; }

/* ---------- Section shells ---------- */
.band-sand { background: var(--sand); }
.band-espresso { background: var(--espresso); color: var(--cream); }
.band-espresso h2, .band-espresso h3 { color: var(--cream); }
.band-espresso .eyebrow { color: var(--taupe); }
.band-espresso a { color: var(--taupe); }
.band-espresso a:hover { color: var(--cream); }

.section-head { max-width: 44rem; margin-bottom: clamp(2.2rem, 5vw, 3.5rem); }

/* ---------- Gallery ---------- */
.gallery-grid {
  display: grid; gap: clamp(1rem, 2.5vw, 1.75rem);
  grid-template-columns: repeat(3, 1fr);
}
@media (max-width: 56rem) { .gallery-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 34rem) { .gallery-grid { grid-template-columns: 1fr; } }

.ba-card { display: flex; flex-direction: column; gap: 0.7rem; }
.ba-frame {
  position: relative; aspect-ratio: 4 / 5; overflow: hidden;
  border-radius: 4px;
  background: var(--cream-bright);
}
.ba-layer { position: absolute; inset: 0; }
.ba-layer img { width: 100%; height: 100%; object-fit: cover; }
.ba-top { clip-path: inset(0 calc(100% - var(--pos, 50%)) 0 0); }

/* placeholder faces: sand tones under a single unclipped specimen label */
.ba-ph-before { background: linear-gradient(160deg, var(--sand), #D8C7B3); }
.ba-ph-after  { background: linear-gradient(160deg, var(--cream-bright), var(--sand)); }
.ba-ph-label {
  position: absolute; inset: 0; display: grid; place-items: center;
  text-align: center; padding: 1rem; pointer-events: none;
}
.ba-ph-label .ph-name {
  font-family: var(--serif); font-style: italic; font-weight: 500;
  font-size: clamp(1.5rem, 2.6vw, 1.9rem); color: var(--mocha); max-width: 11ch;
  line-height: 1.15;
}
.ba-ph-arc { width: 5.5rem; margin: 0.9rem auto 0; opacity: 0.55; }
.ba-ph-arc path { stroke: var(--taupe); stroke-width: 5; fill: none; stroke-linecap: round; }

.ba-divider {
  position: absolute; top: 0; bottom: 0; left: var(--pos, 50%); width: 2px;
  background: var(--cream); transform: translateX(-1px);
  box-shadow: 0 0 0 1px rgb(74 59 46 / 0.08);
  pointer-events: none;
}
.ba-thumb {
  position: absolute; top: 50%; left: var(--pos, 50%);
  transform: translate(-50%, -50%);
  width: 2.4rem; height: 2.4rem; border-radius: 50%;
  background: var(--cream); color: var(--espresso);
  display: grid; place-items: center;
  box-shadow: 0 2px 10px rgb(74 59 46 / 0.22);
  pointer-events: none;
  font-size: 0.8rem; letter-spacing: -0.05em;
}
.ba-range {
  position: absolute; inset: 0; width: 100%; height: 100%;
  opacity: 0; cursor: ew-resize; margin: 0;
  touch-action: pan-y;
}
.ba-range:focus-visible ~ .ba-thumb { outline: 2px solid var(--mocha); outline-offset: 3px; }

.ba-tag {
  position: absolute; bottom: 0.7rem;
  font-size: 0.68rem; font-weight: 500; letter-spacing: 0.13em; text-transform: uppercase;
  color: var(--espresso); background: color-mix(in srgb, var(--cream) 82%, transparent);
  padding: 0.22rem 0.6rem; border-radius: 999px; pointer-events: none;
}
.ba-tag-before { left: 0.7rem; }
.ba-tag-after { right: 0.7rem; }

.ba-expand {
  position: absolute; top: 0.6rem; right: 0.6rem; z-index: 2;
  width: 2rem; height: 2rem; border-radius: 50%; border: none;
  background: color-mix(in srgb, var(--cream) 82%, transparent);
  color: var(--espresso); cursor: pointer; font-size: 1rem;
  display: grid; place-items: center;
}
.ba-expand:hover { background: var(--cream); }

.ba-card figcaption { font-size: 0.9rem; color: var(--mocha); }
.ba-card figcaption strong { color: var(--espresso); font-weight: 500; }

.gallery-note { margin-top: 2.2rem; font-size: 0.95rem; color: var(--mocha); font-style: normal; }

/* ---------- Process (the two visits) ---------- */
.process-steps {
  counter-reset: step;
  display: grid; gap: clamp(1.5rem, 3vw, 2.5rem);
  grid-template-columns: repeat(4, 1fr);
  padding-left: 0;
}
@media (max-width: 56rem) { .process-steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 34rem) { .process-steps { grid-template-columns: 1fr; } }
.process-steps li { list-style: none; counter-increment: step; position: relative; padding-top: 1.1rem; }
.process-steps li::before {
  content: counter(step, decimal-leading-zero);
  font-family: var(--serif); font-style: italic; font-weight: 500;
  font-size: 1.15rem; color: var(--taupe);
  position: absolute; top: -0.55rem; left: 0;
}
.process-steps li { border-top: 1px solid var(--taupe); }
.process-steps h3 { font-size: 1.3rem; margin: 0.65rem 0 0.4rem; }
.process-steps p { font-size: 0.96rem; line-height: 1.6; }

/* ---------- Services ---------- */
.price-table { width: 100%; border-collapse: collapse; margin-top: 0.5rem; }
.price-table th {
  font-family: var(--sans); font-size: 0.72rem; font-weight: 500;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--mocha);
  text-align: left; padding: 0 0.75rem 0.8rem 0;
}
.price-table th:not(:first-child), .price-table td:not(:first-child) { text-align: right; padding-right: 0; padding-left: 0.75rem; white-space: nowrap; }
.price-table td { padding: 0.95rem 0.75rem 0.95rem 0; border-top: 1px solid rgb(74 59 46 / 0.15); vertical-align: baseline; }
.price-table .svc { font-family: var(--serif); font-weight: 500; font-size: 1.28rem; }
.price-table .num { font-size: 1rem; }
.price-table .dash { color: var(--taupe); }

.also { margin-top: 2.6rem; }
.also h3 { font-size: 1.05rem; font-family: var(--sans); font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--mocha); margin-bottom: 0.4rem; }
.also .price-table .svc { font-size: 1.12rem; }

.services-note { margin-top: 2.2rem; font-size: 0.95rem; color: var(--mocha); }
.services-cta { margin-top: 2.4rem; }

@media (max-width: 40rem) {
  .price-table thead { position: absolute; clip-path: inset(50%); width: 1px; height: 1px; overflow: hidden; }
  .price-table, .price-table tbody, .price-table tr, .price-table td { display: block; }
  .price-table tr { border-top: 1px solid rgb(74 59 46 / 0.15); padding: 0.9rem 0; }
  .price-table td { border: none; padding: 0.1rem 0; text-align: left; }
  .price-table td:not(:first-child) { text-align: left; padding-left: 0; font-size: 0.95rem; }
  .price-table td:not(:first-child)::before {
    content: attr(data-label) '  ';
    font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--mocha);
  }
  .price-table td.empty { display: none; }
}

/* ---------- Booking band ---------- */
.book-ways {
  display: grid; gap: clamp(1.5rem, 3vw, 2.5rem);
  grid-template-columns: repeat(3, 1fr);
  padding-left: 0; margin-top: 2.5rem;
}
@media (max-width: 56rem) { .book-ways { grid-template-columns: 1fr; max-width: 30rem; } }
.book-ways li { list-style: none; border-top: 1px solid var(--mocha); padding-top: 1.1rem; }
.book-ways .way-label {
  font-size: 0.72rem; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--taupe); display: block; margin-bottom: 0.5rem;
}
.book-ways .way-main {
  font-family: var(--serif); font-size: 1.55rem; font-weight: 500; color: var(--cream);
  text-decoration: none; display: inline-block; line-height: 1.2;
}
a.way-main:hover { color: var(--taupe); }
.book-ways p { font-size: 0.94rem; margin-top: 0.45rem; color: color-mix(in srgb, var(--cream) 78%, var(--espresso)); }
.book-reassure { margin-top: 3rem; font-size: 1rem; }
.book-reassure em { color: var(--taupe); }

/* ---------- Questions form ---------- */
.ask-form { max-width: 34rem; display: flex; flex-direction: column; gap: 1.1rem; }
.ask-form label {
  display: flex; flex-direction: column; gap: 0.35rem;
  font-size: 0.78rem; font-weight: 500; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--mocha);
}
.ask-form .opt { text-transform: none; letter-spacing: 0.02em; font-weight: 400; }
.ask-form input, .ask-form textarea {
  font-family: var(--sans); font-size: 1.02rem; font-weight: 300; color: var(--espresso);
  background: var(--cream-bright); border: 1px solid rgb(74 59 46 / 0.25);
  border-radius: 4px; padding: 0.7rem 0.85rem;
}
.ask-form input:focus, .ask-form textarea:focus {
  outline: none; border-color: var(--mocha);
  box-shadow: 0 0 0 3px rgb(138 111 88 / 0.18);
}
.ask-form textarea { resize: vertical; min-height: 7rem; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
@media (max-width: 34rem) { .field-row { grid-template-columns: 1fr; } }
.ask-form button { align-self: flex-start; }
.form-note { font-size: 0.85rem; color: var(--mocha); }
.form-error {
  font-size: 0.95rem; color: #7C2D12;
  background: #F5E3DB; border-radius: 4px; padding: 0.7rem 0.9rem;
}
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.ask-done h3 { font-size: 1.8rem; margin-bottom: 0.4rem; }
.ask-done p { color: var(--espresso); }

/* ---------- Footer ---------- */
footer { padding-block: clamp(3rem, 7vw, 4.5rem) 2rem; border-top: 1px solid var(--sand); }
.foot-grid { display: grid; gap: 2.5rem; grid-template-columns: 2fr 1fr 1fr; }
@media (max-width: 46rem) { .foot-grid { grid-template-columns: 1fr; gap: 1.8rem; } }
.foot-grid h3 {
  font-family: var(--sans); font-size: 0.72rem; font-weight: 500;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--mocha); margin-bottom: 0.7rem;
}
.foot-grid p, .foot-grid li { font-size: 0.95rem; }
.foot-grid ul { padding-left: 0; }
.foot-grid li { list-style: none; }
.foot-wordmark { font-family: var(--serif); font-weight: 600; font-size: 1.5rem; margin-bottom: 0.6rem; }
.foot-hours li { display: flex; justify-content: space-between; max-width: 15rem; gap: 1rem; }
.foot-hours .t { color: var(--mocha); }
.smallprint {
  margin-top: 3rem; padding-top: 1.2rem; border-top: 1px solid var(--sand);
  font-size: 0.82rem; color: var(--mocha);
  display: flex; flex-wrap: wrap; gap: 0.3rem 1.5rem; justify-content: space-between;
}

/* ---------- Lightbox ---------- */
dialog.lightbox {
  border: none; padding: 0; background: transparent;
  max-width: min(92vw, 34rem); width: 100%;
  margin: auto; /* the * reset above removes the UA's centering; restore it */
}
dialog.lightbox::backdrop { background: rgb(59 47 37 / 0.82); }
.lightbox-inner { position: relative; }
.lightbox .ba-frame { aspect-ratio: 4 / 5; border-radius: 6px; }
.lightbox-close {
  position: absolute; top: 0.6rem; right: 0.6rem; z-index: 5;
  width: 2.2rem; height: 2.2rem; border-radius: 50%; border: none;
  background: var(--cream); color: var(--espresso); font-family: var(--sans);
  font-size: 0.95rem; cursor: pointer; display: grid; place-items: center;
}
.lightbox-close:hover { background: var(--sand); }
.lightbox-caption { color: var(--cream); font-size: 0.95rem; margin-top: 0.8rem; text-align: center; }

/* ---------- Reveal on scroll ----------
   Hidden state only exists once JS opts in via <html class="anim">,
   so content is never invisible without JS (or with reduced motion). */
html.anim .reveal { opacity: 0; transform: translateY(16px); }
html.anim .reveal.in {
  opacity: 1; transform: none;
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .uline path { animation: none; stroke-dashoffset: 0; }
  html.anim .reveal { opacity: 1; transform: none; transition: none; }
  .btn { transition: none; }
}
