/* ==========================================================================
   Ramey Old Town Barber Shop — shared stylesheet
   Palette & type from research/design-language.md.
   Theme tokens: light default on :root, dark override on [data-theme="dark"].
   Two distinct roles kept separate on purpose:
     --on-brand / --accent-on-dark  = text on always-dark/brand bands (never remapped)
     --surface                       = card fill (does flip in dark mode)
   ========================================================================== */

:root {
  /* Page */
  --ground: #F6F0E4;
  --surface: #FFFFFF;
  --ink: #1E1913;
  --muted: #5C5245;

  /* Brand */
  --brand: #8E2B2B;        /* barber-pole red: CTA fill, rules */
  --brand-hover: #752121;
  --brand-text: #7F2424;   /* red text under ~20px on light */
  --brass: #A8742A;        /* ornaments / large display only */

  /* Fixed-in-both-themes band roles */
  --on-brand: #FFFFFF;        /* text on brand/dark bands */
  --accent-on-dark: #E2BE82;  /* brass text on always-dark bands */
  --band: #1B1611;            /* always-dark header/hero/footer/CTA band */
  --band-line: rgba(255,255,255,0.14);

  /* Derived */
  --card-border: rgba(30,25,19,0.12);
  --shadow: 0 1px 2px rgba(20,17,14,.06), 0 8px 24px rgba(20,17,14,.08);
  --radius: 10px;
  --maxw: 1120px;

  --font-head: 'Oswald', 'Arial Narrow', sans-serif;
  --font-body: 'Source Sans 3', system-ui, -apple-system, Segoe UI, sans-serif;
}

[data-theme="dark"] {
  --ground: #14110E;
  --surface: #262019;
  --ink: #F3ECDD;
  --muted: #B9AE9C;

  --brand: #8E2B2B;
  --brand-hover: #A33636;
  --brand-text: #E6A39A;
  --brass: #A8742A;

  /* band roles intentionally NOT remapped */
  --on-brand: #FFFFFF;
  --accent-on-dark: #E2BE82;
  --band: #0C0A08;
  --band-line: rgba(255,255,255,0.12);

  --card-border: rgba(243,236,221,0.12);
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.5);
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--ground);
  -webkit-font-smoothing: antialiased;
  transition: background-color .2s ease, color .2s ease;
}
img { max-width: 100%; display: block; }
a { color: var(--brand-text); }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .03em;
  line-height: 1.1;
  margin: 0 0 .5em;
  color: var(--ink);
}
h1 { font-size: clamp(2rem, 6vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 4vw, 2.4rem); }
h3 { font-size: 1.25rem; letter-spacing: .04em; }
p { margin: 0 0 1em; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.section { padding: 64px 0; }
.section--tight { padding: 44px 0; }
.eyebrow {
  font-family: var(--font-head);
  text-transform: uppercase;
  letter-spacing: .18em;
  font-size: .8rem;
  font-weight: 600;
  color: var(--brand-text);
  margin: 0 0 .6em;
}
.lead { font-size: 1.15rem; color: var(--muted); max-width: 60ch; }
.center { text-align: center; }
.center .lead { margin-left: auto; margin-right: auto; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5em;
  font-family: var(--font-head);
  text-transform: uppercase; letter-spacing: .06em; font-weight: 600;
  font-size: .95rem;
  padding: .75em 1.4em;
  border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer; text-decoration: none;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.btn--primary { background: var(--brand); color: var(--on-brand); }
.btn--primary:hover { background: var(--brand-hover); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--card-border); }
.btn--ghost:hover { border-color: var(--brand); color: var(--brand-text); }
/* ghost button sitting ON a dark band keeps light text regardless of theme */
.band .btn--ghost, .hero .btn--ghost { color: var(--on-brand); border-color: var(--band-line); }
.band .btn--ghost:hover, .hero .btn--ghost:hover { border-color: var(--accent-on-dark); color: var(--accent-on-dark); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--band);
  color: var(--on-brand);
  border-bottom: 3px solid var(--brand);
}
.site-header .container {
  display: flex; align-items: center; gap: 16px;
  min-height: 68px;
}
.brand-mark {
  display: flex; align-items: center; gap: 12px;
  text-decoration: none; color: var(--on-brand);
  margin-right: auto;
}
.brand-pole {
  width: 10px; height: 34px; border-radius: 5px; flex: none;
  background: repeating-linear-gradient(45deg, var(--brand) 0 6px, #fff 6px 12px, #2d4a8a 12px 18px);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.2);
}
.brand-name {
  font-family: var(--font-head); font-weight: 700;
  text-transform: uppercase; letter-spacing: .05em;
  font-size: 1.1rem; line-height: 1;
}
.brand-name span { display: block; font-size: .62rem; letter-spacing: .22em; color: var(--accent-on-dark); font-weight: 500; }

.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  color: var(--on-brand); text-decoration: none;
  font-family: var(--font-head); text-transform: uppercase;
  letter-spacing: .05em; font-size: .9rem; font-weight: 500;
  padding: .5em .75em; border-radius: 6px;
}
.nav a:hover { background: rgba(255,255,255,.1); }
.nav a[aria-current="page"] { color: var(--accent-on-dark); }

.theme-toggle {
  background: transparent; border: 1px solid var(--band-line);
  color: var(--on-brand); width: 40px; height: 40px; flex: none;
  border-radius: 8px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
.theme-toggle:hover { border-color: var(--accent-on-dark); color: var(--accent-on-dark); }
.theme-toggle svg { width: 20px; height: 20px; }
.theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

.nav-toggle { display: none; background: transparent; border: 1px solid var(--band-line); color: var(--on-brand); width: 40px; height: 40px; border-radius: 8px; cursor: pointer; }

/* ---------- Hero ---------- */
.hero { position: relative; background: var(--band); color: var(--on-brand); overflow: hidden; }
.hero__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 55%; opacity: .32; }
.hero__overlay { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(12,10,8,.85) 0%, rgba(12,10,8,.55) 60%, rgba(12,10,8,.4) 100%); }
.hero__inner { position: relative; z-index: 1; padding: 92px 0; max-width: 680px; }
.hero h1 { color: var(--on-brand); }
.hero .eyebrow { color: var(--accent-on-dark); }
.hero p { color: #EDE6D8; font-size: 1.2rem; }

/* ---------- Proof bar ---------- */
.proof { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.proof__item { background: var(--surface); border: 1px solid var(--card-border); border-radius: var(--radius); padding: 22px; text-align: center; box-shadow: var(--shadow); }
.proof__num { font-family: var(--font-head); font-weight: 700; font-size: 2rem; color: var(--brand-text); line-height: 1; }
.proof__label { color: var(--muted); font-size: .95rem; }
.stars { color: #8A5A18; letter-spacing: 2px; }
[data-theme="dark"] .stars { color: #D2A455; }

/* ---------- Cards / grids ---------- */
.grid { display: grid; gap: 22px; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.card {
  background: var(--surface); border: 1px solid var(--card-border);
  border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow);
}
.card h3 { color: var(--ink); }
.card img { border-radius: 8px; margin-bottom: 14px; aspect-ratio: 3/2; object-fit: cover; width: 100%; }
.card__tag { display: inline-block; font-family: var(--font-head); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--brand-text); border: 1px solid var(--brand); border-radius: 999px; padding: .2em .7em; margin-bottom: 10px; }

/* ---------- Bands (always dark) ---------- */
.band { background: var(--band); color: var(--on-brand); }
.band h1, .band h2, .band h3 { color: var(--on-brand); }
.band .eyebrow { color: var(--accent-on-dark); }
.band p { color: #D9D0C2; }

/* ---------- Location strip ---------- */
.locstrip { display: grid; grid-template-columns: 1.1fr 1fr; gap: 0; align-items: stretch; }
.locstrip__text { padding: 48px; }
.locstrip__map { min-height: 320px; }
.locstrip__map iframe { width: 100%; height: 100%; border: 0; display: block; }

/* ---------- Chips ---------- */
.chip, .to-confirm {
  display: inline-flex; align-items: center; gap: .4em;
  font-family: var(--font-head); font-size: .74rem; letter-spacing: .1em;
  text-transform: uppercase; font-weight: 600;
  padding: .3em .7em; border-radius: 999px;
}
.to-confirm { background: rgba(168,116,42,.14); color: #6E4A12; border: 1px dashed var(--brass); }
/* chip sitting ON an always-dark band keeps the light brass in both themes */
.band .to-confirm, .hero .to-confirm { color: var(--accent-on-dark); }
[data-theme="dark"] .to-confirm { color: var(--accent-on-dark); }

/* ---------- Footer ---------- */
.site-footer { background: var(--band); color: #CfC6B8; padding: 48px 0 28px; border-top: 3px solid var(--brand); }
.site-footer a { color: var(--on-brand); text-decoration: none; }
.site-footer a:hover { color: var(--accent-on-dark); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; margin-bottom: 28px; }
.footer-grid h4 { color: var(--accent-on-dark); font-size: .85rem; letter-spacing: .16em; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: .4em; }
.footer-bottom { border-top: 1px solid var(--band-line); padding-top: 18px; font-size: .85rem; display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; color: #A89E8F; }

/* ---------- Disclosure / demo note ---------- */
.demo-note { background: rgba(168,116,42,.12); border-bottom: 1px solid var(--card-border); font-size: .82rem; color: var(--muted); text-align: center; padding: 7px 12px; }

/* ---------- Forms ---------- */
.field { margin-bottom: 16px; }
.field label { display: block; font-family: var(--font-head); font-size: .85rem; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 6px; color: var(--ink); }
.field input, .field textarea {
  width: 100%; padding: .7em .8em; font: inherit; color: var(--ink);
  background: var(--surface); border: 1px solid var(--card-border); border-radius: 8px;
}
.field input:focus, .field textarea:focus { outline: 2px solid var(--brand); outline-offset: 1px; }
.form-hint { font-size: .88rem; color: var(--muted); }

/* ---------- NAP block ---------- */
.nap { font-style: normal; line-height: 1.7; }
.nap strong { color: var(--ink); }

/* ---------- Focus visibility ---------- */
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.skip-link { position: absolute; left: -999px; top: 0; background: var(--brand); color: #fff; padding: 10px 16px; z-index: 100; }
.skip-link:focus { left: 8px; top: 8px; }

/* ==========================================================================
   Plan Your Visit — signature feature
   ========================================================================== */
.planner { display: grid; grid-template-columns: 1.3fr .9fr; gap: 28px; align-items: start; }
.planner__step { background: var(--surface); border: 1px solid var(--card-border); border-radius: var(--radius); padding: 22px 24px; margin-bottom: 20px; box-shadow: var(--shadow); }
.planner__step h3 { display: flex; align-items: center; gap: .6em; }
.step-num { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; flex: none; border-radius: 50%; background: var(--brand); color: var(--on-brand); font-family: var(--font-head); font-size: .95rem; }

.chipset { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.opt {
  font-family: var(--font-body); font-weight: 600; font-size: .95rem;
  padding: .55em 1em; border-radius: 999px; cursor: pointer;
  background: var(--ground); color: var(--ink);
  border: 1.5px solid var(--card-border); transition: all .14s ease;
}
.opt:hover { border-color: var(--brand); }
.opt[aria-pressed="true"] { background: var(--brand); color: var(--on-brand); border-color: var(--brand); }

/* People list */
.person { border: 1px solid var(--card-border); border-radius: 10px; padding: 16px; margin-bottom: 14px; background: var(--ground); }
.person__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.person__title { font-family: var(--font-head); text-transform: uppercase; letter-spacing: .05em; font-size: 1rem; }
.person__remove { background: transparent; border: 1px solid var(--card-border); color: var(--muted); border-radius: 6px; cursor: pointer; padding: .25em .6em; font-size: .8rem; }
.person__remove:hover { border-color: var(--brand); color: var(--brand-text); }
.field-label { font-family: var(--font-head); font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 10px 0 2px; }

/* Fade guide */
.fadeguide { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 8px; }
.fade {
  cursor: pointer; text-align: left; background: var(--ground);
  border: 1.5px solid var(--card-border); border-radius: 10px; padding: 12px;
  transition: border-color .14s ease, transform .1s ease;
  display: flex; flex-direction: column; gap: 6px;
}
.fade:hover { border-color: var(--brand); }
.fade[aria-pressed="true"] { border-color: var(--brand); box-shadow: inset 0 0 0 1.5px var(--brand); }
.fade svg { width: 100%; height: auto; display: block; }
.fade__name { font-family: var(--font-head); text-transform: uppercase; letter-spacing: .04em; font-size: .88rem; color: var(--ink); }
.fade__desc { font-size: .82rem; color: var(--muted); line-height: 1.35; }
.fade svg .skin { fill: var(--brass); opacity: .22; }
.fade svg .hair { fill: var(--ink); }
.fade svg .outline { fill: none; stroke: var(--muted); stroke-width: 2; }

/* Result panel */
.result { position: sticky; top: 90px; }
.result__box { background: var(--surface); border: 1px solid var(--card-border); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.result__head { background: var(--band); color: var(--on-brand); padding: 16px 20px; }
.result__head h3 { color: var(--on-brand); margin: 0; }
.result__body { padding: 20px; }
.result__msg { background: var(--ground); border: 1px solid var(--card-border); border-radius: 8px; padding: 14px; min-height: 90px; white-space: pre-wrap; font-size: .98rem; color: var(--ink); }
.result__actions { display: grid; gap: 10px; margin-top: 16px; }
.result__actions .btn { justify-content: center; width: 100%; }
.copied-note { font-size: .85rem; color: var(--brand-text); min-height: 1.2em; margin-top: 6px; }

@media (max-width: 860px) {
  .planner { grid-template-columns: 1fr; }
  .result { position: static; }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .locstrip { grid-template-columns: 1fr; }
  .locstrip__map { min-height: 280px; }
}
@media (max-width: 760px) {
  .nav { position: absolute; top: 68px; left: 0; right: 0; background: var(--band); flex-direction: column; align-items: stretch; padding: 8px 20px 16px; gap: 2px; border-bottom: 3px solid var(--brand); display: none; }
  .nav.is-open { display: flex; }
  .nav a { padding: .7em .5em; }
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; order: 3; }
  .grid--3, .proof { grid-template-columns: 1fr; }
  .grid--2 { grid-template-columns: 1fr; }
  .fadeguide { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr; }
  .hero__inner { padding: 64px 0; }
  .locstrip__text { padding: 32px 20px; }
}
@media (max-width: 360px) {
  body { font-size: 16px; }
  .fadeguide { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}
