/* ════════════════════════════════════════════════════════════
   Blaine's Barbershop — classic, warm, vintage.
   Mobile-first. No frameworks, no build step.
   ════════════════════════════════════════════════════════════ */

:root {
  /* Palette: warm browns, cream, brass, a touch of barber-pole red */
  --cream: #f7f1e3;
  --paper: #f1e8d5;
  --brown-dark: #3b2a1c;
  --brown: #5a4128;
  --brown-soft: #7a6044;
  --brass: #b08d57;
  --brass-dark: #8f6f3f;
  --barber-red: #9c3b2a;
  --barber-red-dark: #7e2f21;
  --ink: #2d2115;

  --font-display: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --font-body: Georgia, "Times New Roman", serif;

  --radius: 8px;
  --shadow: 0 2px 10px rgba(59, 42, 28, 0.18);
  --header-h: 4rem;
}

/* ── Reset-ish ── */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 0.5rem);
}

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background-color: var(--cream);
  /* Subtle paper-grain texture, pure CSS */
  background-image:
    radial-gradient(rgba(90, 65, 40, 0.045) 1px, transparent 1px),
    radial-gradient(rgba(90, 65, 40, 0.03) 1px, transparent 1px);
  background-size: 14px 14px, 22px 22px;
  background-position: 0 0, 7px 11px;
}

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3 {
  font-family: var(--font-display);
  color: var(--brown-dark);
  line-height: 1.15;
  margin: 0 0 0.6em;
}

h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h3 { font-size: 1.25rem; }

a { color: var(--barber-red); }

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--brass-dark);
  outline-offset: 3px;
  border-radius: 2px;
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -3rem;
  left: 0.5rem;
  z-index: 100;
  padding: 0.5rem 1rem;
  background: var(--brown-dark);
  color: var(--cream);
  border-radius: 0 0 var(--radius) var(--radius);
  transition: top 0.15s ease;
}
.skip-link:focus { top: 0; }

/* ── Buttons ── */
.btn {
  display: inline-block;
  padding: 0.65em 1.5em;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none;
  border-radius: var(--radius);
  border: 2px solid transparent;
  transition: background-color 0.15s ease, transform 0.1s ease;
}

.btn-book {
  background: var(--barber-red);
  color: var(--cream);
  border-color: var(--barber-red-dark);
  box-shadow: var(--shadow);
}
.btn-book:hover { background: var(--barber-red-dark); }
.btn-book:active { transform: translateY(1px); }

.btn-lg { font-size: 1.2rem; padding: 0.8em 2em; }

/* ── Header / nav ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--brown-dark);
  color: var(--cream);
  border-bottom: 3px solid var(--brass);
  box-shadow: var(--shadow);
}

/* Slimmer bar once the visitor scrolls past the hero (class set in main.js) */
.site-header.shrunk .header-inner { min-height: 3rem; }
.site-header.shrunk .brand-mark { width: 2rem; }
.site-header.shrunk .brand-name { font-size: 1.05rem; }
.header-inner { transition: min-height 0.2s ease; }
.brand-mark { transition: width 0.2s ease; }
.brand-name { transition: font-size 0.2s ease; }

/* Anchored sections clear the (shrunk) sticky header */
section[id] { scroll-margin-top: 4rem; }

.header-inner {
  max-width: 72rem;
  margin: 0 auto;
  padding: 0.5rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  min-height: var(--header-h);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--cream);
}

.brand-mark { width: 2.6rem; height: auto; }

.brand-name {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.nav-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: none;
  border: 2px solid var(--brass);
  border-radius: var(--radius);
  color: var(--cream);
  font-family: var(--font-display);
  font-size: 0.95rem;
  padding: 0.4rem 0.8rem;
  cursor: pointer;
}

.nav-toggle-bar,
.nav-toggle-bar::before,
.nav-toggle-bar::after {
  display: block;
  width: 1.1rem;
  height: 2px;
  background: var(--cream);
  border-radius: 1px;
  content: "";
}
.nav-toggle-bar { position: relative; }
.nav-toggle-bar::before { position: absolute; top: -5px; }
.nav-toggle-bar::after { position: absolute; top: 5px; }

.site-nav { display: none; width: 100%; }
.site-nav.open { display: block; }

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0.5rem 0 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.site-nav a:not(.btn) {
  color: var(--cream);
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 1.05rem;
  letter-spacing: 0.03em;
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
}
.site-nav a:not(.btn):hover { border-bottom-color: var(--brass); }

@media (min-width: 48rem) {
  .nav-toggle { display: none; }
  .site-nav { display: block; width: auto; }
  .site-nav ul {
    flex-direction: row;
    align-items: center;
    gap: 1.5rem;
    padding: 0;
  }
}

/* ── Hero ── */
.hero {
  position: relative;
  display: grid;
}

.hero-photo {
  grid-area: 1 / 1;
  width: 100%;
  height: 100%;
  min-height: 30rem;
  max-height: min(85vh, 45rem);
  object-fit: cover;
}

.hero-content {
  grid-area: 1 / 1;
  align-self: center;
  justify-self: center;
  text-align: center;
  max-width: 38rem;
  margin: 2rem 1rem;
  padding: 2rem 1.5rem;
  background: var(--cream);
  border: 2px solid var(--brass);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero-logo {
  margin: 0 auto 1rem;
  max-width: min(22rem, 80%);
}

.hero-logo img { width: 100%; height: auto; }

.hero-tagline {
  font-size: clamp(1.1rem, 2.5vw, 1.35rem);
  font-style: italic;
  color: var(--brown);
  margin: 0 0 0.75rem;
}

.hero-sub {
  margin: 0 0 1.5rem;
  color: var(--brown-soft);
}

/* ── Sections ── */
.section { padding: 3.5rem 0; }

.section-alt {
  background: var(--paper);
  border-top: 2px solid rgba(176, 141, 87, 0.35);
  border-bottom: 2px solid rgba(176, 141, 87, 0.35);
}

.section-inner {
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 1rem;
}

.section-lede {
  max-width: 42rem;
  font-size: 1.15rem;
  color: var(--brown-soft);
  margin-top: 0;
}

/* ── Paw-print divider ── */
.divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 0.25rem 1rem;
}

.divider::before,
.divider::after {
  content: "";
  flex: 0 1 8rem;
  height: 2px;
  background: var(--brass);
  opacity: 0.5;
}

.paw { width: 1.75rem; height: auto; fill: var(--brass); }

/* ── Services ── */
/* ── Services: compact vintage price lists, grouped by category ── */
.service-group {
  background: var(--paper);
  border: 1px solid rgba(176, 141, 87, 0.5);
  border-top: 4px solid var(--brass);
  border-radius: var(--radius);
  padding: 1rem 1.25rem 1.25rem;
  margin-top: 1.5rem;
}

.service-group-title {
  font-size: 1.35rem;
  margin: 0 0 0.25rem;
  color: var(--brown);
}

.services-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

@media (min-width: 48rem) {
  .services-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 2.5rem;
  }
}

.service { padding: 0.6rem 0 0.5rem; }

.service-line {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin: 0;
}

.service-name {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--brown-dark);
}

.service-leader {
  flex: 1;
  min-width: 1.5rem;
  border-bottom: 2px dotted var(--brass);
  transform: translateY(-0.25em);
}

.service-note {
  font-size: 0.8em;
  font-weight: 400;
  color: var(--brown-soft);
  white-space: nowrap;
}

.service-desc {
  margin: 0.15rem 0 0;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--brown-soft);
}

.service-price {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--barber-red);
}

.service-duration {
  white-space: nowrap;
  color: var(--brass-dark);
  font-size: 0.85rem;
}

.service-duration::before { content: "· "; }

.services-cta { text-align: center; margin: 1.5rem 0 0; }

#services { padding-bottom: 2rem; }

/* ── Gallery ── */
.gallery-grid {
  list-style: none;
  margin: 2rem 0 0;
  padding: 0;
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr 1fr;
}

@media (min-width: 48rem) { .gallery-grid { grid-template-columns: repeat(3, 1fr); } }

.gallery-grid img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid rgba(176, 141, 87, 0.5);
  box-shadow: var(--shadow);
}

/* ── About / Mack split layout ── */
.split {
  display: grid;
  gap: 2rem;
  align-items: center;
}

@media (min-width: 48rem) {
  .split { grid-template-columns: 2fr 3fr; }
  .split-reverse .portrait { order: 2; }
  .split-reverse .split-text { order: 1; }
}

.portrait {
  width: 100%;
  max-width: 24rem;
  margin: 0 auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--radius);
  border: 4px solid var(--paper);
  outline: 1px solid var(--brass);
  box-shadow: var(--shadow);
}

/* ── The Other Chairs (team) ── */
.team-grid {
  list-style: none;
  margin: 2rem 0 0;
  padding: 0;
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr;
}

@media (min-width: 40rem) { .team-grid { grid-template-columns: 1fr 1fr; } }

.team-member { text-align: center; }

.team-photo {
  width: 100%;
  max-width: 20rem;
  margin: 0 auto 0.75rem;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--radius);
  border: 4px solid var(--paper);
  outline: 1px solid var(--brass);
  box-shadow: var(--shadow);
}

.team-name { margin: 0 0 0.4rem; }

.team-member p {
  margin: 0 auto;
  max-width: 26rem;
  font-size: 0.95rem;
  color: var(--brown);
}

.mack-title {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--brass-dark);
  margin-top: -0.5rem;
}

/* ── Joke of the week ── */
.joke {
  max-width: 38rem;
  margin: 2.5rem auto 0;
  padding: 2rem 2.5rem;
  background: var(--cream);
  border: 1px solid var(--brown-soft);
  border-radius: 6px;
  box-shadow: var(--shadow);
  text-align: center;
}

.joke-setup {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--brown-dark);
  margin: 0;
}

.joke-punchline {
  font-family: var(--font-display);
  font-size: 1.9rem;
  color: var(--brown);
  margin: 1rem 0 0;
}

.joke-date {
  text-align: center;
  font-size: 0.9rem;
  font-style: italic;
  color: var(--brown-soft);
  margin: 1rem 0 0;
}

/* ── Visit ── */
.visit-grid {
  display: grid;
  gap: 1.5rem;
  margin-top: 2rem;
}

@media (min-width: 40rem) { .visit-grid { grid-template-columns: 1fr 1fr; } }

.visit-card {
  background: var(--paper);
  border: 1px solid rgba(176, 141, 87, 0.5);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.hours { border-collapse: collapse; width: 100%; }

.hours th,
.hours td {
  text-align: left;
  padding: 0.35rem 0;
  border-bottom: 1px dashed rgba(176, 141, 87, 0.6);
  font-weight: 400;
}

.hours td { text-align: right; color: var(--brown); }

.hours .open-late th,
.hours .open-late td { font-weight: 700; color: var(--brown-dark); }

.late-tag {
  display: inline-block;
  margin-left: 0.4rem;
  padding: 0.05rem 0.45rem;
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--cream);
  background: var(--barber-red);
  border-radius: 999px;
  vertical-align: middle;
}

address { font-style: normal; margin-bottom: 1.25rem; }

.map-embed { margin-top: 1.5rem; text-align: center; }

.map-embed iframe {
  display: block;
  width: 100%;
  height: 20rem;
  border: 2px solid var(--brass);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.map-embed p { margin: 0.75rem 0 0; }

/* ── Footer ── */
.site-footer {
  background: var(--brown-dark);
  color: var(--cream);
  border-top: 3px solid var(--brass);
  padding: 2.5rem 1rem;
  text-align: center;
}

.footer-inner {
  max-width: 72rem;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.footer-brand {
  font-family: var(--font-display);
  font-size: 1.3rem;
  margin: 0;
}

.paw-footer { fill: var(--brass); opacity: 0.85; }

.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.footer-links a:not(.btn) { color: var(--cream); }

.footer-fine {
  font-size: 0.85rem;
  color: rgba(247, 241, 227, 0.7);
  margin: 0;
}
