/* =========================================================
   Hingham Center Barbershop — "Gilded Glass" identity
   Espresso + bone paper, gold-leaf signwriting, barber-pole rule
   ========================================================= */

:root {
  /* Material palette */
  --espresso: #1a1310;     /* warm leather/coffee near-black */
  --espresso-2: #241a15;   /* raised dark surface */
  --bone: #f3ecdd;         /* shaving-foam cream / ticket paper */
  --bone-2: #e9e0cd;       /* paper shadow */
  --ink: #241c16;          /* text on bone */
  --ink-soft: #6f6354;     /* muted text on bone */
  --cream-soft: #cdbfa6;   /* muted text on espresso */
  --oxblood: #7d2b2b;      /* barber-pole red / leather */
  --brass: #c69449;        /* solid gold for borders/icons */
  --brass-lo: #8a6322;
  --brass-hi: #f6e3b0;

  --line-dark: #3a2c20;
  --line-paper: #d8ccb4;

  --radius: 4px;           /* discipline: minimal rounding, like signage */
  --maxw: 1120px;
  --shadow-paper: 0 24px 60px -28px rgba(0, 0, 0, 0.55);

  --f-display: "Big Shoulders Display", "Arial Narrow", sans-serif;
  --f-script: "Kaushan Script", cursive;
  --f-body: "Libre Franklin", system-ui, sans-serif;
}

/* ===== Reset / base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body {
  font-family: var(--f-body);
  background: var(--espresso);
  color: var(--bone);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
:focus-visible { outline: 2px solid var(--brass); outline-offset: 3px; border-radius: 2px; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.center { text-align: center; }
.muted { color: var(--ink-soft); }
.small { font-size: 0.82rem; }

/* ===== Typographic system ===== */
.display {
  font-family: var(--f-display);
  font-weight: 800;
  line-height: 0.92;
  letter-spacing: 0.005em;
  text-transform: uppercase;
}
h1.display { font-size: clamp(2.5rem, 8vw, 6rem); overflow-wrap: break-word; }
h2.display { font-size: clamp(2.2rem, 5vw, 3.6rem); }
.eyebrow {
  font-family: var(--f-script);
  font-size: clamp(1.2rem, 3vw, 1.85rem);
  color: var(--brass);
  line-height: 1.15;
  max-width: 100%;
}
.kicker {
  font-family: var(--f-display);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.34em;
  font-size: 0.8rem;
  color: var(--cream-soft);
}
.lead { font-size: 1.1rem; max-width: 52ch; }

/* Gold-leaf "gild" effect for display type */
.gild {
  background-image: linear-gradient(
    96deg,
    var(--brass-lo) 0%, var(--brass) 18%, var(--brass-hi) 30%,
    var(--brass) 42%, var(--brass-lo) 60%, var(--brass) 78%, var(--brass-hi) 100%
  );
  background-size: 220% 100%;
  background-position: 72% 0;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: shine 2.2s ease-out 0.2s 1 both;
}
@keyframes shine {
  from { background-position: 135% 0; }
  to   { background-position: 72% 0; }
}

/* ===== Barber-pole rule (the recurring signature motif) ===== */
.pole {
  height: 13px;
  background: repeating-linear-gradient(
    118deg,
    var(--oxblood) 0 13px,
    var(--bone) 13px 21px,
    var(--brass) 21px 34px,
    var(--bone) 34px 42px
  );
  box-shadow: inset 0 3px 5px rgba(0,0,0,0.4), inset 0 -3px 5px rgba(0,0,0,0.4);
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--f-display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.98rem;
  padding: 0.85rem 1.6rem;
  border-radius: var(--radius);
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform 0.16s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn--gold {
  background-image: linear-gradient(180deg, var(--brass-hi), var(--brass) 45%, var(--brass-lo));
  color: #231708;
  border-color: var(--brass-lo);
}
.btn--gold:hover { filter: brightness(1.06); }
.btn--outline { border-color: var(--brass); color: var(--brass); background: transparent; }
.btn--outline:hover { background: rgba(198, 148, 73, 0.12); }
.btn--ink { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn--ink:hover { background: var(--ink); color: var(--bone); }
.btn--sm { padding: 0.55rem 1.1rem; font-size: 0.85rem; }
.btn--full { width: 100%; justify-content: center; }

/* ===== Navigation ===== */
.site-nav {
  position: sticky; top: 0; z-index: 60;
  background: rgba(26, 19, 16, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-dark);
}
.site-nav__inner { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.brand { display: flex; align-items: center; gap: 0.7rem; }
.brand__logo { width: 46px; height: 46px; border-radius: 50%; flex: none; }
.brand__name {
  font-family: var(--f-display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 0.95;
  font-size: 1.05rem;
  color: var(--bone);
}
.brand__name small {
  display: block;
  font-size: 0.62rem;
  letter-spacing: 0.32em;
  color: var(--brass);
  font-weight: 600;
}
.nav-links { display: flex; align-items: center; gap: 1.9rem; }
.nav-links a {
  font-family: var(--f-display);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.92rem;
  color: var(--cream-soft);
  transition: color 0.2s;
}
.nav-links a:hover, .nav-links a.is-active { color: var(--bone); }
.nav-links a.btn { color: #231708; }
.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-toggle span { width: 24px; height: 2px; background: var(--brass); transition: 0.3s; }

/* ===== Hero (gilded glass storefront) ===== */
.hero {
  position: relative;
  text-align: center;
  padding: clamp(3.5rem, 9vw, 6.5rem) 0 0;
  overflow: hidden;
  background:
    radial-gradient(120% 80% at 50% -12%, rgba(198,148,73,0.18), transparent 55%),
    linear-gradient(180deg, rgba(20,14,11,0.84), rgba(20,14,11,0.95)),
    url("https://images.unsplash.com/photo-1599351431202-1e0f0137899a?auto=format&fit=crop&w=1600&q=80") center/cover no-repeat,
    var(--espresso);
}
.hero::before {
  /* faint glass grain */
  content: "";
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
}
.hero__inner { position: relative; z-index: 2; }
.hero__logo {
  width: 104px; height: 104px; border-radius: 50%;
  margin: 0 auto 1.4rem;
  box-shadow: 0 0 0 1px rgba(198,148,73,0.5), 0 0 44px -8px rgba(198,148,73,0.5);
}
.hero .eyebrow { margin-bottom: 0.3rem; }
.hero h1 { margin: 0 auto 1.4rem; max-width: 14ch; }
.hero__sub { color: var(--cream-soft); max-width: 46ch; margin: 0 auto 1.6rem; font-size: 1.1rem; }
.rating {
  display: inline-flex; align-items: center; gap: 0.55rem;
  margin-bottom: 1.8rem;
  font-family: var(--f-display); font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase; font-size: 0.84rem;
  color: var(--cream-soft);
}
.rating .stars { color: var(--brass); letter-spacing: 0.12em; font-size: 1rem; }
.rating strong { color: var(--bone); }
.hero__cta { display: flex; gap: 0.9rem; justify-content: center; flex-wrap: wrap; margin-bottom: clamp(3rem, 7vw, 5rem); }

/* ===== Sections ===== */
.section { padding: clamp(4rem, 9vw, 6.5rem) 0; }
.section--paper {
  background-color: var(--bone);
  background-image: repeating-linear-gradient(45deg, rgba(36,28,22,0.04) 0 1px, transparent 1px 26px);
  color: var(--ink);
}
.section--ink {
  background-color: var(--espresso);
  background-image: repeating-linear-gradient(45deg, rgba(198,148,73,0.04) 0 1px, transparent 1px 24px);
  color: var(--bone);
}
.section__head { max-width: 640px; margin-bottom: 3rem; }
.section--paper .section__head .eyebrow { color: var(--oxblood); }
.section--paper .lead { color: var(--ink-soft); }
.section--ink .lead { color: var(--cream-soft); }
.section__head h2 { margin: 0.4rem 0 0.7rem; }

/* ===== Price board ===== */
.board {
  border: 1px solid var(--line-paper);
  border-radius: var(--radius);
  background: linear-gradient(var(--bone), var(--bone-2));
  box-shadow: var(--shadow-paper);
  padding: clamp(1.6rem, 4vw, 2.6rem);
}
.board__row {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  padding: 0.95rem 0;
  border-bottom: 1px solid var(--line-paper);
}
.board__row:last-child { border-bottom: none; }
.board__name {
  flex: 0 1 auto;
  min-width: 0;
  font-family: var(--f-display);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 1.35rem;
  color: var(--ink);
}
.board__name small {
  display: block;
  font-family: var(--f-body);
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.82rem;
  font-weight: 400;
  color: var(--ink-soft);
  margin-top: 0.1rem;
}
.board__dots {
  flex: 1 1 auto;
  min-width: 12px;
  align-self: center;
  height: 0;
  border-bottom: 2px dotted var(--line-paper);
  transform: translateY(-3px);
}
.board__price {
  flex: none;
  font-family: var(--f-display);
  font-weight: 800;
  font-size: 1.6rem;
  color: var(--oxblood);
  letter-spacing: 0.02em;
}
.board__price::before { content: "$"; font-size: 0.7em; vertical-align: 0.18em; margin-right: 1px; }
.board__row:hover .board__price { color: var(--brass-lo); }

/* ===== Trust band ===== */
.trust {
  background: var(--espresso-2);
  border-top: 1px solid var(--line-dark);
  border-bottom: 1px solid var(--line-dark);
  padding: 1.4rem 0;
}
.trust__inner {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center;
  gap: 0.75rem 2.4rem;
  font-family: var(--f-display); font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.18em; font-size: 0.84rem;
  color: var(--cream-soft);
}
.trust__inner b { color: var(--brass); }

/* ===== Hours + location ===== */
.visit { display: grid; grid-template-columns: 1fr 1fr; gap: 3.5rem; }
.visit h2 { margin-bottom: 0.4rem; }
.visit .eyebrow { margin-bottom: 0.2rem; }
.hours { margin-top: 1.6rem; }
.hours li {
  display: flex; justify-content: space-between; gap: 1rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--line-dark);
  font-size: 1rem;
}
.hours li span:first-child {
  font-family: var(--f-display); font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--cream-soft);
}
.hours li.is-today {
  color: var(--brass);
}
.hours li.is-today span:first-child { color: var(--brass); }
.hours li.is-today::after { content: "Today"; }
.hours li.is-today {
  position: relative;
}
.today-tag {
  font-family: var(--f-body); font-size: 0.7rem; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--espresso);
  background: var(--brass); padding: 0.1rem 0.45rem; border-radius: 2px;
  margin-left: 0.6rem;
}

.contact { margin-top: 0.4rem; }
.contact li { padding: 0.7rem 0; border-bottom: 1px solid var(--line-dark); }
.contact li:last-child { border-bottom: none; }
.contact .label {
  display: block;
  font-family: var(--f-display); font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.2em;
  font-size: 0.72rem; color: var(--brass); margin-bottom: 0.15rem;
}
.contact a:hover { color: var(--brass); }
.map {
  margin-top: 1.6rem;
  width: 100%; height: 240px;
  border: 1px solid var(--line-dark);
  border-radius: var(--radius);
  filter: grayscale(0.4) sepia(0.2) contrast(1.05) brightness(0.92);
}

/* ===== CTA band ===== */
.cta {
  text-align: center;
  padding: clamp(4rem, 9vw, 6rem) 0;
  background:
    linear-gradient(rgba(20,14,11,0.82), rgba(20,14,11,0.90)),
    radial-gradient(90% 120% at 50% 0%, rgba(125,43,43,0.38), transparent 60%),
    url("https://images.unsplash.com/photo-1503951914875-452162b0f3f1?auto=format&fit=crop&w=1600&q=80") center/cover no-repeat,
    var(--espresso-2);
}
.cta h2 { margin-bottom: 0.5rem; }
.cta p { color: var(--cream-soft); margin-bottom: 1.8rem; }

/* ===== Page header (gallery / booking) ===== */
.page-head {
  text-align: center;
  padding: clamp(3rem, 7vw, 4.5rem) 0;
  background:
    radial-gradient(120% 90% at 50% -20%, rgba(198,148,73,0.16), transparent 60%),
    linear-gradient(180deg, rgba(20,14,11,0.78), rgba(20,14,11,0.92)),
    url("https://images.unsplash.com/photo-1605497788044-5a32c7078486?auto=format&fit=crop&w=1600&q=80") center/cover no-repeat,
    var(--espresso);
}
.page-head .eyebrow { margin-bottom: 0.2rem; }
.page-head h1 { margin: 0.3rem 0 0.7rem; }
.page-head .lead { margin: 0 auto; color: var(--cream-soft); }

/* ===== Gallery ===== */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 1.3rem;
  margin-bottom: 2rem;
}
.shot {
  position: relative;
  border: 1px solid var(--line-dark);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  background: var(--espresso-2);
}
.shot img { width: 100%; height: 400px; object-fit: cover; transition: transform 0.6s ease; }
.shot:hover img { transform: scale(1.05); }
.shot figcaption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 1.6rem 1.2rem 1rem;
  background: linear-gradient(transparent, rgba(20,14,11,0.92));
  font-family: var(--f-display); font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.08em; font-size: 1.05rem;
}

/* ===== Note (build-time reminder) ===== */
.note {
  font-size: 0.88rem;
  color: var(--brass);
  background: rgba(198, 148, 73, 0.08);
  border: 1px solid rgba(198, 148, 73, 0.3);
  border-radius: var(--radius);
  padding: 0.8rem 1rem;
  max-width: 60ch;
}
.note.center { margin-left: auto; margin-right: auto; }
.note code { background: rgba(255,255,255,0.08); padding: 0.1rem 0.35rem; border-radius: 3px; }
.note a { text-decoration: underline; }

/* ===== Lightbox ===== */
.lightbox {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(15, 10, 8, 0.94);
  display: none; align-items: center; justify-content: center; padding: 24px;
}
.lightbox.is-open { display: flex; }
.lightbox img { max-width: 92vw; max-height: 88vh; border-radius: var(--radius); border: 1px solid var(--brass-lo); }
.lightbox__close {
  position: absolute; top: 16px; right: 24px;
  background: none; border: none; color: var(--bone); font-size: 2.6rem; line-height: 1; cursor: pointer;
}

/* ===== Booking ===== */
.booking { display: grid; grid-template-columns: 1fr 340px; gap: 2.5rem; align-items: start; }
.booking-form {
  background: var(--bone);
  color: var(--ink);
  border: 1px solid var(--line-paper);
  border-radius: var(--radius);
  box-shadow: var(--shadow-paper);
  padding: 2rem;
}
.field { margin-bottom: 1.25rem; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
.field label {
  display: block; margin-bottom: 0.45rem;
  font-family: var(--f-display); font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.82rem; color: var(--ink);
}
.field input, .field select, .field textarea {
  width: 100%;
  padding: 0.8rem 0.95rem;
  background: #fff;
  border: 1px solid var(--line-paper);
  border-radius: var(--radius);
  color: var(--ink);
  font-family: var(--f-body); font-size: 1rem;
  transition: border-color 0.2s;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--oxblood); }
.field input.invalid, .field select.invalid { border-color: var(--oxblood); background: #faf1ef; }
.field textarea { resize: vertical; }

.ticket {
  position: sticky; top: 96px;
  background: var(--espresso-2);
  border: 1px solid var(--line-dark);
  border-radius: var(--radius);
  padding: 1.7rem;
}
.ticket h3 {
  font-family: var(--f-display); font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em; font-size: 1.4rem;
  color: var(--brass); margin-bottom: 1.1rem;
}
.ticket ul { margin-bottom: 1.1rem; }
.ticket li {
  display: flex; justify-content: space-between; gap: 1rem;
  padding: 0.65rem 0; border-bottom: 1px dotted var(--line-dark);
  font-size: 0.95rem;
}
.ticket li span { color: var(--cream-soft); }
.ticket li strong { font-family: var(--f-display); font-weight: 600; letter-spacing: 0.03em; }

/* ===== Confirmation modal ===== */
.modal {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(15, 10, 8, 0.82);
  display: none; align-items: center; justify-content: center; padding: 24px;
}
.modal.is-open { display: flex; }
.modal__card {
  background: var(--bone); color: var(--ink);
  border-radius: var(--radius);
  border-top: 6px solid var(--brass);
  padding: 2.5rem 2rem; max-width: 420px; text-align: center;
  box-shadow: var(--shadow-paper);
  animation: pop 0.3s ease;
}
@keyframes pop { from { transform: scale(0.93); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.modal__seal {
  width: 64px; height: 64px; margin: 0 auto 1.1rem;
  display: grid; place-items: center;
  background: var(--oxblood); color: var(--bone);
  border-radius: 50%; font-family: var(--f-display); font-size: 2rem;
}
.modal__card h2 { font-family: var(--f-display); text-transform: uppercase; margin-bottom: 0.5rem; }
.modal__card p { color: var(--ink-soft); margin-bottom: 1.5rem; }

/* ===== Footer ===== */
.footer { background: var(--espresso); padding: 3.2rem 0 2.4rem; }
.footer__inner { display: flex; flex-wrap: wrap; gap: 1.6rem 2.5rem; align-items: flex-start; justify-content: space-between; }
.footer__brand { display: flex; align-items: center; gap: 0.7rem; }
.footer__brand img { width: 40px; height: 40px; border-radius: 50%; }
.footer__brand .brand__name { font-size: 0.98rem; }
.footer__tag { font-family: var(--f-script); color: var(--brass); font-size: 1.5rem; margin-top: 0.3rem; }
.footer-links { display: flex; gap: 1.5rem; }
.footer-links a {
  font-family: var(--f-display); font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.85rem; color: var(--cream-soft);
}
.footer-links a:hover { color: var(--brass); }
.footer__legal { width: 100%; margin-top: 1.6rem; padding-top: 1.4rem; border-top: 1px solid var(--line-dark); color: var(--ink-soft); }

/* ===== Scroll reveal ===== */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.is-in { opacity: 1; transform: none; }

/* ===== Responsive ===== */
@media (max-width: 860px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: absolute; top: 76px; left: 0; right: 0;
    flex-direction: column; align-items: flex-start;
    gap: 1.2rem;
    background: var(--espresso-2);
    border-bottom: 1px solid var(--line-dark);
    padding: 1.4rem 24px 1.7rem;
    transform: translateY(-130%); transition: transform 0.3s ease;
  }
  .nav-links.is-open { transform: translateY(0); }
  .nav-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle.is-open span:nth-child(2) { opacity: 0; }
  .nav-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .visit { grid-template-columns: 1fr; gap: 2.5rem; }
  .booking { grid-template-columns: 1fr; }
  .ticket { position: static; order: -1; }
}
@media (max-width: 520px) {
  .field-row { grid-template-columns: 1fr; }
  .board__name { font-size: 1.15rem; }
  .board__price { font-size: 1.35rem; }
}

/* ===== Reduced motion ===== */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .gild { background-position: 72% 0; }
  .reveal { opacity: 1; transform: none; }
}
