/* Casa Pueblo — sistema visual v2
   Dirección: Understated Elegance (artesanal, cálido, editorial) sobre la
   paleta OFICIAL de marca que mandó Lautaro (8b9057 · f3ede2 · b8501e ·
   487273), con el marrón y el arena como protagonistas — pedido explícito. */

:root {
  --cream: #f3ede2;
  --cream-deep: #e8dfcd;
  --paper: #fffdf9;
  --brown: #3b2a1e;
  --brown-soft: #6b5542;
  --olive: #8b9057;
  --olive-deep: #4c4f30;
  --terracotta: #b8501e;
  --terracotta-dark: #8a3c16;
  --sand: #c99a5b;
  --teal: #487273;
  --ink: #2e2419;
  --ink-soft: #5a4b3b;
  --line: rgba(59, 42, 30, 0.1);
  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 14px 40px rgba(40, 28, 16, 0.1);
  --shadow-soft: 0 8px 24px rgba(40, 28, 16, 0.08);
  --font-display: "Lora", "Georgia", serif;
  --font-stamp: "Bevan", Georgia, serif;
  --font-body: "Karla", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
.container { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 24px; }
section { padding: 88px 0; }
h1, h2, h3, h4 { font-family: var(--font-display); color: var(--brown); line-height: 1.18; margin: 0 0 16px; font-weight: 600; }
h1 { font-size: clamp(2.1rem, 4.6vw, 3.2rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 16px; color: var(--ink-soft); max-width: 62ch; }
.lead { font-size: 1.14rem; color: var(--brown-soft); }
.eyebrow {
  display: block;
  font-family: var(--font-body);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: 0.8rem;
  color: var(--terracotta-dark);
  margin-bottom: 14px;
}

/* Fotos: filtro cálido uniforme para igualar tomas de celular dispares */
.photo { border-radius: var(--radius); overflow: hidden; }
.photo img { width: 100%; height: 100%; object-fit: cover; filter: saturate(1.06) contrast(1.02) sepia(0.035); }

/* Botones */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  text-decoration: none;
  font-size: 0.96rem;
  border: 1.5px solid transparent;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
  cursor: pointer;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--terracotta); color: var(--paper); }
.btn-primary:hover { background: var(--terracotta-dark); }
.btn-outline { background: transparent; border-color: var(--brown); color: var(--brown); }
.btn-outline:hover { background: var(--brown); color: var(--paper); }
.btn-ghost-light { background: transparent; border-color: rgba(250, 243, 230, 0.5); color: var(--cream); }
.btn-ghost-light:hover { background: rgba(250, 243, 230, 0.12); border-color: var(--cream); }
.btn-wsp { background: var(--teal); color: #fff; border-radius: 999px; }
.btn-wsp:hover { background: #355657; }
.btn-block { width: 100%; justify-content: center; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--cream); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 12px 24px; max-width: 1140px; margin: 0 auto; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-badge { display: inline-flex; align-items: center; height: 54px; }
.brand-badge img { height: 100%; width: auto; display: block; }
@media (max-width: 560px) { .brand-badge { height: 44px; } }
.nav { display: flex; align-items: center; gap: 30px; }
.nav a { text-decoration: none; font-weight: 600; font-size: 0.95rem; color: var(--brown-soft); }
.nav a:hover { color: var(--terracotta); }
.nav-cta .btn-wsp { color: #fff; }
.nav-cta .btn-wsp:hover { color: #fff; }
.nav-cta { display: flex; align-items: center; gap: 10px; }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 6px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--brown); margin: 5px 0; border-radius: 2px; }

/* Dropdown de categorías bajo "Menú" */
.nav-dropdown { position: relative; }
.nav-dropdown-trigger::after { content: "▾"; font-size: 0.7em; margin-left: 4px; color: var(--sand); }
.nav-dropdown-panel {
  position: absolute; top: calc(100% + 16px); left: 50%; transform: translateX(-50%) translateY(6px);
  background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow);
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 2px; padding: 12px;
  width: 460px; opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity 0.15s ease 0.12s, transform 0.15s ease 0.12s, visibility 0s linear 0.27s;
  z-index: 60;
}
/* Puente invisible sobre el hueco entre "Menú" y el panel: sin esto el hover se corta al cruzarlo */
.nav-dropdown-panel::before { content: ""; position: absolute; left: 0; right: 0; top: -20px; height: 20px; }
.nav-dropdown:hover .nav-dropdown-panel,
.nav-dropdown:focus-within .nav-dropdown-panel { opacity: 1; visibility: visible; pointer-events: auto; transform: translateX(-50%) translateY(0); transition-delay: 0s; }
.nav-dropdown-panel a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--radius-sm); text-decoration: none; font-size: 0.86rem; font-weight: 600; color: var(--brown-soft); }
.nav-dropdown-panel a:hover { background: var(--cream-deep); color: var(--terracotta); }
.nav-dropdown-panel img { width: 34px; height: 34px; border-radius: 6px; object-fit: cover; flex-shrink: 0; filter: saturate(1.06) contrast(1.02) sepia(0.035); }

@media (max-width: 860px) {
  .nav { position: fixed; top: 64px; right: 0; bottom: 0; left: 0; background: var(--cream); flex-direction: column; align-items: flex-start; padding: 24px; gap: 20px; transform: translateX(100%); transition: transform 0.25s ease; overflow-y: auto; }
  .nav.is-open { transform: translateX(0); }
  .nav-toggle { display: block; }
  .nav-cta { flex-direction: column; align-items: flex-start; width: 100%; }
  .nav-cta .btn { width: 100%; justify-content: center; }
  .nav-dropdown { width: 100%; }
  .nav-dropdown-panel {
    position: static; opacity: 1; visibility: visible; pointer-events: auto; transform: none;
    box-shadow: none; width: 100%; grid-template-columns: 1fr; padding: 6px 0 0 14px;
    margin-top: 8px; border-left: 2px solid var(--line);
  }
}

/* Hero fotográfico */
.hero { padding: 56px 0 0; background: var(--cream); }
.hero-grid { display: grid; grid-template-columns: 1fr 0.95fr; gap: 56px; align-items: center; }
.hero-copy .eyebrow { margin-bottom: 10px; }
.trust-line { margin-top: 26px; display: flex; flex-wrap: wrap; gap: 6px 10px; font-size: 0.86rem; color: var(--brown-soft); font-weight: 600; }
.trust-line span:not(:last-child)::after { content: "·"; margin-left: 10px; color: var(--sand); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }
.hero-photo { position: relative; }
.hero-photo .photo { aspect-ratio: 4/5; box-shadow: var(--shadow); }
.hero-logo-badge {
  position: absolute; bottom: -20px; left: -20px;
  background: var(--terracotta);
  border-radius: var(--radius); padding: 14px 18px;
  box-shadow: var(--shadow-soft); border: 4px solid var(--cream);
  transform: rotate(-6deg);
}
.hero-logo-badge img { display: block; height: 58px; width: auto; }

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-photo { order: -1; max-width: 380px; margin: 0 auto; }
}

/* Mosaico "qué hacemos" — fotográfico, asimétrico */
.mosaic { display: grid; grid-template-columns: 1.3fr 1fr; grid-template-rows: auto auto; gap: 20px; }
.mosaic-main { grid-row: span 2; }
.mosaic-item { position: relative; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-soft); text-decoration: none; display: block; }
.mosaic-main .photo, .mosaic-item .photo { height: 100%; border-radius: 0; }
.mosaic-main { min-height: 480px; }
.mosaic-item:not(.mosaic-main) { min-height: 230px; }
.mosaic-cap {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 22px 22px 18px;
  background: linear-gradient(180deg, transparent, rgba(30, 20, 12, 0.78));
  color: var(--cream);
}
.mosaic-cap h3 { color: var(--cream); margin-bottom: 4px; font-size: 1.2rem; }
.mosaic-cap p { color: rgba(250, 243, 230, 0.82); margin: 0; font-size: 0.92rem; }
@media (max-width: 760px) {
  .mosaic { grid-template-columns: 1fr; }
  .mosaic-main { min-height: 300px; }
}

/* Franja de confianza — tipográfica, sin pills */
.trust-strip { background: var(--cream-deep); padding: 18px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.trust-strip .container { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 18px; font-size: 0.85rem; font-weight: 700; letter-spacing: 0.03em; color: var(--brown-soft); text-transform: uppercase; }
.trust-strip span:not(:last-child)::after { content: "·"; margin-left: 18px; color: var(--sand); }

/* Secciones */
.section-cream { background: var(--cream); }
.section-paper { background: var(--paper); }
.section-dark { background: var(--brown); color: var(--cream); }
.section-dark h2, .section-dark h3 { color: var(--cream); }
.section-dark p { color: rgba(250, 243, 230, 0.78); }

.section-photo { position: relative; color: var(--cream); overflow: hidden; }
.section-photo .photo-bg { position: absolute; top: 0; right: 0; bottom: 0; left: 0; }
.section-photo .photo-bg img { width: 100%; height: 100%; object-fit: cover; filter: saturate(1.05) contrast(1.02) sepia(0.04); }
.section-photo .photo-overlay { position: absolute; top: 0; right: 0; bottom: 0; left: 0; background: linear-gradient(100deg, rgba(30, 20, 12, 0.92) 0%, rgba(30, 20, 12, 0.78) 45%, rgba(30, 20, 12, 0.35) 100%); }
.section-photo .container { position: relative; z-index: 1; }
.section-photo h2, .section-photo h3 { color: var(--cream); }
.section-photo p { color: rgba(250, 243, 230, 0.85); }
.section-photo .eyebrow { color: var(--sand); }

.section-head { max-width: 620px; margin-bottom: 44px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px; }
@media (max-width: 860px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }

.card { background: var(--paper); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow-soft); }
.divider-rule { border: none; border-top: 1px solid var(--line); margin: 36px 0; }

/* Menú — acordeón con imagen de referencia por categoría */
.menu-ref-note { font-size: 0.85rem; color: var(--teal); background: var(--cream-deep); border-radius: var(--radius-sm); padding: 10px 16px; margin-bottom: 32px; display: inline-block; }
.menu-cat { border-bottom: 1px solid var(--line); }
.menu-cat:first-of-type { border-top: 1px solid var(--line); }
.menu-cat summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 20px 4px;
  font-family: var(--font-stamp);
  color: var(--terracotta);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  font-size: 1.25rem;
}
.menu-cat summary::-webkit-details-marker { display: none; }
.menu-cat summary .thumb { width: 56px; height: 56px; border-radius: var(--radius-sm); overflow: hidden; flex-shrink: 0; }
.menu-cat summary .thumb img { width: 100%; height: 100%; object-fit: cover; filter: saturate(1.06) contrast(1.02) sepia(0.035); }
.menu-cat summary .label { flex: 1; }
.menu-cat summary .chevron { font-family: var(--font-body); font-size: 1.4rem; color: var(--sand); transition: transform 0.2s ease; }
.menu-cat[open] summary .chevron { transform: rotate(45deg); }
.menu-cat .cat-body { padding: 4px 4px 28px 74px; }
.menu-cat .cat-photo { width: 100%; max-width: 420px; aspect-ratio: 16/9; margin-bottom: 20px; }
.menu-cat .note { font-size: 0.85rem; color: var(--teal); font-weight: 700; margin-bottom: 10px; }
.menu-group { margin-bottom: 10px; }
.menu-group dt { font-weight: 700; color: var(--brown); display: inline; }
.menu-group dd { display: inline; margin: 0; color: var(--ink-soft); }
@media (max-width: 560px) {
  .menu-cat .cat-body { padding-left: 4px; }
}
.menu-jump { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 40px; }
.menu-jump a { background: var(--paper); border: 1px solid var(--line); border-radius: 999px; padding: 8px 16px; font-size: 0.85rem; font-weight: 600; text-decoration: none; color: var(--brown); }
.menu-jump a:hover, .menu-jump a.active { background: var(--terracotta); color: var(--paper); border-color: var(--terracotta); }

/* Eventos */
.events-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
@media (max-width: 860px) { .events-grid { grid-template-columns: 1fr; } }
.event-type-row { display: flex; gap: 18px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.event-type-row:last-of-type { border-bottom: none; }
.event-type-row .num { font-family: var(--font-display); font-size: 1.3rem; color: var(--sand); font-weight: 700; min-width: 32px; }

form.card { display: grid; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-weight: 700; font-size: 0.88rem; color: var(--brown); }
.field input, .field select, .field textarea {
  font-family: var(--font-body); font-size: 0.98rem; padding: 12px 14px;
  border-radius: var(--radius-sm); border: 1.5px solid var(--line); background: var(--cream); color: var(--ink);
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--terracotta); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 560px) { .field-row { grid-template-columns: 1fr; } }
.form-note { font-size: 0.82rem; color: var(--ink-soft); }
.form-status { font-size: 0.92rem; font-weight: 600; padding: 12px 14px; border-radius: var(--radius-sm); display: none; }
.form-status.ok { display: block; background: rgba(76, 122, 76, 0.12); color: #355c35; }
.form-status.err { display: block; background: rgba(181, 86, 42, 0.12); color: var(--terracotta-dark); }

.honesty-box { background: var(--cream-deep); border-radius: var(--radius); padding: 18px 22px; margin: 28px 0; font-size: 0.95rem; border-left: 3px solid var(--terracotta); }
.honesty-box strong { color: var(--terracotta-dark); }

/* Blog */
.post-card { background: var(--paper); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-soft); text-decoration: none; display: block; }
.post-card .post-photo { aspect-ratio: 16/10; }
.post-card .post-body { padding: 22px 24px 26px; }
.post-card .cat { font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--terracotta-dark); margin-bottom: 8px; display: block; }
.post-card h3 { color: var(--brown); margin-bottom: 8px; }
.post-card p { margin-bottom: 0; }

.article { max-width: 720px; margin: 0 auto; }
.article .meta { font-size: 0.85rem; color: var(--teal); font-weight: 700; margin-bottom: 18px; }
.answer-box { background: var(--paper); border-left: 3px solid var(--terracotta); border-radius: var(--radius-sm); padding: 20px 24px; margin: 20px 0 32px; box-shadow: var(--shadow-soft); }
.answer-box > strong { color: var(--terracotta-dark); display: block; margin-bottom: 6px; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; }
.article h2 { margin-top: 40px; }
.article table { width: 100%; border-collapse: collapse; margin: 24px 0; }
.article th, .article td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); font-size: 0.95rem; }
.article th { color: var(--brown); font-family: var(--font-body); }
.faq-item { margin-bottom: 18px; }
.faq-item h4 { margin-bottom: 6px; color: var(--brown); font-size: 1.05rem; }

/* Footer */
.site-footer { background: var(--brown); color: var(--cream); padding: 64px 0 28px; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: 36px; margin-bottom: 44px; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer h4 { color: var(--cream); font-family: var(--font-body); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 16px; }
.site-footer a { color: rgba(250, 243, 230, 0.78); text-decoration: none; font-size: 0.92rem; }
.site-footer a:hover { color: var(--cream); }
.footer-links { display: flex; flex-direction: column; gap: 10px; }
.footer-bottom { border-top: 1px solid rgba(250, 243, 230, 0.14); padding-top: 24px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: 0.82rem; color: rgba(250, 243, 230, 0.55); }
.footer-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.footer-brand .brand-badge { height: 46px; }
.site-footer .foot-h { color: var(--cream); font-size: 0.82rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; margin: 0 0 16px; }

/* Botón flotante WhatsApp */
.wsp-float {
  position: fixed; bottom: 22px; right: 22px; z-index: 60;
  background: var(--teal); color: #fff; width: 56px; height: 56px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25); text-decoration: none; font-size: 1.5rem;
}
.wsp-float:hover { transform: scale(1.06); }

.text-center { text-align: center; }
.muted { color: var(--ink-soft); }

.wsp-float svg { width: 28px; height: 28px; fill: #fff; }

/* Jerarquía de títulos corregida (h2 semánticos con tamaño de h3) */
.menu-cat summary h2.label { font: inherit; color: inherit; letter-spacing: inherit; margin: 0; }
.post-card h2 { font-size: 1.25rem; color: var(--brown); margin-bottom: 8px; }
.events-grid h2 { font-size: 1.25rem; }
.faq-item h3 { margin-bottom: 6px; color: var(--brown); font-size: 1.05rem; }
@media (max-width: 860px) { .hero-logo-badge { padding: 10px 14px; bottom: -14px; left: -10px; } .hero-logo-badge img { height: 40px; } }

/* Menú: gustos en viñetas, agrupados */
.flavor-group { margin-bottom: 24px; }
.flavor-group h3 { font-family: var(--font-body); font-size: 0.82rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--brown); margin: 0 0 10px; }
.flavors { list-style: none; padding: 0; margin: 0 0 8px; display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 7px 28px; }
.flavors-wide { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.flavors li { position: relative; padding-left: 16px; color: var(--ink-soft); line-height: 1.45; }
.flavors li::before { content: ""; position: absolute; left: 0; top: 0.6em; width: 6px; height: 6px; border-radius: 50%; background: var(--terracotta); }
.flavors li strong { color: var(--brown); margin-right: 4px; }
.flavors li .desc { color: var(--ink-soft); }
.flavors li .desc::before { content: " — "; color: var(--sand); }
.build { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.build-3 { grid-template-columns: repeat(3, 1fr); }
.build > div { background: var(--paper); border-radius: var(--radius-sm); padding: 16px 18px; }
.build .flavors { grid-template-columns: 1fr; }
.build-step { display: block; font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--terracotta-dark); margin-bottom: 10px; }
.note-inline { text-transform: none; letter-spacing: 0; font-weight: 400; color: var(--ink-soft); }
@media (max-width: 760px) { .build, .build-3 { grid-template-columns: 1fr; } .flavors-wide { grid-template-columns: 1fr; } }
.footer-links span { font-size: 0.92rem; color: rgba(250, 243, 230, 0.78); }
.site-footer { padding-bottom: 96px; }
