/* CONCEPT 'Neighborhood sign' - AESTHETIC: "1950s neighbourhood barber front": enamel oxblood sign on cream
   pinstripe wallpaper, felt letter-board, chalkboard, gilt window lettering; oxblood dominant + marquee-gold accent.
   FONTS: Alfa Slab One (sign-painter slab: name, heads, prices, up to 104px) vs IBM Plex Mono 400/700 (ticket and
   letter-board type: body, hours, labels at 15-17px) - a 6x size jump between the two.
   The shop front as you'd see it from the sidewalk: a hanging enamel sign, the shop
   window with gilt lettering, a felt letter-board menu you swipe, a chalkboard of hours, a ticket-stub rating and
   green street signs for the area. One shop colour: --brand (the enamel + the main button).
   */
/* md-pairs: ink:paper, ink-dim:paper, ink:paper-2, ink-dim:paper-2, on-brand:brand, brand:paper, chalk:board, chalk-dim:board, letter:felt, price:felt, on-sign:sign, gilt:shade-solid */
/* MD-R01: sign lettering uses .08em, the cap. */

@font-face { font-family: "Alfa Slab One"; src: url("fonts/AlfaSlabOne-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("fonts/IBMPlexMono-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("fonts/IBMPlexMono-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }

:root {
  --brand: #a3241c;          /* THE shop colour (barber red); auto shop e.g. #1f4e8c */
  --on-brand: #fff6ea;
  --paper: #f1e7d3;
  --paper-2: #e4d5b7;
  --stripe: rgba(163, 36, 28, .05);
  --ink: #1c1712;
  --ink-dim: #574a3b;
  --edge: #7d6c58;
  --board: #1d2622;
  --wood: #6b4423;
  --wood-dark: #4a2e17;
  --chalk: #f2efe6;
  --chalk-dim: #b9c2b8;
  --felt: #17181a;
  --groove: #222428;
  --letter: #f4f4f0;
  --price: #f3c969;
  --sign: #1d5c3c;
  --on-sign: #ffffff;
  --glass: #14110d;
  --gilt: #e8c76f;
  --shade: rgba(20, 17, 13, .72);
  --shade-solid: #2a241d; /* contrast stand-in for --shade over the photo */
  --pole-blue: #1f3f7a;
  --white: #ffffff;
  --focus: #1f3f7a;
  --slab: "Alfa Slab One", Georgia, serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --fast: 120ms;
  --mid: 220ms;
}

* { box-sizing: border-box; }
html, body { overflow-x: clip; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background:
    repeating-linear-gradient(90deg, transparent 0 22px, var(--stripe) 22px 24px),
    var(--paper);
  color: var(--ink);
  font: 400 16px/1.6 var(--mono);
  padding-bottom: calc(96px + env(safe-area-inset-bottom));
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.skip { position: absolute; left: 8px; top: -64px; background: var(--ink); color: var(--paper); padding: 12px 16px; z-index: 10; }
.skip:focus { top: 8px; }

/* sidewalk bar */
.street { display: flex; gap: 4px; justify-content: flex-end; padding: 8px 12px; padding-top: calc(8px + env(safe-area-inset-top)); border-bottom: 2px solid var(--ink); }
.street-link { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; font-weight: 700; text-decoration: none; }
.street-phone { margin-left: auto; order: -1; padding-left: 4px; }

/* the front */
.front { display: grid; gap: 24px; padding: 24px 16px 32px; max-width: 1200px; margin: 0 auto; }
.sign-wrap { position: relative; padding-top: 32px; }
.chains { position: absolute; inset: 0 0 auto; height: 40px; display: flex; justify-content: space-between; padding: 0 24%; }
.chains span { width: 4px; height: 40px; background: repeating-linear-gradient(var(--ink) 0 6px, transparent 6px 9px); }
.sign {
  position: relative; background: var(--brand); color: var(--on-brand);
  border-radius: 16px; padding: 16px 16px 24px; text-align: center;
  box-shadow: inset 0 0 0 4px var(--brand), inset 0 0 0 6px var(--on-brand), 0 8px 0 var(--ink);
}
.sign::before, .sign::after { content: ""; position: absolute; top: 16px; width: 12px; height: 12px; border-radius: 50%; background: var(--on-brand); }
.sign::before { left: 16px; } .sign::after { right: 16px; }
.arch { width: 100%; max-width: 320px; margin: 0 auto; display: block; height: auto; }
.arch text { fill: var(--on-brand); font: 700 15px var(--mono); letter-spacing: .08em; }
.sign h1 { font-family: var(--slab); font-weight: 400; text-transform: uppercase; line-height: .9; margin-top: -8px; }
.name-1 { display: block; font-size: 40px; letter-spacing: 0; }
.name-2 { display: block; font-size: 32px; letter-spacing: .06em; border-top: 3px solid var(--on-brand); border-bottom: 3px solid var(--on-brand); margin: 8px auto 0; width: fit-content; padding: 4px 16px; }
.sign-trade { font: 700 16px var(--mono); text-transform: uppercase; letter-spacing: .08em; margin-top: 12px; }
.stars { width: 120px; height: 16px; margin: 12px auto 0; display: block; }
.stars path { fill: var(--on-brand); }
.stars .rule { fill: none; stroke: var(--on-brand); stroke-width: 2; }

.door-tag {
  position: relative; width: fit-content; margin: 24px auto 0; transform: rotate(-3deg);
  background: var(--white); color: var(--ink); border: 2px solid var(--ink); border-radius: 8px;
  padding: 12px 24px 12px 40px; font: 700 18px/1.2 var(--mono); text-transform: uppercase; letter-spacing: .04em;
}
.door-hole { position: absolute; left: 16px; top: 50%; width: 12px; height: 12px; transform: translateY(-50%); border-radius: 50%; border: 2px solid var(--ink); }
.door-tag [data-state="open"] { color: var(--sign); }
.door-tag [data-state="closed"] { color: var(--brand); }

.window { position: relative; border: 12px solid var(--wood); outline: 2px solid var(--wood-dark); background: var(--glass); }
.window img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.gilt {
  position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: center; gap: 16px;
  padding: 12px 8px; background: var(--shade); color: var(--gilt);
  font: 400 18px var(--slab); text-transform: uppercase; letter-spacing: .04em;
}

.actions { display: grid; gap: 12px; }
.btn {
  display: flex; align-items: center; justify-content: center; min-height: 56px; padding: 0 24px;
  font: 400 20px var(--slab); text-transform: uppercase; letter-spacing: .02em; text-decoration: none;
  border-radius: 8px; border: 3px solid var(--ink); cursor: pointer;
  transition: transform var(--fast) ease-out;
}
.btn:active { transform: translateY(2px); }
.btn-main { background: var(--brand); color: var(--on-brand); box-shadow: 0 4px 0 var(--ink); }
.btn-line { background: var(--paper); color: var(--ink); }

/* letter-board menu */
.menu { background: var(--felt); color: var(--letter); padding: 32px 0 40px; border-top: 8px solid var(--wood); border-bottom: 8px solid var(--wood); }
.menu-head { padding: 0 16px; max-width: 1200px; margin: 0 auto 16px; display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px; }
.menu h2 { font: 400 48px/1 var(--slab); text-transform: uppercase; letter-spacing: .06em; color: var(--price); }
.hint { color: var(--letter); font-size: 16px; }
.board {
  list-style: none; margin: 0; padding: 4px 16px 16px; display: flex; gap: 12px;
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 16px; overscroll-behavior-x: contain;
}
.letters {
  flex: 0 0 72%; max-width: 280px; scroll-snap-align: start; display: grid; gap: 8px; align-content: start;
  padding: 24px 16px 16px; border-radius: 8px;
  background: repeating-linear-gradient(var(--felt) 0 10px, var(--groove) 10px 12px);
  border: 2px solid var(--groove);
}
.letters h3 { font: 700 20px/1.25 var(--mono); text-transform: uppercase; letter-spacing: .04em; min-height: 56px; }
.price { font: 400 56px/1 var(--slab); color: var(--price); }
.pick { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; color: var(--letter); }

/* hours / reviews / area */
.pair { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; padding: 32px 16px; max-width: 1200px; margin: 0 auto; }   /* minmax: the ES hours row never widens the phone page (12-02) */
.frame { background: var(--board); color: var(--chalk); border: 12px solid var(--wood); outline: 2px solid var(--wood-dark); border-radius: 4px; padding: 24px 16px; }
.chalk h2 { font: 400 56px/1 var(--slab); text-transform: uppercase; letter-spacing: .06em; transform: rotate(-2deg); margin-bottom: 16px; }
.days { margin: 0; display: grid; gap: 4px; }
.days div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 12px; border-radius: 40px 32px 40px 24px; font: 700 20px/1.2 var(--mono); }
.days dt { text-transform: uppercase; letter-spacing: .04em; }
.days dd { margin: 0; color: var(--chalk-dim); }
.days .is-today { box-shadow: inset 0 0 0 3px var(--chalk); }
.days .is-today dd { color: var(--chalk); }
.chalk-note { margin-top: 16px; color: var(--chalk-dim); }

.side { display: grid; gap: 24px; align-content: start; }
.stub {
  position: relative; background: var(--paper-2); border: 2px dashed var(--ink); border-radius: 8px; padding: 24px;
}
.stub::before, .stub::after { content: ""; position: absolute; top: 50%; width: 24px; height: 24px; margin-top: -12px; border-radius: 50%; background: var(--paper); border: 2px dashed var(--ink); }
.stub::before { left: -14px; } .stub::after { right: -14px; }
.stub-kicker { font: 700 20px var(--mono); text-transform: uppercase; letter-spacing: .08em; }
.stub-score strong { font: 400 72px/1 var(--slab); }
.stub-score span, .stub-count { color: var(--ink-dim); }
.stub-link { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; }

.area h2 { font: 400 28px var(--slab); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 12px; }
.street-signs { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.street-signs li {
  background: var(--sign); color: var(--on-sign); border-radius: 4px; padding: 4px 12px;
  font: 700 18px var(--mono);
}

/* text-us note (works without JS: :target) */
.note { display: none; }
.note:target { display: grid; place-items: end center; position: fixed; inset: 0; z-index: 20; background: var(--shade); padding: 16px; padding-bottom: calc(16px + env(safe-area-inset-bottom)); }
.note-card { position: relative; width: 100%; max-width: 480px; max-height: 100%; overflow: auto; background: var(--paper); border: 3px solid var(--ink); border-radius: 8px; padding: 24px 16px; transform: rotate(-1deg); }
.note-card h2 { font: 400 32px var(--slab); text-transform: uppercase; letter-spacing: .04em; }
.note-card form { display: grid; gap: 8px; margin-top: 16px; }
.note-card label { font-weight: 700; }
.note-card input:not([type=checkbox]), .note-card textarea { font: inherit; min-height: 48px; padding: 8px 12px; border: 2px solid var(--edge); border-radius: 4px; background: var(--white); color: var(--ink); }
.check { display: flex; gap: 12px; align-items: flex-start; font-weight: 400; min-height: 44px; }
.check input { width: 24px; height: 24px; margin: 0; flex: none; }
.note-close { position: absolute; top: 12px; right: 12px; min-height: 44px; display: inline-flex; align-items: center; padding: 0 12px; font-weight: 700; }

/* footer with barber pole */
.foot { text-align: center; padding: 40px 16px; border-top: 2px solid var(--ink); display: grid; gap: 4px; justify-items: center; }
.foot a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 8px; }
.foot-name { font: 400 32px var(--slab); text-transform: uppercase; letter-spacing: .04em; }
.pole { width: 32px; height: 96px; border-radius: 16px; overflow: hidden; border: 3px solid var(--ink); margin-bottom: 12px; }
.pole-stripes { display: block; height: 200%; background: repeating-linear-gradient(-35deg, var(--brand) 0 12px, var(--white) 12px 24px, var(--pole-blue) 24px 36px, var(--white) 36px 48px); animation: pole 3s linear infinite; }
@keyframes pole { to { transform: translateY(-50%); } }

/* sticky dock: an awning stripe */
.dock {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 15; display: grid; grid-template-columns: 1fr 1fr;
  border-top: 3px solid var(--ink); padding-bottom: env(safe-area-inset-bottom); background: var(--paper);
}
.dock a { display: flex; align-items: center; justify-content: center; min-height: 64px; font: 400 26px var(--slab); text-transform: uppercase; letter-spacing: .08em; text-decoration: none; }
.dock-book { background: var(--brand); color: var(--on-brand); }
.dock-call { color: var(--ink); }

/* the one page-load reveal: the sign drops onto its chains, the door tag swings in, the window and buttons follow */
.sign { animation: hang 620ms cubic-bezier(.3, 1.4, .5, 1) both; transform-origin: 50% 0; }
.door-tag { animation: swing 520ms 300ms cubic-bezier(.3, 1.5, .5, 1) both; transform-origin: 50% 0; }
.window { animation: rise 420ms 420ms ease-out both; }
.actions { animation: rise 420ms 520ms ease-out both; }
@keyframes hang { from { opacity: 0; transform: translateY(-32px) rotate(-4deg); } to { opacity: 1; transform: none; } }
@keyframes swing { from { opacity: 0; transform: rotate(12deg); } to { opacity: 1; transform: rotate(-3deg); } }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

@media (min-width: 900px) {
  body { padding-bottom: 0; }
  .dock { display: none; }
  .front { grid-template-columns: 5fr 6fr; grid-template-areas: "sign window" "actions window"; align-items: start; padding: 48px 32px; gap: 32px 48px; }
  .sign-wrap { grid-area: sign; }
  .window { grid-area: window; }
  .actions { grid-area: actions; }
  .hint { display: none; }
  .name-1 { font-size: 80px; } .name-2 { font-size: 48px; }
  .menu-head, .board { padding-left: 32px; padding-right: 32px; }
  .board { max-width: 1200px; margin: 0 auto; flex-wrap: wrap; overflow: visible; }
  .letters { flex: 1 1 30%; max-width: none; }
  .pair { grid-template-columns: 3fr 2fr; padding: 48px 32px; }
}

@media (pointer: coarse) {
  .street-link, .pick, .stub-link, .foot a { min-height: 48px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .pole-stripes, .sign, .door-tag, .window, .actions { animation: none; }
  .btn { transition: none; }
}
