/* =====================================================================
   Base layout — shared by every theme.
   Build order of style.css:  base.css  ->  themes/<theme>.css  ->  client style block
   Colors and fonts come from the client style block (generated by build.js
   from the palette/fonts chosen in the client JSON). Theme files add shape
   and personality. The defaults below are only fallbacks.
   ===================================================================== */
:root {
  /* colors (set per client) */
  --bg: #ffffff;
  --surface: #f5f5f5;
  --card-bg: #ffffff;
  --text: #111111;
  --muted: #5b5b5b;
  --border: #e4e4e4;
  --input-bg: #ffffff;
  --input-text: #111111;
  --input-border: #9a9a9a;
  --header-bg: rgba(255, 255, 255, .92);
  --primary: #111111;      /* button fill */
  --on-primary: #ffffff;   /* button text */
  --primary-ink: #111111;  /* primary when used as text/icons (contrast-checked) */
  --accent: #111111;       /* decorative highlight fill */
  --on-accent: #ffffff;
  --accent-ink: #111111;   /* accent when used as text (contrast-checked) */
  --pop-2: var(--accent);
  --pop-3: var(--primary);
  --texture: none;
  /* type (set per client) */
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-head: var(--font-body);
  --head-weight: 700;
  --head-spacing: -0.01em;
  --head-scale: 1;
  /* shape (themes set these; --btn-radius is set per client) */
  --head-transform: none;
  --head-line: 1.1;
  --radius: 8px;
  --btn-radius: 8px;
  --img-radius: var(--radius);
  --btn-transform: none;
  --btn-spacing: 0;
  --section-pad: 4rem;
  --max: 1100px;
  --header-h: 64px;
  /* full-bleed hero: always white text over a darkened photo, whatever the palette */
  --hero-overlay: linear-gradient(180deg, rgba(0, 0, 0, .35) 0%, rgba(0, 0, 0, .55) 50%, rgba(0, 0, 0, .72) 100%);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  padding-bottom: 76px; /* room for the mobile action bar */
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 {
  font-family: var(--font-head);
  font-weight: var(--head-weight);
  text-transform: var(--head-transform);
  letter-spacing: var(--head-spacing);
  line-height: var(--head-line);
  margin: 0 0 .5em;
  overflow-wrap: break-word;
}
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--primary-ink); outline-offset: 3px; }
section[id] { scroll-margin-top: var(--header-h); }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 1.25rem; }
.skip-link { position: absolute; left: -9999px; top: 0; }
.skip-link:focus { left: 1rem; top: 1rem; z-index: 100; background: var(--bg); padding: .5rem 1rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 48px; padding: .8rem 1.5rem;
  border: 2px solid var(--primary); border-radius: var(--btn-radius);
  background: var(--primary); color: var(--on-primary);
  font: inherit; font-weight: 600; line-height: 1.1;
  text-decoration: none; text-transform: var(--btn-transform); letter-spacing: var(--btn-spacing);
  cursor: pointer; transition: opacity .15s, transform .15s;
}
.btn:hover { opacity: .9; }
.btn:disabled { opacity: .6; cursor: wait; }
.btn svg { width: 1.15em; height: 1.15em; flex: none; }
.btn-sm { min-height: 40px; padding: .5rem 1rem; font-size: .9rem; white-space: nowrap; flex: none; }
.btn-lg { min-height: 56px; padding: 1rem 2rem; font-size: 1.08rem; }
.btn-block { width: 100%; }
.btn-outline { background: transparent; color: var(--text); border-color: currentColor; }
.btn-ghost { background: transparent; color: var(--text); border-color: currentColor; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: var(--header-bg);
  border-bottom: 1px solid var(--border);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: var(--header-h); }
.brand {
  display: flex; align-items: center; gap: .6rem; min-width: 0;
  font-family: var(--font-head); font-weight: var(--head-weight); text-transform: var(--head-transform);
  font-size: 1.1rem; line-height: 1.15; text-decoration: none;
}
.brand span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brand img { width: 40px; height: 40px; object-fit: contain; border-radius: 50%; flex: none; }
.site-nav { display: none; }
@media (min-width: 860px) {
  .site-nav { display: flex; gap: 1.75rem; }
  .site-nav a { text-decoration: none; font-size: .95rem; color: var(--muted); }
  .site-nav a:hover { color: var(--text); }
}

/* ---------- Hero (shared) ---------- */
.hero { display: grid; background-color: var(--bg); color: var(--text); }
.hero-inner { padding: 3.5rem 1.25rem 3rem; text-align: center; }
.hero h1 { font-size: calc(clamp(2.5rem, 11vw, 5rem) * var(--head-scale)); }
.hero .eyebrow { color: var(--accent-ink); }
.tagline { font-size: clamp(1.1rem, 4.2vw, 1.4rem); color: var(--muted); max-width: 34ch; margin: 0 auto 2rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; justify-content: center; }
.hero-media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }

/* Hero layout 1: centered — text centered, wide photo below it */
.hero--centered .hero-inner { max-width: 820px; margin: 0 auto; }
.hero--centered .tagline { max-width: 40ch; }
.hero--centered .hero-media { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 1.25rem 3rem; }
.hero--centered .hero-media img { border-radius: var(--img-radius); }
@media (min-width: 768px) {
  .hero--centered .hero-inner { padding-top: 5rem; }
  .hero--centered .hero-media img { aspect-ratio: 21 / 9; }
}

/* Hero layout 2: split — text + photo side by side on desktop, stacked on phones */
@media (min-width: 900px) {
  .hero--split { grid-template-columns: 1.05fr 1fr; align-items: center; min-height: min(80vh, 720px); }
  .hero--split .hero-inner { text-align: left; padding: 4rem 3rem 4rem max(1.25rem, calc((100vw - var(--max)) / 2 + 1.25rem)); }
  .hero--split .tagline { margin-left: 0; }
  .hero--split .hero-actions { justify-content: flex-start; }
  .hero--split .hero-media { height: 100%; }
  .hero--split .hero-media img { height: 100%; aspect-ratio: auto; }
}

/* Hero layout 3: full-bleed — photo fills the screen, white text on a dark overlay */
.hero--full-bleed { position: relative; isolation: isolate; min-height: min(88vh, 820px); min-height: min(88svh, 820px); place-items: center; color: #fff; background-color: #111; }
.hero--full-bleed .hero-media { position: absolute; inset: 0; z-index: -1; }
.hero--full-bleed .hero-media img { height: 100%; aspect-ratio: auto; }
.hero--full-bleed .hero-media::after { content: ""; position: absolute; inset: 0; background: var(--hero-overlay); }
.hero--full-bleed .hero-inner { padding: 5rem 1.25rem; text-shadow: 0 1px 18px rgba(0, 0, 0, .35); }
.hero--full-bleed h1 { color: #fff; }
.hero--full-bleed .tagline { color: rgba(255, 255, 255, .9); }
.hero--full-bleed .eyebrow { color: rgba(255, 255, 255, .88); }
.hero--full-bleed .btn-ghost { color: #fff; }

/* ---------- Sections ---------- */
.section { position: relative; padding: var(--section-pad) 0; }
main > .section { --sec-bg: var(--bg); background-color: var(--sec-bg); }
main > .section:nth-child(odd) { --sec-bg: var(--surface); } /* alternate backgrounds automatically */
.section-head { margin-bottom: 2.5rem; }
.eyebrow { font-size: .78rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin-bottom: .75rem; }
.section-title { font-size: calc(clamp(1.9rem, 7vw, 3rem) * var(--head-scale)); margin-bottom: .35em; }
.section-intro { color: var(--muted); max-width: 40rem; margin-bottom: 0; }

/* ---------- Texture (optional, subtle pattern behind sections) ---------- */
main > .section, .site-footer, .hero:not(.hero--full-bleed) { background-image: var(--texture); }

/* ---------- Dividers (optional, between sections) ---------- */
.divider-line main > .section::before {
  content: ""; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: min(calc(var(--max) - 2.5rem), calc(100% - 2.5rem)); height: 1px; background: var(--border);
}
.divider-line main > .section::after {
  content: ""; position: absolute; top: -4px; left: 50%; width: 8px; height: 8px;
  transform: translateX(-50%) rotate(45deg); background: var(--accent);
}
.divider-wave main > .section::before,
.divider-slant main > .section::before {
  content: ""; position: absolute; left: 0; right: 0; top: -31px; height: 32px; z-index: 1;
  background-color: var(--sec-bg); background-image: var(--texture);
  -webkit-mask: var(--divider-shape) center / 100% 100% no-repeat; mask: var(--divider-shape) center / 100% 100% no-repeat;
  pointer-events: none;
}
.divider-wave { --divider-shape: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 40' preserveAspectRatio='none'%3E%3Cpath d='M0 40V22C150 2 300 2 450 20S750 40 900 20 1100 4 1200 14V40Z'/%3E%3C/svg%3E"); }
.divider-slant { --divider-shape: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 40' preserveAspectRatio='none'%3E%3Cpath d='M0 40L1200 0V40Z'/%3E%3C/svg%3E"); }

/* ---------- Services ---------- */
.services { list-style: none; margin: 0; padding: 0; display: grid; }
.service {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem;
  padding: 1.1rem 0; border-bottom: 1px solid var(--border);
}
.service-name { font-family: var(--font-body); font-size: 1.05rem; font-weight: 600; letter-spacing: 0; text-transform: none; line-height: 1.35; margin: 0; }
.service-meta { color: var(--muted); font-size: .9rem; margin: .2rem 0 0; }
.service-side { display: flex; flex-direction: column; align-items: flex-end; gap: .35rem; flex: none; }
.service-price { font-weight: 700; font-size: 1.05rem; white-space: nowrap; }
.service-book { font-size: .82rem; font-weight: 600; color: var(--muted); text-underline-offset: 3px; padding: .25rem 0; }
.service-book:hover { color: var(--text); }
@media (min-width: 768px) { .services { grid-template-columns: 1fr 1fr; column-gap: 3rem; } }

/* ---------- Booking form ---------- */
.booking-card {
  max-width: 580px; margin: 0 auto; padding: 1.5rem 1.25rem;
  background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius);
}
@media (min-width: 600px) { .booking-card { padding: 2.25rem; } }
.field { display: grid; gap: .4rem; margin-bottom: 1.1rem; min-width: 0; }
.field label { font-weight: 600; font-size: .95rem; }
.field input, .field select {
  display: block; width: 100%; min-height: 50px; padding: .7rem .85rem;
  font: inherit; font-size: 16px; /* 16px stops iPhones zooming in */
  color: var(--input-text); background: var(--input-bg);
  border: 1.5px solid var(--input-border); border-radius: min(var(--radius), 14px);
}
.field input:focus, .field select:focus { outline: none; border-color: var(--primary-ink); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary-ink) 30%, transparent); }
.field-row { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 0 .75rem; }
.field input[type="date"] { min-width: 0; padding-left: .7rem; padding-right: .55rem; -webkit-appearance: none; appearance: none; }
@media (max-width: 360px) { .field-row { grid-template-columns: 1fr; } }
.form-hint { font-size: .9rem; color: var(--muted); margin: -.4rem 0 1rem; }
.form-hint:empty { display: none; }
.form-note { font-size: .88rem; color: var(--muted); text-align: center; margin: .9rem 0 0; }
.form-status { margin-top: 1rem; padding: .9rem 1rem; border-radius: min(var(--radius), 12px); font-weight: 600; }
.form-status.is-ok { background: color-mix(in srgb, #2e9e5b 16%, transparent); }
.form-status.is-error { background: color-mix(in srgb, #d23c3c 16%, transparent); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* ---------- Gallery ---------- */
.gallery { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: .5rem; }
.gallery img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--img-radius); }
@media (min-width: 768px) { .gallery { grid-template-columns: repeat(3, 1fr); gap: .75rem; } }

/* ---------- Visit ---------- */
.visit-grid { display: grid; gap: 1.25rem; }
@media (min-width: 768px) { .visit-grid { grid-template-columns: 1fr 1fr; gap: 2rem; } }
.visit-card { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem 1.25rem; }
@media (min-width: 600px) { .visit-card { padding: 2rem; } }
.visit-card h3 { font-size: calc(1.5rem * var(--head-scale)); }
.open-status { display: inline-block; font-size: .85rem; font-weight: 700; padding: .3rem .75rem; border-radius: 999px; margin-bottom: 1rem; }
.open-status.is-open { background: color-mix(in srgb, #2e9e5b 18%, transparent); }
.open-status.is-closed { background: color-mix(in srgb, var(--muted) 18%, transparent); }
.hours { width: 100%; border-collapse: collapse; }
.hours th, .hours td { padding: .6rem 0; border-bottom: 1px solid var(--border); text-align: left; font-weight: 400; }
.hours td { text-align: right; }
.hours tr:last-child th, .hours tr:last-child td { border-bottom: 0; }
.hours tr.is-today th, .hours tr.is-today td { font-weight: 700; }
.hours .closed { color: var(--muted); }
address { font-style: normal; font-size: 1.1rem; margin-bottom: 1.5rem; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; gap: .85rem; }
@media (min-width: 768px) { .contact-grid { grid-template-columns: repeat(3, 1fr); gap: 1.25rem; } }
.contact-card {
  display: flex; align-items: center; gap: 1rem; padding: 1.15rem 1.25rem; min-height: 72px;
  background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius); text-decoration: none;
}
.contact-card:hover { border-color: var(--primary-ink); }
.contact-card svg { width: 26px; height: 26px; flex: none; color: var(--primary-ink); }
.contact-label { display: block; font-size: .8rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }
.contact-value { display: block; font-weight: 600; font-size: 1.05rem; word-break: break-word; }

/* ---------- Footer ---------- */
.site-footer { padding: 2.5rem 0; border-top: 1px solid var(--border); font-size: .9rem; color: var(--muted); text-align: center; }
.site-footer p { margin: 0 0 .4rem; }
.footer-name { font-family: var(--font-head); font-weight: var(--head-weight); text-transform: var(--head-transform); color: var(--text); font-size: 1.15rem; }
.site-footer a { text-underline-offset: 3px; white-space: nowrap; }

/* ---------- Mobile action bar ---------- */
.action-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: grid; grid-template-columns: 1fr 1.5fr; gap: .6rem;
  padding: .6rem .75rem calc(.6rem + env(safe-area-inset-bottom));
  background: var(--header-bg); border-top: 1px solid var(--border);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.action-bar .btn { min-height: 50px; padding: .6rem .8rem; }
@media (min-width: 860px) {
  .action-bar { display: none; }
  body { padding-bottom: 0; }
}

/* =====================================================================
   Theme: clean-minimal — white, black, simple sans-serif.
   Good for: barbers, lash studios.
   Colors + fonts come from the client's palette/fonts (see themes.json).
   ===================================================================== */
:root {
  --head-line: 1.02;
  --radius: 4px;
  --img-radius: 0;
}

.hero h1 { font-size: calc(clamp(2.75rem, 12.5vw, 5.75rem) * var(--head-scale)); }
.eyebrow { letter-spacing: .2em; font-weight: 500; }
.section-head { border-top: 1px solid var(--text); padding-top: 1.25rem; }
.service-price { font-weight: 600; }
.hours tr.is-today th, .hours tr.is-today td { font-weight: 600; }
.hero--centered .hero-media img { border-radius: 0; }

/* ===== This client's style (generated by build.js from the "style" block) ===== */
:root {
  color-scheme: light;
  --bg: #f5f2ed;
  --surface: #ebe5dc;
  --card-bg: #fcfbf9;
  --text: #1d1b18;
  --muted: #5c564f;
  --border: #d7d4cf;
  --input-bg: #fcfbf9;
  --input-text: #1d1b18;
  --input-border: #989694;
  --header-bg: rgba(245, 242, 237, 0.92);
  --primary: #1d1b18;
  --on-primary: #ffffff;
  --primary-ink: #1d1b18;
  --accent: #80603f;
  --on-accent: #ffffff;
  --accent-ink: #80603f;
  --pop-2: #80603f;
  --pop-3: #1d1b18;
  --font-head: "Instrument Serif", Georgia, serif;
  --font-body: "Inter", system-ui, sans-serif;
  --head-weight: 400;
  --head-spacing: -0.01em;
  --head-scale: 1.15;
  --btn-radius: 10px;
  --texture: none;
}
