/* Gescofel - estilos comunes (web comercial y páginas legales) */
/* Tipografía Public Sans alojada en el propio servidor (licencia OFL, ver fonts/OFL.txt) */
@font-face {
  font-family: "Public Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/public-sans-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Public Sans";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/public-sans-latin-400-italic.woff2") format("woff2");
}
@font-face {
  font-family: "Public Sans";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/public-sans-latin-500-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Public Sans";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/public-sans-latin-600-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Public Sans";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/public-sans-latin-700-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Public Sans";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("../fonts/public-sans-latin-800-normal.woff2") format("woff2");
}


/* ============================================================
   Tokens
   ============================================================ */
:root {
  --ink: #18261c;
  --ink-2: #2e3d31;
  --green: #1f6334;        /* verde del logotipo: texto, botones y marcadores */
  --green-dark: #174d28;
  --green-brand: #5bd850;  /* verde de los ojos del gato: solo acentos y decoración */
  --green-tint: #e4f1e1;
  --blue: #154a72;         /* azul del lema del logo */
  --paper: #f5f7f2;
  --white: #ffffff;
  --line: #d9e1d2;
  --muted: #4d5c50;
  --amber: #b86e00;
  --amber-text: #8f5600;
  --amber-tint: #fbeedb;

  --radius-s: 6px;
  --radius-m: 12px;
  --radius-l: 20px;

  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 40px);

  --font: "Public Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}

/* ============================================================
   Base
   ============================================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--white);
  font-feature-settings: "tnum" 0;
}

img,
svg {
  display: block;
  max-width: 100%;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  line-height: 1.12;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

p {
  margin: 0;
}

a {
  color: var(--green);
  text-underline-offset: 3px;
}

a:hover {
  color: var(--green-dark);
}

:focus-visible {
  outline: 3px solid var(--green-brand);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  background: var(--white);
  color: var(--ink);
  padding: 10px 16px;
  border-radius: var(--radius-s);
  font-weight: 600;
}

.skip-link:focus {
  top: 12px;
}

/* Botones */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 22px;
  border-radius: var(--radius-s);
  font: 600 1rem/1.2 var(--font);
  text-decoration: none;
  cursor: pointer;
  border: 2px solid transparent;
  transition: background-color .18s ease, border-color .18s ease, color .18s ease;
}

.btn-primary {
  background: var(--green);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--green-dark);
  color: var(--white);
}

.btn-secondary {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}

.btn-secondary:hover {
  background: var(--ink);
  color: var(--white);
}

/* Secciones */
.section {
  padding: clamp(64px, 9vw, 120px) 0;
}

.section-head {
  max-width: 46rem;
  margin-bottom: clamp(36px, 5vw, 56px);
}

.section-head h2 {
  font-size: clamp(1.9rem, 3.6vw, 2.75rem);
  font-weight: 800;
}

.section-head p {
  margin-top: 16px;
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 40rem;
}

/* ============================================================
   Cabecera
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .96);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .25s ease;
}

.site-header.is-scrolled {
  box-shadow: 0 8px 24px -16px rgba(24, 38, 28, .45);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.brand-icon {
  width: 46px;
  height: 46px;
}

.brand-mark {
  width: 140px;
  height: auto;
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  color: var(--ink);
  cursor: pointer;
}

.site-nav ul {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav a {
  display: block;
  padding: 10px 12px;
  color: var(--ink-2);
  text-decoration: none;
  font-weight: 500;
  font-size: .97rem;
  border-radius: var(--radius-s);
}

.site-nav a:hover {
  color: var(--ink);
  background: var(--paper);
}

.site-nav .nav-cta {
  margin-left: 10px;
  background: var(--green);
  color: var(--white);
  font-weight: 600;
  padding: 10px 16px;
}

.site-nav .nav-cta:hover {
  background: var(--green-dark);
  color: var(--white);
}

@media (max-width: 960px) {
  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 72px;
    background: var(--white);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 16px 30px -20px rgba(24, 38, 28, .45);
    padding: 8px var(--gutter) 20px;
    display: none;
  }

  .site-nav.is-open {
    display: block;
  }

  .site-nav ul {
    flex-direction: column;
    align-items: stretch;
  }

  .site-nav a {
    padding: 14px 8px;
    font-size: 1.05rem;
  }

  .site-nav .nav-cta {
    margin: 10px 0 0;
    text-align: center;
  }
}

/* ============================================================
   Hero
   ============================================================ */
.hero {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}

.hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(32px, 5vw, 72px);
  padding-top: clamp(48px, 7vw, 96px);
  padding-bottom: clamp(48px, 7vw, 96px);
}

.hero h1 {
  font-size: clamp(2.3rem, 5vw, 3.75rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  max-width: 15ch;
}

.hero-lead {
  margin-top: 22px;
  font-size: clamp(1.1rem, 1.6vw, 1.25rem);
  color: var(--ink-2);
  max-width: 34rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.hero-proof {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  margin: 36px 0 0;
  padding: 24px 0 0;
  list-style: none;
  border-top: 1px solid var(--line);
  font-size: .95rem;
  color: var(--muted);
}

.hero-proof li {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hero-proof svg {
  width: 18px;
  height: 18px;
  flex: none;
  color: var(--green);
}

/* Mapa ilustrativo */
.map-figure {
  position: relative;
  margin: 0;
}

.map-frame {
  position: relative;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  box-shadow: 0 30px 60px -30px rgba(24, 38, 28, .35);
  overflow: hidden;
}

.map-frame svg {
  width: 100%;
  height: auto;
}

.map-card {
  position: absolute;
  right: 5%;
  bottom: 6%;
  width: min(250px, 58%);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  box-shadow: 0 16px 34px -16px rgba(24, 38, 28, .45);
  padding: 14px 16px 16px;
  font-size: .82rem;
  line-height: 1.4;
}

.map-card h3 {
  font-size: .98rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.map-card .assoc {
  color: var(--muted);
  margin-top: 2px;
}

.map-card dl {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 12px;
  margin: 12px 0 0;
}

.map-card dt {
  color: var(--muted);
}

.map-card dd {
  margin: 0;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.meter {
  grid-column: 1 / -1;
  height: 6px;
  background: var(--green-tint);
  border-radius: 99px;
  overflow: hidden;
}

.meter span {
  display: block;
  height: 100%;
  width: 79%;
  background: var(--green);
  border-radius: 99px;
}

.map-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-top: 14px;
  font-size: .85rem;
  color: var(--muted);
}

.map-legend span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.map-legend svg {
  width: 16px;
  height: 16px;
}

/* ---------- Hero animado: el mapa "vivo" ---------- */
.map-figure {
  margin-top: 104px;
}

.map-frame {
  z-index: 1;
}

/* El gato del logo se asoma por encima del mapa */
.map-cat {
  position: absolute;
  z-index: 0;
  top: 0;
  left: 9%;
  width: 150px;
  height: auto;
  transform: translateY(-80%);
  transform-origin: 50% 100%;
  animation: cat-peek .9s cubic-bezier(.3, 1.3, .5, 1) 1.3s both;
  transition: transform .35s ease;
  pointer-events: none;
}

.map-figure:hover .map-cat {
  transform: translateY(-83%) rotate(-5deg);
}

@keyframes cat-peek {
  from {
    transform: translateY(0);
  }

  to {
    transform: translateY(-80%);
  }
}

.pin {
  transform-box: fill-box;
  transform-origin: center;
  animation: pin-in .45s cubic-bezier(.2, .9, .3, 1.3) both;
}

.pin.is-flagged {
  animation: pin-in .45s cubic-bezier(.2, .9, .3, 1.3) both, pin-flag .9s ease-in-out 2;
}

@keyframes pin-flag {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.35);
  }
}

/* Marcador de colonia seleccionada: se desplaza entre colonias */
.sel-marker {
  transition: transform .9s cubic-bezier(.65, 0, .35, 1);
}

.sel-marker .sel-in {
  transform-box: fill-box;
  transform-origin: center;
  animation: pin-in .5s cubic-bezier(.2, .9, .3, 1.3) 1.05s both;
}

.pulse {
  transform-box: fill-box;
  transform-origin: center;
  animation: pulse 2.4s ease-out 1.4s infinite;
}

.map-figure.is-paused .pulse {
  animation-play-state: paused;
}

.map-card {
  animation: card-in .5s ease-out 1.25s both;
}

.map-card .card-body {
  transition: opacity .25s ease, transform .25s ease;
}

.map-card.is-swapping .card-body {
  opacity: 0;
  transform: translateY(6px);
}

.card-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  padding: 3px 9px;
  border-radius: 99px;
  font-size: .74rem;
  font-weight: 700;
  background: var(--green-tint);
  color: var(--green);
}

.card-status::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.map-card.is-alert .card-status {
  background: var(--amber-tint);
  color: var(--amber-text);
}

.meter span {
  transition: width .8s cubic-bezier(.65, 0, .35, 1), background-color .3s ease;
}

.map-card.is-alert .meter span {
  background: var(--amber);
}

/* Aviso entrante, como lo vería el ayuntamiento */
.map-toast {
  position: absolute;
  top: 5%;
  left: 5%;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  max-width: min(280px, 72%);
  padding: 10px 14px 10px 10px;
  background: var(--white);
  border: 1px solid var(--line);
  border-left: 4px solid var(--amber);
  border-radius: var(--radius-m);
  box-shadow: 0 16px 34px -16px rgba(24, 38, 28, .5);
  font-size: .8rem;
  line-height: 1.35;
  opacity: 0;
  transform: translateY(-12px);
  transition: opacity .35s ease, transform .35s ease;
  pointer-events: none;
}

.map-toast.is-visible {
  opacity: 1;
  transform: none;
}

.map-toast .toast-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--amber-tint);
  color: var(--amber);
}

.map-toast .toast-icon svg {
  width: 17px;
  height: 17px;
}

.map-toast strong {
  display: block;
  font-size: .86rem;
}

.map-toast span.toast-sub {
  color: var(--muted);
}

.map-legend {
  align-items: center;
}

.motion-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  min-height: 36px;
  padding: 6px 12px;
  font: 500 .85rem var(--font);
  color: var(--ink-2);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 99px;
  cursor: pointer;
}

.motion-toggle:hover {
  border-color: var(--ink-2);
}

.motion-toggle svg {
  width: 14px;
  height: 14px;
}

.motion-toggle svg[hidden] {
  display: none;
}

.motion-toggle[hidden] {
  display: none;
}

/* Entrada escalonada de la tabla de la ley (solo con JS y sin movimiento reducido) */
.motion .law-map li {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .55s ease, transform .55s ease;
  transition-delay: calc(var(--i, 0) * 110ms);
}

.motion .law-map .arrow svg {
  transform: translateX(-10px);
  opacity: 0;
  transition: transform .5s ease, opacity .5s ease;
  transition-delay: calc(var(--i, 0) * 110ms + 250ms);
}

.motion .law-map.is-in li {
  opacity: 1;
  transform: none;
}

.motion .law-map.is-in .arrow svg {
  opacity: 1;
  transform: none;
}

@keyframes pin-in {
  from {
    opacity: 0;
    transform: scale(.3);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes card-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes pulse {
  0% {
    opacity: .55;
    transform: scale(1);
  }

  70%,
  100% {
    opacity: 0;
    transform: scale(2.6);
  }
}

@media (prefers-reduced-motion: reduce) {

  html {
    scroll-behavior: auto;
  }

  .pin,
  .pin.is-flagged,
  .sel-marker .sel-in,
  .map-card,
  .map-cat,
  .pulse {
    animation: none;
  }

  .sel-marker,
  .map-cat,
  .map-toast,
  .map-card .card-body,
  .meter span {
    transition: none;
  }

  .pulse {
    opacity: 0;
  }
}

@media (max-width: 900px) {
  .hero .wrap {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    max-width: 18ch;
  }
}

@media (max-width: 480px) {
  .map-cat {
    width: 112px;
  }

  .map-figure {
    margin-top: 80px;
  }

  .motion-toggle {
    margin-left: 0;
  }

  .map-card {
    position: static;
    width: auto;
    margin: -1px 0 0;
    border-radius: 0 0 var(--radius-m) var(--radius-m);
    box-shadow: none;
  }

  .map-frame {
    border-radius: var(--radius-m) var(--radius-m) 0 0;
  }

  .hero-actions .btn {
    flex: 1 1 100%;
  }
}

/* ============================================================
   Ley 7/2023
   ============================================================ */
.law {
  background: var(--white);
}

.law-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  gap: clamp(32px, 6vw, 80px);
  align-items: start;
}

.law-intro h2 {
  font-size: clamp(1.9rem, 3.6vw, 2.75rem);
  font-weight: 800;
}

.law-intro p {
  margin-top: 18px;
  color: var(--muted);
  font-size: 1.1rem;
}

.law-intro p+p {
  margin-top: 14px;
}

.law-map {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 2px solid var(--ink);
}

.law-map li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 28px minmax(0, 1.2fr);
  align-items: start;
  gap: 16px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}

.law-map .req {
  font-weight: 700;
}

.law-map .req small {
  display: block;
  font-weight: 400;
  font-size: .88rem;
  color: var(--muted);
  margin-top: 2px;
}

.law-map .arrow {
  color: var(--green);
  padding-top: 2px;
}

.law-map .arrow svg {
  width: 24px;
  height: 24px;
}

.law-map .how {
  color: var(--ink-2);
}

.law-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 28px minmax(0, 1.2fr);
  gap: 16px;
  padding-bottom: 10px;
  font-size: .9rem;
  font-weight: 600;
  color: var(--muted);
}

@media (max-width: 860px) {
  .law-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {

  .law-map li,
  .law-head {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .law-head span:nth-child(2),
  .law-head span:nth-child(3),
  .law-map .arrow {
    display: none;
  }

  .law-map .how {
    padding-left: 14px;
    border-left: 3px solid var(--green-brand);
  }
}

/* ============================================================
   Funcionalidades
   ============================================================ */
.features {
  background: var(--paper);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.feature-group {
  display: grid;
  grid-template-columns: minmax(0, 260px) minmax(0, 1fr);
  gap: clamp(20px, 4vw, 56px);
  padding: 36px 0;
  border-top: 1px solid var(--line);
}

.feature-group:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.feature-group>h3 {
  font-size: 1.4rem;
  font-weight: 800;
}

.feature-group>h3 small {
  display: block;
  margin-top: 8px;
  font-size: .98rem;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--muted);
  line-height: 1.5;
}

.feature-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 28px 40px;
}

.feature {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.feature-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-m);
  background: var(--green-tint);
  color: var(--green);
}

.feature-icon svg {
  width: 22px;
  height: 22px;
}

.feature-icon.is-alert {
  background: var(--amber-tint);
  color: var(--amber);
}

.feature h4 {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.feature p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 1rem;
}

@media (max-width: 760px) {
  .feature-group {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   Roles
   ============================================================ */
.roles-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  overflow: hidden;
}

.role {
  padding: clamp(24px, 3vw, 36px);
  background: var(--white);
}

.role+.role {
  border-left: 1px solid var(--line);
}

.role:first-child {
  background: var(--ink);
  color: var(--white);
}

.role:first-child .role-who {
  color: #b9cdb0;
}

.role:first-child li::before {
  background: var(--green-brand);
}

.role-who {
  font-size: .95rem;
  color: var(--muted);
  margin-bottom: 6px;
}

.role h3 {
  font-size: 1.45rem;
  font-weight: 800;
}

.role ul {
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}

.role li {
  position: relative;
  padding-left: 20px;
  margin-top: 10px;
}

.role li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .62em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
}

@media (max-width: 860px) {
  .roles-grid {
    grid-template-columns: 1fr;
  }

  .role+.role {
    border-left: 0;
    border-top: 1px solid var(--line);
  }
}

/* ============================================================
   Seguridad y datos
   ============================================================ */
.trust {
  background: var(--ink);
  color: var(--white);
}

.trust .section-head p {
  color: #c7d4c0;
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(20px, 3vw, 32px);
}

.trust-item {
  padding-top: 22px;
  border-top: 2px solid var(--green-brand);
}

.trust-item h3 {
  font-size: 1.2rem;
  font-weight: 700;
}

.trust-item p {
  margin-top: 10px;
  color: #c7d4c0;
}

.trust-item a {
  color: #a9dd86;
  font-weight: 600;
}

.trust-item a:hover {
  color: var(--white);
}

.ens-badge {
  display: block;
  width: max-content;
  margin-top: 16px;
  background: var(--white);
  padding: 10px 14px;
  border-radius: var(--radius-s);
}

.ens-badge img {
  width: 96px;
  height: auto;
}

.store-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.store-links img {
  width: 140px;
  height: auto;
}

@media (max-width: 860px) {
  .trust-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   Licencias
   ============================================================ */
.licenses-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
  gap: clamp(32px, 6vw, 80px);
  align-items: start;
}

.licenses-text p {
  color: var(--ink-2);
  margin-top: 16px;
}

.licenses-text p:first-of-type {
  margin-top: 0;
}

.licenses-text .note {
  margin-top: 28px;
  padding: 20px 22px;
  background: var(--green-tint);
  border-radius: var(--radius-m);
  color: var(--ink);
}

.licenses-text .note strong {
  display: block;
  margin-bottom: 4px;
}

.licenses-photo {
  margin: 28px 0 0;
}

.licenses-photo img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius-m);
}

.plan-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 1rem;
}

.plan-table caption {
  text-align: left;
  font-size: .95rem;
  color: var(--muted);
  padding-bottom: 12px;
}

.plan-table th,
.plan-table td {
  padding: 14px 12px;
  border-bottom: 1px solid var(--line);
  text-align: center;
  vertical-align: middle;
}

.plan-table th[scope="row"] {
  text-align: left;
  font-weight: 500;
  padding-left: 0;
}

.plan-table thead th {
  border-bottom: 2px solid var(--ink);
  font-weight: 800;
  font-size: 1.05rem;
  vertical-align: bottom;
}

.plan-table thead th small {
  display: block;
  font-weight: 400;
  font-size: .85rem;
  color: var(--muted);
  margin-top: 2px;
}

.plan-table thead th:first-child {
  text-align: left;
  padding-left: 0;
  font-weight: 600;
  font-size: .95rem;
  color: var(--muted);
}

.plan-table .col-social {
  background: var(--paper);
}

.yes,
.no {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
}

.yes {
  background: var(--green-tint);
  color: var(--green);
}

.no {
  background: #eef0ec;
  color: #7b867d;
}

.yes svg,
.no svg {
  width: 14px;
  height: 14px;
}

.plan-table .txt {
  font-weight: 600;
  font-size: .95rem;
}

@media (max-width: 860px) {
  .licenses-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 420px) {

  .plan-table th,
  .plan-table td {
    padding: 12px 6px;
    font-size: .92rem;
  }
}

/* ============================================================
   Clientes
   ============================================================ */
.clients {
  background: var(--paper);
  border-top: 1px solid var(--line);
}

.clients-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.clients-row li {
  display: grid;
  place-items: center;
  min-height: 130px;
  padding: 24px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
}

.clients-row img {
  max-height: 80px;
  width: auto;
}

@media (max-width: 640px) {
  .clients-row {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   Contacto
   ============================================================ */
.contact-paths {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.path {
  display: flex;
  flex-direction: column;
  padding: clamp(24px, 3vw, 36px);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
}

.path:first-child {
  border: 2px solid var(--ink);
}

.path h3 {
  font-size: 1.4rem;
  font-weight: 800;
}

.path p {
  margin-top: 10px;
  color: var(--muted);
  flex: 1;
}

.path .btn {
  margin-top: 24px;
  align-self: flex-start;
}

.channels {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}

.channel {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.channel-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--green-tint);
  color: var(--green);
}

.channel-icon svg {
  width: 20px;
  height: 20px;
}

.channel-label {
  font-size: .9rem;
  color: var(--muted);
}

.channel a.value {
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  word-break: break-word;
}

.channel a.value:hover {
  color: var(--green);
  text-decoration: underline;
}

.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  min-height: 36px;
  padding: 6px 12px;
  font: 600 .88rem var(--font);
  color: var(--green);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  cursor: pointer;
}

.copy-btn:hover {
  border-color: var(--green);
}

.copy-btn svg {
  width: 15px;
  height: 15px;
}

.copy-status {
  font-size: .88rem;
  color: var(--green);
  margin-left: 8px;
}

@media (max-width: 860px) {

  .contact-paths,
  .channels {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   Pie
   ============================================================ */
.site-footer {
  background: var(--ink);
  color: #c7d4c0;
  padding: 56px 0 32px;
  font-size: .95rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 32px;
}

.site-footer h2 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: 0;
  margin-bottom: 14px;
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer li+li {
  margin-top: 8px;
}

.site-footer a {
  color: #dfe7da;
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--white);
  text-decoration: underline;
}

.site-footer .footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.25rem;
  font-weight: 800;
}

.footer-brand span {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--white);
}

.footer-brand img {
  width: 34px;
  height: 34px;
  margin: 0;
}

.footer-company > img {
  width: 170px;
  height: auto;
  margin-top: 16px;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, .14);
  font-size: .88rem;
}

@media (max-width: 860px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 520px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   Banner de cookies (misma lógica, estilo adaptado)
   ============================================================ */
.cookie-bar {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 999;
  max-width: 860px;
  margin: 0 auto;
  background: var(--white);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  box-shadow: 0 18px 40px -12px rgba(24, 38, 28, .4);
}

.cookie-bar[hidden],
.cookie-fab[hidden] {
  display: none;
}

.cookie-bar__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 20px;
  padding: 16px 18px;
}

.cookie-bar__txt {
  flex: 1 1 380px;
  font-size: .92rem;
  line-height: 1.5;
}

.cookie-bar__actions {
  display: flex;
  gap: 10px;
}

.cb-btn {
  min-height: 44px;
  padding: 10px 18px;
  border-radius: var(--radius-s);
  font: 600 .95rem var(--font);
  cursor: pointer;
  border: 2px solid var(--ink);
  background: transparent;
  color: var(--ink);
}

.cb-btn--primary {
  background: var(--green);
  border-color: var(--green);
  color: var(--white);
}

.cookie-fab {
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: 998;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: 0 6px 18px rgba(24, 38, 28, .2);
  cursor: pointer;
}

/* ============================================================
   Movimiento v3
   ============================================================ */

/* Barra de progreso de lectura */
.read-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 3px;
  background: var(--green-brand);
  transform: scaleX(var(--p, 0));
  transform-origin: 0 50%;
  pointer-events: none;
}

/* Aparición al hacer scroll */
.motion [data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .7s ease, transform .8s cubic-bezier(.2, .8, .2, 1);
  transition-delay: calc(var(--d, 0) * 90ms);
}

.motion [data-reveal].is-in {
  opacity: 1;
  transform: none;
}

.motion .feature.is-in .feature-icon {
  animation: icon-pop .6s cubic-bezier(.3, 1.6, .5, 1) both;
  animation-delay: calc(var(--d, 0) * 90ms + .2s);
}

.motion .plan-table tr.is-in .yes,
.motion .plan-table tr.is-in .no {
  animation: icon-pop .45s cubic-bezier(.3, 1.6, .5, 1) both;
  animation-delay: calc(var(--d, 0) * 70ms + .25s);
}

.motion .plan-table tbody tr {
  transition-delay: calc(var(--d, 0) * 60ms);
}

@keyframes icon-pop {
  from {
    transform: scale(.4) rotate(-12deg);
  }

  to {
    transform: none;
  }
}

/* Microinteracciones */
.btn {
  transition: background-color .18s ease, border-color .18s ease, color .18s ease, transform .18s ease, box-shadow .18s ease;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px -10px rgba(31, 99, 52, .7);
}

.feature-icon {
  transition: transform .3s cubic-bezier(.3, 1.6, .5, 1);
}

.feature:hover .feature-icon {
  transform: rotate(-8deg) scale(1.08);
}

.role {
  transition: background-color .25s ease;
}

.role:not(:first-child):hover {
  background: var(--paper);
}

.path {
  position: relative;
  z-index: 1;
  background: var(--white);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.path:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 36px -24px rgba(24, 38, 28, .55);
}

.clients-row li {
  transition: transform .25s ease, box-shadow .25s ease;
}

.clients-row li:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 30px -22px rgba(24, 38, 28, .55);
}

/* El gato vuelve a asomarse en contacto */
.contact-paths {
  position: relative;
}

.contact-cat {
  position: absolute;
  z-index: 0;
  top: 0;
  left: 50%;
  margin-left: -240px;
  width: 120px;
  height: auto;
  transform: translateY(-78%);
  pointer-events: none;
}

.motion .contact-cat {
  transform: translateY(0);
  transition: transform .9s cubic-bezier(.3, 1.3, .5, 1) .3s;
}

.motion .contact-paths.is-in .contact-cat {
  transform: translateY(-78%);
}

.contact-paths {
  margin-top: 96px;
}

@media (max-width: 860px) {
  .contact-cat {
    left: auto;
    right: 10%;
    margin-left: 0;
    width: 100px;
  }
}


/* ============================================================
   Páginas legales
   ============================================================ */
.page-head {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  padding: clamp(40px, 6vw, 72px) 0 clamp(32px, 5vw, 56px);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
  font-size: .92rem;
  color: var(--muted);
}

.breadcrumb li+li::before {
  content: "/";
  margin-right: 8px;
  color: #9aa69c;
}

.breadcrumb a {
  color: var(--muted);
}

.page-head h1 {
  font-size: clamp(2rem, 4.4vw, 3.1rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  max-width: 24ch;
}

.page-lead {
  margin-top: 16px;
  max-width: 44rem;
  font-size: 1.12rem;
  color: var(--ink-2);
}

.page-meta {
  margin-top: 18px;
  font-size: .92rem;
  color: var(--muted);
}

.legal-layout {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: clamp(32px, 5vw, 72px);
  padding-top: clamp(40px, 6vw, 64px);
  padding-bottom: clamp(64px, 8vw, 104px);
}

.legal-aside {
  position: sticky;
  top: 96px;
  align-self: start;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  font-size: .93rem;
}

.legal-aside h2 {
  font-size: .95rem;
  font-weight: 700;
  letter-spacing: 0;
  margin: 0 0 10px;
}

.toc {
  margin: 0 0 32px;
  padding: 0;
  list-style: none;
  border-left: 2px solid var(--line);
}

.toc a {
  display: block;
  margin-left: -2px;
  padding: 6px 0 6px 14px;
  border-left: 2px solid transparent;
  color: var(--muted);
  text-decoration: none;
  line-height: 1.35;
  transition: color .2s ease, border-color .2s ease;
}

.toc a:hover {
  color: var(--ink);
}

.toc a[aria-current="true"] {
  color: var(--green);
  font-weight: 600;
  border-left-color: var(--green);
}

.doc-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.doc-list li+li {
  margin-top: 6px;
}

.doc-list a {
  color: var(--ink-2);
  text-decoration: none;
}

.doc-list a:hover {
  color: var(--green);
  text-decoration: underline;
}

.doc-list a[aria-current="page"] {
  color: var(--green);
  font-weight: 700;
}

.doc-list .doc-group {
  margin-top: 16px;
  font-size: .85rem;
  color: var(--muted);
}

.toc-mobile {
  display: none;
}

/* Texto */
.legal-body {
  max-width: 46rem;
  color: var(--ink-2);
  line-height: 1.7;
}

.legal-body>*:first-child {
  margin-top: 0;
}

.legal-body h2 {
  margin: 56px 0 16px;
  font-size: clamp(1.35rem, 2.2vw, 1.6rem);
  font-weight: 800;
  color: var(--ink);
  scroll-margin-top: 96px;
}

.legal-body h3 {
  margin: 32px 0 10px;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.01em;
  scroll-margin-top: 96px;
}

.legal-body h4 {
  margin: 24px 0 8px;
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 0;
}

.legal-body p {
  margin: 0 0 14px;
}

.legal-body ul,
.legal-body ol {
  margin: 0 0 16px;
  padding-left: 1.3em;
}

.legal-body li {
  margin-bottom: 8px;
}

.legal-body ol.alpha {
  list-style-type: lower-alpha;
}

.legal-body strong {
  color: var(--ink);
}

.data-card {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 8px 24px;
  margin: 0 0 20px;
  padding: 22px 24px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
}

.data-card dt {
  color: var(--muted);
}

.data-card dd {
  margin: 0;
  color: var(--ink);
  font-weight: 600;
}

.callout {
  margin: 0 0 20px;
  padding: 18px 22px;
  background: var(--green-tint);
  border-radius: var(--radius-m);
  color: var(--ink);
}

.callout p:last-child {
  margin-bottom: 0;
}

.purpose {
  margin: 0 0 20px;
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--green);
  border-radius: var(--radius-m);
}

.purpose h3 {
  margin-top: 0;
}

.purpose dl {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 8px 20px;
  margin: 12px 0 0;
}

.purpose dt {
  font-weight: 700;
  color: var(--ink);
}

.purpose dd {
  margin: 0;
}

/* Tablas de cookies */
.table-wrap {
  margin: 0 0 24px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
}

.legal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .93rem;
  line-height: 1.5;
}

.legal-table th,
.legal-table td {
  padding: 12px 14px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}

.legal-table thead th {
  background: var(--paper);
  color: var(--ink);
  font-weight: 700;
}

.legal-table tbody tr:last-child td {
  border-bottom: 0;
}

.legal-table .group td {
  background: var(--green-tint);
  color: var(--ink);
  font-weight: 700;
}

.legal-table code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .88em;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.legal-table {
  font-size: .9rem;
}

.legal-table th,
.legal-table td {
  padding: 12px 12px;
}

.legal-table td:first-child {
  width: 26%;
}

.legal-table td:nth-child(5) {
  width: 36%;
}

@media (max-width: 720px) {
  .table-wrap {
    border: 0;
    overflow: visible;
  }

  .legal-table thead {
    display: none;
  }

  .legal-table,
  .legal-table tbody,
  .legal-table tr,
  .legal-table td {
    display: block;
  }

  .legal-table tr {
    margin-bottom: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius-m);
    overflow: hidden;
  }

  .legal-table tr.group {
    border: 0;
    margin: 20px 0 8px;
  }

  .legal-table .group td {
    background: transparent;
    padding: 0;
  }

  .legal-table td,
  .legal-table td:first-child,
  .legal-table td:nth-child(5) {
    min-width: 0;
  }

  .legal-table td {
    display: grid;
    grid-template-columns: 7.5rem minmax(0, 1fr);
    gap: 10px;
    padding: 9px 14px;
  }

  .legal-table td::before {
    content: attr(data-label);
    font-weight: 700;
    color: var(--muted);
    font-size: .85rem;
  }

  .legal-table .group td {
    display: block;
  }

  .legal-table .group td::before {
    content: none;
  }
}

.btn-inline {
  margin: 4px 0 20px;
}

@media (max-width: 960px) {
  .legal-layout {
    grid-template-columns: 1fr;
  }

  .legal-aside {
    display: none;
  }

  .toc-mobile {
    display: block;
    margin-bottom: 32px;
    border: 1px solid var(--line);
    border-radius: var(--radius-m);
  }

  .toc-mobile summary {
    padding: 14px 18px;
    font-weight: 700;
    cursor: pointer;
    min-height: 48px;
  }

  .toc-mobile .toc {
    margin: 0 18px 16px;
  }
}

@media (max-width: 520px) {

  .data-card,
  .purpose dl {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .data-card dd,
  .purpose dd {
    margin-bottom: 10px;
  }
}

/* Roles: banda de asociaciones y línea final */
.assoc-band {
  margin-top: 20px;
  padding: clamp(22px, 3vw, 32px) clamp(24px, 3vw, 36px);
  background: var(--green-tint);
  border-radius: var(--radius-l);
}

.assoc-band h3 {
  font-size: 1.3rem;
  font-weight: 800;
}

.assoc-band p {
  margin-top: 10px;
  max-width: 62rem;
  color: var(--ink-2);
}

.roles-extra {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 12px 28px;
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  color: var(--ink-2);
}

.roles-extra-label {
  font-weight: 700;
  color: var(--ink);
}

.roles-extra ul {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 32px;
  flex: 1 1 520px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.roles-extra li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  flex: 1 1 280px;
}

.roles-extra svg {
  width: 20px;
  height: 20px;
  flex: none;
  margin-top: 3px;
  color: var(--green);
}
