/* Tres Hijos Bakehouse: components + layout (uses tokens.css) */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; } }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 var(--fs-body)/var(--lh-body) var(--font-body); }
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, h4, p, ul, ol, dl, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 100; background: var(--primary); color: #fff; padding: 12px 16px; border-radius: var(--r-sm); font-weight: 700; }
.skip:focus { top: 12px; }
.wrap { width: 100%; max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
.icon { width: 20px; height: 20px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.muted { color: var(--text-muted); }

/* ---------- type ---------- */
.eyebrow { font: 700 var(--fs-label)/1.3 var(--font-body); letter-spacing: .2em; text-transform: uppercase; color: var(--text-accent); }
.h2 { font: 800 var(--fs-h2)/1.02 var(--font-head); letter-spacing: -.02em; margin-top: 10px; }
.h2 em, .display em { font-style: italic; font-weight: 500; color: var(--text-accent); }
.h3 { font: 700 var(--fs-h3)/1.15 var(--font-head); letter-spacing: -.01em; }
.lead { font-size: var(--fs-lead); color: var(--text-muted); }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 0 26px; border-radius: var(--r-pill); border: 2px solid transparent; font: 700 17px/1 var(--font-body); text-decoration: none; cursor: pointer; white-space: nowrap; transition: background .15s, color .15s; }
.btn-primary { background: var(--primary); color: var(--text-on-primary); }
.btn-primary:hover { background: var(--primary-hover); }
.btn-secondary { border-color: var(--text); color: var(--text); background: transparent; }
.btn-secondary:hover { background: var(--text); color: #fff; }
.btn-link { color: var(--text-accent); font-weight: 700; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; }
.btn-link:hover { text-decoration: underline; }
.btn-block { width: 100%; }

/* ---------- header ---------- */
.site-header { position: fixed; inset: 0 0 auto; z-index: 50; background: var(--bg); border-bottom: 1px solid var(--border); }
.hdr-in { height: var(--header-h); display: flex; align-items: center; gap: 32px; }
.brand { display: flex; align-items: center; gap: 12px; min-height: 44px; text-decoration: none; }
.brand img { width: 56px; height: 56px; border-radius: 50%; border: 1px solid var(--border); }
.brand-name { display: block; font: 700 23px/1.05 var(--font-head); }
.brand-sub { display: block; font: 700 12px/1.3 var(--font-body); letter-spacing: .26em; text-transform: uppercase; color: var(--text-muted); margin-top: 3px; }
.nav-desktop { display: flex; gap: 8px; margin-left: auto; }
.nav-desktop a { display: flex; align-items: center; height: 44px; padding: 0 12px; font-weight: 700; font-size: 16px; text-decoration: none; border-bottom: 3px solid transparent; }
.nav-desktop a:hover { color: var(--text-accent); }
.nav-desktop a[aria-current="true"] { color: var(--text-accent); border-bottom-color: var(--text-accent); }
.hdr-call { display: none; }
.chips-nav { display: none; }
.m-cta { display: none; }

/* ---------- sections ---------- */
.section { position: relative; padding: 40px 0 72px; scroll-margin-top: calc(var(--header-h) + var(--chips-h)); }
.anchor { scroll-margin-top: calc(var(--header-h) + var(--chips-h) + 16px); }
.section + .section { border-top: 1px solid var(--border); }
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; margin-bottom: 24px; }
.sec-head .lead { max-width: 440px; }

/* ---------- 1. HOME ---------- */
.hero { margin-top: var(--header-h); height: calc(100vh - var(--header-h)); min-height: 640px; max-height: 1000px; position: relative; overflow: hidden; scroll-margin-top: var(--header-h); display: flex; flex-direction: column; }
.hero-grid { flex: 1; display: grid; grid-template-columns: 600px 1fr; gap: 32px; align-items: center; }
.hero .display { font: 800 var(--fs-display)/.98 var(--font-head); letter-spacing: -.025em; margin-top: 18px; }
.hero .lead { margin: 22px 0 32px; max-width: 520px; }
.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; }
.facts { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 36px; }
.facts li { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-pill); font-weight: 700; font-size: 15px; }
.facts .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--c-green); }
.facts .open { color: var(--c-green); }
.hero-photo { position: relative; align-self: end; justify-self: end; width: 720px; }
.hero-photo img { width: 100%; height: auto; }
.price-tag { position: absolute; left: -24px; bottom: 90px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 12px 16px; box-shadow: var(--shadow); line-height: 1.3; }
.price-tag b { display: block; font: 700 24px/1.1 var(--font-head); color: var(--text-accent); }
.price-tag span { font-size: 16px; font-weight: 600; }
.best { background: var(--surface); border-top: 1px solid var(--border); }
.best-in { display: flex; align-items: center; gap: 18px; min-height: 96px; }
.best-in .eyebrow { margin-right: 6px; }
.best-in ul { display: flex; gap: 10px; }
.best-in li img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--border); }
.best-in .btn-link { margin-left: auto; }

/* ---------- 2. MENU ---------- */
.menu-grid { display: grid; grid-template-columns: 430px 1fr; gap: 40px; align-items: start; }
.price-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); padding: 22px 26px; box-shadow: var(--shadow); }
.pl-group + .pl-group { margin-top: 14px; }
.pl-group h3 { font: 700 20px/1.2 var(--font-head); display: flex; justify-content: space-between; align-items: baseline; padding-bottom: 6px; border-bottom: 2px solid var(--text); }
.pl-group h3 small { font: 700 var(--fs-label) var(--font-body); letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); }
.pl-row { display: flex; align-items: baseline; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.pl-row:last-child { border-bottom: 0; }
.pl-name { font-weight: 600; }
.pl-unit { color: var(--text-muted); font-size: 16px; margin-left: 4px; }
.pl-dots { flex: 1; border-bottom: 2px dotted var(--border-input); transform: translateY(-5px); min-width: 16px; }
.pl-price { font: 700 20px/1 var(--font-head); color: var(--text-accent); white-space: nowrap; }
.pl-note { margin-top: 14px; color: var(--text-muted); }
.products { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.product { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); overflow: hidden; display: flex; flex-direction: column; }
.product img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--bg); }
.product-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.product h4 { font: 700 19px/1.2 var(--font-head); }
.product .p-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 6px; }
.product .p-price { font: 700 var(--fs-price)/1 var(--font-head); color: var(--text-accent); }
.product .p-price small { font: 600 16px var(--font-body); color: var(--text-muted); margin-left: 4px; }

/* ---------- 3. ABOUT ---------- */
.about-grid { display: grid; grid-template-columns: 460px 1fr; gap: 64px; align-items: center; }
.about-photo { position: relative; }
.about-photo img { width: 100%; height: 620px; object-fit: cover; border-radius: 220px 220px var(--r-md) var(--r-md); }
.since { position: absolute; right: -24px; top: 40px; width: 128px; height: 128px; border-radius: 50%; background: var(--primary); color: #fff; display: grid; place-items: center; text-align: center; font: 700 15px/1.2 var(--font-body); box-shadow: var(--shadow); }
.since b { display: block; font: 800 34px/1 var(--font-head); }
.about-text { display: grid; gap: 14px; margin: 18px 0 26px; max-width: 640px; }
.about-text p { color: var(--text-muted); font-size: 17px; }
.values { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.value { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); padding: 18px; }
.value .ic { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; background: var(--surface-2); color: var(--text-accent); margin-bottom: 10px; }
.value h3 { font: 700 19px/1.2 var(--font-head); margin-bottom: 4px; }
.value p { color: var(--text-muted); }
.steps { margin-top: 26px; }
.steps h3 { margin-bottom: 12px; }
.steps ol { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; counter-reset: s; }
.steps li { display: grid; grid-template-columns: 40px 1fr; gap: 12px; align-items: start; counter-increment: s; }
.steps li::before { content: counter(s); width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; border: 2px solid var(--text-accent); color: var(--text-accent); font: 700 18px/1 var(--font-head); }
.steps b { display: block; }
.steps span { color: var(--text-muted); }

/* ---------- 4. CONTACT (Option 1 · Map + Details) ---------- */
.contact-head { max-width: 760px; margin-bottom: 28px; }
.contact-head .lead { margin-top: 12px; }
.ct-panel { display: grid; grid-template-columns: 1fr 480px; min-height: 520px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); overflow: hidden; box-shadow: var(--shadow); }
.ct-map { position: relative; min-height: 320px; background: var(--surface-2); }
.ct-map img, .ct-map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; object-fit: cover; }
.ct-det { background: var(--surface-2); padding: 36px 40px; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.ct-place { font: 800 60px/1 var(--font-head); letter-spacing: -.02em; margin-top: 4px; }
.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-weight: 700; cursor: pointer; }
.ct-copy:hover span { text-decoration: underline; }
.ct-row { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin: 4px 0 2px; }
.ct-hours { display: grid; grid-template-columns: auto 1fr; gap: 4px 20px; width: 100%; margin-top: auto; padding-top: 16px; border-top: 1px solid var(--border-input); }
.ct-hours dt { color: var(--text-muted); }
.ct-hours dd { margin: 0; font-weight: 700; text-align: right; }
.ct-note { color: var(--text-muted); }
.now-tag { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--c-green); }
.now-tag::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--c-green); }

/* ---------- footer ---------- */
.site-footer { background: var(--c-espresso); color: #F3ECDD; padding: 44px 0 48px; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
.site-footer .brand img { border-color: #6B5444; }
.site-footer .brand-sub { color: #D9CBB6; }
.foot-grid h2 { font: 700 var(--fs-label)/1.3 var(--font-body); letter-spacing: .2em; text-transform: uppercase; color: #E9B48F; margin-bottom: 10px; }
.foot-grid p, .foot-grid li { color: #D9CBB6; }
.foot-grid a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; color: #F3ECDD; text-decoration: none; }
.foot-grid a:hover { text-decoration: underline; }
.copy { margin-top: 24px; color: #D9CBB6; }

/* ======================= MOBILE ======================= */
@media (max-width: 760px) {
  body { padding-bottom: var(--mcta-h); }
  .hdr-in { gap: 10px; }
  .brand img { width: 42px; height: 42px; }
  .brand-name { font-size: 21px; }
  .site-header .brand-sub { display: none; }
  .nav-desktop, .hdr-order { display: none; }
  .hdr-call { display: grid; place-items: center; width: 44px; height: 44px; margin-left: auto; border: 1px solid var(--border-input); border-radius: 50%; }
  .chips-nav { display: flex; gap: 8px; height: var(--chips-h); align-items: center; padding: 0 16px; overflow-x: auto; scrollbar-width: none; }
  .chips-nav::-webkit-scrollbar { display: none; }
  .chips-nav a { flex: 0 0 auto; display: flex; align-items: center; min-height: 44px; padding: 0 16px; background: var(--surface); border: 1px solid var(--border-input); border-radius: var(--r-pill); font-weight: 700; font-size: 15px; text-decoration: none; }
  .chips-nav a[aria-current="true"] { background: var(--primary); border-color: var(--primary); color: #fff; }
  .m-cta { display: flex; gap: 10px; position: fixed; inset: auto 0 0; z-index: 50; height: var(--mcta-h); padding: 12px 16px; background: var(--bg); border-top: 1px solid var(--border); }
  .m-cta .btn { flex: 1; }
  .m-cta .m-call { flex: 0 0 52px; padding: 0; }

  .section { padding: 26px 0 40px; }
  .sec-head { flex-direction: column; align-items: flex-start; gap: 6px; margin-bottom: 16px; }
  /* home */
  .hero { margin-top: calc(var(--header-h) + var(--chips-h)); height: auto; min-height: 0; max-height: none; }
  .hero-grid { display: flex; flex-direction: column; gap: 0; padding-bottom: 24px; }
  .hero-photo { order: -1; width: calc(100% + 32px); margin: 0 -16px; justify-self: auto; align-self: auto; }
  .hero-photo img { height: 240px; object-fit: cover; object-position: 50% 20%; }
  .hero-text { margin-top: 18px; }
  .price-tag { left: 16px; bottom: 14px; padding: 8px 12px; }
  .price-tag b { font-size: 20px; }
  .hero .display { margin-top: 14px; }
  .hero .lead { margin: 10px 0 0; }
  .hero-ctas { display: none; }
  .facts { margin-top: 16px; gap: 8px; }
  .best { display: none; }
  /* menu: prices first, then photos */
  .menu-grid { grid-template-columns: 1fr; gap: 20px; }
  .price-card { padding: 16px; }
  .products { grid-template-columns: 1fr 1fr; gap: 10px; }
  .product-body { padding: 10px 12px 12px; }
  .product h4 { font-size: 17px; }
  .product .p-meta { flex-direction: column; align-items: stretch; gap: 8px; }
  /* about */
  .about-grid { display: flex; flex-direction: column; gap: 20px; }
  .about-photo { order: 2; }
  .about-photo img { height: 300px; border-radius: 150px 150px var(--r-md) var(--r-md); }
  .since { right: 8px; top: 16px; width: 104px; height: 104px; font-size: 14px; }
  .since b { font-size: 28px; }
  .values { grid-template-columns: 1fr; gap: 10px; }
  .value { display: grid; grid-template-columns: 44px 1fr; gap: 12px; padding: 14px; }
  .value .ic { margin: 0; }
  .about-body { display: flex; flex-direction: column; }
  .about-body .values { order: 1; margin-top: 14px; }
  .about-body .about-text { order: 2; margin: 18px 0 4px; }
  .about-body .steps { order: 3; }
  .steps ol { grid-template-columns: 1fr; }
  /* contact: map on top, details below */
  .contact-head { margin-bottom: 16px; }
  .ct-panel { grid-template-columns: 1fr; min-height: 0; }
  .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; }
  .foot-grid { grid-template-columns: 1fr; gap: 20px; }
}
