/* Barber 514 — one stylesheet for index, legal pages and 404 */

:root {
  --ink: #070707;
  --coal: #0d0d0d;
  --pit: #151515;
  --rule: #262626;
  --bone: #f4f4f4;
  --ash: #a8a8a8;
  --dim: #808080;
  --gold: #e2b842;
  --f-display: 'Syne', sans-serif;
  --f-text: 'Space Grotesk', system-ui, sans-serif;
  --f-mono: 'JetBrains Mono', ui-monospace, monospace;
  --pad: clamp(1.25rem, 4vw, 4rem);
  --rail: 17rem;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 4.5rem; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--bone);
  font: 400 1rem/1.6 var(--f-text);
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; }
p, dl, dd, figure { margin: 0; }
address { font-style: normal; }

h1, h2, h3 {
  margin: 0;
  font-family: var(--f-display);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.01em;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}
h2 { font-size: clamp(1.9rem, 4.6vw, 3.4rem); }
h3 { font-size: 1.2rem; font-weight: 700; line-height: 1.2; }

:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
::selection { background: var(--gold); color: #080808; }

.skip { position: absolute; left: -999rem; }
.skip:focus { left: 1rem; top: 1rem; z-index: 50; padding: .6rem 1rem; background: var(--gold); color: #080808; }

.tag, dt, .hours caption {
  font: 500 .72rem/1.4 var(--f-mono);
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--gold);
}
dt { color: var(--dim); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  padding: .95rem 1.4rem;
  border: 1px solid var(--gold);
  background: var(--gold);
  color: #080808;
  font: 700 .75rem/1 var(--f-mono);
  letter-spacing: .16em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background .2s, border-color .2s, color .2s;
}
.btn:hover { background: var(--bone); border-color: var(--bone); }
.btn-line { background: none; border-color: #3a3a3a; color: var(--bone); }
.btn-line:hover { background: none; border-color: var(--gold); color: var(--gold); }

/* ---------- Rail: top bar on phones, side column on desktop ---------- */

.rail {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .5rem 1rem;
  padding: .75rem var(--pad);
  background: rgba(7, 7, 7, .97);
  border-bottom: 1px solid var(--rule);
}
.rail-mark { display: flex; align-items: center; gap: .7rem; min-width: 0; text-decoration: none; }
.rail-mark img { flex: none; width: 2.9rem; height: auto; }
.rail-mark strong { display: block; }
.rail-mark span { font: 800 .66rem/1.25 var(--f-display); letter-spacing: .05em; text-transform: uppercase; }
.rail-mark small { display: block; font: 400 .6rem/1.5 var(--f-mono); letter-spacing: .12em; color: var(--dim); }

.rail-toggle {
  flex: none;
  padding: .6rem .7rem;
  border: 1px solid #3a3a3a;
  background: none;
  color: var(--bone);
  font: 500 .7rem/1 var(--f-mono);
  letter-spacing: .16em;
  text-transform: uppercase;
  cursor: pointer;
}
.rail-nav { display: none; width: 100%; }
.rail.is-open .rail-nav { display: block; }
.rail-nav ol { margin: 0; padding: 0; list-style: none; counter-reset: stop; }
.rail-nav a {
  display: flex;
  gap: .9rem;
  padding: .85rem 0;
  border-top: 1px solid var(--rule);
  color: var(--ash);
  font: 500 .78rem/1.4 var(--f-mono);
  letter-spacing: .16em;
  text-transform: uppercase;
  text-decoration: none;
}
.rail-nav a::before { counter-increment: stop; content: counter(stop, decimal-leading-zero); color: var(--dim); }
.rail-nav a:hover, .rail-nav a[aria-current] { color: var(--gold); }
.rail-foot { display: none; }

.sheet { min-width: 0; padding-bottom: 3.25rem; container-type: inline-size; }

.dock {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 20;
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--rule);
}
.dock a {
  padding: 1.05rem .5rem;
  background: var(--coal);
  color: var(--bone);
  font: 700 .75rem/1 var(--f-mono);
  letter-spacing: .16em;
  text-align: center;
  text-transform: uppercase;
  text-decoration: none;
}
.dock a:first-child { background: var(--gold); color: #080808; }

@media (min-width: 60rem) {
  html { scroll-padding-top: 0; }
  body { display: grid; grid-template-columns: var(--rail) minmax(0, 1fr); }
  .rail {
    height: 100vh;
    height: 100dvh;
    overflow-y: auto;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    justify-content: flex-start;
    gap: 2.5rem;
    padding: 2rem 1.75rem;
    background: var(--coal);
    border-bottom: 0;
    border-right: 1px solid var(--rule);
  }
  .rail-toggle { display: none; }
  .rail-mark { flex-direction: column; align-items: flex-start; gap: 1rem; }
  .rail-mark img { width: 10.5rem; }
  .rail-mark strong { display: none; }
  .rail-mark small { color: var(--gold); font-size: .64rem; }
  .rail-nav { display: block; }
  .rail-nav li:last-child a { border-bottom: 1px solid var(--rule); }
  .rail-foot { display: grid; gap: 1rem; margin-top: auto; }
  .rail-hours { color: var(--dim); font: 400 .72rem/1.7 var(--f-mono); }
  .rail-appt { color: var(--gold); font: 500 .72rem/1.4 var(--f-mono); letter-spacing: .18em; text-transform: uppercase; }
  .rail-tel { font: 500 .9rem/1 var(--f-mono); text-decoration: none; }
  .rail-mail { font: 400 .7rem/1 var(--f-mono); text-decoration-color: var(--gold); text-underline-offset: .3em; }
  .rail-tel:hover, .rail-mail:hover { color: var(--gold); }
  .sheet { padding-bottom: 0; }
  .dock { display: none; }
}

/* ---------- Shared section frame ---------- */

main > section { padding: clamp(3.5rem, 8vw, 6.5rem) var(--pad); border-bottom: 1px solid var(--rule); }
.lead-in h2 { margin-top: .6rem; }
.lead-note { margin-top: 1rem; color: var(--dim); font-size: .9rem; }

/* ---------- Opener ---------- */

.opener h1 { margin-top: 1rem; font-size: clamp(1.5rem, 5vw, 4.75rem); font-size: clamp(1.5rem, 7cqi, 4.75rem); }
.opener h1 em { color: var(--gold); font-style: italic; font-weight: 700; }
.opener-body { display: grid; gap: 2rem; margin-top: 2.5rem; }
.opener-text { max-width: 34rem; color: var(--ash); font-size: 1.08rem; }
.appt { margin-top: 1.5rem; max-width: 34rem; }
.appt a { text-decoration-color: var(--gold); text-underline-offset: .2em; }
.appt a:hover { color: var(--gold); }
.opener-acts { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.75rem; }
.opener-shot { position: relative; aspect-ratio: 4 / 3; overflow: hidden; border: 1px solid var(--rule); background: var(--coal); }
.opener-shot img, .crew-row img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.35) brightness(.9); }
.opener-shot figcaption {
  position: absolute;
  left: 0;
  bottom: 0;
  padding: .5rem .8rem;
  background: rgba(0, 0, 0, .82);
  color: var(--ash);
  font: 400 .66rem/1.4 var(--f-mono);
  letter-spacing: .12em;
  text-transform: uppercase;
}
.facts { display: grid; margin-top: 3rem; border-top: 1px solid var(--rule); }
.facts > div { padding: 1.1rem 0; border-bottom: 1px solid var(--rule); }
.facts dd { margin-top: .35rem; }
.facts a { text-decoration-color: var(--gold); text-underline-offset: .2em; }

@media (min-width: 48rem) {
  .opener-body { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: end; }
  .opener-shot { aspect-ratio: 16 / 10; }
  .facts { grid-template-columns: repeat(3, 1fr); }
  .facts > div { padding: 1.25rem 1.25rem 0 0; border-bottom: 0; }
  .facts > div + div { padding-left: 1.25rem; border-left: 1px solid var(--rule); }
}

/* ---------- Tariff (price list) ---------- */

.tariff { background: var(--coal); }
.tariff-list { margin-top: 2.5rem; border-top: 1px solid var(--rule); }
.tariff-list details { border-bottom: 1px solid var(--rule); }
.tariff-list summary {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: .5rem 1rem;
  align-items: baseline;
  padding: 1.3rem 2.25rem 1.3rem 0;
  cursor: pointer;
  list-style: none;
}
.tariff-list summary::-webkit-details-marker { display: none; }
.tariff-list summary::after {
  content: '+';
  position: absolute;
  top: 1.15rem;
  right: .25rem;
  color: var(--dim);
  font: 400 1.3rem/1 var(--f-mono);
}
.tariff-list details[open] summary::after { content: '–'; color: var(--gold); }
.t-name { grid-column: 1 / -1; font: 700 1.12rem/1.25 var(--f-display); text-transform: uppercase; transition: color .2s; }
.t-name small { display: block; margin-top: .35rem; color: var(--dim); font: 400 .85rem/1.4 var(--f-text); text-transform: none; }
.t-name i {
  display: inline-block;
  white-space: nowrap;
  margin-left: .4rem;
  padding: .15rem .4rem;
  background: var(--gold);
  color: #080808;
  font: 700 .6rem/1 var(--f-mono);
  letter-spacing: .1em;
  vertical-align: middle;
}
.tariff-list summary:hover .t-name, .tariff-list details[open] .t-name { color: var(--gold); }
.t-time { color: var(--ash); font: 400 .78rem/1 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; }
.t-price { color: var(--gold); font: 700 1.1rem/1 var(--f-mono); }
.t-more { display: grid; gap: 1.25rem; padding: 0 0 1.6rem; }
.t-more dl { display: grid; gap: 1rem; }
.t-more dd { margin-top: .3rem; color: var(--ash); font-size: .92rem; }

@media (min-width: 48rem) {
  .tariff-list summary { grid-template-columns: minmax(0, 1fr) 5.5rem 4.5rem; padding: 1.5rem 3rem 1.5rem .75rem; }
  .tariff-list summary::after { top: 1.4rem; right: .75rem; }
  .t-name { grid-column: auto; font-size: 1.25rem; }
  .t-price { text-align: right; }
  .t-more { padding: 0 .75rem 1.8rem; }
  .t-more dl { grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
}

/* ---------- Crew (barbers as rows) ---------- */

.crew .lead-in { margin-bottom: 1rem; }
.crew-row { display: grid; gap: 1.25rem; padding: 2rem 0; border-bottom: 1px solid var(--rule); }
.crew-row:last-child { padding-bottom: 0; border-bottom: 0; }
.crew-row img { aspect-ratio: 3 / 2; object-position: 50% 20%; border: 1px solid var(--rule); }
.crew-role { margin: .45rem 0 .9rem; color: var(--gold); font: 500 .72rem/1.4 var(--f-mono); letter-spacing: .16em; text-transform: uppercase; }
.crew-row p:not(.crew-role) { max-width: 36rem; color: var(--ash); }
.crew-facts { display: grid; gap: .9rem; align-content: start; }
.crew-facts dd { margin-top: .2rem; }

@media (min-width: 48rem) {
  .crew-row { grid-template-columns: 10rem minmax(0, 1fr) 13rem; gap: 2.5rem; }
  .crew-row img { aspect-ratio: 4 / 5; }
  .crew-facts { padding-left: 1.5rem; border-left: 1px solid var(--rule); }
}

/* ---------- Craft (method + notes) ---------- */

.craft { background: var(--coal); }
.craft-steps { display: grid; gap: 2rem; margin: 2.5rem 0 0; padding: 0; list-style: none; counter-reset: step; }
.craft-steps li { padding-top: 1.25rem; border-top: 2px solid var(--gold); }
.craft-steps li::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  display: block;
  margin-bottom: 1rem;
  color: var(--gold);
  font: 700 2.4rem/1 var(--f-display);
}
.craft-steps p { margin-top: .7rem; color: var(--ash); font-size: .95rem; }
.notes { display: grid; gap: 1.25rem; margin-top: 3rem; padding: 1.5rem; border: 1px solid var(--rule); background: var(--ink); }
.notes dd { margin-top: .35rem; color: var(--ash); font-size: .92rem; }

@media (min-width: 48rem) {
  .craft-steps, .notes { grid-template-columns: repeat(3, 1fr); }
  .craft-steps { gap: 2.5rem; }
  .notes { gap: 2rem; padding: 2rem; }
}

/* ---------- Locate ---------- */

.locate-grid { display: grid; gap: 2.5rem; margin-top: 2.5rem; }
.locate-info address { font-size: 1.15rem; line-height: 1.5; }
.locate-tel { margin-top: 1rem; font: 700 1.35rem/1.3 var(--f-mono); }
.locate-info a:not(.btn) { text-decoration-color: var(--gold); text-underline-offset: .2em; }
.locate-info a:not(.btn):hover { color: var(--gold); }
.hours { width: 100%; margin-top: 2rem; border-collapse: collapse; font-size: .95rem; }
.hours caption { padding-bottom: .6rem; color: var(--dim); text-align: left; }
.hours th, .hours td { padding: .7rem 0; border-top: 1px solid var(--rule); font-weight: 400; text-align: left; }
.hours td { font-family: var(--f-mono); font-size: .88rem; text-align: right; }
.hours .is-off { color: var(--dim); }
.locate-way { margin-top: 1.5rem; color: var(--ash); font-size: .92rem; }
.locate-map { border: 1px solid var(--rule); }
.locate-map svg { width: 100%; height: auto; aspect-ratio: 7 / 4; font-family: var(--f-mono); }
.locate-map figcaption { padding: .5rem .8rem; border-top: 1px solid var(--rule); color: var(--dim); font: 400 .66rem/1.4 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; }

@media (min-width: 70rem) {
  .locate-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); align-items: start; }
}

/* ---------- Colophon ---------- */

.colophon {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem 2rem;
  justify-content: space-between;
  padding: 2rem var(--pad);
  color: var(--dim);
  font: 400 .72rem/1.6 var(--f-mono);
  letter-spacing: .06em;
}
.colophon nav { display: flex; gap: 1.5rem; }
.colophon a { color: var(--ash); }
.colophon a:hover { color: var(--gold); }

/* ---------- Legal pages and 404 ---------- */

.legal { max-width: 52rem; }
.legal h1 { margin-top: 1rem; font-size: clamp(2rem, 6vw, 3.4rem); }
.legal h2 { margin: 2.4rem 0 .7rem; font-size: 1.1rem; font-weight: 700; letter-spacing: .02em; }
.legal p, .legal li { margin-top: .8rem; color: var(--ash); }
.legal ul { margin: 0; padding-left: 1.2rem; }
.legal strong { color: var(--bone); font-weight: 500; }
.legal a { color: var(--bone); text-decoration-color: var(--gold); text-underline-offset: .2em; }
.legal .btn { margin-top: 2rem; color: #080808; }

/* ---------- Motion ---------- */

@keyframes rise { from { opacity: 0; transform: translateY(22px); } }
@keyframes ping { from { opacity: .9; transform: scale(1); } to { opacity: 0; transform: scale(5); } }
@keyframes sheen { to { left: 140%; } }

/* Opener: staggered entrance on load */
.opener > .tag, .opener h1, .opener-body, .facts { animation: rise .8s cubic-bezier(.16, 1, .3, 1) both; }
.opener h1 { animation-delay: .1s; }
.opener-body { animation-delay: .24s; }
.facts { animation-delay: .4s; }

/* Scroll entrance: classes are added by main.js, so without JS everything stays visible */
.will-rise { opacity: 0; transform: translateY(24px); transition: opacity .7s cubic-bezier(.16, 1, .3, 1), transform .7s cubic-bezier(.16, 1, .3, 1); }
.will-rise.has-risen { opacity: 1; transform: none; }
.craft-steps li:nth-child(2).will-rise { transition-delay: .12s; }
.craft-steps li:nth-child(3).will-rise { transition-delay: .24s; }

/* Gold button: light sweep on hover */
.btn { position: relative; overflow: hidden; }
.btn:not(.btn-line)::after {
  content: '';
  position: absolute;
  top: 0;
  left: -120%;
  width: 70%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .45), transparent);
  transform: skewX(-20deg);
}
.btn:not(.btn-line):hover::after { animation: sheen .75s ease-in-out; }

/* Photos wake up on hover */
.opener-shot img, .crew-row img { transition: transform .6s cubic-bezier(.16, 1, .3, 1), filter .6s; }
.opener-shot:hover img { transform: scale(1.04); filter: grayscale(1) contrast(1.5) brightness(1.05); }
.crew-row:hover img { filter: grayscale(1) contrast(1.5) brightness(1.05); }
.crew-row h3 { transition: color .2s; }
.crew-row:hover h3 { color: var(--gold); }

/* Price list: gold edge on hover, details ease in */
.tariff-list summary { transition: background .25s, box-shadow .25s; }
.tariff-list summary:hover { background: var(--pit); box-shadow: inset 2px 0 0 var(--gold); }
.tariff-list details[open] .t-more { animation: rise .45s cubic-bezier(.16, 1, .3, 1) both; }

/* Method steps and rail links */
.craft-steps li::before { transition: transform .3s cubic-bezier(.16, 1, .3, 1); }
.craft-steps li:hover::before { transform: translateX(6px); }
.rail-nav a { transition: color .2s, padding-left .25s cubic-bezier(.16, 1, .3, 1); }
.rail-nav a:hover, .rail-nav a[aria-current] { padding-left: .4rem; }

/* Map pin */
.map-ping { fill: none; stroke: var(--gold); stroke-width: 1.5; transform-box: fill-box; transform-origin: center; animation: ping 3s cubic-bezier(.2, .8, .2, 1) infinite; }
.map-ping + .map-ping { animation-delay: 1.5s; }

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