/* ==========================================================================
   nudosdecorbata.org — Plantilla "Sastrería" (2026)
   Paleta: marfil, azul tinta, burdeos y latón. Sin fuentes externas.
   ========================================================================== */

:root {
  --ivory: #f7f2e8;
  --paper: #fffdf8;
  --linen: #ece4d3;
  --ink: #1b2233;
  --ink-soft: #3b4357;
  --muted: #5d6474;
  --oxblood: #7d1d2c;
  --oxblood-dark: #5e1521;
  --brass: #a8854a;
  --brass-light: #d9c39a;
  --line: #ddd3bf;
  --focus: #0b5fff;

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --radius: 14px;
  --shadow: 0 1px 2px rgba(27, 34, 51, .06), 0 8px 24px rgba(27, 34, 51, .08);
  --wrap: 1180px;
  --stripe: repeating-linear-gradient(135deg,
      var(--oxblood) 0 14px, var(--brass-light) 14px 18px,
      var(--ink) 18px 32px, var(--brass-light) 32px 36px);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; animation: none !important; } }

body {
  margin: 0;
  background: var(--ivory);
  color: var(--ink);
  font: 1.0625rem/1.7 var(--sans);
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--oxblood); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--oxblood-dark); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3, h4 { font-family: var(--serif); color: var(--ink); line-height: 1.2; font-weight: 600; margin: 0 0 .6em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); letter-spacing: -.01em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); }
h3 { font-size: 1.35rem; }
h4 { font-size: 1.15rem; }
p { margin: 0 0 1.1em; }
ul, ol { padding-left: 1.3em; margin: 0 0 1.2em; }
li { margin-bottom: .35em; }
hr { border: 0; height: 1px; background: var(--line); margin: 2.5rem 0; }
strong { font-weight: 650; }

.wrap { width: min(100% - 32px, var(--wrap)); margin-inline: auto; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--ink); color: #fff; padding: .6rem 1rem; border-radius: 0 0 8px 8px; text-decoration: none;
}
.skip-link:focus { top: 0; color: #fff; }

/* ---------- Header ---------- */
.stripe { height: 8px; background: var(--stripe); }

.site-header { background: var(--paper); border-bottom: 1px solid var(--line); position: relative; z-index: 10; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 78px; }

.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand svg { width: 38px; height: 48px; flex: none; }
.brand-name { font-family: var(--serif); font-size: 1.45rem; font-weight: 600; line-height: 1; letter-spacing: .01em; }
.brand-name small { display: block; font-family: var(--sans); font-size: .68rem; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); margin-top: .35rem; font-weight: 500; }

.brand-name small { white-space: nowrap; }
@media (max-width: 480px) {
  .site-header .brand-name { font-size: 1.15rem; }
  .site-header .brand-name small { font-size: .6rem; letter-spacing: .12em; }
  .site-header .brand svg { width: 30px; height: 38px; }
}

/* ==========================================================================
   Menú principal "mega" — paneles con cortinilla, iconos que se dibujan,
   indicador de franja de club que sigue al ratón y hoja lateral en móvil.
   ========================================================================== */
.site-header { z-index: 50; }
.mega ul { list-style: none; margin: 0; padding: 0; }
.mega li { margin: 0; }
.mega svg { display: block; }
.mega-head, .mega-back, .mega-panel-title { display: none; }

/* Botón hamburguesa: tres hilos que se cruzan en aspa */
.nav-toggle {
  display: none; align-items: center; gap: .6rem; position: relative;
  background: var(--ink); color: #f2ede2; border: 0; border-radius: 999px;
  padding: .6rem 1.05rem .6rem .9rem; font: 600 .82rem var(--sans); letter-spacing: .08em; text-transform: uppercase; cursor: pointer;
  transition: background-color .3s, transform .3s;
}
.nav-toggle:hover { background: var(--oxblood); transform: translateY(-1px); }
.nav-toggle .bars { position: relative; width: 20px; height: 14px; }
.nav-toggle .bars i { position: absolute; left: 0; height: 2px; border-radius: 2px; background: currentColor; transition: transform .45s cubic-bezier(.7, -.4, .3, 1.4), width .3s, opacity .2s; }
.nav-toggle .bars i:nth-child(1) { top: 0; width: 20px; }
.nav-toggle .bars i:nth-child(2) { top: 6px; width: 14px; }
.nav-toggle .bars i:nth-child(3) { top: 12px; width: 18px; }
.nav-toggle:hover .bars i:nth-child(2) { width: 20px; }
.nav-toggle[aria-expanded="true"] .bars i:nth-child(1) { transform: translateY(6px) rotate(45deg); width: 20px; }
.nav-toggle[aria-expanded="true"] .bars i:nth-child(2) { opacity: 0; transform: translateX(-8px); }
.nav-toggle[aria-expanded="true"] .bars i:nth-child(3) { transform: translateY(-6px) rotate(-45deg); width: 20px; }

/* Barra superior */
.mega-bar { display: flex; align-items: center; gap: .15rem; }
.mega-trigger {
  display: flex; align-items: center; gap: .45rem; position: relative;
  padding: .55rem .75rem; border: 0; border-radius: 12px; background: none; cursor: pointer;
  font: 600 .8rem/1 var(--sans); letter-spacing: .05em; text-transform: uppercase; color: var(--ink-soft); text-decoration: none; white-space: nowrap;
  transition: color .25s, background-color .25s;
}
.mega-trigger:hover, .mega-item.is-open > .mega-trigger { color: var(--ink); background: var(--linen); }
.mega-trigger.is-current { color: var(--oxblood); }
.mega-tico { --ia: var(--brass-light); width: 26px; height: 26px; flex: none; transform-origin: 50% 12%; transition: transform .4s; }
.mega-tico svg { width: 100%; height: 100%; }
.mega-trigger:hover .mega-tico, .mega-item.is-open > .mega-trigger .mega-tico { animation: mega-swing 1.1s cubic-bezier(.3, 1.6, .5, 1) both; --ia: var(--brass); }
@keyframes mega-swing { 0% { transform: rotate(0); } 25% { transform: rotate(14deg); } 50% { transform: rotate(-9deg); } 75% { transform: rotate(4deg); } 100% { transform: rotate(0); } }
.mega-chev { width: 15px; height: 15px; stroke-width: 3; transition: transform .4s cubic-bezier(.2, .7, .2, 1); }
.mega-item.is-open > .mega-trigger .mega-chev { transform: rotate(180deg); }
.mega-contact { background: var(--oxblood); color: #fff; margin-left: .35rem; padding-inline: .85rem 1rem; }
.mega-contact .mega-tico { --ia: rgba(255, 255, 255, .25); }
.mega-contact:hover { background: var(--oxblood-dark); color: #fff; }
.mega-contact[aria-current] { background: var(--ink); }

/* Franja de club que se desliza bajo la opción señalada */
.mega-ink { position: absolute; bottom: -1px; left: 0; width: 0; height: 4px; border-radius: 4px 4px 0 0; background: var(--stripe); background-size: 50.91px 100%; opacity: 0; pointer-events: none; z-index: 2;
  transition: transform .5s cubic-bezier(.3, 1.4, .5, 1), width .5s cubic-bezier(.3, 1.4, .5, 1), opacity .3s; animation: mega-ink-slide 2.4s linear infinite; }
.mega-ink.is-on { opacity: 1; }
@keyframes mega-ink-slide { to { background-position: 50.91px 0; } }

/* Panel desplegable */
.mega-panel {
  position: absolute; left: 0; right: 0; top: 100%; z-index: 1;
  background:
    radial-gradient(40rem 18rem at 100% 0%, rgba(168, 133, 74, .1), transparent 70%),
    var(--paper);
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  box-shadow: 0 30px 60px -20px rgba(27, 34, 51, .35);
  visibility: hidden; clip-path: inset(0 0 100% 0); opacity: 0;
  transition: clip-path .55s cubic-bezier(.7, 0, .2, 1), opacity .3s, visibility 0s .55s;
}
.mega-panel::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--stripe); transform: scaleX(0); transform-origin: left; transition: transform .8s .1s cubic-bezier(.2, .7, .2, 1); }
.mega-item.is-open > .mega-panel, html:not(.js) .mega-item:hover > .mega-panel, html:not(.js) .mega-item:focus-within > .mega-panel {
  visibility: visible; clip-path: inset(0 0 -60px 0); opacity: 1; transition: clip-path .6s cubic-bezier(.7, 0, .2, 1), opacity .25s, visibility 0s;
}
.mega-item.is-open > .mega-panel::before { transform: scaleX(1); }
.mega-inner { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 2.2rem; width: min(100% - 32px, var(--wrap)); margin-inline: auto; padding: 2rem 0 2.2rem; }
.mega-cols { display: grid; grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); gap: .4rem 1.8rem; }
.mega-col-title {
  display: flex; align-items: center; gap: .6rem; margin: 0 0 .7rem .2rem;
  font: 700 .7rem/1 var(--sans); letter-spacing: .22em; text-transform: uppercase; color: var(--oxblood);
}
.mega-col-title::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--line), transparent); }
.mega-col ul { display: grid; gap: .15rem; }
.mega-cols[style*="--cols:1"] .mega-col ul { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 1.8rem; }

/* Enlace con icono en ficha */
.mega-link {
  display: flex; align-items: center; gap: .8rem; position: relative;
  padding: .5rem .6rem; border-radius: 14px; text-decoration: none; color: var(--ink);
  transition: background-color .3s;
}
.mega-link::after { content: ""; position: absolute; left: 3.9rem; right: .8rem; bottom: .3rem; height: 1px; background: var(--brass); transform: scaleX(0); transform-origin: left; transition: transform .4s cubic-bezier(.2, .7, .2, 1); }
.mega-link:hover, .mega-link:focus-visible { background: rgba(236, 228, 211, .55); color: var(--ink); }
.mega-link:hover::after, .mega-link:focus-visible::after { transform: scaleX(1); }
.mega-ico {
  --ia: var(--brass-light);
  display: grid; place-items: center; flex: none; width: 46px; height: 46px; border-radius: 14px;
  background: var(--ivory); border: 1px solid var(--line); color: var(--ink);
  transition: background-color .35s, color .35s, border-color .35s, transform .5s cubic-bezier(.3, 1.6, .5, 1), box-shadow .35s;
}
.mega-ico svg { width: 34px; height: 34px; }
.mega-link:hover .mega-ico, .mega-link:focus-visible .mega-ico {
  --ia: var(--brass); background: var(--oxblood); border-color: var(--oxblood); color: #fff;
  transform: rotate(-8deg) scale(1.08); box-shadow: 0 8px 18px -6px rgba(125, 29, 44, .6);
}
.mega-link:hover .mega-ico svg, .mega-link:focus-visible .mega-ico svg { stroke-dasharray: 1; animation: mega-draw .75s cubic-bezier(.4, 0, .2, 1) both; }
@keyframes mega-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
.mega-txt { display: grid; gap: .1rem; min-width: 0; transition: transform .35s cubic-bezier(.2, .7, .2, 1); }
.mega-link:hover .mega-txt { transform: translateX(3px); }
.mega-name { font-family: var(--serif); font-size: 1.04rem; font-weight: 600; line-height: 1.2; }
.mega-desc { font-size: .8rem; line-height: 1.35; color: var(--muted); }
.mega-link[aria-current] .mega-ico { background: var(--ink); border-color: var(--ink); color: #fff; --ia: var(--brass); }
.mega-link[aria-current] .mega-name::after { content: "Estás aquí"; display: inline-block; white-space: nowrap; margin-left: .4rem; padding: .1rem .45rem; border-radius: 999px; background: var(--linen); font: 700 .58rem/1.4 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--oxblood); vertical-align: middle; }
.mega-diff { display: flex; gap: 3px; margin-left: auto; padding-left: .4rem; flex: none; }
.mega-diff i { width: 6px; height: 6px; border-radius: 50%; border: 1.3px solid var(--brass); }
.mega-diff i.on { background: var(--brass); }

/* Entrada escalonada de columnas y enlaces */
.js .mega-col-title, .js .mega-col li, .js .mega-feature { opacity: 0; transform: translateY(14px); transition: opacity .35s, transform .35s; }
.mega-item.is-open .mega-col-title, .mega-item.is-open .mega-col li, .mega-item.is-open .mega-feature {
  opacity: 1; transform: none; transition: opacity .5s, transform .6s cubic-bezier(.2, .7, .2, 1);
  transition-delay: calc(var(--i, 0) * 70ms + var(--j, 0) * 32ms + 120ms);
}
.mega-item.is-open .mega-feature { transition-delay: 260ms; }

/* Tarjeta destacada */
.mega-feature {
  --ia: rgba(217, 195, 154, .3);
  position: relative; overflow: hidden; isolation: isolate; display: flex; flex-direction: column; gap: .35rem; align-self: start;
  padding: 1.5rem 1.5rem 1.4rem; border-radius: 18px; text-decoration: none; color: #d8d2c4;
  background:
    radial-gradient(18rem 12rem at 0% 0%, rgba(125, 29, 44, .55), transparent 70%),
    repeating-linear-gradient(45deg, rgba(255, 255, 255, .025) 0 1px, transparent 1px 6px),
    var(--ink);
  box-shadow: 0 20px 40px -18px rgba(27, 34, 51, .7);
}
.mega-feature::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, .14) 50%, transparent 70%); transform: translateX(-110%); transition: transform .9s cubic-bezier(.2, .7, .2, 1); }
.mega-feature:hover::after { transform: translateX(110%); }
.mega-feature:hover { color: #fff; }
.mega-feature-art { width: 96px; height: 96px; margin: -.2rem 0 .5rem -.4rem; color: var(--brass-light); }
.mega-feature-art svg { width: 100%; height: 100%; stroke-width: 1.4; }
.mega-item.is-open .mega-feature-art svg { stroke-dasharray: 1; animation: mega-draw 1.6s .35s cubic-bezier(.45, .05, .2, 1) both; }
.mega-feature .mega-kicker { font: 700 .66rem/1 var(--sans); letter-spacing: .24em; text-transform: uppercase; color: var(--brass-light); }
.mega-feature strong { font-family: var(--serif); font-size: 1.45rem; font-weight: 600; line-height: 1.15; color: #fff; }
.mega-feature-text { font-size: .9rem; line-height: 1.5; }
.mega-feature-cta { display: inline-flex; align-items: center; gap: .45rem; margin-top: .6rem; font-size: .82rem; font-weight: 700; letter-spacing: .06em; color: var(--brass-light); }
.mega-feature-cta svg { width: 20px; height: 20px; stroke-width: 2.6; transition: transform .35s cubic-bezier(.3, 1.6, .5, 1); }
.mega-feature:hover .mega-feature-cta svg { transform: translateX(6px); }

/* Velo que oscurece la página con el panel abierto */
.mega-scrim { position: fixed; left: 0; right: 0; bottom: 0; top: var(--hh, 86px); z-index: 0; background: rgba(19, 25, 39, .28); backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px); opacity: 0; pointer-events: none; transition: opacity .4s; }
.mega-scrim.is-on { opacity: 1; pointer-events: auto; }

@media (max-width: 1460px) and (min-width: 1081px) {
  .mega-trigger { padding-inline: .5rem; gap: .35rem; font-size: .74rem; letter-spacing: .03em; }
  .mega-tico { width: 22px; height: 22px; }
  .mega-contact .mega-tlabel { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .mega-contact { padding: .5rem .6rem; }
}
@media (max-width: 1280px) and (min-width: 1081px) {
  .mega-trigger .mega-tico { display: none; }
  .mega-contact .mega-tico { display: block; }
  .mega-inner { grid-template-columns: minmax(0, 1fr) 250px; gap: 1.6rem; }
  .mega-desc { display: none; }
}

/* ---------- Móvil y tableta: hoja lateral con navegación por niveles ---------- */
@media (max-width: 1080px) {
  .js .nav-toggle { display: inline-flex; }
  .js .mega {
    position: fixed; top: 0; right: 0; bottom: 0; z-index: 70; width: min(430px, 100%);
    display: flex; flex-direction: column; overflow: hidden;
    background: radial-gradient(30rem 16rem at 100% 0%, rgba(125, 29, 44, .12), transparent 70%), var(--paper);
    box-shadow: -30px 0 60px -20px rgba(19, 25, 39, .5);
    transform: translateX(105%); visibility: hidden;
    transition: transform .55s cubic-bezier(.7, 0, .2, 1), visibility 0s .55s;
  }
  .js .mega.is-open { transform: none; visibility: visible; transition: transform .6s cubic-bezier(.2, .9, .2, 1), visibility 0s; }
  .js .mega-head { display: flex; align-items: center; justify-content: space-between; flex: none; padding: 1rem 1.2rem 1rem 1.4rem; border-bottom: 1px solid var(--line); font: 700 .74rem var(--sans); letter-spacing: .24em; text-transform: uppercase; color: var(--oxblood); position: relative; }
  .js .mega-head::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; background: var(--stripe); transform: scaleX(0); transform-origin: left; transition: transform .8s .25s cubic-bezier(.2, .7, .2, 1); }
  .js .mega.is-open .mega-head::after { transform: scaleX(1); }
  .mega-close { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 50%; background: var(--paper); color: var(--ink); cursor: pointer; transition: transform .4s cubic-bezier(.3, 1.6, .5, 1), background-color .3s, color .3s; }
  .mega-close svg { width: 22px; height: 22px; stroke-width: 2.6; }
  .mega-close:hover { transform: rotate(90deg); background: var(--ink); color: #fff; }
  .js .mega-bar { flex: 1; flex-direction: column; align-items: stretch; gap: .3rem; padding: 1rem 1rem 2rem; overflow-y: auto; }
  .js .mega-item { opacity: 0; transform: translateX(40px); transition: opacity .3s, transform .3s; }
  .js .mega.is-open .mega-item { opacity: 1; transform: none; transition: opacity .5s, transform .7s cubic-bezier(.2, .9, .2, 1); transition-delay: calc(var(--i, 0) * 60ms + 180ms); }
  .js .mega-trigger { width: 100%; padding: .85rem .9rem; border-radius: 16px; font-size: .95rem; letter-spacing: .02em; text-transform: none; font-family: var(--serif); font-weight: 600; color: var(--ink); }
  .js .mega-trigger .mega-tico { width: 44px; height: 44px; padding: 6px; border-radius: 14px; background: var(--ivory); border: 1px solid var(--line); }
  .js .mega-trigger .mega-chev { margin-left: auto; transform: rotate(-90deg); }
  .js .mega-item.is-open > .mega-trigger .mega-chev { transform: rotate(-90deg); }
  .js .mega-contact { margin: .6rem 0 0; justify-content: flex-start; color: #fff; }
  .js .mega-contact .mega-tico { background: rgba(255, 255, 255, .12); border-color: transparent; }
  .mega-ink, .mega-scrim--desk { display: none; }

  /* Panel de segundo nivel que entra desde la derecha */
  .js .mega-panel {
    position: absolute; top: 0; bottom: 0; left: 0; right: 0; z-index: 3; overflow-y: auto; overscroll-behavior: contain;
    border: 0; box-shadow: none; clip-path: none; opacity: 1;
    transform: translateX(100%); transition: transform .5s cubic-bezier(.7, 0, .2, 1), visibility 0s .5s;
  }
  .js .mega-panel::before { display: none; }
  .js .mega-item.is-open > .mega-panel { transform: none; clip-path: none; transition: transform .55s cubic-bezier(.2, .9, .2, 1), visibility 0s; }
  .js .mega-inner { display: block; width: auto; padding: 0 1rem 2.5rem; }
  .js .mega-back { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: .4rem; width: calc(100% + 2rem); margin: 0 -1rem 0; padding: 1.15rem 1.2rem; border: 0; border-bottom: 1px solid var(--line); background: var(--paper); font: 700 .74rem var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--oxblood); cursor: pointer; }
  .js .mega-back svg { width: 22px; height: 22px; stroke-width: 2.6; transition: transform .3s; }
  .js .mega-back:hover svg { transform: translateX(-4px); }
  .js .mega-panel-title { display: block; margin: 1.2rem .3rem 1rem; font-family: var(--serif); font-size: 1.7rem; font-weight: 600; line-height: 1.1; color: var(--ink); }
  .js .mega-cols { display: block; }
  .js .mega-cols[style*="--cols:1"] .mega-col ul { grid-template-columns: 1fr; }
  .js .mega-col { margin-bottom: 1.3rem; }
  .js .mega-desc { display: block; }
  .js .mega-feature { margin-top: .5rem; }
  .js .mega-feature-art { width: 72px; height: 72px; }
  html.menu-open { overflow: hidden; }
  .mega-scrim { top: 0; z-index: 60; backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
}
@media (max-width: 1080px) {
  html:not(.js) .site-header .wrap { flex-wrap: wrap; }
  html:not(.js) .mega { width: 100%; }
  html:not(.js) .mega-bar { flex-wrap: wrap; }
  html:not(.js) .mega-panel { position: static; visibility: visible; clip-path: none; opacity: 1; box-shadow: none; }
  html:not(.js) .mega-inner { grid-template-columns: 1fr; }
  html:not(.js) .mega-cols { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .mega-ink { animation: none; }
}

/* ---------- Imágenes de cabecera generadas con IA ---------- */
.ia-badge {
  position: absolute; right: 16px; bottom: 14px; z-index: 2; pointer-events: none;
  padding: .12rem .45rem; border-radius: 999px;
  background: rgba(19, 25, 39, .28); color: rgba(255, 255, 255, .72);
  font: 500 .58rem/1.4 var(--sans); letter-spacing: .08em;
  -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
}
.hero-figure--ia img { background: var(--linen); }
.hero-banner { position: relative; margin: 0; background: var(--ink); }
.hero-banner img { display: block; width: 100%; height: clamp(240px, 52vh, 560px); object-fit: cover; object-position: 30% 38%; }
.hero-banner::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 8px; background: var(--stripe); }
.hero-banner .ia-badge { bottom: 20px; right: max(16px, calc((100% - var(--wrap)) / 2)); }
/* Subpáginas: la franja respeta la proporción del recorte para que el nudo se vea entero */
.hero-banner--pajarita img { height: clamp(260px, 62vh, 640px); object-position: 22% 45%; }
.hero-banner--sub img { height: auto; aspect-ratio: 1920 / 672; min-height: 240px; max-height: 72vh; object-position: 50% 15%; }
.hero--portada { padding-top: 2.4rem; }
.hero--simple .specs { max-width: 760px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.hero-banner + .breadcrumb { padding-top: 1.2rem; }
.hero-banner + .breadcrumb + .hero--simple { padding-top: 1.2rem; }
.hero--simple .lead { max-width: 68ch; }

/* ---------- Cabecera pendiente de foto ---------- */
.hero-ph {
  --ia: rgba(217, 195, 154, .35);
  position: relative; display: grid; place-items: center; width: 100%; aspect-ratio: 4 / 4.2; overflow: hidden; isolation: isolate;
  border-radius: 999px 999px var(--radius) var(--radius); border: 6px solid var(--paper); box-shadow: var(--shadow); color: var(--brass-light);
  background:
    radial-gradient(circle at 30% 20%, rgba(125, 29, 44, .65), transparent 60%),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, .04) 0 2px, transparent 2px 12px),
    var(--ink);
}
.hero-ph svg { width: 58%; height: 58%; stroke-width: 1.1; }
.js .hero-ph svg { stroke-dasharray: 1; animation: mega-draw 2.4s .2s cubic-bezier(.45, .05, .2, 1) both; }
@media (max-width: 860px) { .hero-ph { aspect-ratio: 16 / 11; border-radius: 160px 160px var(--radius) var(--radius); } .hero-ph svg { width: 42%; height: 60%; } }

/* Tarjetas con icono (páginas relacionadas) */
.card .card-ico { --ia: var(--brass-light); display: grid; place-items: center; width: 54px; height: 54px; border-radius: 16px; background: var(--ivory); border: 1px solid var(--line); color: var(--ink); margin-bottom: .5rem; transition: transform .5s cubic-bezier(.3, 1.6, .5, 1), background-color .3s, color .3s; }
.card .card-ico svg { width: 38px; height: 38px; }
a.card:hover .card-ico { transform: rotate(-8deg) scale(1.06); background: var(--oxblood); border-color: var(--oxblood); color: #fff; --ia: var(--brass); }

/* Bloques reutilizables para las páginas nuevas */
.tip { background: var(--paper); border: 1px solid var(--line); border-left: 4px solid var(--oxblood); border-radius: 10px; padding: 1.1rem 1.4rem; margin: 1.5rem 0; }
.tip p:last-child { margin-bottom: 0; }
.tip strong:first-child { color: var(--oxblood); }
.pros-cons { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; margin: 1.5rem 0; }
.pros-cons > div { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 1.1rem 1.3rem; }
.pros-cons h3 { margin-top: 0; font-size: 1.1rem; }
.pros-cons ul { margin: 0; }

/* ---------- Breadcrumb ---------- */
.breadcrumb { font-size: .85rem; color: var(--muted); padding-top: 1.4rem; }
.breadcrumb ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.breadcrumb li { margin: 0; }
.breadcrumb li + li::before { content: "›"; margin-right: .4rem; color: var(--brass); }
.breadcrumb a { color: var(--muted); }
.breadcrumb [aria-current] { color: var(--ink); }

/* ---------- Hero ---------- */
.hero { padding: 2rem 0 3rem; }
.hero .wrap { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.kicker {
  display: inline-flex; align-items: center; gap: .6rem;
  font-size: .78rem; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--oxblood); margin-bottom: 1rem;
}
.kicker::before { content: ""; width: 28px; height: 2px; background: var(--brass); }
.lead { font-size: 1.2rem; color: var(--ink-soft); max-width: 58ch; }

.hero-figure { margin: 0; position: relative; isolation: isolate; }
.hero-figure img {
  width: 100%; aspect-ratio: 4 / 4.2; object-fit: cover;
  border-radius: 999px 999px var(--radius) var(--radius);
  border: 6px solid var(--paper); box-shadow: var(--shadow);
}
.hero-figure::after {
  content: ""; position: absolute; inset: auto -14px -14px auto; width: 70%; height: 55%;
  border: 2px solid var(--brass); border-radius: 0 0 var(--radius) 0; z-index: -1;
}

.specs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; margin: 1.8rem 0 0; max-width: 520px; }
.specs div { background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: .7rem .9rem; }
.specs dt { font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.specs dd { margin: .15rem 0 0; font-family: var(--serif); font-size: 1.1rem; }
.dots { display: inline-flex; gap: 4px; vertical-align: middle; margin-left: .3rem; }
.dots i { width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid var(--oxblood); }
.dots i.on { background: var(--oxblood); }

.hero--simple .wrap { grid-template-columns: minmax(0, 1fr); }
.hero--simple { padding-bottom: 1.5rem; }
.hero--simple + .section { padding-top: 1rem; }

@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: minmax(0, 1fr); }
  .hero-figure { order: -1; max-width: 420px; }
  .hero-figure img { aspect-ratio: 16 / 11; border-radius: 160px 160px var(--radius) var(--radius); }
}

/* ---------- Sections ---------- */
.section { padding: 3.5rem 0; }
.section--paper { background: var(--paper); border-block: 1px solid var(--line); }
.section-head { max-width: 720px; margin-bottom: 2rem; }
.section-head p { color: var(--muted); }

.prose { max-width: 72ch; }
.prose h2 { margin-top: 2.6rem; position: relative; padding-top: 1.1rem; }
.prose h2::before { content: ""; position: absolute; top: 0; left: 0; width: 48px; height: 3px; background: var(--stripe); border-radius: 2px; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 2rem; }
.prose h4 { margin-top: 1.8rem; }
.prose img.float { float: left; width: min(45%, 284px); margin: .3rem 1.5rem 1rem 0; border-radius: 10px; }
.prose::after { content: ""; display: table; clear: both; }
.prose img.float { height: auto; aspect-ratio: 3 / 2; object-fit: cover; box-shadow: var(--shadow); border: 4px solid var(--paper); outline: 1px solid var(--line); }
.prose img.float--r { float: right; margin: .3rem 0 1rem 1.5rem; }
.foto-ancha { margin: 1.2rem 0 1.8rem; position: relative; }
.foto-ancha img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 7; object-fit: cover; border-radius: var(--radius); box-shadow: var(--shadow); }
.foto-ancha::after { content: ""; position: absolute; left: 1.2rem; right: 1.2rem; bottom: -6px; height: 6px; background: var(--stripe); border-radius: 0 0 6px 6px; }
/* Dibujos clásicos paso a paso (ilustraciones originales de la web) */
.dibujo-clasico { margin: 1.4rem auto 0; max-width: 980px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(.6rem, 2vw, 1.4rem); box-shadow: var(--shadow); }
.dibujo-clasico img { display: block; width: 100%; height: auto; }
.dibujo-clasico figcaption { margin-top: .7rem; padding-top: .7rem; border-top: 1px dashed var(--line); font-size: .9rem; color: var(--muted); text-align: center; }
.prose .dibujo-clasico { margin: 1.6rem 0 2rem; }
.dibujos-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 1.4rem; align-items: start; }
.dibujos-grid .dibujo-clasico { margin: 0; max-width: none; }
.dibujos-grid a:has(img) { display: block; }

/* Fotos a todo el ancho entre secciones */
.foto-banda { position: relative; margin: 0; background: var(--ink); }
.foto-banda img { display: block; width: 100%; height: clamp(320px, 78vh, 860px); object-fit: cover; object-position: var(--pos, 50% 40%); }
.foto-banda::before, .foto-banda::after { content: ""; position: absolute; left: 0; right: 0; height: 8px; background: var(--stripe); z-index: 1; }
.foto-banda::before { top: 0; } .foto-banda::after { bottom: 0; }
.foto-banda figcaption, .foto-duo figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 4rem max(16px, calc((100% - var(--wrap)) / 2)) 1.8rem; background: linear-gradient(180deg, transparent, rgba(15, 19, 30, .78)); color: #fff; font-family: var(--serif); font-size: clamp(1.05rem, 2.2vw, 1.5rem); line-height: 1.35; text-shadow: 0 1px 3px rgba(0, 0, 0, .4); }
.foto-banda figcaption .kicker { display: flex; color: var(--brass-light); font-family: var(--sans); margin-bottom: .4rem; text-shadow: none; }
.foto-duo { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; background: var(--ink); border-block: 8px solid transparent; border-image: var(--stripe) 8; }
.foto-duo figure { position: relative; margin: 0; }
.foto-duo img { display: block; width: 100%; height: clamp(320px, 70vh, 760px); object-fit: cover; }
.foto-duo figcaption { padding: 3rem 1.6rem 1.4rem; font-size: clamp(1rem, 1.6vw, 1.2rem); }
@media (max-width: 760px) { .foto-duo { grid-template-columns: 1fr; } .foto-banda img, .foto-duo img { height: auto; aspect-ratio: 1 / 1; } }
.prose h2 { clear: both; }
.prose::after { content: ""; display: block; clear: both; }
.menu-card { display: flow-root; }
@media (max-width: 560px) { .prose img.float, .prose img.float--r { float: none; width: 100%; margin: 0 0 1rem; } }

/* Nota "Historia" */
.note {
  background: var(--ink); color: #f2ede2; border-radius: var(--radius); padding: 1.8rem 2rem;
  position: relative; overflow: hidden; margin: 0;
}
.note::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 6px; background: var(--stripe); }
.note h2, .note h3 { color: #fff; font-size: 1.3rem; margin-top: .4rem; }
.note p { margin: 0; font-family: var(--serif); font-size: 1.15rem; line-height: 1.6; }
.note a { color: var(--brass-light); }

/* ---------- Pasos ---------- */
.howto { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: start; }
.diagram { margin: 0; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; box-shadow: var(--shadow); position: sticky; top: 1.2rem; }
.diagram figcaption { font-size: .85rem; color: var(--muted); padding: .6rem .3rem 0; }
@media (max-width: 900px) { .howto { grid-template-columns: 1fr; } .diagram { position: static; } }.prose .diagram { position: static; margin: 1.8rem 0; }

.steps { list-style: none; padding: 0; margin: 0; counter-reset: step; }
.steps li {
  counter-increment: step; position: relative; padding: 1rem 0 1.1rem 4.2rem; margin: 0;
  border-bottom: 1px dashed var(--line);
}
.steps li:last-child { border-bottom: 0; }
.steps li::before { transition: background-color .35s, color .35s, border-color .35s, transform .35s; }
.steps li.ka-linked { cursor: pointer; }
.steps li.is-current { background: linear-gradient(90deg, rgba(168, 133, 74, .14), transparent 85%); border-radius: 10px; }
.steps li.is-current::before { background: var(--oxblood); border-color: var(--oxblood); color: #fff; transform: scale(1.06); }

/* ---------- Animación del nudo ---------- */
.knot-anim { display: none; }
.js .knot-anim { display: block; }
.ka-stage { position: relative; overflow: hidden; border-radius: calc(var(--radius) - 4px); background: radial-gradient(circle at 50% 30%, #fff 0, #f3eee3 75%); }
.ka-stage svg { display: block; width: 100%; height: auto; max-height: 56vh; margin: 0 auto; }
.ka-tie { fill: url(#ka-silk); stroke: #2a1016; stroke-width: 1.6; stroke-linejoin: round; }
.ka-back { fill: #561421; stroke: #2a1016; stroke-width: 1.6; stroke-linejoin: round; }
.ka-tie, .ka-back { filter: url(#ka-drop); }
.ka-veil { fill: #f6f2ea; opacity: .5; stroke: none; filter: none; }
.ka-hl { stroke: #2a1016; stroke-width: 2; }
.ka-frame.is-active .ka-hl { animation: ka-pop .9s cubic-bezier(.2, .7, .2, 1) both; }
@keyframes ka-pop { from { opacity: 0; } to { opacity: 1; } }
.ka-crease { fill: none; stroke: #2a1016; stroke-width: 1.6; stroke-linecap: round; opacity: .55; }
.ka-label rect { fill: var(--ink); }
.ka-label text { fill: #f2ede2; font: 600 12px/1 var(--sans, system-ui, sans-serif); letter-spacing: .06em; text-anchor: middle; }
.ka-arrow { fill: none; stroke: var(--brass); stroke-width: 3.5; stroke-linecap: round; }
.ka-head { fill: var(--brass); }
.ka-frame { opacity: 0; transform: translateY(8px); transition: opacity .55s ease, transform .7s cubic-bezier(.2, .7, .2, 1); }
.ka-frame.is-active { opacity: 1; transform: none; }
.ka-badge { position: absolute; top: .7rem; left: .7rem; padding: .3rem .75rem; border-radius: 999px; background: var(--ink); color: #f2ede2; font-size: .72rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
.ka-badge b { color: var(--brass-light); }
.ka-progress { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(27, 34, 51, .08); }
.ka-progress span { display: block; height: 100%; width: 0; background: var(--stripe); }
@keyframes ka-fill { from { width: 0; } to { width: 100%; } }
.ka-caption { min-height: 3.4em; margin: .9rem .2rem .6rem; font-size: 1rem; line-height: 1.55; }
.ka-caption strong { color: var(--oxblood); font-family: var(--serif); }
.ka-controls { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; padding: 0 .2rem; }
.ka-btn { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border-radius: 50%; border: 1px solid var(--line); background: var(--paper); color: var(--ink); cursor: pointer; transition: background-color .25s, border-color .25s, color .25s, transform .25s; }
.ka-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.ka-btn:hover { border-color: var(--brass); transform: translateY(-2px); }
.ka-btn--play { width: 52px; height: 52px; background: var(--oxblood); border-color: var(--oxblood); color: #fff; }
.ka-btn--play:hover { background: var(--oxblood-dark); }
.ka-btn--play svg { fill: currentColor; stroke-width: 0; }
.ka-btn--play .i-pause { display: none; fill: none; stroke-width: 3; }
.is-playing .ka-btn--play .i-play { display: none; }
.is-playing .ka-btn--play .i-pause { display: block; }
.ka-dots { display: flex; gap: 0; list-style: none; margin: 0 0 0 auto; padding: 0; }
.ka-dots li { margin: 0; }
.ka-dot { display: grid; place-items: center; width: 24px; height: 32px; padding: 0; border: 0; background: none; cursor: pointer; }
.ka-dot::before { content: ""; width: 8px; height: 8px; border-radius: 999px; background: var(--line); transition: width .35s ease, background-color .35s; }
.ka-dot.is-done::before { background: var(--brass); }
.ka-dot[aria-current]::before { width: 20px; background: var(--oxblood); }
.ka-dot:hover::before { background: var(--brass); }
.ka-static { margin-top: 1rem; }
.ka-static summary { cursor: pointer; font-size: .9rem; font-weight: 600; color: var(--oxblood); }
.ka-static img { margin-top: .8rem; }
@media (max-width: 480px) { .ka-dots { margin: .2rem 0 0; width: 100%; justify-content: center; } }
.steps li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute; left: 0; top: .75rem; width: 3.1rem; height: 3.1rem; border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--serif); font-size: 1.15rem; font-weight: 600; color: var(--oxblood);
  border: 1.5px solid var(--brass); background: var(--paper);
}

/* ---------- Lámina «paso a paso en un vistazo» ---------- */
.esq-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.esquema { list-style: none; margin: 0; padding: 0; counter-reset: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1.1rem; }
.esquema li { margin: 0; }
.esq-paso figure { height: 100%; margin: 0; display: flex; flex-direction: column; overflow: hidden; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); transition: transform .3s ease, box-shadow .3s ease, border-color .3s; }
.esq-paso figure:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--brass-light); }
.esq-paso svg { display: block; width: 100%; height: auto; background: radial-gradient(circle at 50% 30%, #fff 0, #f3eee3 75%); border-bottom: 1px solid var(--line); }
.esq-paso figcaption { display: flex; gap: .7rem; align-items: flex-start; padding: .8rem 1rem 1rem; font-size: .92rem; line-height: 1.45; color: var(--ink-soft); }
.esq-num { flex: none; display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; background: var(--oxblood); color: #fff; font: 600 1rem/1 var(--serif); }
.esquema .ka-tie { fill: url(#es-silk); filter: url(#es-drop); }
.esquema .ka-back { filter: url(#es-drop); }
.esq-arrow { fill: none; stroke: var(--brass); stroke-width: 3.5; stroke-linecap: round; }
@media (max-width: 560px) {
  .esquema { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
  .esq-paso figcaption { flex-direction: column; gap: .4rem; padding: .6rem .7rem .8rem; font-size: .82rem; }
  .esq-num { width: 1.7rem; height: 1.7rem; font-size: .9rem; }
}
@media print {
  .esquema { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .esq-paso figure { break-inside: avoid; box-shadow: none; }
  .esq-paso figcaption { font-size: 9pt; padding: 4px 6px; }
}

/* ---------- Tarjetas ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.2rem; }
.card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem 1.5rem;
  display: flex; flex-direction: column; gap: .4rem; text-decoration: none; color: var(--ink);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
a.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--brass-light); color: var(--ink); }
.card h3 { margin: 0; font-size: 1.25rem; }
.card p { margin: 0; color: var(--muted); font-size: .95rem; }
.card .tag { font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--oxblood); font-weight: 700; }
.card img { border-radius: 10px; margin-bottom: .6rem; aspect-ratio: 16/9; object-fit: cover; }

.menu-card { background: var(--paper); border: 1px solid var(--line); border-left: 4px solid var(--brass); border-radius: 10px; padding: 1.4rem 1.6rem; margin: 1.5rem 0; }
.menu-card h3 { margin-top: 0; }
.menu-card dl { display: grid; grid-template-columns: max-content 1fr; gap: .3rem 1rem; margin: 0 0 1rem; }
.menu-card dt { font-weight: 650; color: var(--oxblood); }
.menu-card dd { margin: 0; }

/* Quiénes somos (portada) */
.quienes { max-width: 760px; margin: 0 auto; text-align: center; padding: 2rem clamp(1rem, 4vw, 2.6rem); background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); position: relative; }
.quienes::before { content: ""; position: absolute; inset: 0 0 auto; height: 5px; background: var(--stripe); border-radius: var(--radius) var(--radius) 0 0; }
.quienes .kicker { justify-content: center; }
.quienes h2 { margin: .3rem 0 .8rem; }
.quienes p:last-child { margin-bottom: 0; color: var(--ink-soft); }

/* Otros sitios de interés (portada): enlaces discretos */
.links-sec { background: linear-gradient(180deg, var(--ivory), var(--linen)); border-top: 1px solid var(--line); }
.links-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.6rem; }
@media (max-width: 860px) { .links-grid { grid-template-columns: 1fr; } }
.links-card { position: relative; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 2rem 1.8rem 1.6rem; box-shadow: var(--shadow); overflow: hidden; }
.links-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 5px; background: var(--stripe); opacity: .85; }
.links-ico { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--ivory); border: 1px solid var(--brass-light); color: var(--oxblood); margin-bottom: 1rem; }
.links-ico svg { width: 30px; height: 30px; }
.links-card h3 { font-family: var(--serif); font-size: 1.35rem; margin: 0 0 .8rem; color: var(--ink); }
.links-card p { color: var(--ink-soft); font-size: .98rem; }
.links-list { list-style: none; margin: 1.4rem 0 0; padding: 1.1rem 0 0; border-top: 1px dashed var(--line); display: grid; gap: .55rem; }
.links-list li { display: grid; grid-template-columns: 6px 1fr; column-gap: .7rem; align-items: baseline; font-size: .9rem; line-height: 1.45; }
.links-list li::before { content: ""; grid-row: 1; width: 6px; height: 6px; border-radius: 50%; background: var(--brass-light); transform: translateY(-2px); }
.links-list a { grid-column: 2; justify-self: start; }
.links-list span { grid-column: 2; color: var(--muted); font-size: .85rem; }
.links-card a { color: inherit; text-decoration: none; border-bottom: 1px dotted var(--line); transition: color .2s, border-color .2s; }
.links-list a { color: var(--ink-soft); font-weight: 550; }
.links-card a:hover, .links-card a:focus-visible { color: var(--oxblood); border-bottom-color: var(--brass); }

/* ---------- Tablas ---------- */
.table-wrap { position: relative; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); margin: 1.5rem 0; }
table { border-collapse: collapse; width: 100%; min-width: 620px; font-size: .95rem; }
caption { text-align: left; padding: 1rem 1.2rem .4rem; font-family: var(--serif); font-size: 1.1rem; font-weight: 600; }
th, td { padding: .75rem 1.2rem; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th { font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); background: var(--ivory); }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }
tbody th { font-family: var(--serif); font-size: 1.05rem; }

/* ---------- FAQ ---------- */
.faq details { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; margin-bottom: .8rem; }
.faq summary {
  cursor: pointer; list-style: none; padding: 1.1rem 3.2rem 1.1rem 1.4rem; position: relative;
  font-family: var(--serif); font-size: 1.15rem; font-weight: 600;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 1.3rem; top: 50%; transform: translateY(-50%); font: 400 1.6rem var(--sans); color: var(--oxblood); }
.faq details[open] summary::after { content: "–"; }
.faq details > div { padding: 0 1.4rem 1.2rem; }
.faq details > div p:last-child { margin-bottom: 0; }

/* ---------- Glosario / mapa ---------- */
.glossary dt { font-family: var(--serif); font-size: 1.2rem; font-weight: 600; margin-top: 1.4rem; }
.glossary dd { margin: .2rem 0 0; color: var(--ink-soft); }
.sitemap-list { columns: 2 260px; column-gap: 3rem; }
.sitemap-list section { break-inside: avoid; margin-bottom: 1.6rem; }
.sitemap-list h2 { font-size: 1.3rem; }
.sitemap-list ul { list-style: none; padding: 0; }
.sitemap-list li { padding: .35rem 0; border-bottom: 1px dashed var(--line); }

/* ---------- Contacto ---------- */
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.2rem; margin: 1.5rem 0 2rem; }
.contact-grid .card { gap: .2rem; }
address { font-style: normal; }
.contact-grid .big {font-family: var(--serif); font-size: 1.25rem; word-break: break-word; }

/* ---------- Paginación entre nudos ---------- */
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; padding: 0 0 4rem; }
.pager a { display: block; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.4rem; text-decoration: none; color: var(--ink); }
.pager a:hover { border-color: var(--brass); }
.pager span { display: block; font-size: .75rem; letter-spacing: .15em; text-transform: uppercase; color: var(--muted); }
.pager strong { font-family: var(--serif); font-size: 1.2rem; font-weight: 600; }
.pager .next { text-align: right; grid-column: 2; }
@media (max-width: 560px) { .pager { grid-template-columns: 1fr; } .pager .next { grid-column: 1; } }

/* ---------- Botón ---------- */
.btn { display: inline-flex; align-items: center; gap: .5rem; background: var(--oxblood); color: #fff; padding: .8rem 1.4rem; border-radius: 999px; text-decoration: none; font-weight: 600; }
.btn:hover { background: var(--oxblood-dark); color: #fff; }

/* ---------- Footer ---------- */
.site-footer {
  --f-text: #cfc9bc;
  position: relative; overflow: hidden; isolation: isolate;
  margin-top: 3rem; color: var(--f-text);
  background:
    radial-gradient(55rem 26rem at 0% 0%, rgba(125, 29, 44, .42), transparent 62%),
    radial-gradient(45rem 26rem at 100% 100%, rgba(168, 133, 74, .16), transparent 62%),
    repeating-linear-gradient(45deg, rgba(255, 255, 255, .022) 0 1px, transparent 1px 5px),
    repeating-linear-gradient(-45deg, rgba(0, 0, 0, .16) 0 1px, transparent 1px 5px),
    #131927;
}
.site-footer a { color: #f2ede2; text-decoration: none; }
.site-footer a:hover { color: #fff; }
.site-footer :focus-visible { outline-color: var(--brass-light); }

/* Franja de club que se desliza, con un brillo de seda */
.footer-band { position: relative; height: 10px; overflow: hidden; box-shadow: 0 6px 22px rgba(0, 0, 0, .4); }
.footer-band::before { content: ""; position: absolute; top: 0; bottom: 0; left: -50.91px; right: 0; background: var(--stripe); animation: band-slide 5s linear infinite; }
.footer-band::after { content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 30%; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .45), transparent); transform: translateX(-120%); animation: band-sheen 8s ease-in-out infinite; }
@keyframes band-slide { to { transform: translateX(50.91px); } }
@keyframes band-sheen { 0% { transform: translateX(-120%); } 55%, 100% { transform: translateX(440%); } }

/* Corbata dibujada a línea como marca de agua */
.footer-ornament { position: absolute; z-index: -1; right: max(-40px, calc((100% - var(--wrap)) / 2 - 190px)); bottom: -70px; width: 250px; color: var(--brass-light); opacity: .13; pointer-events: none; }
.footer-ornament .draw { stroke-dasharray: 1; stroke-dashoffset: 0; transition: stroke-dashoffset 2.6s cubic-bezier(.45, .05, .2, 1); }
.footer-ornament .draw:nth-child(2) { transition-delay: .3s; }
.footer-ornament .draw:nth-child(3) { transition-delay: .6s; }
.footer-ornament .draw:nth-child(4) { transition-delay: 1.2s; }
.footer-ornament .stitch { transition: opacity 1.4s 2s; }
.js .site-footer:not(.is-visible) .footer-ornament .draw { stroke-dashoffset: 1; }
.js .site-footer:not(.is-visible) .footer-ornament .stitch { opacity: 0; }

/* Entrada escalonada */
.site-footer .reveal { transition: opacity .8s ease, transform .8s cubic-bezier(.2, .7, .2, 1); transition-delay: calc(var(--i, 0) * 110ms); }
.js .site-footer:not(.is-visible) .reveal { opacity: 0; transform: translateY(26px); }

/* Cita */
.footer-lead { display: flex; align-items: center; justify-content: space-between; gap: 2rem; padding: 3.6rem 0 2.8rem; border-bottom: 1px solid rgba(217, 195, 154, .16); }
.footer-quote { margin: 0; max-width: 44rem; }
.footer-quote blockquote { position: relative; margin: 0; padding-left: 2.8rem; }
.footer-quote blockquote p { margin: 0; font-family: var(--serif); font-style: italic; font-size: clamp(1.35rem, 2.6vw, 1.95rem); line-height: 1.35; color: #f6f1e6; }
.footer-quote blockquote::before { content: "\201C"; position: absolute; left: -.1rem; top: -.55rem; font: 600 4.4rem/1 var(--serif); color: var(--brass); }
.footer-quote figcaption { margin-top: .9rem; padding-left: 2.8rem; font-size: .74rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--brass-light); }
.footer-quote figcaption::before { content: ""; display: inline-block; width: 30px; height: 1px; margin-right: .75rem; vertical-align: middle; background: var(--brass); }
.footer-quote cite { font-style: normal; }

/* Volver arriba */
.site-footer .to-top { flex: none; display: inline-flex; flex-direction: column; align-items: center; gap: .65rem; color: var(--brass-light); font-size: .7rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; }
.to-top .ring { position: relative; display: grid; place-items: center; width: 58px; height: 58px; border-radius: 50%; border: 1px solid rgba(217, 195, 154, .55); transition: transform .35s ease, background-color .35s, border-color .35s, box-shadow .35s; }
.to-top .ring::after { content: ""; position: absolute; inset: -7px; border-radius: 50%; border: 1px dashed rgba(217, 195, 154, .35); animation: ring-spin 28s linear infinite; }
.to-top svg { width: 20px; height: 20px; transition: transform .35s ease; }
.site-footer .to-top:hover { color: #fff; }
.to-top:hover .ring, .to-top:focus-visible .ring { background: var(--oxblood); border-color: var(--oxblood); transform: translateY(-4px); box-shadow: 0 12px 26px rgba(125, 29, 44, .5); }
.to-top:hover svg { transform: translateY(-2px); }
@keyframes ring-spin { to { transform: rotate(360deg); } }

/* Columnas */
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 2.5rem; padding: 3rem 0 3.2rem; }
.footer-grid h2 { position: relative; color: #fff; font-family: var(--serif); font-size: 1.15rem; font-weight: 600; margin-bottom: 1.1rem; padding-bottom: .75rem; }
.footer-grid h2::after { content: ""; position: absolute; left: 0; bottom: 0; width: 36px; height: 3px; border-radius: 2px; background: var(--stripe); transition: width .5s ease; }
.footer-grid nav:hover h2::after, .footer-grid nav:focus-within h2::after { width: 72px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: .5rem; font-size: .95rem; }
.footer-grid li a { position: relative; display: inline-flex; align-items: center; gap: .55rem; color: var(--f-text); transition: color .25s, transform .25s ease; }
.footer-grid li a::before { content: ""; flex: none; width: 6px; height: 6px; border: 1px solid var(--brass); transform: rotate(45deg); transition: background-color .25s, transform .4s ease; }
.footer-grid li a::after { content: ""; position: absolute; left: calc(6px + .55rem); right: 0; bottom: -2px; height: 1px; background: var(--brass-light); transform: scaleX(0); transform-origin: left; transition: transform .35s ease; }
.footer-grid li a:hover, .footer-grid li a:focus-visible { color: #fff; transform: translateX(4px); }
.footer-grid li a:hover::before, .footer-grid li a:focus-visible::before { background: var(--brass); transform: rotate(225deg); }
.footer-grid li a:hover::after, .footer-grid li a:focus-visible::after { transform: scaleX(1); }

.footer-brand p { font-size: .95rem; max-width: 34ch; }
.footer-brand .brand { color: #fff; margin-bottom: 1.1rem; }
.footer-brand .brand svg { filter: drop-shadow(0 0 14px rgba(217, 195, 154, .3)); transition: transform .5s cubic-bezier(.2, .7, .2, 1); }
.footer-brand .brand:hover svg { transform: rotate(-7deg) scale(1.06); }
.footer-brand .brand-name small { color: #b9b4a9; }
.site-footer .footer-mail { display: inline-flex; align-items: center; gap: .55rem; margin-top: .3rem; padding: .5rem 1rem; border: 1px solid rgba(217, 195, 154, .4); border-radius: 999px; font-size: .88rem; color: var(--brass-light); transition: background-color .3s, color .3s, border-color .3s; }
.footer-mail svg { width: 18px; height: 18px; }
.site-footer .footer-mail:hover { background: var(--brass-light); border-color: var(--brass-light); color: var(--ink); }

/* Pespunte y créditos */
.footer-ia { position: relative; padding: 0 0 1.1rem; }
.footer-ia p { margin: 0; max-width: 760px; font-size: .8rem; line-height: 1.55; color: #a9a497; }
.prose .aviso-ia { padding: .9rem 1.1rem; border-left: 3px solid var(--brass); background: var(--paper); border-radius: 0 10px 10px 0; }
.footer-bottom { position: relative; display: flex; flex-wrap: wrap; justify-content: space-between; gap: .6rem; padding: 1.3rem 0 1.8rem; font-size: .85rem; color: #a9a497; }
.footer-bottom::before { content: ""; position: absolute; top: 0; left: 0; right: 0; border-top: 2px dashed rgba(217, 195, 154, .3); }
.site-footer .footer-bottom a { color: var(--brass-light); }
.site-footer .footer-bottom a:hover { color: #fff; text-decoration: underline; }

@media (max-width: 860px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-lead { flex-direction: column; align-items: flex-start; }
  .footer-ornament { width: 170px; opacity: .09; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .footer-quote blockquote, .footer-quote figcaption { padding-left: 2.2rem; }
}

/* ---------- Impresión ---------- */
@media print {
  .stripe, .site-header nav, .nav-toggle, .site-footer, .pager, .skip-link, .breadcrumb { display: none !important; }
  body { background: #fff; font-size: 11pt; }
  .diagram { position: static; box-shadow: none; }
  a { color: inherit; }
}
