/* ===========================================================
   #cierre — Footer (Lane F) · §8.9
   Transparent over the night sky. Sleeping Bastet bottom-left
   (breathing, one eye opens on hover/focus), brand block, dual
   clock, section links, sources, «Volver al inicio» and the
   «Reducir animaciones» toggle. Mobile-first. Tokens only.
   =========================================================== */

.cierre {
  position: relative;
  min-height: 70svh;
  padding-top: var(--section-pad);
  color: var(--c-cream);
  overflow: hidden;
}

/* second, low-opacity star field (its dots twinkle in one by one) */
.cierre__stars {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: .6;
  pointer-events: none;
}
.cierre__star { fill: var(--c-cream); }

.cierre__in {
  position: relative;
  z-index: 1;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--sp-7);
}

/* ---- Bastet asleep (paws on the very bottom edge) ---- */
.cierre__cat-wrap {
  order: 9;
  display: flex;
  justify-content: flex-start;
  align-items: flex-end;
  margin-top: var(--sp-6);
}
.cat-sleep {
  position: relative;
  display: block;
  height: 160px;
  aspect-ratio: 738 / 1283;
  transform-origin: 50% 100%;
  cursor: pointer;
  border-radius: var(--r-sm);
}
.cat-sleep picture, .cat-sleep img {
  display: block;
  width: 100%;
  height: 100%;
}
.cat-sleep img { object-fit: contain; object-position: 50% 100%; }
.cat-sleep .cat__lid { transform: scaleY(1); }

/* ---- brand block ---- */
.cierre__brand {
  display: grid;
  gap: var(--sp-4);
  justify-items: start;
}
.cierre__logo {
  width: 132px;
  height: auto;
  display: block;
}
.cierre__title {
  margin: 0;
  font: 700 var(--fs-h3) / var(--lh-heading) var(--ff-display);
  font-optical-sizing: auto;
  letter-spacing: .02em;
  color: var(--c-cream);
  text-wrap: balance;
}
.cierre__title time { font-variant-numeric: tabular-nums; }
.cierre__org {
  margin: 0;
  max-width: 44ch;
  font: 400 var(--fs-small) / var(--lh-body) var(--ff-body);
  color: var(--c-paper-soft);
}

/* dual clock on the night sky */
.cierre__clock { color: var(--c-cream); }
.cierre__clock .clock__city { color: var(--c-gold); }
.cierre__clock .clock__time { color: var(--c-cream); }
.cierre__clock .clock__sep { color: var(--c-gold); }
/* .clock / .clock__* structure lives in components.css (Core, shared with #pasaporte) */

/* ---- section links ---- */
.cierre__nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3) var(--sp-5);
}
.cierre__nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;               /* §10: «Tips» alone is 36 px wide */
  min-height: 44px;
  font: 600 .8125rem / 1 var(--ff-body);
  letter-spacing: var(--track-nav);
  text-transform: uppercase;
  color: var(--c-cream);
  text-decoration: none;
}
.cierre__nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 10px;
  height: 1px;
  background: var(--c-gold);
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform var(--t-ui) var(--ease-out);
}
.cierre__nav a:hover::after,
.cierre__nav a:focus-visible::after { transform: scaleX(1); }
.cierre__nav a:focus-visible { outline: 2px solid var(--c-gold); outline-offset: 4px; }

/* ---- actions ---- */
.cierre__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-4) var(--sp-6);
}
.cierre__top {
  display: inline-flex;
  align-items: center;
  gap: .6em;
  min-height: 44px;
  cursor: pointer;
}
.cierre__top-ico {
  width: 18px;
  height: 18px;
  transform: rotate(-90deg);
  transition: transform var(--t-ui) var(--ease-out);
}
.cierre__top:hover .cierre__top-ico,
.cierre__top:focus-visible .cierre__top-ico { transform: rotate(-90deg) translateX(3px); }

.cierre__reduce {
  display: inline-flex;
  align-items: center;
  gap: .6em;
  min-height: 44px;
  padding: 0 var(--sp-2);
  border: 0;
  background: transparent;
  color: var(--c-paper-soft);
  font: 500 var(--fs-small) / 1 var(--ff-body);
  cursor: pointer;
  transition: color var(--t-ui) var(--ease-out);
}
.cierre__reduce:hover,
.cierre__reduce:focus-visible { color: var(--c-cream); }
.cierre__reduce:focus-visible { outline: 2px solid var(--c-gold); outline-offset: 4px; }
.cierre__reduce-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 1px solid var(--c-gold);
  background: transparent;
  transition: background-color var(--t-ui) var(--ease-out);
}
.cierre__reduce[aria-pressed="true"] .cierre__reduce-dot { background: var(--c-gold); }

/* ---- sources ---- */
.cierre__sources {
  margin: 0;
  font: 400 var(--fs-eyebrow) / 1.5 var(--ff-body);
  letter-spacing: .06em;
  color: var(--c-paper-soft);
}

/* ---------- ≥ 640 ---------- */
@media (min-width: 640px) {
  .cierre__logo { width: 160px; }
}

/* ---------- ≥ 1024: Bastet left, content right ---------- */
@media (min-width: 1024px) {
  .cierre__in {
    grid-template-columns: 300px minmax(0, 1fr);
    grid-template-areas:
      "cat brand"
      "cat nav"
      "cat actions"
      "cat sources";
    column-gap: var(--sp-9);
    row-gap: var(--sp-6);
    align-items: start;
  }
  .cierre__cat-wrap { grid-area: cat; order: 0; align-self: end; margin: 0; height: 100%; padding-top: var(--sp-8); }
  .cat-sleep { height: 240px; }
  .cierre__brand { grid-area: brand; }
  .cierre__nav { grid-area: nav; }
  .cierre__actions { grid-area: actions; }
  .cierre__sources { grid-area: sources; padding-bottom: var(--sp-7); }
  .cierre__title { font-size: var(--fs-h2); }
}

/* ---------------------------------------------- instalar la app (PWA) */
.cierre__app {
  display: grid;
  justify-items: center;
  gap: var(--sp-3);
  max-width: 560px;
  margin: var(--sp-7) auto 0;
  padding: var(--sp-6) var(--sp-5);
  border: 1px solid rgba(217,164,65,.28);
  border-radius: var(--r-md);
  background: rgba(42,22,48,.55);
  text-align: center;
}
.cierre__app-title { margin: 0; font: 700 var(--fs-h3) / var(--lh-heading) var(--ff-display); color: var(--c-cream); }
.cierre__app-copy { margin: 0; max-width: 46ch; font-size: var(--fs-small); color: var(--c-paper-soft); }
.cierre__app-actions { display: flex; flex-wrap: wrap; gap: var(--sp-3); justify-content: center; margin-top: var(--sp-2); }
.cierre__install { background: var(--c-gold); color: var(--c-night); }
.cierre__install:hover { background: var(--c-gold-light); }
.cierre__install[hidden] { display: none; }
.cierre__app .ico { width: 1.1em; height: 1.1em; }
