/* Smith Bespoke — chalk on worsted */
:root {
  --worsted: #14130e;      /* deep charcoal-brown ground, like midnight worsted */
  --worsted-2: #1b1a14;    /* raised panels */
  --chalk: #f2eee3;        /* tailor's chalk */
  --chalk-dim: #b9b4a4;    /* secondary text */
  --thread: rgba(242, 238, 227, 0.22); /* basting thread lines */
  --hanko: #b4372e;        /* vermilion seal — used only as the maker's mark */
  --max: 1100px;
}

* { box-sizing: border-box; margin: 0; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; animation: none !important; } }

body {
  background: var(--worsted);
  color: var(--chalk);
  font-family: "Lora", Georgia, serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .mark, .mark-lg, .eyebrow, .btn {
  font-family: "Marcellus", "Times New Roman", serif;
  font-weight: 400;
}
h1 { font-size: clamp(3rem, 9vw, 6rem); line-height: 1.02; letter-spacing: 0.02em; text-transform: uppercase; }
h2 { font-size: clamp(1.7rem, 4vw, 2.6rem); letter-spacing: 0.04em; margin-bottom: 1rem; }
h3 { font-size: 1.25rem; letter-spacing: 0.05em; margin: 1rem 0 0.5rem; }
p { color: var(--chalk-dim); }
h1 + p, h2 + p { max-width: 34em; }
a { color: var(--chalk); }

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.35em;
  font-size: 0.72rem;
  color: var(--chalk-dim);
  margin-bottom: 1rem;
}
.center { text-align: center; margin-left: auto; margin-right: auto; }

/* Chalk signature: hand-drawn stroke under the key word */
.chalk { position: relative; white-space: nowrap; }
.chalk::after {
  content: "";
  position: absolute;
  left: -2%; right: -3%; bottom: 0.02em;
  height: 0.16em;
  background: var(--chalk);
  opacity: 0.9;
  border-radius: 60% 40% 55% 45% / 55% 60% 40% 45%;
  transform: rotate(-1.2deg);
  filter: blur(0.4px);
}

/* Basting-stitch divider */
.baste {
  max-width: var(--max);
  margin: 0 auto;
  border-top: 1px dashed var(--thread);
}

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 1.5rem;
  padding: 0.9rem 1.25rem;
  background: color-mix(in srgb, var(--worsted) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--thread);
}
.mark { font-size: 1.4rem; text-decoration: none; letter-spacing: 0.08em; }
.mark-lg { font-family: "Marcellus", serif; font-size: 2.2rem; letter-spacing: 0.08em; }
.bar { color: var(--chalk-dim); padding: 0 0.06em; }
.nav nav { display: flex; gap: 1.25rem; margin-left: auto; }
.nav nav a { text-decoration: none; font-size: 0.9rem; color: var(--chalk-dim); }
.nav nav a:hover { color: var(--chalk); }
@media (max-width: 720px) { .nav nav { display: none; } .nav .btn { margin-left: auto; } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 0.8rem 1.6rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.78rem;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.btn-line { border: 1px solid var(--chalk); color: var(--chalk); background: transparent; }
.btn-line:hover { background: var(--chalk); color: var(--worsted); }
.btn-solid { background: var(--chalk); color: var(--worsted); border: 1px solid var(--chalk); }
.btn-solid:hover { background: transparent; color: var(--chalk); }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 92vh; display: flex; align-items: flex-end; overflow: hidden; }
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 22%; }
.hero-veil {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(20,19,14,0.35) 0%, rgba(20,19,14,0.15) 40%, rgba(20,19,14,0.92) 100%);
}
.hero-copy { position: relative; padding: 3rem 1.25rem 4.5rem; max-width: var(--max); margin: 0 auto; width: 100%; }
.lede { font-size: 1.1rem; margin: 1.2rem 0 1.8rem; max-width: 30em; }
.hero-note { margin-top: 0.9rem; font-size: 0.85rem; font-style: italic; }

/* ---------- Story ---------- */
.story { padding: 5.5rem 1.25rem; }
.story-inner { max-width: 44em; margin: 0 auto; text-align: center; }

/* ---------- Process ---------- */
.process, .garments, .words, .book { padding: 5rem 1.25rem; max-width: var(--max); margin: 0 auto; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; margin: 2.5rem 0 3rem; }
.step img, .tier img { width: 100%; aspect-ratio: 4/5; object-fit: cover; display: block; filter: saturate(0.85); }
.stepno { color: var(--chalk-dim); margin-right: 0.4em; }
@media (max-width: 820px) { .steps { grid-template-columns: 1fr; } }

/* ---------- Garments ---------- */
.tiers { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; margin-top: 2.5rem; }
.tier { background: var(--worsted-2); border: 1px solid var(--thread); padding-bottom: 1.5rem; }
.tier h3, .tier p, .tier ul { padding: 0 1.5rem; }
.tier-sub { color: var(--chalk-dim); font-size: 0.85em; letter-spacing: 0.02em; }
.tier ul { list-style: none; margin-top: 1rem; padding-bottom: 0; }
.tier li {
  display: flex; justify-content: space-between;
  padding: 0.55rem 0; color: var(--chalk);
  border-top: 1px dashed var(--thread);
}
.tier li span { color: var(--chalk-dim); }
@media (max-width: 820px) { .tiers { grid-template-columns: 1fr; } }

/* ---------- Testimonials ---------- */
.quotes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; margin-top: 2.5rem; }
blockquote { border-left: 1px solid var(--thread); padding-left: 1.25rem; position: relative; }
blockquote p { font-style: italic; }
blockquote cite { display: block; margin-top: 1rem; font-style: normal; font-size: 0.85rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--chalk-dim); }
.japan .hanko {
  position: absolute; top: -0.4rem; right: 0;
  width: 2.2rem; height: 2.2rem;
  display: grid; place-items: center;
  border: 2px solid var(--hanko); color: var(--hanko);
  border-radius: 4px; font-size: 1.1rem;
  transform: rotate(-4deg); opacity: 0.9;
}
@media (max-width: 820px) { .quotes { grid-template-columns: 1fr; } }

/* ---------- Booking ---------- */
.book-lede { max-width: 34em; margin-bottom: 2.5rem; }
.booker { max-width: 640px; margin: 0 auto; background: var(--worsted-2); border: 1px solid var(--thread); padding: 1.5rem; }
.dates { display: flex; gap: 0.5rem; overflow-x: auto; padding-bottom: 0.75rem; margin-bottom: 1rem; border-bottom: 1px dashed var(--thread); }
.date-chip {
  flex: 0 0 auto; text-align: center; cursor: pointer;
  border: 1px solid var(--thread); background: transparent; color: var(--chalk);
  padding: 0.5rem 0.8rem; font-family: "Lora", serif;
}
.date-chip small { display: block; font-size: 0.65rem; letter-spacing: 0.15em; text-transform: uppercase; color: var(--chalk-dim); }
.date-chip strong { font-weight: 500; font-size: 1.05rem; }
.date-chip[aria-selected="true"] { background: var(--chalk); color: var(--worsted); }
.date-chip[aria-selected="true"] small { color: var(--worsted); }
.date-chip:disabled { opacity: 0.3; cursor: default; }

.slots { display: flex; flex-wrap: wrap; gap: 0.5rem; min-height: 3rem; }
.slots-hint { font-size: 0.9rem; }
.slot {
  border: 1px solid var(--thread); background: transparent; color: var(--chalk);
  padding: 0.5rem 0.9rem; cursor: pointer; font-family: "Lora", serif; font-size: 0.95rem;
}
.slot:hover, .slot[aria-selected="true"] { background: var(--chalk); color: var(--worsted); }

.bform { display: grid; gap: 0.9rem; margin-top: 1.25rem; border-top: 1px dashed var(--thread); padding-top: 1.25rem; }
.bform label { display: grid; gap: 0.3rem; font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--chalk-dim); }
.bform input, .bform textarea {
  background: var(--worsted); border: 1px solid var(--thread); color: var(--chalk);
  padding: 0.7rem 0.8rem; font-family: "Lora", serif; font-size: 1rem;
}
.bform input:focus, .bform textarea:focus, .btn:focus-visible, .slot:focus-visible, .date-chip:focus-visible {
  outline: 2px solid var(--chalk); outline-offset: 2px;
}
.chosen { color: var(--chalk); font-style: italic; }
.bform-note { font-size: 0.8rem; }
.bdone { margin-top: 1.25rem; border-top: 1px dashed var(--thread); padding-top: 1.25rem; color: var(--chalk); }

/* ---------- Footer ---------- */
.atelier { border-top: 1px solid var(--thread); padding: 4rem 1.25rem 2rem; }
.at-inner { max-width: var(--max); margin: 0 auto; display: flex; justify-content: space-between; gap: 2rem; flex-wrap: wrap; }
.at-name { color: var(--chalk); margin: 0.75rem 0 0.25rem; }
address { font-style: normal; }
.at-cta { display: grid; gap: 1rem; align-content: start; }
.fine { max-width: var(--max); margin: 3rem auto 0; font-size: 0.78rem; letter-spacing: 0.06em; }

/* ---------- Live chat widget ---------- */
.sbc-launch {
  position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 60;
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: "Marcellus", serif; letter-spacing: 0.08em; text-transform: uppercase;
  font-size: 0.8rem; color: var(--worsted);
  background: var(--chalk); border: none; border-radius: 999px;
  padding: 0.8rem 1.3rem; cursor: pointer;
  box-shadow: 0 10px 30px -12px rgba(0,0,0,0.7);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.sbc-launch:hover { transform: translateY(-2px); box-shadow: 0 16px 36px -14px rgba(0,0,0,0.8); }
.sbc-launch-dot {
  width: 0.55rem; height: 0.55rem; border-radius: 50%;
  background: var(--hanko); box-shadow: 0 0 0 3px rgba(180,55,46,0.25);
}
.sbc-panel {
  position: fixed; right: 1.25rem; bottom: 5.2rem; z-index: 61;
  width: min(360px, calc(100vw - 2.5rem)); max-height: min(70vh, 560px);
  display: flex; flex-direction: column;
  background: var(--worsted-2); color: var(--chalk);
  border: 1px solid var(--thread); border-radius: 14px; overflow: hidden;
  box-shadow: 0 24px 60px -24px rgba(0,0,0,0.85);
}
.sbc-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 0.75rem;
  padding: 1rem 1.1rem; border-bottom: 1px solid var(--thread);
}
.sbc-head strong { font-family: "Marcellus", serif; font-size: 1.02rem; display: block; }
.sbc-head span { color: var(--chalk-dim); font-size: 0.8rem; }
.sbc-close { background: none; border: none; color: var(--chalk-dim); font-size: 1.4rem; line-height: 1; cursor: pointer; padding: 0 0.2rem; }
.sbc-close:hover { color: var(--chalk); }
.sbc-log {
  flex: 1; overflow-y: auto; padding: 1rem 1.1rem;
  display: flex; flex-direction: column; gap: 0.5rem;
}
.sbc-msg {
  max-width: 82%; padding: 0.55rem 0.8rem; border-radius: 12px;
  font-size: 0.92rem; line-height: 1.45; white-space: pre-wrap; word-wrap: break-word;
}
.sbc-them { align-self: flex-start; background: rgba(242,238,227,0.08); border: 1px solid var(--thread); border-bottom-left-radius: 4px; }
.sbc-me { align-self: flex-end; background: var(--chalk); color: var(--worsted); border-bottom-right-radius: 4px; }
.sbc-note { align-self: center; text-align: center; color: var(--chalk-dim); font-size: 0.82rem; font-style: italic; max-width: 90%; }
.sbc-form { border-top: 1px solid var(--thread); padding: 0.75rem; display: flex; flex-direction: column; gap: 0.5rem; }
.sbc-name, .sbc-input {
  width: 100%; background: var(--worsted); color: var(--chalk);
  border: 1px solid var(--thread); border-radius: 8px; padding: 0.6rem 0.7rem; font: inherit; font-size: 0.92rem;
}
.sbc-name::placeholder, .sbc-input::placeholder { color: var(--chalk-dim); }
.sbc-name:focus, .sbc-input:focus { outline: none; border-color: var(--chalk-dim); }
.sbc-row { display: flex; gap: 0.5rem; }
.sbc-row .sbc-input { flex: 1; }
.sbc-send {
  font-family: "Marcellus", serif; letter-spacing: 0.06em; text-transform: uppercase; font-size: 0.78rem;
  background: var(--chalk); color: var(--worsted); border: none; border-radius: 8px; padding: 0 1rem; cursor: pointer;
}
.sbc-send:disabled { opacity: 0.55; cursor: default; }
@media (max-width: 480px) {
  .sbc-panel { right: 0.75rem; left: 0.75rem; width: auto; bottom: 4.8rem; }
  .sbc-launch { right: 0.9rem; bottom: 0.9rem; }
}
@media (prefers-reduced-motion: reduce) { .sbc-launch { transition: none; } }
