:root {
  --paper: #F4ECD8;
  --ink: #1C140C;
  --mute: #6A5848;
  --rule: #1C140C;
  --mark: #8B1E12;
  --mark-ink: #F4ECD8;
  --display: Fraunces, Georgia, serif;
  --body: "Source Serif 4", Georgia, serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 1.125rem/1.6 var(--body);
}
img { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, .nameplate, .btn {
  font-family: var(--display);
  font-weight: 600;
}

.skip {
  position: absolute; left: -999px; top: 0;
  background: var(--paper); color: var(--ink);
  padding: 8px 16px; z-index: 60;
  border: 1px solid var(--rule);
}
.skip:focus { left: 5vw; top: 8px; }

.masthead {
  position: sticky; top: 0; z-index: 15;
  display: flex; flex-wrap: wrap; align-items: baseline;
  justify-content: space-between; gap: 12px;
  padding: 16px 5vw 12px;
  background: var(--paper);
  border-bottom: 3px solid var(--rule);
}
.nameplate {
  font-size: clamp(1.05rem, 2.5vw, 1.45rem);
  text-decoration: none;
  letter-spacing: 0.02em;
  line-height: 1.15;
}
.masthead-meta { font-size: 0.8rem; color: var(--mute); }
.masthead a.tel { font-family: var(--display); font-size: 0.9rem; text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }

.hero { position: relative; min-height: 70vh; }
.hero img { width: 100%; height: 70vh; object-fit: cover; }
.hero-slab {
  position: absolute; left: 5vw; bottom: 8%;
  width: min(36rem, 90%);
  background: var(--paper);
  padding: 1.75rem 1.5rem 1.5rem;
  border: 1px solid var(--rule);
}
.hero-slab h1 { font-size: clamp(2rem, 5vw, 3.4rem); line-height: 1.05; margin: 0 0 0.75rem; }
.hero-slab p { margin: 0 0 1rem; max-width: 34rem; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 0 18px; text-decoration: none;
  border: 1px solid var(--rule);
  transition: background-color 150ms linear, color 150ms linear;
}
.btn-primary { background: var(--mark); color: var(--mark-ink); border-color: var(--mark); }
.btn-ghost { background: transparent; }
.btn-ghost:hover { background: var(--ink); color: var(--paper); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }

.crumbs {
  font-size: 0.85rem;
  padding: 1rem 5vw 0;
  color: var(--mute);
}
.crumbs a { text-decoration: underline; text-underline-offset: 2px; }
.crumbs [aria-current="page"] { color: var(--ink); }

.page {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  padding: 0 5vw 4rem;
}
#contenido, section[id] { scroll-margin-top: 4.75rem; }

.toc {
  display: flex; gap: 8px; overflow-x: auto;
  padding: 12px 0;
  border-bottom: 1px solid var(--rule);
}
.toc a {
  flex: none;
  display: inline-flex; align-items: center;
  min-height: 44px; padding: 0 12px;
  text-decoration: none;
  font-family: var(--display);
  font-size: 0.95rem;
  border: 1px solid var(--rule);
}
@media (min-width: 64rem) {
  .page { grid-template-columns: 11rem 1fr; gap: 3rem; }
  .toc {
    display: block; position: sticky; top: 4.75rem; align-self: start;
    padding-top: 2rem; overflow: visible; border: 0;
  }
  .toc a {
    display: block; border: 0; border-bottom: 1px solid var(--rule);
    padding: 8px 0; border-radius: 0;
  }
}

.story {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  padding: 2.5rem 0;
  border-top: 1px solid var(--rule);
}
.story h3 { font-size: 2rem; line-height: 1.1; margin: 0 0 0.5rem; }
.story img { width: 100%; height: 220px; object-fit: cover; }
@media (min-width: 48rem) {
  .story { grid-template-columns: 1fr 1fr; align-items: center; }
  .story:nth-of-type(even) img { order: 2; }
  .story img { height: 280px; }
}

.dir { padding: 1rem 0 2rem; }
.dir ul { list-style: none; margin: 0; padding: 0 0 0.5rem 0.25rem; }
.dir a {
  text-decoration: none;
  display: flex; align-items: center;
  min-height: 44px; padding: 4px 0;
}
.dir a:hover { text-decoration: underline; }

details { border-top: 1px solid var(--rule); }
summary {
  min-height: 44px;
  display: flex; align-items: center; gap: 12px;
  cursor: pointer;
  font-family: var(--display);
  list-style: none;
}
summary::-webkit-details-marker { display: none; }
.acc > summary::before,
.faq details > summary::before {
  content: "+";
  flex: none;
  width: 1.25rem;
  font-size: 1.25rem;
  line-height: 1;
  color: var(--mark);
  transition: transform 200ms ease;
}
.acc[open] > summary::before,
.faq details[open] > summary::before {
  content: "−";
}
.acc-label { flex: 1; }
.acc-hint {
  font-family: var(--body);
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--mute);
  white-space: nowrap;
}
.acc > summary .acc-hint::after { content: "contraído"; }
.acc[open] > summary .acc-hint::after { content: "desplegado"; }
.dir > .acc > summary { font-size: 1.15rem; }
.acc-sub { margin-left: 0.5rem; }

.fold {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 280ms ease;
}
.acc[open] > .fold { grid-template-rows: 1fr; }
.acc[open].is-closing > .fold { grid-template-rows: 0fr; }
.fold-inner { overflow: hidden; min-height: 0; }

.why { display: grid; gap: 1rem; }
@media (min-width: 48rem) { .why { grid-template-columns: 1fr 1fr; } }
.why div { border-top: 1px solid var(--rule); padding-top: 0.5rem; }
.why p { color: var(--mute); margin: 0; }

.colophon { display: grid; gap: 2rem; padding: 2rem 0; border-top: 3px solid var(--rule); }
@media (min-width: 48rem) { .colophon { grid-template-columns: 1fr 1fr; } }
.colophon dt { font-family: var(--display); margin-top: 0.75rem; }
.colophon dd { margin: 0; color: var(--mute); }
.faq details > summary { font-size: 1rem; }
.faq p { margin: 0; padding: 0 0 12px 1.9rem; }

.site-footer { padding: 1rem 5vw 4.5rem; font-size: 0.8rem; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }

.wa {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 20;
  width: 3.75rem;
  height: 3.75rem;
  border-radius: 50%;
  background: #25D366;
  color: #fff;
  text-decoration: none;
  border: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 8px 22px rgba(18, 140, 126, 0.45),
    0 2px 8px rgba(28, 20, 12, 0.18);
  transition: transform 160ms ease, box-shadow 160ms ease;
}
.wa:hover {
  transform: translateY(-2px) scale(1.04);
  box-shadow:
    0 12px 28px rgba(18, 140, 126, 0.5),
    0 4px 10px rgba(28, 20, 12, 0.2);
}
.wa:active { transform: translateY(0) scale(0.98); }
.wa-fab {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}
.wa-fab svg {
  width: 2rem;
  height: 2rem;
  display: block;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.18));
}
.wa-pulse,
.wa-pulse-2 {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: #25D366;
  pointer-events: none;
  z-index: -1;
  animation: wa-pulse 2.4s ease-out infinite;
}
.wa-pulse-2 { animation-delay: 1.2s; }
@keyframes wa-pulse {
  0% { transform: scale(1); opacity: 0.55; }
  100% { transform: scale(1.7); opacity: 0; }
}

:focus-visible { outline: 2px solid var(--mark); outline-offset: 2px; }

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