/* Kuya Coco's Barber Studio: components & layout (uses tokens.css) */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 var(--fs-body)/1.55 var(--font-body);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 700; line-height: 1.12; margin: 0; color: var(--text); }
p, ul, ol, dl, dd, figure { margin: 0; }
ul { padding: 0; list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
.wrap { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.icon { width: 20px; height: 20px; flex: none; }
.icon-lg { width: 24px; height: 24px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: var(--radius-sm); }
.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 { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--c-gold); color: var(--text-on-gold); padding: 12px 16px; font-weight: 600; border-radius: var(--radius-sm); }
.skip:focus { left: 16px; }

/* ---------- Type helpers ---------- */
.eyebrow { font: 600 var(--fs-label)/1.3 var(--font-body); letter-spacing: .16em; text-transform: uppercase; color: var(--text-accent); }
.display { font-size: var(--fs-display); line-height: 1.05; letter-spacing: -.01em; }
.display em { font-style: italic; color: var(--text-accent); }
.h1 { font-size: var(--fs-h1); }
.h2 { font-size: var(--fs-h2); }
.h3 { font-size: var(--fs-h3); }
.lead { font-size: var(--fs-lead); line-height: 1.6; color: var(--text-muted); }
.muted { color: var(--text-muted); }
.gold { color: var(--text-accent); }
.need {
  display: inline-block; border: 1.5px dashed var(--c-gold); color: var(--text-accent);
  padding: 1px 8px; border-radius: var(--radius-sm); font: 600 16px/1.5 var(--font-body);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 24px; border-radius: var(--radius-sm);
  font: 600 16px/1.1 var(--font-body); text-decoration: none; text-align: center;
  border: 1.5px solid transparent; cursor: pointer; transition: background-color .15s, color .15s;
}
.btn-primary { background: var(--c-gold); color: var(--text-on-gold); }
.btn-primary:hover { background: var(--c-gold-hover); }
.btn-secondary { background: transparent; color: var(--text-accent); border-color: var(--c-gold); }
.btn-secondary:hover { background: var(--bg-raised); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border-input); }
.btn-ghost:hover { background: var(--bg-raised); }
.btn-lg { min-height: 56px; font-size: 18px; padding: 0 28px; }
.btn-block { width: 100%; }
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; }
.link-arrow {
  display: inline-flex; align-items: center; gap: 6px; min-height: var(--tap);
  color: var(--text-accent); font-weight: 600; text-decoration: none;
}
.link-arrow:hover { text-decoration: underline; text-underline-offset: 4px; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: var(--tap); height: var(--tap); border-radius: var(--radius-pill);
  border: 1.5px solid var(--border-input); color: var(--text); background: transparent; text-decoration: none; cursor: pointer;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40; background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.header-in { height: var(--header-h); display: flex; align-items: center; gap: 32px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; min-height: var(--tap); }
.brand img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; }
.brand-name { display: block; font: 700 22px/1.05 var(--font-head); }
.brand-sub { display: block; font: 600 var(--fs-label)/1.3 var(--font-body); letter-spacing: .14em; text-transform: uppercase; color: var(--text-muted); }
.nav-desktop { display: flex; gap: 4px; margin-left: auto; }
.nav-desktop a {
  display: inline-flex; align-items: center; min-height: var(--tap); padding: 0 14px;
  text-decoration: none; font-weight: 500; color: var(--text);
  border-bottom: 2px solid transparent; border-radius: 0;
}
.nav-desktop a:hover { color: var(--text-accent); }
.nav-desktop a[aria-current="page"] { color: var(--text-accent); border-bottom-color: var(--c-gold); font-weight: 700; }
.header-call { display: none; }

/* ---------- Mobile bottom nav + sticky CTA ---------- */
.bottom-nav, .m-cta { display: none; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); background: var(--bg); margin-top: 64px; }
.foot-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: 40px; padding-top: 48px; padding-bottom: 40px; }
.foot-brand img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; margin-bottom: 12px; }
.foot-grid h2 { font: 600 var(--fs-label)/1.3 var(--font-body); letter-spacing: .16em; text-transform: uppercase; color: var(--text-accent); margin-bottom: 12px; }
.foot-grid li { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 4px; }
.foot-grid li .icon { margin-top: 3px; color: var(--text-muted); }
.foot-grid a { text-decoration: none; display: inline-flex; align-items: center; min-height: var(--tap); }
.foot-grid a:hover { color: var(--text-accent); text-decoration: underline; }
.hours-table { border-collapse: collapse; width: 100%; }
.hours-table th, .hours-table td { text-align: left; padding: 6px 0; font-weight: 400; vertical-align: top; }
.hours-table th { color: var(--text-muted); padding-right: 16px; white-space: nowrap; }
.hours-table tr.is-today th, .hours-table tr.is-today td { color: var(--text); font-weight: 700; }
.today-tag { display: inline-block; margin-left: 6px; font: 700 var(--fs-label)/1.4 var(--font-body); color: var(--text-on-gold); background: var(--c-gold); padding: 0 6px; border-radius: var(--radius-sm); }
.foot-bottom { border-top: 1px solid var(--border); padding-top: 16px; padding-bottom: 24px; color: var(--text-muted); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.install-btn[hidden] { display: none; }

/* ---------- Generic sections ---------- */
.section { padding: 48px 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.page-head { padding: 36px 0 28px; border-bottom: 1px solid var(--border); }
.page-head .h1 { margin: 8px 0 10px; }
.page-head .lead { max-width: 820px; }
.card { background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius-md); }

/* ---------- Photo placeholder ---------- */
.ph-box {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  background: var(--bg-surface); border: 2px dashed var(--border-input); color: var(--text-muted);
  text-align: center; padding: 24px;
}
.ph-box strong { color: var(--text); font-weight: 600; }

/* ---------- Service card ---------- */
.svc-card {
  position: relative; display: flex; flex-direction: column; gap: 8px; text-decoration: none;
  background: var(--bg-surface); border: 1px solid var(--border); border-top: 3px solid var(--c-gold);
  border-radius: var(--radius-sm); padding: 20px; transition: background-color .15s;
}
a.svc-card:hover { background: var(--bg-raised); }
.svc-top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.svc-name { font: 700 var(--fs-h3)/1.2 var(--font-head); }
.svc-price { font: 700 var(--fs-price)/1 var(--font-head); color: var(--text-accent); white-space: nowrap; }
.svc-meta { display: flex; align-items: center; gap: 6px; color: var(--text-muted); }
.svc-desc { color: var(--text-muted); }
.svc-cta { margin-top: auto; padding-top: 8px; display: inline-flex; align-items: center; gap: 6px; color: var(--text-accent); font-weight: 600; min-height: var(--tap); }
.cards-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.cards-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.cards-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }

/* ---------- HOME ---------- */
.hero { position: relative; height: 600px; overflow: hidden; border-bottom: 1px solid var(--border); }
.hero-photo { position: absolute; top: 0; right: 0; bottom: 0; width: 56%; }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 55% 40%; }
.hero-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, var(--c-charcoal) 0%, rgba(21,23,26,.55) 22%, rgba(21,23,26,0) 55%); }
.hero-text { position: relative; z-index: 2; padding-top: 88px; max-width: 580px; }
.hero-text .display { margin: 16px 0 20px; }
.hero-text .lead { margin-bottom: 32px; max-width: 500px; }
.trust { display: flex; flex-wrap: wrap; gap: 12px 28px; margin-top: 36px; }
.trust li { display: flex; align-items: center; gap: 8px; color: var(--text); }
.trust .icon { color: var(--text-accent); }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; counter-reset: step; }
.step { padding: 24px; }
.step-num { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid var(--c-gold); color: var(--text-accent); font: 700 20px/1 var(--font-head); margin-bottom: 14px; }
.step h3 { font-size: 22px; margin-bottom: 6px; }
.reviews { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.review { padding: 22px; display: flex; flex-direction: column; gap: 10px; }
.stars { display: flex; gap: 2px; color: var(--text-accent); }
.stars .icon { width: 18px; height: 18px; }
.review blockquote { margin: 0; font: italic 400 20px/1.35 var(--font-head); }
.review cite { font-style: normal; color: var(--text-muted); }

/* ---------- ABOUT ---------- */
.about-grid { display: grid; grid-template-columns: 380px 1fr; gap: 48px; padding-top: 32px; }
.about-grid.one { grid-template-columns: 1fr; }
.barber-card { overflow: hidden; }
.barber-card .ph-box { height: 230px; border-width: 0 0 2px; border-radius: 0; }
.barber-body { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 8px; }
.barber-body .h3 { font-size: 28px; }
.rating { display: flex; align-items: center; gap: 6px; }
.rating .icon { color: var(--text-accent); }
.rules { padding: 20px 22px; margin-top: 20px; }
.rules h2 { font-size: 22px; margin-bottom: 10px; }
.rules li { display: flex; gap: 10px; align-items: flex-start; padding: 3px 0; }
.rules li .icon { color: var(--text-accent); margin-top: 3px; }
.svc-group + .svc-group { margin-top: 28px; }
.svc-group-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 14px; }
.svc-group-head .h2 { font-size: 28px; }
.svc-card.wide { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "name price" "desc price" "meta cta"; column-gap: 20px; row-gap: 4px; }
.svc-card.wide { padding: 16px 20px; }
.svc-card.wide .svc-top { display: contents; }
.svc-card.wide .svc-name { grid-area: name; }
.svc-card.wide .svc-price { grid-area: price; align-self: start; }
.svc-card.wide .svc-desc { grid-area: desc; }
.svc-card.wide .svc-meta { grid-area: meta; align-self: end; }
.svc-card.wide .svc-cta { grid-area: cta; padding-top: 0; margin-top: 0; justify-self: end; }
.story-m { display: none; }

/* ---------- GALLERY ---------- */
.gal-layout { display: grid; grid-template-columns: 1fr 380px; gap: 40px; padding-top: 24px; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: var(--tap); padding: 0 16px;
  border-radius: var(--radius-pill); border: 1.5px solid var(--border-input); background: transparent;
  color: var(--text); font-weight: 500; cursor: pointer; white-space: nowrap;
}
.chip[aria-pressed="true"] { background: var(--c-gold); border-color: var(--c-gold); color: var(--text-on-gold); font-weight: 700; }
.chip .icon { width: 16px; height: 16px; }
.chip:not([aria-pressed="true"]) .icon { display: none; }
.bento { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 216px; grid-auto-flow: dense; gap: 12px; }
.tile {
  position: relative; padding: 0; border: 0; background: var(--bg-surface); border-radius: var(--radius-sm);
  overflow: hidden; cursor: zoom-in; text-align: left; display: block; width: 100%; height: 100%;
}
.tile.tall { grid-row: span 2; }
.tile[hidden] { display: none; }
.tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.tile:hover img { transform: scale(1.04); }
.tile-cap {
  position: absolute; left: 0; right: 0; bottom: 0; display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 10px 12px; background: var(--c-charcoal); color: var(--text); font-weight: 600;
}
.tile-tag { font: 600 var(--fs-label)/1.3 var(--font-body); letter-spacing: .08em; text-transform: uppercase; color: var(--text-accent); }
.price-panel { align-self: start; position: sticky; top: calc(var(--header-h) + 24px); padding: 24px; border-top: 3px solid var(--c-gold); border-radius: var(--radius-sm); }
.price-panel > .h2 { font-size: 28px; margin-bottom: 4px; }
.pl-group { margin-top: 16px; }
.pl-group h3 { font: 600 var(--fs-label)/1.3 var(--font-body); letter-spacing: .16em; text-transform: uppercase; color: var(--text-accent); margin-bottom: 4px; }
.pl-row { display: flex; align-items: baseline; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.pl-row:last-child { border-bottom: 0; }
.pl-name { font-weight: 600; }
.pl-dur { font-weight: 400; color: var(--text-muted); margin-left: 8px; }
.pl-dots { flex: 1; border-bottom: 2px dotted var(--border-input); transform: translateY(-6px); min-width: 16px; }
.pl-price { font: 700 22px/1 var(--font-head); color: var(--text-accent); }
.price-panel .btn { margin-top: 18px; }
.price-note { margin-top: 12px; color: var(--text-muted); }
.lightbox { border: 0; padding: 0; background: var(--bg-surface); color: var(--text); border-radius: var(--radius-md); max-width: min(560px, 92vw); width: 100%; box-shadow: var(--shadow-1); }
.lightbox::backdrop { background: rgba(10,11,13,.85); }
.lightbox img { width: 100%; max-height: 70vh; object-fit: cover; }
.lightbox-body { padding: 16px 20px 20px; display: flex; flex-direction: column; gap: 12px; }
.lightbox-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.lightbox-close { position: absolute; top: 12px; right: 12px; background: var(--c-charcoal); }

/* ---------- CONTACT (Option 1 · Map + Details) ---------- */
.contact-head .h1 em { font-style: italic; color: var(--text-accent); }
.ct-panel { display: grid; grid-template-columns: 1fr 480px; min-height: 540px; margin: 32px 0 56px; background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden; }
.ct-map { position: relative; min-height: 320px; background: var(--bg-raised); }
.ct-map img, .ct-map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; object-fit: cover; }
.ct-map img { filter: grayscale(.35); }
.ct-det { background: var(--bg-surface); padding: 34px 38px; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.ct-place { font: 700 60px/1 var(--font-head); margin-top: 2px; }
.ct-addr { color: var(--text-muted); font-size: 17px; }
.ct-copy { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0; background: none; border: 0; color: var(--text-accent); font: 600 16px var(--font-body); cursor: pointer; }
.ct-copy:hover span { text-decoration: underline; }
.ct-row { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin: 4px 0 0; }
.ct-det .link-arrow { min-height: 44px; }
.ct-hours { width: 100%; margin-top: auto; padding-top: 16px; border-top: 1px solid var(--border-input); }
.ct-hours .hours-table { width: 100%; }
.ct-note { color: var(--text-muted); }

/* ==========================================================
   MOBILE (≤ 760px): not a shrunken desktop
   ========================================================== */
@media (max-width: 760px) {
  body { padding-bottom: calc(var(--bottom-nav-h) + var(--mcta-h) + env(safe-area-inset-bottom)); }
  body.no-cta { padding-bottom: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom)); }
  .header-in { gap: 12px; }
  .brand img { width: 40px; height: 40px; }
  .brand-name { font-size: 19px; }
  .nav-desktop, .header-cta { display: none; }
  .header-call { display: inline-flex; margin-left: auto; }

  .bottom-nav {
    display: grid; grid-template-columns: repeat(4, 1fr);
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
    height: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
    background: var(--bg); border-top: 1px solid var(--border);
  }
  .bottom-nav a {
    position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
    min-height: var(--tap); text-decoration: none; color: var(--text-muted); font: 500 var(--fs-label)/1 var(--font-body);
  }
  .bottom-nav a .icon { width: 24px; height: 24px; }
  .bottom-nav a[aria-current="page"] { color: var(--text-accent); font-weight: 700; }
  .bottom-nav a[aria-current="page"]::before { content: ""; position: absolute; top: 0; left: 28%; right: 28%; height: 3px; background: var(--c-gold); border-radius: 0 0 3px 3px; }
  .m-cta {
    display: flex; gap: 10px; align-items: center; position: fixed; left: 0; right: 0; z-index: 45;
    bottom: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom));
    height: var(--mcta-h); padding: 12px 16px; background: var(--bg); border-top: 1px solid var(--border);
  }
  .m-cta .btn { flex: 1; min-height: 52px; }

  .site-footer { margin-top: 40px; }
  .foot-grid { grid-template-columns: 1fr; gap: 24px; padding-top: 32px; padding-bottom: 24px; }
  .foot-bottom { flex-direction: column; gap: 4px; }

  .section { padding: 32px 0; }
  .section-head { margin-bottom: 16px; align-items: center; }
  .page-head { padding: 20px 0 16px; }
  .page-head .h1 { margin: 6px 0 4px; }

  /* Home */
  .hero { height: auto; border-bottom: 0; }
  .hero-photo { position: relative; width: 100%; height: 170px; }
  .trust li:nth-child(3) { display: none; }
  .hero-photo img { object-position: 58% 52%; }
  .hero-photo::after { background: linear-gradient(0deg, var(--c-charcoal) 0%, rgba(21,23,26,0) 45%); }
  .hero-text { padding-top: 4px; }
  .hero-text .display { margin: 8px 0 10px; }
  .hero-text .lead { margin-bottom: 0; }
  .hero .btn-row { display: none; }
  .trust { gap: 8px; margin-top: 14px; }
  .trust li { border: 1px solid var(--border); border-radius: var(--radius-pill); padding: 4px 12px; font-size: var(--fs-label); font-weight: 500; }
  .trust li .icon { width: 16px; height: 16px; }
  .home-prices { padding-top: 20px; }
  .cards-4, .cards-3, .cards-2 { grid-template-columns: 1fr; gap: 10px; }
  .steps, .reviews { grid-template-columns: 1fr; gap: 12px; }

  /* compact service card on mobile: name+meta left, price right */
  .svc-card { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "name price" "meta cta"; gap: 2px 12px; padding: 12px 14px; }
  .svc-card .svc-top { display: contents; }
  .svc-card .svc-name { grid-area: name; }
  .svc-card .svc-price { grid-area: price; }
  .svc-card .svc-meta { grid-area: meta; }
  .svc-card .svc-desc { display: none; }
  .svc-card .svc-cta { grid-area: cta; padding: 0; margin: 0; min-height: 0; justify-self: end; }
  .svc-card.wide { grid-template-areas: "name price" "desc desc" "meta cta"; }
  .svc-card.wide .svc-desc { display: block; grid-area: desc; }

  /* About: services first, then barber, rules, story */
  .about-grid { display: flex; flex-direction: column; gap: 24px; padding-top: 20px; }
  .about-services { order: 1; }
  .about-side { order: 2; }
  .story-d { display: none; }
  .story-m { display: block; }
  .svc-group-head .h2 { font-size: 24px; }

  /* Gallery: prices first, then photos */
  .gal-layout { display: flex; flex-direction: column; gap: 28px; padding-top: 16px; }
  .price-panel { order: -1; position: static; padding: 18px; }
  .price-panel .btn { display: none; }
  .filters { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px 12px; padding: 0 16px 4px; scrollbar-width: none; }
  .bento { grid-template-columns: 1fr 1fr; grid-auto-rows: 190px; gap: 8px; }

  /* Contact: map on top, details below */
  .ct-panel { grid-template-columns: 1fr; min-height: 0; margin: 16px 0 32px; }
  .ct-map { min-height: 240px; }
  .ct-map img { object-fit: none; object-position: 50% 50%; }
  .ct-det { padding: 20px 16px 22px; }
  .ct-place { font-size: 40px; }
  .ct-row { flex-direction: column; align-items: stretch; width: 100%; gap: 4px; }
}
