:root{
  --ink:#16233B;
  --blue:#2B4C7E;
  --blue-light:#4A6FA5;
  --fog:#E7EAEE;
  --paper:#F5F6F8;
  --graphite:#2A2E35;
  --amber:#E8A33D;
  --green:#4C9A6A;
  --red:#C24C3E;
  --white:#FFFFFF;
  --line: rgba(22,35,59,0.12);
  --radius: 3px;
  --display: 'Space Grotesk', sans-serif;
  --body: 'IBM Plex Sans', sans-serif;
  --mono: 'IBM Plex Mono', monospace;
}

*{box-sizing:border-box; margin:0; padding:0;}
html{scroll-behavior:smooth;}
body{
  font-family: var(--body);
  color: var(--graphite);
  background: var(--paper);
  line-height:1.5;
  -webkit-font-smoothing: antialiased;
}
img{max-width:100%; display:block;}
a{color:inherit; text-decoration:none;}
ul{list-style:none;}
button{font-family:inherit; cursor:pointer;}
input, select, textarea{font-family:inherit;}

.wrap{ max-width:1180px; margin:0 auto; padding:0 28px; }

h1,h2,h3,h4{
  font-family: var(--display);
  color: var(--ink);
  line-height:1.1;
  letter-spacing:-0.01em;
}

.eyebrow{
  font-family: var(--mono);
  font-size:12px;
  letter-spacing:0.14em;
  text-transform:uppercase;
  color: var(--blue);
  display:flex;
  align-items:center;
  gap:10px;
}
.eyebrow::before{
  content:"";
  width:8px; height:8px;
  background: var(--amber);
  display:inline-block;
  flex:none;
}

:focus-visible{ outline: 2px solid var(--blue); outline-offset: 3px; }

/* ================= HEADER ================= */
header{ position:sticky; top:0; z-index:100; background: var(--paper); border-bottom: 1px solid var(--line); }
.header-inner{ display:flex; align-items:center; justify-content:space-between; padding:18px 28px; max-width:1180px; margin:0 auto; position:relative; }
.logo{ font-family: var(--display); font-weight:700; font-size:22px; color: var(--ink); display:flex; align-items:center; gap:10px; letter-spacing:-0.02em; }
/* Logo real de la marca (SVG). Se le da alto fijo y el ancho se ajusta solo.
   En la cabecera va solo, sin el texto "TTL Canarias" al lado, así que se
   sube un poco para que no quede perdido junto al menú. */
.logo .mark{ height:38px; width:auto; display:block; }
nav ul{ display:flex; gap:34px; }
nav a{ font-size:14px; font-weight:500; color: var(--graphite); position:relative; padding:4px 0; }
nav a::after{ content:""; position:absolute; left:0; bottom:-2px; width:0%; height:2px; background: var(--amber); transition: width .2s ease; }
nav a:hover::after{ width:100%; }

.btn{ font-size:14px; font-weight:600; padding:11px 20px; border-radius: var(--radius); border:1px solid transparent; display:inline-flex; align-items:center; gap:8px; transition: transform .15s ease, background .2s ease, border-color .2s ease; }
.btn-primary{ background: var(--ink); color: var(--white); }
.btn-primary:hover{ background: var(--blue); }
.btn-ghost{ border-color: var(--line); color: var(--ink); background:transparent; }
.btn-ghost:hover{ border-color: var(--ink); }
.btn-amber{ background: var(--amber); color: var(--ink); }
.btn-amber:hover{ transform: translateY(-1px); }

.header-cta{ display:flex; align-items:center; gap:14px; }

.nav-toggle{ display:none; flex-direction:column; gap:5px; background:none; border:none; padding:6px; }
.nav-toggle span{ width:22px; height:2px; background:var(--ink); display:block; }

/* ================= HERO ================= */
.hero{ padding:64px 0 0; background: linear-gradient(180deg, var(--paper) 0%, var(--fog) 100%); position:relative; overflow:hidden; }
.hero::before{
  content:"";
  position:absolute; inset:0;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,0.5), transparent 70%);
  pointer-events:none;
}
.hero-inner{ position:relative; max-width:1180px; margin:0 auto; padding:0 28px 56px; }
.hero-grid{ display:grid; grid-template-columns: 1.15fr 0.85fr; gap:48px; align-items:end; margin-top:22px; }
.hero h1{ font-size:clamp(34px, 5vw, 56px); margin:16px 0 20px; max-width:16ch; }
.hero p.lead{ font-size:17px; color:#4B5564; max-width:46ch; margin-bottom:28px; }
.hero-actions{ display:flex; gap:14px; flex-wrap:wrap; }

.manifest-card{ background: var(--ink); color: var(--fog); border-radius: var(--radius); padding:24px; font-family: var(--mono); font-size:13px; }
.manifest-card .m-title{ display:flex; justify-content:space-between; color:#8FA3C4; text-transform:uppercase; letter-spacing:0.1em; font-size:11px; border-bottom:1px solid rgba(255,255,255,0.14); padding-bottom:12px; margin-bottom:14px; }
.manifest-row{ display:flex; justify-content:space-between; padding:9px 0; border-bottom:1px dashed rgba(255,255,255,0.12); }
.manifest-row:last-child{ border-bottom:none; }
.manifest-row .val{ color:#fff; font-weight:600; }

/* ================= HERO SLIDER (fotos de producto) ================= */
.hero-slider{ background: var(--white); border:1px solid var(--line); border-radius: var(--radius); overflow:hidden; }
.hs-stage{ position:relative; height:300px; background: var(--white); }
.hs-track{ display:flex; height:100%; transition: transform .5s ease; }
.hs-slide{ flex:0 0 100%; width:100%; height:100%; display:flex; align-items:center; justify-content:center; }
.hs-slide img{ width:100%; height:100%; object-fit:contain; padding:20px; box-sizing:border-box; }
.hs-arrow{
  position:absolute; top:50%; transform:translateY(-50%);
  width:34px; height:34px; border-radius:50%; border:1px solid var(--line);
  background: rgba(255,255,255,0.92); color: var(--ink); font-size:20px; line-height:1;
  display:flex; align-items:center; justify-content:center; cursor:pointer;
  transition: border-color .2s ease, color .2s ease;
}
.hs-arrow:hover{ border-color: var(--blue); color: var(--blue); }
.hs-prev{ left:10px; }
.hs-next{ right:10px; }
.hs-dots{ position:absolute; bottom:12px; left:50%; transform:translateX(-50%); display:flex; gap:7px; }
.hs-dots button{ width:7px; height:7px; border-radius:50%; border:none; padding:0; background: var(--line); cursor:pointer; }
.hs-dots button.active{ background: var(--blue); }
.hs-caption{
  text-align:center; font-family: var(--mono); font-size:12px; letter-spacing:0.08em;
  text-transform:uppercase; color:#6B7382; padding:13px 0; border-top:1px solid var(--line);
}

/* ================= TICKER ================= */
.ticker-section{ background: var(--ink); overflow:hidden; border-bottom:1px solid rgba(255,255,255,0.08); }
.ticker-track{ display:flex; width:max-content; animation: scroll-left 38s linear infinite; }
@keyframes scroll-left{ from{ transform:translateX(0); } to{ transform:translateX(-50%); } }
.ticker-item{ display:flex; align-items:center; gap:10px; padding:13px 26px; font-family: var(--mono); font-size:12.5px; color:#C9D3E3; border-right:1px solid rgba(255,255,255,0.08); white-space:nowrap; }
.ticker-item .sku{ color:#8FA3C4; }
.ticker-item .dot{ width:7px; height:7px; border-radius:50%; display:inline-block; background: var(--green); flex:none; }
.ticker-item.low .dot{ background: var(--amber); }
.ticker-item .qty{ color:#fff; font-weight:600; }

@media (prefers-reduced-motion: reduce){
  .ticker-track{ animation:none; }
  .hero::before{ mask-image:none; }
}

/* ================= ANIMACIONES DE ENTRADA ================= */
@keyframes fade-up{
  from{ opacity:0; transform:translateY(18px); }
  to{ opacity:1; transform:translateY(0); }
}
.hero-grid > div:first-child{ animation: fade-up .7s ease both; }
.hero-slider{ animation: fade-up .7s ease .15s both; }

/* Aparición progresiva al hacer scroll: activada por scroll-reveal.js
   (IntersectionObserver). Sin JS o con "reducir movimiento" del sistema,
   el contenido se ve directamente (ver más abajo). */
[data-reveal]{
  opacity:0;
  transform:translateY(20px);
  transition: opacity .6s ease, transform .6s ease;
}
[data-reveal].is-visible{ opacity:1; transform:translateY(0); }

/* Cascada suave entre tarjetas de una misma cuadrícula estática (sin bucle
   Twig); las cuadrículas generadas con {% for %} llevan su propio
   transition-delay calculado por índice directamente en la plantilla. */
.trust-grid [data-reveal]:nth-child(2),
.process-grid [data-reveal]:nth-child(2){ transition-delay:.06s; }
.trust-grid [data-reveal]:nth-child(3),
.process-grid [data-reveal]:nth-child(3){ transition-delay:.12s; }
.trust-grid [data-reveal]:nth-child(4),
.process-grid [data-reveal]:nth-child(4){ transition-delay:.18s; }
.trust-grid [data-reveal]:nth-child(5){ transition-delay:.24s; }
.trust-grid [data-reveal]:nth-child(6){ transition-delay:.3s; }
.trust-grid [data-reveal]:nth-child(7){ transition-delay:.36s; }
.trust-grid [data-reveal]:nth-child(8){ transition-delay:.42s; }
.trust-grid [data-reveal]:nth-child(9){ transition-delay:.48s; }

@media (prefers-reduced-motion: reduce){
  .hero-grid > div:first-child, .hero-slider{ animation:none; }
  [data-reveal]{ opacity:1; transform:none; transition:none; }
}

/* ================= SECTION GENERIC ================= */
section{ padding:88px 0; }
.section-head{ display:flex; justify-content:space-between; align-items:flex-end; gap:24px; margin-bottom:40px; flex-wrap:wrap; }
.section-head h1, .section-head h2{ font-size:clamp(26px,3.4vw,36px); margin-top:12px; max-width:20ch; }
.section-head p{ color:#5B6372; max-width:38ch; font-size:15px; }

/* ================= CATEGORIES ================= */
.cat-grid{ display:grid; grid-template-columns: repeat(3, 1fr); gap:20px; }
.cat-card{ background: var(--white); border:1px solid var(--line); border-radius: var(--radius); padding:22px; position:relative; overflow:hidden; transition: border-color .2s ease, transform .2s ease; }
.cat-card:hover{ border-color: var(--blue); transform: translateY(-3px); }
.cat-barcode{
  height:30px;
  background: repeating-linear-gradient(90deg, var(--ink) 0, var(--ink) 2px, transparent 2px, transparent 5px, var(--ink) 5px, var(--ink) 6px, transparent 6px, transparent 10px, var(--ink) 10px, var(--ink) 13px, transparent 13px, transparent 16px);
  opacity:0.85; margin-bottom:16px;
}
.cat-photo{
  height:150px; margin:-22px -22px 16px;
  /* Blanco, no --paper: las fotos de producto vienen con fondo blanco y
     sombra suave; sobre un gris claro se notaria el recuadro. */
  background: var(--white); border-bottom:1px solid var(--line);
  display:flex; align-items:center; justify-content:center;
}
.cat-photo img{ width:100%; height:100%; object-fit:contain; padding:18px; box-sizing:border-box; }
.cat-card .cat-code{ font-family: var(--mono); font-size:11px; color:#8891A0; letter-spacing:0.06em; }
.cat-card h2, .cat-card h3{ font-size:19px; margin:8px 0 6px; }
.cat-card .cat-desc{ font-size:13.5px; color:#4B5564; line-height:1.5; margin-bottom:10px; }
.cat-card .cat-count{ font-size:13px; color:#6B7382; margin-bottom:14px; }
.cat-card .cat-link{ font-size:13px; font-weight:600; color: var(--blue); display:inline-flex; align-items:center; gap:6px; }
.cat-card .cat-link .arrow{ transition: transform .2s ease; }
.cat-card:hover .cat-link .arrow{ transform: translateX(3px); }

/* ================= PROCESS ================= */
.process{ background: var(--ink); color: var(--fog); }
.process .section-head h2, .process .eyebrow{ color:#fff; }
.process .eyebrow{ color:#9FB3D4; }
.process .section-head p{ color:#A9B4C7; }
.process-grid{ display:grid; grid-template-columns: repeat(4, 1fr); gap:0; border-top:1px solid rgba(255,255,255,0.14); }
.process-step{ padding:28px 22px 0 0; border-left:1px solid rgba(255,255,255,0.14); padding-left:22px; }
.process-step:first-child{ border-left:none; padding-left:0; }
.process-step .p-num{ font-family: var(--mono); font-size:13px; color: var(--amber); margin-bottom:14px; }
.process-step h3{ color:#fff; font-size:17px; margin-bottom:8px; }
.process-step p{ font-size:13.5px; color:#A9B4C7; }

/* ================= REVENDEDORES CTA ================= */
.revendedores-cta{ background: var(--ink); padding:56px 0; }
.revendedores-cta .eyebrow{ color:#9FB3D4; }
.revendedores-cta-inner{ display:flex; align-items:center; justify-content:space-between; gap:32px; flex-wrap:wrap; }
.revendedores-cta-inner h2{ color:#fff; font-size:clamp(22px,2.6vw,30px); margin:12px 0 10px; max-width:26ch; }
.revendedores-cta-inner p{ color:#A9B4C7; max-width:44ch; margin:0; font-size:15px; }
.revendedores-cta-inner .btn{ flex-shrink:0; }

@media (max-width: 720px){
  .revendedores-cta-inner{ flex-direction:column; align-items:flex-start; }
}

/* ================= CATALOG BADGES ================= */
.badge{ font-family: var(--mono); font-size:11px; padding:4px 9px; border-radius:2px; display:inline-flex; align-items:center; gap:6px; text-transform:uppercase; letter-spacing:0.05em; }
.badge .dot{ width:6px; height:6px; border-radius:50%; }
.badge.in{ background:rgba(76,154,106,0.12); color: var(--green); }
.badge.in .dot{ background: var(--green); }
.badge.low{ background:rgba(232,163,61,0.14); color:#B67A1E; }
.badge.low .dot{ background: var(--amber); }
.badge.out{ background:rgba(194,76,62,0.1); color: var(--red); }
.badge.out .dot{ background: var(--red); }

.catalog-foot{ display:flex; justify-content:flex-end; margin-top:22px; }

/* ================= CATALOG FILTERS + PRODUCT CARDS ================= */
.catalog-filters{
  display:flex; align-items:flex-end; gap:16px; flex-wrap:wrap;
  background: var(--paper); border:1px solid var(--line); border-radius: var(--radius);
  padding:16px 18px; margin-bottom:22px;
}
/* flex-basis pequeño porque ahora puede haber hasta 6 campos (disponibilidad,
   4 características y el orden): con el mínimo de 200px de antes se salían. */
.catalog-filters .filter-field{ display:flex; flex-direction:column; gap:6px; flex:1 1 158px; min-width:158px; }
.catalog-filters label{ font-size:11.5px; font-weight:600; color:#6B7382; text-transform:uppercase; letter-spacing:0.06em; }
.catalog-filters select{
  padding:9px 12px; border:1px solid var(--line); border-radius: var(--radius);
  font-size:13.5px; background: var(--white); color: var(--graphite);
}
.catalog-filters select:focus{ outline:none; border-color: var(--blue); }
/* Las combinaciones que no darían ningún resultado se desactivan desde el JS */
.catalog-filters select option:disabled{ color:#B4BAC4; }
.catalog-filters .filter-count{ margin-left:auto; font-size:12.5px; color:#8891A0; align-self:center; }
.filter-reset{
  align-self:center; background:none; border:none; padding:0;
  font-family: var(--body); font-size:12.5px; font-weight:600; color: var(--blue);
  cursor:pointer; text-decoration:underline; text-underline-offset:3px;
}
.filter-reset:hover{ color: var(--ink); }
.filter-reset[hidden]{ display:none; }

.product-grid{ display:grid; grid-template-columns: repeat(2, 1fr); gap:18px; }
.product-card{
  background: var(--white); border:1px solid var(--line); border-radius: var(--radius);
  padding:20px; display:flex; flex-direction:column; gap:10px;
  transition: border-color .2s ease, transform .2s ease;
}
.product-card:hover{ border-color: var(--blue); transform: translateY(-2px); }
.product-card[hidden]{ display:none; }
/* Miniatura de la tarjeta: mismos márgenes negativos que .cat-photo para que
   la foto llegue a los bordes de la tarjeta. */
.product-card .pc-photo{
  display:flex; align-items:center; justify-content:center;
  height:132px; margin:-20px -20px 4px;
  background: var(--white); border-bottom:1px solid var(--line);
  border-radius: var(--radius) var(--radius) 0 0; overflow:hidden;
}
.product-card .pc-photo img{ width:100%; height:100%; object-fit:contain; padding:14px; box-sizing:border-box; }
.product-card .pc-head{ display:flex; justify-content:space-between; align-items:flex-start; gap:10px; }
.product-card .pc-sku{ font-family: var(--mono); font-size:11px; color:#8891A0; letter-spacing:0.05em; }
.product-card h2{ font-size:16px; line-height:1.35; margin:2px 0 0; }
.product-card h2 a{ color: var(--ink); }
.product-card .pc-specs{ list-style:none; font-size:13px; color:#4B5564; line-height:1.7; }
.product-card .pc-specs li strong{ color: var(--graphite); font-weight:600; }
.product-card .pc-foot{ display:flex; justify-content:space-between; align-items:center; margin-top:auto; padding-top:8px; border-top:1px solid var(--line); }
.product-card .pc-foot a{ font-size:13px; font-weight:600; color: var(--blue); }
.catalog-empty{ text-align:center; padding:40px 20px; color:#6B7382; font-size:14px; display:none; }
.catalog-empty.show{ display:block; }

/* ================= GALERÍA DE FICHA DE PRODUCTO ================= */
/* Mismo ancho que la tarjeta "Ficha de referencia" de debajo, para que la
   ficha quede en una columna ordenada en vez de una foto enorme arriba.
   Las 6 miniaturas más grandes (Teknopack) caben justas en una sola fila. */
.galeria{ max-width:440px; margin:0 0 28px; }
.gal-principal{
  background: var(--white); border:1px solid var(--line); border-radius: var(--radius);
  height:250px; display:flex; align-items:center; justify-content:center; overflow:hidden;
}
.gal-principal img{ width:100%; height:100%; object-fit:contain; padding:16px; box-sizing:border-box; }
.gal-miniaturas{ display:flex; gap:10px; margin-top:10px; flex-wrap:wrap; }
.gal-mini{
  width:64px; height:64px; flex:0 0 auto;
  background: var(--white); border:1px solid var(--line); border-radius:8px;
  display:flex; align-items:center; justify-content:center; overflow:hidden;
  transition: border-color .2s ease;
}
.gal-mini img{ width:100%; height:100%; object-fit:contain; padding:6px; box-sizing:border-box; }
.gal-mini:hover{ border-color: var(--blue); }
.gal-mini.activa{ border-color: var(--blue); box-shadow:0 0 0 1px var(--blue) inset; }
.gal-mini:focus-visible{ outline:2px solid var(--blue); outline-offset:2px; }
@media (max-width: 640px){
  .gal-principal{ height:200px; }
  .gal-mini{ width:54px; height:54px; }
}

@media (max-width: 680px){
  .product-grid{ grid-template-columns:1fr; }
  .catalog-filters .filter-count{ margin-left:0; }
}

/* ================= TRUST ================= */
/* flex en vez de grid de columnas fijas: así el número de tarjetas puede
   cambiar (hoy 5) sin dejar huecos ni exigir tocar los media queries */
/* Rejilla en vez de flex-wrap: con 9 tarjetas, el flex dejaba la última fila
   con una sola tarjeta estirada a todo el ancho.
   Las 3 columnas van fijas y no con auto-fit: en el ancho de .wrap caben 4
   (4x260 + 3x24 = 1112 de los 1124 disponibles), y entonces volvían a salir
   4+4+1 con la novena huérfana. Con 3 fijas quedan 3x3 exactas. */
.trust-grid{
  display:grid; grid-template-columns: repeat(3, 1fr); gap:28px 24px;
}
@media (max-width: 900px){
  .trust-grid{ grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px){
  .trust-grid{ grid-template-columns: 1fr; }
}
.trust-card{
  padding:22px 0 0; border-top:2px solid var(--ink);
  transition: border-color .2s ease;
}
.trust-card:hover{ border-top-color: var(--amber); }
.trust-card h3{ font-size:16.5px; margin:14px 0 8px; }
.trust-card p{ font-size:13.5px; color:#5B6372; max-width:34ch; }
/* El icono va dentro de una pastilla: sin ella quedaba flotando y las
   tarjetas se leían como una lista de texto suelto. */
.trust-icon{
  width:42px; height:42px; padding:10px; box-sizing:border-box;
  border-radius:10px; background: var(--paper); color: var(--blue);
  transition: background-color .2s ease, color .2s ease;
}
.trust-card:hover .trust-icon{ background: var(--ink); color:#fff; }

/* ================= CTA / FORM ================= */
.cta-section{ background: var(--fog); border-top:1px solid var(--line); border-bottom:1px solid var(--line); }
.cta-grid{ display:grid; grid-template-columns: 1fr 1fr; gap:56px; align-items:center; }
.cta-grid h2{ font-size:clamp(26px,3.2vw,34px); margin:14px 0 14px; max-width:16ch; }
.cta-grid p.lead{ color:#4B5564; max-width:42ch; margin-bottom:0; font-size:15px; }

form{ background: var(--white); border:1px solid var(--line); border-radius: var(--radius); padding:28px; }
.field{ margin-bottom:16px; }
.field label{ display:block; font-size:12.5px; font-weight:600; color: var(--ink); margin-bottom:6px; }
.field input, .field select, .field textarea{ width:100%; padding:11px 13px; border:1px solid var(--line); border-radius: var(--radius); font-size:14px; background: var(--paper); color: var(--graphite); font-family: var(--body); }
.field input:focus, .field select:focus, .field textarea:focus{ outline:none; border-color: var(--blue); background: var(--white); }
.field textarea{ resize:vertical; min-height:90px; }
.field-row{ display:grid; grid-template-columns:1fr 1fr; gap:14px; }
/* En móvil las dos columnas dejaban ~145px por campo, donde no se lee
   ni un email mientras se escribe. Por debajo de 620px van apiladas. */
@media (max-width: 620px){
  .field-row{ grid-template-columns:1fr; gap:0; }
}
.field-error{ font-size:12px; color: var(--red); margin-top:5px; }
.field:has(.field-error) input{ border-color: var(--red); }
form .btn{ width:100%; max-width:340px; justify-content:center; margin-top:6px; }
@media (max-width: 620px){ form .btn{ max-width:none; } }
.form-note{ font-size:11.5px; color:#8891A0; margin-top:12px; text-align:center; }
.form-success{ text-align:center; padding:34px 10px; }
.form-success .check{ width:44px; height:44px; border-radius:50%; background: var(--green); color:#fff; display:flex; align-items:center; justify-content:center; margin:0 auto 14px; font-size:20px; }
.form-success h2{ font-size:18px; margin-bottom:6px; }
.form-success p{ font-size:13.5px; color:#5B6372; }

/* ================= FOOTER ================= */
footer{ background: var(--ink); color:#A9B4C7; padding:64px 0 28px; }
.footer-grid{ display:grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap:40px; padding-bottom:40px; border-bottom:1px solid rgba(255,255,255,0.1); }
.footer-logo{ font-family: var(--display); font-weight:700; font-size:20px; color:#fff; margin-bottom:12px; display:flex; align-items:center; gap:10px; }
/* El SVG del logo viene en el gris oscuro de la marca; sobre el pie oscuro se
   fuerza a blanco con un filtro en vez de mantener un segundo fichero. */
.footer-logo .mark{ height:22px; width:auto; display:block; filter: brightness(0) invert(1); }
.footer-grid p{ font-size:13.5px; max-width:32ch; }
.footer-col h2{ font-family: var(--mono); font-size:11px; letter-spacing:0.1em; text-transform:uppercase; color:#7E8CA6; margin-bottom:14px; }
.footer-col ul li{ margin-bottom:10px; font-size:13.5px; }
.footer-col a:hover{ color:#fff; }
.footer-bottom{ display:flex; justify-content:space-between; padding-top:24px; font-size:12.5px; color:#7E8CA6; flex-wrap:wrap; gap:10px; }
.footer-bottom a:hover{ color:#fff; }

/* ================= PÁGINAS LEGALES ================= */
.legal-content h2{ font-size:20px; margin:34px 0 12px; }
.legal-content h2:first-child{ margin-top:0; }
.legal-content h3{ font-size:16px; margin:20px 0 8px; color:var(--ink); }
.legal-content p{ margin-bottom:14px; color:var(--graphite); font-size:14.5px; line-height:1.7; }
/* Tablas dentro de páginas legales: se desplazan en horizontal en pantallas
   estrechas en lugar de desbordar la página entera. */
.tabla-scroll{ overflow-x:auto; -webkit-overflow-scrolling:touch; margin:16px 0; }
.tabla-scroll table{ min-width:520px; width:100%; }
.legal-content ul{ margin:0 0 14px 20px; list-style:disc; }
.legal-content li{ margin-bottom:6px; font-size:14.5px; line-height:1.6; }
.legal-note{
  background: var(--fog);
  border:1px solid var(--line);
  border-radius: var(--radius);
  padding:14px 16px;
  font-size:13px;
  color:#5B6372;
  margin-bottom:28px;
}
.legal-updated{
  font-family: var(--mono);
  font-size:11.5px;
  color:#8891A0;
  margin-bottom:24px;
}
@media (max-width: 900px){
  .hero-grid{ grid-template-columns:1fr; gap:32px; }
  .cat-grid{ grid-template-columns: repeat(2,1fr); }
  .process-grid{ grid-template-columns: repeat(2,1fr); }
  .process-step{ border-left:none !important; padding-left:0 !important; border-top:1px solid rgba(255,255,255,0.14); padding-top:22px; }
  .cta-grid{ grid-template-columns:1fr; gap:32px; }
  .footer-grid{ grid-template-columns: 1fr 1fr; }
}

/* El menú pasa a hamburguesa a 900px, no a 680: con el menú horizontal, los
   5 enlaces más los 2 botones más el logo suman ~897px, así que entre 680 y
   900 la cabecera se salía y aparecía scroll horizontal en toda la página.
   Afectaba de lleno a un iPad en vertical (768px). */
@media (max-width: 900px){
  nav{ display:none; position:absolute; top:100%; left:0; right:0; background:var(--paper); border-bottom:1px solid var(--line); }
  nav.open{ display:block; }
  nav ul{ flex-direction:column; gap:0; padding:10px 28px 18px; }
  nav a{ display:block; padding:12px 0; border-bottom:1px solid var(--line); }
  .nav-toggle{ display:flex; }
  .header-cta .btn-ghost{ display:none; }
}

@media (max-width: 680px){
  .cat-grid{ grid-template-columns:1fr; }
  .process-grid{ grid-template-columns:1fr; }
  .footer-grid{ grid-template-columns:1fr; gap:28px; }
  .section-head{ flex-direction:column; align-items:flex-start; }
}

/* ================= COOKIE BANNER ================= */
.cookie-banner{
  position:fixed; left:0; right:0; bottom:0; z-index:50;
  background: var(--ink); border-top:1px solid rgba(255,255,255,0.14);
  padding:16px 20px;
}
.cookie-banner[hidden]{ display:none; }
.cookie-banner-inner{
  max-width:1180px; margin:0 auto;
  display:flex; align-items:center; justify-content:space-between; gap:20px; flex-wrap:wrap;
}
.cookie-banner-inner p{ color:#C9D3E3; font-size:13.5px; margin:0; max-width:64ch; }
.cookie-banner-inner p a{ color:#fff; text-decoration:underline; }
.cookie-banner-actions{ display:flex; gap:10px; flex-shrink:0; }
.cookie-banner-actions .btn{ padding:9px 16px; font-size:13px; }
/* .btn-ghost está pensado para fondo claro (borde/texto oscuros); aquí el
   fondo es oscuro, así que se sobreescribe solo dentro del banner. */
.cookie-banner .btn-ghost{ border-color: rgba(255,255,255,0.35); color:#fff; }
.cookie-banner .btn-ghost:hover{ border-color:#fff; }

@media (max-width: 560px){
  .cookie-banner-inner{ flex-direction:column; align-items:stretch; }
  .cookie-banner-actions{ justify-content:flex-end; }
}
