/* Built by build.mjs from site.json. Edit site.json (or the template), then run: node build.mjs */
/* Shared base for every template. A template's styles.css sets the look (custom properties) and styles its own sections. */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 400 1.0625rem/1.55 var(--font-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg, iframe { display: block; }
img { max-width: 100%; height: auto; }
a { color: inherit; }
p, ul, ol, dl, dd, figure, h1, h2, h3, h4, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }

::selection { background: var(--accent); color: var(--accent-fg); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
[tabindex="-1"]:focus { outline: none; }
section[id] { scroll-margin-top: calc(var(--header-h) + 8px); }

@media (prefers-reduced-motion: no-preference) {
  html:not(.lenis) { scroll-behavior: smooth; }
  .js [data-hero] { visibility: hidden; }
}
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

/* SplitText line masks: room for descenders while lines slide in. */
[data-split] > div, [data-hero-lines] > div { padding-bottom: 0.12em; margin-bottom: -0.12em; }

.wrap { max-width: var(--max); margin-inline: auto; }
.section { padding: clamp(4rem, 10vw, 8rem) var(--gutter); }

.skip {
  position: fixed; left: 12px; top: 12px; z-index: 100;
  padding: 0.75rem 1rem; border-radius: 8px;
  background: var(--fg); color: var(--bg);
  transform: translateY(-200%);
}
.skip:focus { transform: none; }

/* Concept label: deliberately plain, so it reads as a note on top of the design, not part of it. */
.concept-bar {
  padding: 0.6rem var(--gutter);
  background: #161616; color: #F4F4F0;
  font: 500 0.8125rem/1.35 system-ui, -apple-system, "Segoe UI", sans-serif;
  text-align: center;
}
.concept-bar a { color: inherit; font-weight: 700; }

@media (max-width: 759px) {
  .nav-wide { display: none; }
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
  min-height: 52px; padding: 0 1.5rem;
  border: 0; border-radius: var(--radius-btn, 999px);
  background: var(--btn-bg); color: var(--btn-fg);
  font: 700 1rem/1 var(--font-body);
  text-decoration: none; cursor: pointer;
  transition: background-color 0.3s, color 0.3s, box-shadow 0.3s, transform 0.2s;
}
.btn:hover { background: var(--btn-hover-bg); color: var(--btn-hover-fg); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.6; cursor: progress; }
.btn-small { min-height: 42px; padding: 0 1.1rem; font-size: 0.9375rem; }
.btn-ghost { background: transparent; color: var(--fg); box-shadow: inset 0 0 0 1.5px currentColor; }
.btn-ghost:hover { background: var(--fg); color: var(--bg); }

/* "Open now" badge, filled in by site.js */
.open-now { display: inline-flex; align-items: center; gap: 0.55rem; font-weight: 700; }
.open-now::before { content: ""; flex: none; width: 0.6rem; height: 0.6rem; border-radius: 50%; background: var(--closed, #B42318); }
.open-now.is-open::before { background: var(--open, #1A7F37); box-shadow: 0 0 0 4px color-mix(in srgb, var(--open, #1A7F37) 22%, transparent); }

/* Hours */
.hours-row { display: flex; justify-content: space-between; gap: 1rem; padding: 0.65rem 0; border-bottom: 1px solid var(--line); }
.hours-row dt { font-weight: 600; }
.hours-row dd { font-variant-numeric: tabular-nums; text-align: right; }
.hours-row.is-today { font-weight: 800; }
.hours-row.is-today dt::after { content: " (today)"; font-weight: 500; }

/* Map */
.map { position: relative; overflow: hidden; aspect-ratio: 4 / 3; background: var(--line); }
.map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* Forms */
.lead-form { display: grid; gap: 1.25rem; }
.field { display: grid; gap: 0.4rem; min-width: 0; }
.field > label, .checks legend { font-weight: 700; font-size: 0.9375rem; }
.optional { font-weight: 400; color: var(--muted); }
/* Text boxes only: checkboxes and radios keep their own small size. */
.field input:not([type="checkbox"]):not([type="radio"]), .field select, .field textarea {
  width: 100%; min-height: 52px; padding: 0.75rem 0.9rem;
  border: 1.5px solid var(--input-border, var(--line)); border-radius: var(--radius-input, 8px);
  background: var(--input-bg, #FFFFFF); color: var(--input-fg, var(--fg));
}
.field textarea { min-height: 128px; resize: vertical; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.check-options input { flex: none; width: 1.1rem; height: 1.1rem; }
.checks { margin: 0; padding: 0; border: 0; min-width: 0; }
.checks legend { padding: 0; margin-bottom: 0.6rem; }
.check-options { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.check-options label {
  display: inline-flex; align-items: center; gap: 0.5rem; min-height: 44px; padding: 0 1rem;
  border: 1.5px solid var(--input-border, var(--line)); border-radius: 999px;
  background: var(--input-bg, #FFFFFF); color: var(--input-fg, var(--fg));
  font-weight: 500; cursor: pointer;
}
.check-options label:has(:checked) { background: var(--fg); border-color: var(--fg); color: var(--bg); }
.check-options input { margin: 0; accent-color: var(--accent); }
.hp { display: none; }
.form-end { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; }
.form-status { font-weight: 700; }
.form-error { padding: 1rem 1.1rem; border-left: 3px solid var(--closed, #B42318); background: rgba(180, 35, 24, 0.08); }
@media (min-width: 640px) {
  .lead-form { grid-template-columns: 1fr 1fr; column-gap: 1.25rem; }
  .field-wide, .checks, .form-end, .form-error { grid-column: 1 / -1; }
}

/* Footer */
.site-footer { padding: clamp(3.5rem, 8vw, 6rem) var(--gutter) 2rem; background: var(--footer-bg); color: var(--footer-fg); }
.footer-grid { display: grid; gap: 2rem; }
.footer-name { margin-bottom: 0.75rem; font-family: var(--font-display); font-size: clamp(1.75rem, 3vw, 2.5rem); line-height: 1; }
.footer-h { margin-bottom: 0.6rem; font: 700 0.9375rem/1.2 var(--font-body); opacity: 0.7; }
.site-footer p + p { margin-top: 0.25rem; }
.site-footer a { text-underline-offset: 0.2em; }
.footer-base {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 2rem;
  margin-top: 3rem; padding-top: 1.25rem;
  border-top: 1px solid color-mix(in srgb, currentColor 25%, transparent);
  font-size: 0.875rem; opacity: 0.8;
}
@media (min-width: 760px) {
  .footer-grid { grid-template-columns: 1.4fr 1fr 1.3fr 1fr; }
}

/* Mobile Call / Book bar */
.sticky-bar { display: none; }
@media (max-width: 759px) {
  .sticky-bar {
    position: fixed; z-index: 70; left: 12px; right: 12px; bottom: calc(10px + env(safe-area-inset-bottom));
    display: grid; grid-template-columns: 1fr 1.5fr; gap: 8px; padding: 7px;
    border-radius: 999px; background: var(--bar-bg); box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
    transition: transform 0.45s cubic-bezier(0.2, 0.7, 0.1, 1), opacity 0.3s;
  }
  .sticky-bar a { display: flex; align-items: center; justify-content: center; min-height: 48px; border-radius: 999px; font-weight: 700; text-decoration: none; }
  .sticky-call { color: var(--bar-fg); box-shadow: inset 0 0 0 1.5px currentColor; }
  .sticky-book { background: var(--accent); color: var(--accent-fg); }
  .js .sticky-bar:not(.is-shown) { transform: translateY(150%); opacity: 0; pointer-events: none; }
  .site-footer { padding-bottom: 7rem; }
}

/* Barbershop template: retro Florida barbershop. Mint tile, sea green, chrome, and one barber-pole red. */

:root {
  --bg: #EEF3EF;
  --fg: #0E3B36;
  --muted: #4E6B66;
  --line: rgba(14, 59, 54, 0.18);
  --mint: #A9DCC6;
  --chrome: #C3CCCA;
  --red: #D9362B;
  --grout: rgba(14, 59, 54, 0.075);
  --accent: var(--mint);
  --accent-fg: var(--fg);
  --btn-bg: var(--fg);
  --btn-fg: var(--bg);
  --btn-hover-bg: var(--mint);
  --btn-hover-fg: var(--fg);
  --focus: var(--fg);
  --radius-input: 6px;
  --footer-bg: var(--fg);
  --footer-fg: var(--bg);
  --bar-bg: var(--fg);
  --bar-fg: var(--bg);
  --font-display: "Big Shoulders Display", "Arial Narrow", Impact, sans-serif;
  --font-body: "Figtree", system-ui, sans-serif;
  --gutter: clamp(20px, 4.5vw, 56px);
  --max: 1280px;
  --header-h: 68px;
  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);
}

/* Square shop tiles with grout lines */
.tiles {
  background-color: var(--bg);
  background-image: linear-gradient(var(--grout) 1px, transparent 1px), linear-gradient(90deg, var(--grout) 1px, transparent 1px);
  background-size: 46px 46px;
}

.section-title {
  font: 800 clamp(2.75rem, 7vw, 5.5rem)/0.9 var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.005em;
}

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  min-height: var(--header-h); padding: 0.5rem var(--gutter);
  background: rgba(238, 243, 239, 0.94);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  border-bottom: 1.5px solid var(--fg);
}
.brand {
  display: inline-flex; align-items: center; gap: 0.7rem;
  font: 800 1.55rem/1 var(--font-display); text-transform: uppercase; letter-spacing: 0.02em;
  text-decoration: none;
}
.site-nav { display: flex; align-items: center; gap: clamp(1rem, 2.5vw, 2rem); font-weight: 600; }
.site-nav a:not(.btn) {
  padding-block: 0.3rem; text-decoration: none;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 2px no-repeat;
  transition: background-size 0.3s var(--ease);
}
.site-nav a:not(.btn):hover { background-size: 100% 2px; }

/* Barber pole: stripes slide as you scroll (site.js) */
.pole { position: relative; display: block; flex: none; overflow: hidden; border-radius: 999px; background: var(--chrome); box-shadow: inset 0 0 0 2px var(--fg); }
.pole-stripes {
  position: absolute; inset: 3px; border-radius: inherit;
  background: repeating-linear-gradient(-45deg, var(--red) 0 7px, #FFFFFF 7px 14px, var(--fg) 14px 21px, #FFFFFF 21px 28px);
  background-size: 39.6px 39.6px; /* one stripe period (28px × √2), so it tiles without seams while it moves */
}
.pole-small { width: 14px; height: 32px; }
.pole-small .pole-stripes { inset: 2px; }
.pole-tall { width: 26px; }

/* Hero */
.hero {
  display: grid; gap: clamp(2.5rem, 6vw, 4rem);
  padding: clamp(2.5rem, 7vw, 5rem) var(--gutter) clamp(3.5rem, 8vw, 6rem);
}
.hero-title {
  font: 900 clamp(3.6rem, 14.5vw, 9.75rem)/0.84 var(--font-display);
  text-transform: uppercase; letter-spacing: -0.01em;
}
.hero-sub { max-width: 33ch; margin-top: 1.5rem; color: var(--muted); font-size: clamp(1.125rem, 1.5vw, 1.3125rem); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }
.hero-open { margin-top: 1.5rem; }
.hero-visual { position: relative; padding-left: 44px; }
.hero-visual .pole-tall { position: absolute; left: 0; top: 14%; bottom: 14%; }
.hero-media {
  position: relative; overflow: hidden; aspect-ratio: 4 / 5;
  border-radius: 999px 999px 8px 8px;
  box-shadow: 0 0 0 6px var(--bg), 0 0 0 8px var(--fg);
}
.hero-media img { position: absolute; left: 0; top: -7%; width: 100%; height: 114%; object-fit: cover; }
@media (min-width: 900px) {
  .hero { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: center; column-gap: clamp(2.5rem, 6vw, 6rem); min-height: calc(100svh - var(--header-h)); }
  .hero-title { font-size: clamp(4rem, 8.4vw, 9.5rem); }
  .hero-visual { width: 100%; max-width: 500px; justify-self: end; }
}

/* Prices: a felt letter board in a chrome frame */
.prices { background: var(--mint); }
.prices-wrap { display: grid; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.prices-intro p { max-width: 32ch; margin: 1.25rem 0 1.75rem; font-size: 1.125rem; }
.board-frame {
  padding: clamp(10px, 1.6vw, 16px); border-radius: 10px;
  background: linear-gradient(135deg, #F4F7F6 0%, #A3AFAC 30%, #E8EDEB 50%, #8E9B98 72%, #F0F3F2 100%);
  box-shadow: 0 28px 60px -24px rgba(14, 59, 54, 0.55);
}
.board {
  padding: clamp(1.25rem, 4vw, 2.5rem) clamp(1.25rem, 4vw, 2.75rem);
  border-radius: 4px;
  background: repeating-linear-gradient(180deg, #123029 0 3px, #0C241F 3px 6px);
  box-shadow: inset 0 2px 14px rgba(0, 0, 0, 0.55);
  color: #F3F1EA;
  font: 700 clamp(1.2rem, 2.7vw, 2rem)/1.15 var(--font-display);
  text-transform: uppercase; letter-spacing: 0.09em;
}
.board li { display: flex; justify-content: space-between; align-items: baseline; gap: 1.25rem; padding: 0.45rem 0; text-shadow: 0 1px 1px rgba(0, 0, 0, 0.7); }
.board small { font-size: 0.6em; letter-spacing: 0.12em; opacity: 0.8; }
.board-price { white-space: nowrap; font-variant-numeric: lining-nums; }
@media (min-width: 900px) {
  .prices-wrap { grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.4fr); }
}

/* The shop */
.shop-wrap { display: grid; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.shop-media { position: relative; overflow: hidden; aspect-ratio: 5 / 4; border-radius: 8px; }
.shop-media img { width: 100%; height: 100%; object-fit: cover; }
.shop-copy p { max-width: 42ch; margin-top: 1.25rem; color: var(--muted); font-size: 1.125rem; }
.facts { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.75rem; }
.facts li { padding: 0.5rem 0.95rem; border: 1.5px solid var(--fg); border-radius: 999px; font-size: 0.9375rem; font-weight: 600; }
@media (min-width: 900px) {
  .shop-wrap { grid-template-columns: 1.1fr 1fr; }
}

/* Fresh cuts: swipe on phones, a staggered row on desktop */
.cuts { padding-inline: 0; background: var(--fg); color: var(--bg); }
.cuts .wrap { padding-inline: var(--gutter); }
.cuts-strip {
  display: grid; grid-auto-flow: column; grid-auto-columns: 72%; gap: 12px;
  margin-top: clamp(2rem, 4vw, 3rem); padding: 0 var(--gutter);
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter);
  scrollbar-width: none;
}
.cuts-strip::-webkit-scrollbar { display: none; }
.cut { position: relative; overflow: hidden; aspect-ratio: 3 / 4; border-radius: 6px; scroll-snap-align: start; }
.cut img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.9s var(--ease); }
.cut:hover img { transform: scale(1.05); }
@media (min-width: 900px) {
  .cuts-strip {
    grid-auto-flow: row; grid-template-columns: repeat(5, minmax(0, 1fr));
    max-width: calc(var(--max) + 2 * var(--gutter)); margin-inline: auto; overflow: visible;
  }
  .cut:nth-child(even) { margin-top: 3rem; }
}

/* Hours and directions */
.visit-wrap { display: grid; gap: clamp(2rem, 5vw, 4rem); }
.visit-info .open-now { margin-top: 1.25rem; }
.visit-place { margin-top: 1rem; font-size: 1.125rem; }
.visit-phone { font: 800 clamp(1.75rem, 3vw, 2.25rem)/1 var(--font-display); letter-spacing: 0.01em; text-decoration: none; }
.visit-info .hours { max-width: 440px; margin-top: 1.5rem; }
.visit-map .map { aspect-ratio: 1 / 1; border-radius: 8px; box-shadow: 0 0 0 1.5px var(--fg); filter: saturate(0.55); }
@media (min-width: 900px) {
  .visit-wrap { grid-template-columns: 1fr 1fr; align-items: start; }
}

/* Booking */
.book { background: #F8FBF9; }
.book-wrap { display: grid; gap: clamp(2rem, 5vw, 4rem); }
.book-intro p { max-width: 36ch; margin-top: 1.25rem; color: var(--muted); font-size: 1.125rem; }
@media (min-width: 900px) {
  .book-wrap { grid-template-columns: 0.8fr 1.2fr; align-items: start; }
}

.footer-name { font-weight: 800; text-transform: uppercase; }
