/* =========================================================================
   CLIMANION (Nothing Proyectos y Servicios, S.L.) — Instalaciones en Cataluña
   Rediseño 2026 · formato a todo el ancho, moderno y limpio.
   Display: Space Grotesk · Texto: IBM Plex Sans · Etiquetas: IBM Plex Mono
   Las paletas se cambian en vivo con [data-palette] (panel de Tweaks).
   ========================================================================= */

/* ---------- Utilidad: visible solo para lectores de pantalla / SEO ---------- */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Tokens base (claro, comunes a todas las paletas) ---------- */
:root {
  --bg:        oklch(0.992 0.003 240);
  --surface:   #ffffff;
  --surface-2: oklch(0.974 0.005 244);
  --surface-3: oklch(0.956 0.007 246);
  --line:      oklch(0.905 0.010 246);
  --line-soft: oklch(0.935 0.008 246);

  --ink:       oklch(0.250 0.028 256);
  --ink-soft:  oklch(0.430 0.024 256);
  --muted:     oklch(0.555 0.018 256);

  /* —— Tokens de marca (los sobrescribe cada paleta) —— */
  --navy:      oklch(0.300 0.050 256);
  --navy-2:    oklch(0.232 0.048 256);
  --navy-3:    oklch(0.172 0.042 258);
  --blue:      oklch(0.560 0.130 252);
  --blue-600:  oklch(0.505 0.138 252);
  --blue-700:  oklch(0.450 0.130 252);
  --blue-50:   oklch(0.960 0.022 250);

  --accent:      oklch(0.700 0.175 47);
  --accent-600:  oklch(0.640 0.178 45);
  --accent-soft: oklch(0.955 0.045 60);
  --accent-ink:  #ffffff;
  --shadow-accent: 0 10px 28px oklch(0.70 0.17 47 / 0.32);

  /* velo del hero (lo cambia [data-overlay]) */
  --veil-1: 0.78;
  --veil-2: 0.42;
  --veil-3: 0.20;

  --radius:    16px;
  --radius-sm: 11px;
  --radius-lg: 24px;
  --shadow-sm: 0 1px 2px oklch(0.30 0.04 256 / 0.06), 0 1px 3px oklch(0.30 0.04 256 / 0.05);
  --shadow:    0 4px 14px oklch(0.30 0.04 256 / 0.08), 0 2px 6px oklch(0.30 0.04 256 / 0.05);
  --shadow-lg: 0 20px 54px oklch(0.25 0.05 256 / 0.17), 0 7px 20px oklch(0.25 0.05 256 / 0.10);

  --maxw: 1220px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  --ff-display: "Space Grotesk", "IBM Plex Sans", system-ui, sans-serif;
  --ff-sans: "IBM Plex Sans", system-ui, -apple-system, sans-serif;
  --ff-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", monospace;
}

/* ============ PALETAS (cambian en vivo) ============ */

/* Marino + Naranja (por defecto) */
[data-palette="marino"] {
  --navy:  oklch(0.300 0.050 256); --navy-2: oklch(0.232 0.048 256); --navy-3: oklch(0.168 0.042 258);
  --blue:  oklch(0.585 0.135 252); --blue-600: oklch(0.520 0.140 252); --blue-700: oklch(0.460 0.130 252); --blue-50: oklch(0.958 0.024 250);
  --accent: oklch(0.700 0.175 47); --accent-600: oklch(0.640 0.178 45); --accent-soft: oklch(0.955 0.045 60); --accent-ink:#fff;
  --shadow-accent: 0 10px 28px oklch(0.70 0.17 47 / 0.32);
}

/* Grafito + Naranja (look climaelec, casi negro) */
[data-palette="grafito"] {
  --navy:  oklch(0.310 0.010 262); --navy-2: oklch(0.232 0.009 262); --navy-3: oklch(0.158 0.008 262);
  --blue:  oklch(0.560 0.045 250); --blue-600: oklch(0.500 0.050 250); --blue-700: oklch(0.440 0.050 250); --blue-50: oklch(0.955 0.010 250);
  --accent: oklch(0.695 0.180 46); --accent-600: oklch(0.635 0.182 44); --accent-soft: oklch(0.955 0.045 60); --accent-ink:#fff;
  --shadow-accent: 0 10px 28px oklch(0.69 0.18 46 / 0.32);
}

/* Índigo + Ámbar */
[data-palette="indigo"] {
  --navy:  oklch(0.300 0.072 278); --navy-2: oklch(0.232 0.078 280); --navy-3: oklch(0.168 0.070 282);
  --blue:  oklch(0.595 0.140 282); --blue-600: oklch(0.530 0.150 282); --blue-700: oklch(0.470 0.145 282); --blue-50: oklch(0.958 0.028 282);
  --accent: oklch(0.770 0.150 72); --accent-600: oklch(0.705 0.158 66); --accent-soft: oklch(0.965 0.050 86); --accent-ink: oklch(0.250 0.040 70);
  --shadow-accent: 0 10px 28px oklch(0.77 0.15 72 / 0.36);
}

/* Pizarra + Teal */
[data-palette="pizarra"] {
  --navy:  oklch(0.300 0.038 220); --navy-2: oklch(0.232 0.038 222); --navy-3: oklch(0.165 0.034 226);
  --blue:  oklch(0.580 0.090 212); --blue-600: oklch(0.515 0.095 212); --blue-700: oklch(0.455 0.090 212); --blue-50: oklch(0.958 0.020 210);
  --accent: oklch(0.705 0.130 178); --accent-600: oklch(0.640 0.132 176); --accent-soft: oklch(0.955 0.045 180); --accent-ink: oklch(0.200 0.040 180);
  --shadow-accent: 0 10px 28px oklch(0.70 0.13 178 / 0.34);
}

/* ============ Intensidad del velo del hero ============ */
[data-overlay="claro"]  { --veil-1: 0.62; --veil-2: 0.30; --veil-3: 0.12; }
[data-overlay="medio"]  { --veil-1: 0.78; --veil-2: 0.42; --veil-3: 0.20; }
[data-overlay="oscuro"] { --veil-1: 0.90; --veil-2: 0.60; --veil-3: 0.34; }

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: var(--ff-sans);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea, select { font: inherit; color: inherit; }
ul { list-style: none; padding: 0; }
::selection { background: var(--accent); color: var(--accent-ink); }

/* ---------- Layout helpers ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 28px; }
.section { padding-block: clamp(66px, 9vw, 124px); }

.eyebrow {
  font-family: var(--ff-mono); font-size: 12.5px; font-weight: 500;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--blue-600);
  display: inline-flex; align-items: center; gap: 9px;
}
.eyebrow::before { content: ""; width: 22px; height: 2px; background: var(--accent); display: inline-block; }
.eyebrow.on-dark { color: oklch(0.86 0.05 250); }
.eyebrow.center { justify-content: center; }

h1, h2, h3, h4 { font-family: var(--ff-display); font-weight: 600; line-height: 1.08; letter-spacing: -0.02em; color: var(--ink); }
.h2 { font-size: clamp(31px, 4.2vw, 47px); }
.lede { font-size: clamp(17px, 1.5vw, 19px); color: var(--ink-soft); max-width: 60ch; text-wrap: pretty; }

.section-head { max-width: 740px; margin-bottom: clamp(38px, 5vw, 58px); }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head.center .lede { margin-inline: auto; }
.section-head .h2 { margin-top: 14px; }
.section-head .lede { margin-top: 16px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 15px 24px; border-radius: 12px;
  font-family: var(--ff-sans); font-weight: 600; font-size: 15.5px; letter-spacing: -0.005em;
  transition: transform 0.18s var(--ease), box-shadow 0.2s var(--ease), background 0.2s, color 0.2s, border-color 0.2s;
  white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; }
.btn:active { transform: translateY(1px); }
.btn-accent { background: var(--accent); color: var(--accent-ink); box-shadow: var(--shadow-accent); }
.btn-accent:hover { background: var(--accent-600); transform: translateY(-2px); }
.btn-navy { background: var(--navy); color: #fff; }
.btn-navy:hover { background: var(--navy-2); transform: translateY(-2px); }
.btn-ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--line); }
.btn-ghost:hover { border-color: var(--blue); color: var(--blue-700); background: var(--blue-50); }
.btn-ghost-light { background: oklch(1 0 0 / 0.10); color: #fff; border: 1.5px solid oklch(1 0 0 / 0.34); backdrop-filter: blur(6px); }
.btn-ghost-light:hover { background: oklch(1 0 0 / 0.20); border-color: oklch(1 0 0 / 0.6); }
.btn-wa { background: #25D366; color: #08311a; }
.btn-wa:hover { background: #1fbb59; transform: translateY(-2px); }
.btn-block { width: 100%; }
.btn-lg { padding: 17px 30px; font-size: 16.5px; }

/* ---------- Header (transparente sobre el hero, sólido al hacer scroll) ---------- */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 60;
  background: transparent; border-bottom: 1px solid transparent;
  transition: background 0.3s var(--ease), border-color 0.3s, box-shadow 0.3s, color 0.3s;
}
.header-inner { display: flex; align-items: center; gap: 24px; height: 80px; }

.header .nav a, .header .tel-link, .header .brand-name { color: #fff; }
.header .brand-name span { color: oklch(0.86 0.05 250); }
.header .nav a:hover { background: oklch(1 0 0 / 0.12); color: #fff; }
.header .tel-link:hover { background: oklch(1 0 0 / 0.12); }
.header .tel-link svg { color: var(--accent); }
.header .tel-link .tel-label small { color: oklch(0.84 0.03 250); }
.header .logo-slot { background: oklch(1 0 0 / 0.08); border-color: oklch(1 0 0 / 0.30); color: oklch(0.88 0.02 250); }
.header .menu-toggle { border-color: oklch(1 0 0 / 0.30); color: #fff; }

/* estado sólido */
.header.is-stuck {
  background: oklch(0.992 0.003 240 / 0.86);
  backdrop-filter: blur(16px) saturate(1.5);
  border-bottom-color: var(--line); box-shadow: var(--shadow-sm);
}
.header.is-stuck .nav a, .header.is-stuck .brand-name { color: var(--ink); }
.header.is-stuck .brand-name span { color: var(--blue-600); }
.header.is-stuck .nav a:hover { background: var(--surface-2); color: var(--ink); }
.header.is-stuck .tel-link { color: var(--navy); }
.header.is-stuck .tel-link:hover { background: var(--blue-50); }
.header.is-stuck .tel-link svg { color: var(--blue); }
.header.is-stuck .tel-link .tel-label small { color: var(--muted); }
.header.is-stuck .logo-slot { background: repeating-linear-gradient(45deg, var(--surface-3) 0 7px, var(--surface-2) 7px 14px); border-color: var(--line); color: var(--muted); }
.header.is-stuck .menu-toggle { border-color: var(--line); color: var(--ink); }

.brand { display: flex; align-items: center; gap: 12px; }
.logo-slot {
  width: 46px; height: 46px; border-radius: 12px;
  border: 1.5px dashed var(--line); display: grid; place-items: center;
  color: var(--muted); font-family: var(--ff-mono); font-size: 8px; letter-spacing: 0.05em;
  text-align: center; line-height: 1.1; flex-shrink: 0;
  transition: background 0.3s, border-color 0.3s, color 0.3s;
}
.brand-name { font-family: var(--ff-display); font-weight: 600; font-size: 19px; letter-spacing: -0.02em; line-height: 1; transition: color 0.3s; }
.brand-name span { display: block; font-family: var(--ff-mono); font-size: 10px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; margin-top: 4px; transition: color 0.3s; }

/* —— Logo CLIMANION (SVG vectorial inline, arcoíris por letra en ION) —— */
.brand-logo { display: inline-flex; flex-direction: column; align-items: flex-start; line-height: 1; gap: 4px; }
.bl-word { font-size: 25px; line-height: 0; color: #fff; fill: #fff; transition: fill 0.3s, color 0.3s; }
.bl-svg { display: inline-block; vertical-align: top; height: 0.82em; width: auto; aspect-ratio: 11480 / 1616; }
.bl-sub { font-family: var(--ff-mono); font-weight: 500; font-size: 9px; letter-spacing: 0.32em; text-transform: uppercase; color: rgba(255,255,255,0.62); transition: color 0.3s; }
.header.is-stuck .bl-word { color: var(--ink); fill: var(--ink); }
.header.is-stuck .bl-sub { color: var(--muted); }
.drawer .bl-word { color: var(--ink); fill: var(--ink); }
.drawer .bl-sub { color: var(--muted); }
.footer .bl-word { color: #fff; fill: #fff; }
.footer .bl-sub { color: oklch(0.7 0.03 250); }

.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a { font-size: 14.5px; font-weight: 500; padding: 9px 14px; border-radius: 10px; transition: color 0.18s, background 0.18s; }

.header-cta { display: flex; align-items: center; gap: 10px; }
.tel-link { display: inline-flex; align-items: center; gap: 9px; font-weight: 600; font-size: 15px; padding: 9px 12px; border-radius: 10px; transition: background 0.18s, color 0.3s; }
.tel-link svg { width: 18px; height: 18px; }
.tel-link .tel-label { display: flex; flex-direction: column; line-height: 1.05; }
.tel-link .tel-label small { font-family: var(--ff-mono); font-size: 9.5px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; }

.menu-toggle { display: none; width: 44px; height: 44px; border-radius: 11px; border: 1.5px solid var(--line); align-items: center; justify-content: center; transition: border-color 0.3s, color 0.3s; }
.menu-toggle svg { width: 22px; height: 22px; }

/* ---------- HERO (a todo el ancho, fade entre imágenes) ---------- */
/* ============ Hero split panels ============ */
.hero-split { position: relative; height: 100vh; min-height: 600px; display: flex; flex-direction: column; overflow: hidden; background: #000; }

/* Marca centrada arriba */
.hs-brand { position: absolute; top: 92px; left: 0; right: 0; z-index: 10; text-align: center; pointer-events: none; opacity: 0; animation: hs-fadein 0.7s 1.9s ease forwards; }
.hs-logo { display: block; text-align: center; }
.hs-logo .bl-word { font-size: clamp(30px, 4.2vw, 56px); }
.hs-logo .bl-svg { filter: drop-shadow(0 2px 18px rgba(0,0,0,0.65)); }
.hs-tagline { font-family: var(--ff-mono); font-size: clamp(9px, 1vw, 12px); letter-spacing: 0.22em; color: oklch(1 0 0 / 0.48); margin-top: 10px; text-transform: uppercase; }

/* Grid de paneles */
.hs-grid { display: flex; width: 100%; height: 100%; }

/* Panel individual */
.hs-panel {
  flex: 1; position: relative; overflow: hidden; cursor: pointer;
  filter: brightness(0.08);
  transition: flex 0.42s cubic-bezier(0.25,0.46,0.45,0.94), filter 0.3s ease;
}
.hs-panel + .hs-panel { border-left: 1px solid oklch(1 0 0 / 0.08); }

/* Imagen del panel (sustituye al background-image: permite alt + srcset) */
.hs-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; z-index: 0; }

/* Reveal secuencial vía JS */
.hs-panel.is-lit { filter: brightness(0.50); }

/* Estados hover — activos solo tras .is-ready */
.hs-grid.is-ready .hs-panel { filter: brightness(0.30); }
.hs-grid.is-ready .hs-panel:hover { filter: brightness(0.85); flex: 1.6; }

/* Barra de color por servicio */
.hs-panel:nth-child(1)::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: #38bdf8; z-index: 3; }
.hs-panel:nth-child(2)::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: #fb923c; z-index: 3; }
.hs-panel:nth-child(3)::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: #34d399; z-index: 3; }
.hs-panel:nth-child(4)::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: #fbbf24; z-index: 3; }

/* Gradiente para legibilidad del texto */
.hs-veil { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(to top, rgba(0,0,0,0.90) 0%, rgba(0,0,0,0.40) 38%, transparent 65%); }

/* Info de servicio abajo */
.hs-info { position: absolute; bottom: 0; left: 0; right: 0; padding: 0 22px 130px; color: #fff; z-index: 2; }
.hs-icon { font-size: 28px; display: block; margin-bottom: 9px; }
.hs-name { display: block; font-family: var(--ff-display); font-size: clamp(17px, 1.7vw, 23px); font-weight: 700; letter-spacing: -0.02em; }
.hs-desc { font-size: clamp(11px, 0.85vw, 13px); color: oklch(1 0 0 / 0.68); margin-top: 6px; line-height: 1.5; }

/* CTA flotante abajo al centro */
.hs-cta { position: absolute; bottom: 30px; left: 0; right: 0; z-index: 10; display: flex; flex-direction: column; align-items: center; gap: 8px; opacity: 0; animation: hs-fadein 0.7s 2.1s ease forwards; }
.hs-resp { font-family: var(--ff-mono); font-size: 11px; color: oklch(1 0 0 / 0.42); letter-spacing: 0.04em; margin: 0; }

@keyframes hs-fadein { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .hs-panel, .hs-brand, .hs-cta { animation: none !important; filter: brightness(0.55) !important; opacity: 1 !important; } }

/* ---------- Franja de certificaciones ---------- */
.certs { border-bottom: 1px solid var(--line); background: var(--surface); }
.certs-inner { display: flex; align-items: center; gap: 32px; padding-block: 26px; flex-wrap: wrap; }
.certs-label { font-family: var(--ff-mono); font-size: 11.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); flex-shrink: 0; }
.certs-logos { display: flex; gap: 14px; flex-wrap: wrap; flex: 1; }
.cert-slot { height: 46px; min-width: 120px; flex: 1; border: 1.5px dashed var(--line); border-radius: 10px; display: grid; place-items: center; font-family: var(--ff-mono); font-size: 10.5px; letter-spacing: 0.04em; color: var(--muted); background: var(--surface-2); }
.cert-slot--img { border-style: solid; padding: 6px 16px; flex: 0 0 auto; min-width: 0; }
.cert-slot--img img { max-height: 34px; max-width: 100%; width: auto; object-fit: contain; }
.cert-slot--dark { background: #16283d; border-color: #2a3f5a; }

/* ---------- Intro "¿Qué es CLIMANION?" ---------- */
.intro { background: var(--surface); }
.intro-inner { max-width: 880px; margin-inline: auto; text-align: center; }
.intro-lead { font-family: var(--ff-display); font-weight: 500; font-size: clamp(20px, 2.4vw, 27px); line-height: 1.4; letter-spacing: -0.015em; color: var(--ink); margin-top: 22px; text-wrap: pretty; }
.intro-lead strong { font-weight: 700; }
.intro-lead .hl { color: var(--blue-700); }
.intro p.body { color: var(--ink-soft); margin-top: 20px; max-width: 64ch; margin-inline: auto; }
.intro-cta { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin-top: 32px; }

/* hueco de vídeo */
.video-frame {
  position: relative; margin: clamp(40px, 5vw, 60px) auto 0; max-width: 900px;
  aspect-ratio: 16 / 9; border-radius: var(--radius-lg); overflow: hidden;
  border: 1px solid var(--line); box-shadow: var(--shadow-lg);
  background:
    radial-gradient(130% 100% at 50% 0%, oklch(0.34 0.045 256) 0%, oklch(0.20 0.04 258) 70%);
  display: grid; place-items: center;
}
.video-frame .video-el { width: 100%; height: 100%; object-fit: cover; display: block; background: #0d1b2a; }
.video-frame .v-grid { position: absolute; inset: 0; background-image: linear-gradient(oklch(1 0 0 / 0.05) 1px, transparent 1px), linear-gradient(90deg, oklch(1 0 0 / 0.05) 1px, transparent 1px); background-size: 40px 40px; }
.video-frame .play {
  position: relative; width: 84px; height: 84px; border-radius: 50%;
  background: var(--accent); color: var(--accent-ink); display: grid; place-items: center;
  box-shadow: var(--shadow-accent); transition: transform 0.2s var(--ease);
}
.video-frame:hover .play { transform: scale(1.07); }
.video-frame .play svg { width: 32px; height: 32px; margin-left: 4px; }
.video-frame .v-tag { position: absolute; left: 20px; bottom: 18px; font-family: var(--ff-mono); font-size: 11.5px; letter-spacing: 0.05em; color: oklch(1 0 0 / 0.6); display: inline-flex; gap: 8px; align-items: center; }
.video-frame .v-tag::before { content: "▦"; opacity: 0.6; }

/* ---------- Imagen placeholder genérico ---------- */
.ph {
  position: relative;
  background: repeating-linear-gradient(135deg, oklch(0.93 0.015 250) 0 12px, oklch(0.955 0.012 250) 12px 24px);
  border: 1px solid var(--line); display: grid; place-items: center; color: var(--ink-soft); overflow: hidden;
}
.ph.on-dark { background: repeating-linear-gradient(135deg, oklch(0.30 0.04 256) 0 12px, oklch(0.26 0.04 256) 12px 24px); border-color: oklch(1 0 0 / 0.10); color: oklch(0.82 0.03 250); }
.ph-tag { font-family: var(--ff-mono); font-size: 11.5px; letter-spacing: 0.06em; padding: 7px 12px; border-radius: 999px; background: oklch(1 0 0 / 0.72); border: 1px solid var(--line); display: inline-flex; align-items: center; gap: 7px; }
.ph.on-dark .ph-tag { background: oklch(0 0 0 / 0.35); border-color: oklch(1 0 0 / 0.16); color: #fff; }
.ph-tag::before { content: "▦"; opacity: 0.6; }

/* ---------- Servicios ---------- */
.services-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.svc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px 30px; position: relative; transition: transform 0.22s var(--ease), box-shadow 0.22s var(--ease), border-color 0.22s; overflow: hidden; }
.svc::after { content: ""; position: absolute; left: 0; top: 0; height: 3px; width: 100%; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform 0.3s var(--ease); }
.svc:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: transparent; }
.svc:hover::after { transform: scaleX(1); }
.svc-ico { width: 58px; height: 58px; border-radius: 15px; background: var(--blue-50); color: var(--blue-700); display: grid; place-items: center; margin-bottom: 20px; transition: background 0.22s, color 0.22s; }
.svc:hover .svc-ico { background: var(--navy); color: #fff; }
.svc-ico svg { width: 29px; height: 29px; }
.svc h3 { font-size: 21px; margin-bottom: 8px; }
.svc p { color: var(--ink-soft); font-size: 15px; }
.svc .svc-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 16px; }
.svc .svc-tags span { font-family: var(--ff-mono); font-size: 10.5px; letter-spacing: 0.03em; color: var(--blue-700); background: var(--blue-50); padding: 4px 9px; border-radius: 7px; }
.svc.cta-card { display: flex; flex-direction: column; justify-content: center; background: var(--navy-2); border-color: transparent; color: #fff; }
.svc.cta-card h3 { color: #fff; }
.svc.cta-card p { color: oklch(0.86 0.025 250); }

/* ---------- Sobre nosotros ---------- */
.about-grid { display: grid; grid-template-columns: 0.95fr 1.05fr; gap: 56px; align-items: center; }
.about-media { aspect-ratio: 5/4; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); overflow: hidden; }
.about-img { width: 100%; height: 100%; object-fit: cover; object-position: center; display: block; }
.about-body p { color: var(--ink-soft); margin-top: 16px; max-width: 56ch; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 34px; }
.stat { background: var(--surface-2); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 22px 20px; }
.stat b { font-family: var(--ff-display); font-size: clamp(28px, 3.5vw, 38px); display: block; line-height: 1; color: var(--navy); letter-spacing: -0.03em; }
.stat b em { font-style: normal; color: var(--accent-600); }
.stat b.stat-word { font-size: clamp(22px, 2.6vw, 30px); }
.stat span { font-size: 13px; color: var(--muted); margin-top: 8px; display: block; }

/* ---------- Climatización destacada ---------- */
.spotlight { background: var(--surface-2); }
.spotlight-grid { align-items: center; }
.spotlight .about-media { aspect-ratio: 4/3; }
.spotlight .spotlight-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.spotlight .spotlight-tags span { font-family: var(--ff-mono); font-size: 10.5px; letter-spacing: 0.03em; color: var(--blue-700); background: var(--blue-50); padding: 5px 10px; border-radius: 7px; }

/* ---------- Por qué elegirnos ---------- */
.why-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.why { border: 1px solid var(--line); border-radius: var(--radius); padding: 30px 26px; background: var(--surface); position: relative; transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease); }
.why:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.why .num { font-family: var(--ff-mono); font-size: 12px; color: var(--muted); letter-spacing: 0.08em; }
.why-ico { width: 50px; height: 50px; border-radius: 13px; background: var(--accent-soft); color: var(--accent-600); display: grid; place-items: center; margin: 14px 0 18px; }
.why-ico svg { width: 26px; height: 26px; }
.why h3 { font-size: 18.5px; margin-bottom: 8px; }
.why p { font-size: 14.5px; color: var(--ink-soft); }

/* ---------- Cobertura ---------- */
.coverage { background: var(--navy-2); color: #fff; position: relative; overflow: hidden; }
.coverage::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(oklch(1 0 0 / 0.04) 1px, transparent 1px), linear-gradient(90deg, oklch(1 0 0 / 0.04) 1px, transparent 1px); background-size: 44px 44px; pointer-events: none; }
.coverage .h2, .coverage .lede { color: #fff; }
.coverage .lede { color: oklch(0.86 0.025 250); }
.coverage .eyebrow { color: var(--accent); }
.coverage-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: 56px; align-items: center; position: relative; }
.prov-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 30px; }
.prov { border: 1px solid oklch(1 0 0 / 0.14); border-radius: var(--radius); padding: 18px 20px; background: oklch(1 0 0 / 0.04); transition: background 0.2s, border-color 0.2s; }
.prov { cursor: default; }
.prov[data-prov] { cursor: pointer; }
.prov:hover, .prov.is-active { background: oklch(1 0 0 / 0.11); border-color: oklch(0.72 0.12 252 / 0.70); }
.prov b { font-family: var(--ff-display); font-size: 18px; display: flex; align-items: center; gap: 9px; }
.prov b svg { width: 17px; height: 17px; color: var(--accent); }
.prov span { font-family: var(--ff-mono); font-size: 11.5px; color: oklch(0.78 0.03 250); display: block; margin-top: 7px; line-height: 1.5; }
.map-ph { aspect-ratio: 1/1; border-radius: var(--radius-lg); }

/* ---------- Mapa Leaflet de Cataluña ---------- */
.cat-map-wrap { position: relative; z-index: 0; } /* contiene los z-index altos de Leaflet bajo el header */
.leaflet-cat-map { width: 100%; aspect-ratio: 4/3; border-radius: var(--radius-lg); overflow: hidden; }

/* Dark theme overrides */
.leaflet-popup-content-wrapper {
  background: var(--navy-3, #1e293b);
  color: #e2e8f0;
  border: 1px solid oklch(1 0 0 / 0.12);
  border-radius: var(--radius, 10px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  font-family: var(--ff-body, system-ui, sans-serif);
}
.leaflet-popup-tip { background: var(--navy-3, #1e293b); }
.leaflet-popup-content { margin: 14px 18px; }
.leaflet-control-attribution { background: rgba(13,27,42,0.8) !important; color: #475569 !important; font-size: 10px; }
.leaflet-control-attribution a { color: #64748b !important; }
.leaflet-control-zoom a { background: var(--navy-3, #1e293b) !important; color: #e2e8f0 !important; border-color: oklch(1 0 0 / 0.12) !important; }
.leaflet-control-zoom a:hover { background: #334155 !important; }
.lmap-title { font-size: 14px; font-weight: 600; color: var(--accent, #f97316); margin-bottom: 6px; display: flex; align-items: center; gap: 6px; }
.lmap-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.lmap-cities { font-family: var(--ff-mono, monospace); font-size: 11px; color: #94a3b8; line-height: 1.6; }

/* ---------- Contacto ---------- */
.contact { background: var(--surface-2); }
.contact-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: 48px; align-items: start; }
.contact-aside .lede { margin-top: 16px; }
.phone-hero { display: flex; align-items: center; gap: 16px; margin-top: 28px; padding: 22px 24px; background: var(--navy-2); border-radius: var(--radius); color: #fff; }
.phone-hero .ph-ico { width: 52px; height: 52px; border-radius: 13px; background: oklch(1 0 0 / 0.10); display: grid; place-items: center; color: var(--accent); flex-shrink: 0; }
.phone-hero .ph-ico svg { width: 26px; height: 26px; }
.phone-hero small { font-family: var(--ff-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: oklch(0.82 0.03 250); display: block; }
.phone-hero b { font-family: var(--ff-display); font-size: clamp(24px, 3vw, 30px); letter-spacing: -0.01em; display: block; line-height: 1.1; margin-top: 3px; }
.contact-cards { margin-top: 14px; display: grid; gap: 12px; }
.cc { display: flex; align-items: center; gap: 16px; padding: 18px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s; }
.cc:hover { border-color: var(--blue); box-shadow: var(--shadow-sm); transform: translateX(2px); }
.cc .cc-ico { width: 46px; height: 46px; border-radius: 12px; background: var(--blue-50); color: var(--blue-700); display: grid; place-items: center; flex-shrink: 0; }
.cc.cc-wa .cc-ico { background: oklch(0.93 0.10 150); color: #0e7a3d; }
.cc .cc-ico svg { width: 22px; height: 22px; }
.cc .cc-ico.cc-ico--img { background: transparent; }
.cc .cc-ico--img img { width: 46px; height: 46px; display: block; border-radius: 50%; }
.cc small { font-family: var(--ff-mono); font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); display: block; }
.cc b { font-family: var(--ff-display); font-size: 18px; }
.cc .cc-go { margin-left: auto; color: var(--muted); }
.cc .cc-go svg { width: 18px; height: 18px; }

/* form */
.form-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(26px, 3vw, 40px); box-shadow: var(--shadow); }
.form-card h3 { font-size: 24px; margin-bottom: 4px; }
.form-card .form-sub { color: var(--muted); font-size: 14.5px; margin-bottom: 24px; }
.field { margin-bottom: 16px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field label { display: block; font-size: 13.5px; font-weight: 600; margin-bottom: 7px; }
.field label .req { color: var(--accent-600); }
.field input, .field textarea, .field select { width: 100%; padding: 14px 15px; border-radius: 11px; border: 1.5px solid var(--line); background: var(--surface-2); font-size: 15px; transition: border-color 0.18s, background 0.18s, box-shadow 0.18s; }
.field textarea { resize: vertical; min-height: 110px; }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--blue); background: var(--surface); box-shadow: 0 0 0 4px var(--blue-50); }
.field.invalid input, .field.invalid textarea, .field.invalid select { border-color: oklch(0.60 0.18 25); background: oklch(0.98 0.02 25); }
.field .err { font-size: 12.5px; color: oklch(0.55 0.18 25); margin-top: 6px; display: none; font-family: var(--ff-mono); }
.field.invalid .err { display: block; }
.consent { display: flex; gap: 11px; align-items: flex-start; font-size: 13px; color: var(--muted); margin-bottom: 20px; }
.consent input { width: 18px; height: 18px; margin-top: 2px; flex-shrink: 0; accent-color: var(--blue); }
.consent a { color: var(--blue-700); text-decoration: underline; text-underline-offset: 2px; }
.form-note { display: flex; align-items: center; gap: 8px; justify-content: center; margin-top: 14px; font-size: 12.5px; color: var(--muted); font-family: var(--ff-mono); }
.form-note svg { width: 15px; height: 15px; color: #1fbb59; }
.form-success { display: none; text-align: center; padding: 30px 10px; }
.form-success.show { display: block; }
.form-success .ok-ico { width: 64px; height: 64px; border-radius: 50%; background: oklch(0.93 0.10 150); color: #0e7a3d; display: grid; place-items: center; margin: 0 auto 18px; }
.form-success .ok-ico svg { width: 34px; height: 34px; }
.form-success h3 { font-size: 24px; margin-bottom: 8px; }
.form-success p { color: var(--ink-soft); max-width: 38ch; margin: 0 auto; }

/* ---------- Footer ---------- */
.footer { background: var(--navy-3); color: oklch(0.82 0.025 250); padding-block: 58px 30px; }
.footer a:hover { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 40px; }
.footer .brand-name { color: #fff; }
.footer .brand-name span { color: oklch(0.7 0.03 250); }
.footer .logo-slot { background: oklch(1 0 0 / 0.06); border-color: oklch(1 0 0 / 0.18); color: oklch(0.7 0.02 250); }
.footer p { font-size: 14px; margin-top: 16px; max-width: 34ch; }
.footer h4 { font-family: var(--ff-mono); font-size: 11.5px; letter-spacing: 0.12em; text-transform: uppercase; color: oklch(0.66 0.03 250); margin-bottom: 16px; }
.footer-col ul { display: grid; gap: 11px; }
.footer-col a, .footer-col li { font-size: 14.5px; }
.footer-bottom { border-top: 1px solid oklch(1 0 0 / 0.10); margin-top: 44px; padding-top: 24px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 14px; font-size: 12.5px; font-family: var(--ff-mono); color: oklch(0.62 0.03 250); }
.footer-credits { margin-top: 12px; font-size: 11px; font-family: var(--ff-mono); color: oklch(0.52 0.02 250); }
.footer-credits a { color: inherit; text-decoration: none; }
.footer-credits a:hover { color: oklch(0.7 0.03 250); text-decoration: underline; }

/* ---------- WhatsApp flotante ---------- */
.wa-float { position: fixed; right: 22px; bottom: 22px; z-index: 70; width: 60px; height: 60px; border-radius: 50%; background: #25D366; color: #fff; display: grid; place-items: center; box-shadow: 0 8px 26px oklch(0.6 0.12 150 / 0.45); transition: transform 0.2s var(--ease); }
.wa-float:hover { transform: scale(1.08); }
.wa-float svg { width: 31px; height: 31px; }
.wa-float img { width: 100%; height: 100%; border-radius: 50%; display: block; }
.wa-float::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid #25D366; animation: pulse 2.4s ease-out infinite; }
@keyframes pulse { 0% { transform: scale(1); opacity: 0.6; } 100% { transform: scale(1.6); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .wa-float::after { animation: none; } }

/* ---------- Nav móvil ---------- */
.mobile-nav { display: none; }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* =========================================================================
   Responsive
   ========================================================================= */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .why-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 880px) {
  .nav, .header-cta .tel-link .tel-label, .header-cta .btn span.lbl { display: none; }
  .menu-toggle { display: inline-flex; }
  .header-cta { margin-left: auto; }
  .about-grid, .coverage-grid, .contact-grid { grid-template-columns: 1fr; gap: 38px; }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .map-ph { aspect-ratio: 16/10; }
  /* Hero split – mobile */
  .hero-split { height: auto; min-height: 100svh; }
  .hs-grid { flex-direction: column; }
  .hs-panel { flex: none; height: 22svh; min-height: 110px; }
  .hs-grid.is-ready .hs-panel:hover { flex: none; }
  .hs-brand { top: 76px; }
  .hs-info { padding: 0 14px 64px; }
  .hs-icon { font-size: 18px; margin-bottom: 4px; }
  .hs-name { font-size: 15px; }
  .hs-desc { display: none; }

  .mobile-nav { display: block; position: fixed; inset: 0; z-index: 80; background: oklch(0.20 0.045 256 / 0.55); backdrop-filter: blur(3px); opacity: 0; pointer-events: none; transition: opacity 0.25s; }
  .mobile-nav.open { opacity: 1; pointer-events: auto; }
  .mobile-nav .drawer { position: absolute; top: 0; right: 0; bottom: 0; width: min(86vw, 360px); background: var(--surface); padding: 24px; display: flex; flex-direction: column; gap: 6px; transform: translateX(100%); transition: transform 0.3s var(--ease); box-shadow: var(--shadow-lg); overflow-y: auto; }
  .mobile-nav.open .drawer { transform: none; }
  .mobile-nav .drawer .mn-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
  .mobile-nav .drawer a { padding: 14px 12px; border-radius: 11px; font-weight: 500; font-size: 17px; color: var(--ink); }
  .mobile-nav .drawer a:hover { background: var(--surface-2); }
  .mobile-nav .drawer .mn-divider { height: 1px; background: var(--line); margin: 14px 0; }
  .mobile-nav .drawer .btn { margin-top: 4px; }
}

@media (max-width: 620px) {
  .wrap { padding-inline: 20px; }
  .services-grid, .why-grid, .prov-grid, .field-row { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .stat { padding: 16px 14px; }
  .certs-inner { gap: 18px; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; }
  .wa-float { width: 56px; height: 56px; }
  .phone-hero { flex-direction: column; align-items: flex-start; }
}

/* ===== Banner de consentimiento de cookies ===== */
.cookie-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 90; background: oklch(0.20 0.04 258 / 0.97); backdrop-filter: blur(8px); border-top: 1px solid oklch(1 0 0 / 0.12); transform: translateY(110%); transition: transform 0.3s var(--ease, ease); }
.cookie-bar.is-visible { transform: translateY(0); }
.cookie-bar__inner { max-width: var(--maxw, 1200px); margin: 0 auto; padding: 16px 22px; display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.cookie-bar__text { margin: 0; flex: 1 1 320px; color: oklch(0.88 0.02 250); font-size: 13.5px; line-height: 1.55; }
.cookie-bar__text a { color: var(--accent); }
.cookie-bar__actions { display: flex; gap: 10px; flex-shrink: 0; }
.cookie-bar__actions .btn { padding: 10px 22px; font-size: 14px; }
.cookie-bar__reject { background: transparent; border: 1px solid oklch(1 0 0 / 0.3); color: #fff; }
.cookie-bar__reject:hover { background: oklch(1 0 0 / 0.1); }
@media (max-width: 620px) {
  .cookie-bar__inner { padding: 14px 18px; gap: 12px; }
  .cookie-bar__actions { width: 100%; }
  .cookie-bar__actions .btn { flex: 1; }
}

/* ==================== LANDING PAGES (servicios y zonas) ==================== */

/* Cabecera de página interior: banda navy bajo el header transparente */
.page-hero {
  background: linear-gradient(160deg, var(--navy-3) 0%, var(--navy-2) 60%, var(--navy) 100%);
  padding: 130px 0 58px; color: #fff;
}
.page-hero .h1 { font-family: var(--ff-display); font-weight: 600; letter-spacing: -0.02em; line-height: 1.1; font-size: clamp(28px, 4.2vw, 46px); margin: 14px 0 0; color: #fff; }
.page-hero .lede { color: oklch(0.86 0.03 250); max-width: 760px; margin-top: 16px; }
.page-hero .eyebrow { color: var(--accent); }
.page-hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }

/* Migas de pan */
.breadcrumbs { font-family: var(--ff-mono); font-size: 12px; letter-spacing: 0.02em; }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; }
.breadcrumbs li + li::before { content: "→"; margin-right: 6px; opacity: 0.5; }
.breadcrumbs a { color: oklch(0.80 0.04 250); }
.breadcrumbs a:hover { color: #fff; }
.breadcrumbs [aria-current="page"] { color: var(--accent); }

/* FAQ con <details> */
.faq-list { max-width: 860px; margin-top: 34px; display: grid; gap: 12px; }
.faq-item { border: 1px solid var(--line); border-radius: 14px; background: var(--surface); overflow: hidden; }
.faq-item summary { cursor: pointer; list-style: none; padding: 18px 20px; font-family: var(--ff-display); font-weight: 600; font-size: 16.5px; color: var(--ink); display: flex; justify-content: space-between; align-items: center; gap: 14px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-size: 22px; color: var(--accent); flex-shrink: 0; transition: transform 0.2s; }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item .faq-body { padding: 0 20px 18px; color: var(--muted); line-height: 1.65; }

/* Banda CTA final */
.cta-band { background: linear-gradient(160deg, var(--navy-2), var(--navy)); border-radius: 20px; padding: clamp(30px, 5vw, 54px); text-align: center; color: #fff; }
.cta-band h2 { color: #fff; font-size: clamp(22px, 3vw, 32px); margin: 0 0 10px; }
.cta-band p { color: oklch(0.85 0.03 250); margin: 0 0 22px; }
.cta-band .page-hero-cta { justify-content: center; margin-top: 0; }

/* Selector de idioma ES | CA */
.lang-switch { display: inline-flex; align-items: center; gap: 2px; font-family: var(--ff-mono); font-size: 12px; letter-spacing: 0.04em; border: 1px solid oklch(1 0 0 / 0.30); border-radius: 9px; padding: 5px 4px; }
.lang-switch a { color: oklch(1 0 0 / 0.62); padding: 2px 7px; border-radius: 6px; }
.lang-switch a.is-active { color: #fff; background: oklch(1 0 0 / 0.16); }
.header.is-stuck .lang-switch { border-color: var(--line); }
.header.is-stuck .lang-switch a { color: var(--muted); }
.header.is-stuck .lang-switch a.is-active { color: var(--ink); background: var(--surface-2); }
@media (max-width: 880px) { .header .lang-switch { display: none; } }
.drawer .lang-switch { border-color: var(--line); align-self: flex-start; }
.drawer .lang-switch a { color: var(--muted); }
.drawer .lang-switch a.is-active { color: var(--ink); background: var(--surface-2); }

/* Grid de enlaces a zonas/servicios relacionados */
.link-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-top: 30px; }
.link-card { display: block; border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; background: var(--surface); transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s; }
.link-card:hover { border-color: var(--accent); box-shadow: var(--shadow-sm); transform: translateY(-2px); }
.link-card b { display: block; font-family: var(--ff-display); font-weight: 600; color: var(--ink); margin-bottom: 4px; }
.link-card span { font-size: 13.5px; color: var(--muted); line-height: 1.5; }

/* Enlace "más sobre" en cards de servicio del index */
.svc-more { display: inline-block; margin-top: 14px; font-weight: 600; font-size: 14px; color: var(--blue-600); }
.svc-more:hover { color: var(--blue-700); text-decoration: underline; }
/* Enlaces dentro de las cards de provincia (cobertura) */
.prov span a { color: inherit; text-decoration: underline; text-decoration-color: oklch(0.7 0.02 250 / 0.5); text-underline-offset: 2px; }
.prov span a:hover { color: var(--blue-700); }
