/* ═══════════════════════════════════════════════════════
   Sol-Elec v3 — tema oscuro + efectos
   Reglas: solo transform/opacity en animaciones (GPU),
   efectos de puntero solo en (hover:hover) and (pointer:fine),
   todo desactivable con prefers-reduced-motion.
   ═══════════════════════════════════════════════════════ */
:root {
  /* Variante v4c: fondo #0A0D12, ámbar cálido #F5A623 */
  --bg: #0a0d12;
  --bg-2: #0e1218;
  --bg-3: #12171e;
  --surface: #141920;
  --surface-2: #1b212a;
  --border: #242b35;
  --border-strong: #323b47;
  --ink: #f4f4f2;
  --ink-soft: #cfd3d8;
  --muted: #9aa3ad;
  --muted-light: #6b7480;
  --accent: #f5a623;
  --accent-text: #f5a623;   /* ámbar para texto: en fondo claro se sustituye por uno más oscuro */
  --accent-2: #d98a0a;
  --accent-glow: rgba(245,166,35,0.25);
  --on-accent: #0a0d12;
  --wa: #25d366;
  --radius: 16px;
  --radius-sm: 10px;
  --max: 1200px;
  --header-h: 72px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --shadow-lg: 0 24px 70px -20px rgba(0,0,0,0.7);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 12px); }
body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: var(--ink); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--accent-text); }
img { max-width: 100%; height: auto; display: block; }
.container { width: min(var(--max), 92vw); margin-inline: auto; }
section { position: relative; padding: 88px 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

/* ───── Secciones claras: redefinen los tokens; todo lo demás hereda ───── */
.light {
  --bg: #f7f5f0;
  --bg-2: #f1ede4;
  --surface: #ffffff;
  --surface-2: #f3f0e9;
  --border: #e6e1d6;
  --border-strong: #d6cfc0;
  --ink: #14171c;
  --ink-soft: #2f353d;
  --muted: #5b6470;
  --muted-light: #7d8792;
  --accent-text: #9a5b00;  /* ámbar oscuro: 5.1:1 sobre blanco */
  --accent-glow: rgba(245,166,35,0.35);
  --shadow-lg: 0 24px 60px -24px rgba(20,23,28,0.25);
  background: var(--bg);
  color: var(--ink);
  color-scheme: light;
}
.light.alt { background: var(--bg-2); }
.light .spot { box-shadow: 0 1px 2px rgba(20,23,28,0.04); }
.light .spot::before { background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(245,166,35,0.22), transparent 45%); }
.light .dif-icon { background: rgba(245,166,35,0.18); border-color: rgba(245,166,35,0.5); color: var(--accent-text); }
.light .card-media::after { background: linear-gradient(to top, rgba(255,255,255,0.9) 0%, transparent 35%); }
.light .thumb-tag { color: #fff; }
.light .btn-outline { background: #fff; }
.light form.contacto-form input, .light form.contacto-form textarea, .light form.contacto-form select { background: #fff; }
.light .tab-btn.active { color: var(--on-accent); }
.light .stage-detail { background: #fff; }
.light .map iframe { filter: none; }

/* Fondo global: rejilla como la tarjeta + halo ámbar (sin animación) */
body::before {
  content: '';
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(900px 600px at 85% -10%, rgba(245,166,35,0.09), transparent 60%),
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px) 0 0 / 100% 56px,
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px) 0 0 / 56px 100%;
  -webkit-mask-image: linear-gradient(to bottom, #000 0, #000 70%, transparent 100%);
          mask-image: linear-gradient(to bottom, #000 0, #000 70%, transparent 100%);
}

.skip-link { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--accent); color: var(--bg); padding: 8px 14px; border-radius: 8px; font-weight: 700; }
.skip-link:focus { left: 8px; }

/* ───── Botones ───── */
.btn-primary, .btn-outline, .cta {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 0.8rem 1.35rem; border-radius: var(--radius-sm);
  font-weight: 700; font-size: 14.5px; line-height: 1;
  border: 1px solid transparent; cursor: pointer;
  position: relative; overflow: hidden; isolation: isolate;
  transition: transform 0.2s var(--ease-out), background 0.2s, color 0.2s, border-color 0.2s, box-shadow 0.25s;
  white-space: nowrap;
}
.btn-primary { background: var(--accent); color: var(--on-accent); box-shadow: 0 8px 28px -8px var(--accent-glow); }
.btn-primary:hover { color: var(--on-accent); background: #ffbd4a; transform: translateY(-2px); box-shadow: 0 14px 34px -8px rgba(245,166,35,0.45); }
.btn-outline { background: rgba(255,255,255,0.03); color: var(--ink); border-color: var(--border-strong); backdrop-filter: blur(6px); }
.btn-outline:hover { border-color: var(--accent-text); color: var(--accent-text); transform: translateY(-2px); }
.btn-outline.wa:hover { border-color: var(--wa); color: var(--wa); }
.btn-outline .ico { width: 18px; height: 18px; }
/* Brillo que barre el botón (solo escritorio con ratón) */
@media (hover: hover) and (pointer: fine) {
  .btn-primary::after {
    content: ''; position: absolute; inset: 0; z-index: -1;
    background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,0.45) 50%, transparent 70%);
    transform: translateX(-120%); transition: transform 0.7s var(--ease-out);
  }
  .btn-primary:hover::after { transform: translateX(120%); }
}

/* ───── Header: transparente sobre el hero → sólido al bajar ───── */
header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  height: var(--header-h);
  color: #fff;
  background: linear-gradient(to bottom, rgba(10,13,18,0.85), rgba(10,13,18,0));
  transition: background 0.35s, box-shadow 0.35s, backdrop-filter 0.35s;
}
header.scrolled {
  background: rgba(10,13,18,0.82);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  box-shadow: 0 1px 0 var(--border), 0 10px 30px -20px rgba(0,0,0,0.8);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 100%; gap: 1rem; }
.logo img { height: 50px; width: auto; }
nav ul { display: flex; gap: 1.6rem; list-style: none; align-items: center; }
nav a { color: #e2e8f0; font-size: 14.5px; font-weight: 500; position: relative; padding: 4px 0; }
nav a::after { content: ''; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform 0.3s var(--ease-out); }
nav a:hover::after, nav a.active::after { transform: scaleX(1); }
.cta { background: #fff; color: #0a0d12; padding: 0.65rem 1.1rem; font-size: 14px; }
.cta:hover { background: var(--accent); color: var(--on-accent); }
.cta-short { display: none; }
.menu-toggle {
  display: none; width: 42px; height: 42px; flex-shrink: 0;
  border: 1px solid var(--border-strong); background: rgba(255,255,255,0.04);
  color: #fff; border-radius: 10px; cursor: pointer; font-size: 20px; line-height: 1;
}

/* ───── HERO (estilo de la imagen OG) ───── */
.hero {
  min-height: 100svh;
  display: grid; align-items: center;
  padding: calc(var(--header-h) + 48px) 0 72px;
  overflow: hidden;
  isolation: isolate;
}
.hero-bg { position: absolute; inset: 0; z-index: -1; }
.hero-bg img {
  position: absolute; top: 0; right: 0; height: 100%; width: 64%;
  object-fit: cover; object-position: center;
  will-change: transform;
  animation: kenburns 24s ease-in-out infinite alternate;
}
@keyframes kenburns { from { transform: scale(1) translateY(0); } to { transform: scale(1.08) translateY(-1.5%); } }
.hero-bg::after {
  /* Fundido fotografía → fondo, como en la imagen */
  content: ''; position: absolute; inset: 0;
  background:
    linear-gradient(90deg, var(--bg) 0%, var(--bg) 34%, rgba(10,13,18,0.85) 44%, rgba(10,13,18,0.35) 62%, rgba(10,13,18,0.15) 100%),
    linear-gradient(to bottom, rgba(10,13,18,0.55) 0%, transparent 30%, transparent 70%, var(--bg) 100%);
}
.section-mark {
  /* Marca de agua: bombilla del logo en ámbar, como en la tarjeta (solo secciones oscuras) */
  position: absolute; right: -4vw; top: -40px; width: clamp(260px, 30vw, 460px); z-index: 0;
  opacity: 0.13; pointer-events: none;
}
.section-mark.low { top: auto; bottom: -60px; left: -3vw; right: auto; transform: scaleX(-1); opacity: 0.08; }
.proyectos > .container, .contacto > .container { position: relative; z-index: 1; }
.proyectos, .contacto { overflow: hidden; }
.hero-content { max-width: 680px; position: relative; }
/* Móvil flotante con la app (dice "domótica" sin explicarlo) */
.hero-phone {
  position: absolute; right: clamp(24px, 7vw, 120px); bottom: 9%; z-index: 2;
  width: clamp(150px, 13vw, 200px);
  padding: 8px; border-radius: 28px;
  background: #0f1319; border: 1px solid #2a323d;
  box-shadow: 0 40px 80px -20px rgba(0,0,0,0.8), 0 0 0 1px rgba(255,255,255,0.04) inset;
  animation: phoneIn 1.2s var(--ease-out) .6s both, phoneFloat 7s ease-in-out 1.8s infinite;
}
.hero-phone img { border-radius: 21px; width: 100%; aspect-ratio: 600 / 1343; object-fit: cover; object-position: top; }
.hero-phone::after { content: ''; position: absolute; top: 14px; left: 50%; width: 34%; height: 5px; margin-left: -17%; border-radius: 3px; background: #0f1319; }
@keyframes phoneIn { from { opacity: 0; transform: translateY(40px) rotate(-3deg); } to { opacity: 1; transform: none; } }
@keyframes phoneFloat { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
.hero-kicker {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 12px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent-text);
  margin-bottom: 22px;
}
.hero-kicker::before { content: ''; width: 28px; height: 2px; background: var(--accent); }
.hero-role { font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin-top: 6px; }
.hero h1 {
  font-size: clamp(36px, 5vw, 58px);
  line-height: 1.02; letter-spacing: -0.02em; font-weight: 800; margin-bottom: 22px;
}
.hero h1 .accent { color: var(--accent-text); }
.hero h1 .w { display: inline-block; }
.hero p.sub { font-size: clamp(16px, 1.4vw, 19px); color: var(--ink-soft); max-width: 54ch; margin-bottom: 30px; line-height: 1.55; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-tags { margin-top: 34px; font-size: 14px; color: var(--accent-text); letter-spacing: 0.02em; font-weight: 500; }
.hero-tags span { color: var(--muted-light); margin: 0 6px; }
.hero-anchor { margin-top: 12px; font-size: 13px; color: var(--muted); }
.scroll-hint {
  position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%);
  width: 26px; height: 42px; border: 2px solid var(--border-strong); border-radius: 14px;
}
.scroll-hint::after { content: ''; position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: var(--accent); animation: hint 1.8s ease-in-out infinite; }
@keyframes hint { 0%,100% { transform: translateY(0); opacity: 1; } 60% { transform: translateY(14px); opacity: 0; } }

/* Entrada del titular palabra a palabra (solo al cargar) */
.hero .w, .hero .fade-in { opacity: 0; transform: translateY(18px); animation: rise 0.9s var(--ease-out) forwards; }
.hero .w:nth-child(1) { animation-delay: .05s } .hero .w:nth-child(2) { animation-delay: .13s }
.hero .w:nth-child(3) { animation-delay: .21s } .hero .w:nth-child(4) { animation-delay: .29s }
.hero .w:nth-child(5) { animation-delay: .37s } .hero .w:nth-child(6) { animation-delay: .45s } .hero .w:nth-child(7) { animation-delay: .53s }
.hero .fade-in.d1 { animation-delay: .5s } .hero .fade-in.d2 { animation-delay: .62s } .hero .fade-in.d3 { animation-delay: .74s } .hero .fade-in.d4 { animation-delay: .86s }
@keyframes rise { to { opacity: 1; transform: translateY(0); } }

/* ───── Marquesina de credenciales ───── */
.trust-bar { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: rgba(255,255,255,0.015); padding: 16px 0; overflow: hidden; position: relative; }
.trust-bar::before, .trust-bar::after { content: ''; position: absolute; top: 0; bottom: 0; width: 90px; z-index: 2; pointer-events: none; }
.trust-bar::before { left: 0; background: linear-gradient(90deg, var(--bg), transparent); }
.trust-bar::after { right: 0; background: linear-gradient(-90deg, var(--bg), transparent); }
.marquee { display: flex; width: max-content; animation: marquee 38s linear infinite; }
.trust-bar:hover .marquee { animation-play-state: paused; }
.marquee-track { display: flex; align-items: center; gap: 44px; padding-right: 44px; }
@keyframes marquee { to { transform: translateX(-50%); } }
.trust-item { display: inline-flex; align-items: center; gap: 9px; font-size: 13.5px; color: var(--muted); white-space: nowrap; font-weight: 500; }
.trust-item strong { color: var(--ink); font-weight: 700; }
.trust-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted-light); font-weight: 700; }
.brand-mark { width: 8px; height: 8px; border-radius: 2px; flex-shrink: 0; box-shadow: 0 0 10px currentColor; }
.bm-control4 { background: #ef4444; color: #ef4444; } .bm-loxone { background: #84cc16; color: #84cc16; } .bm-knx { background: #2dd4bf; color: #2dd4bf; }
.bm-coeti, .bm-dgi { background: var(--accent); color: var(--accent-text); }

/* ───── Cabeceras de sección ───── */
.section-head { margin-bottom: 40px; max-width: 760px; }
.section-kicker { display: block; font-size: 12px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent-text); margin-bottom: 12px; }
.section-head h2 { font-size: clamp(28px, 3.2vw, 42px); font-weight: 800; letter-spacing: -0.02em; line-height: 1.12; }
.section-head h2 .accent { color: var(--accent-text); }
.section-head .lead { margin-top: 14px; color: var(--muted); font-size: 1.05rem; max-width: 62ch; line-height: 1.6; }

/* ───── Aparición al hacer scroll ─────
   Sin JS todo es visible. Con JS (html.js) los .reveal empiezan ocultos y entran con .in */
html.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out); }
html.js .reveal.in { opacity: 1; transform: none; }
html.js .reveal-stagger > * { opacity: 0; transform: translateY(22px); transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out); }
html.js .reveal-stagger.in > * { opacity: 1; transform: none; }
.reveal-stagger.in > :nth-child(1) { transition-delay: .00s } .reveal-stagger.in > :nth-child(2) { transition-delay: .08s }
.reveal-stagger.in > :nth-child(3) { transition-delay: .16s } .reveal-stagger.in > :nth-child(4) { transition-delay: .24s }
.reveal-stagger.in > :nth-child(5) { transition-delay: .32s } .reveal-stagger.in > :nth-child(6) { transition-delay: .40s }
.reveal-stagger.in > :nth-child(7) { transition-delay: .48s } .reveal-stagger.in > :nth-child(8) { transition-delay: .56s }

/* ───── Tarjetas con foco de luz (spotlight) ───── */
.spot {
  position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; transition: border-color 0.3s, transform 0.3s var(--ease-out), box-shadow 0.3s;
}
.spot::before {
  /* halo que sigue al ratón: --mx/--my las pone el JS solo en escritorio */
  content: ''; position: absolute; inset: 0; pointer-events: none; opacity: 0; z-index: 0;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(245,166,35,0.14), transparent 45%);
  transition: opacity 0.4s;
}
.spot > * { position: relative; z-index: 1; }
@media (hover: hover) and (pointer: fine) {
  .spot:hover { border-color: rgba(245,166,35,0.5); transform: translateY(-4px); box-shadow: 0 24px 50px -24px rgba(0,0,0,0.8), 0 0 0 1px rgba(245,166,35,0.08); }
  .spot:hover::before { opacity: 1; }
}

/* ───── POR QUÉ ───── */
.dif-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.dif-card { padding: 28px 26px 30px; }
.dif-icon { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 18px; color: var(--accent-text); background: rgba(245,166,35,0.10); border: 1px solid rgba(245,166,35,0.25); }
.dif-icon svg { width: 24px; height: 24px; }
.dif-card h3 { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.dif-card p { font-size: 15px; line-height: 1.6; color: var(--muted); }

/* Contadores */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 44px; padding-top: 34px; border-top: 1px solid var(--border); }
.stat-num { font-size: clamp(34px, 4vw, 52px); font-weight: 800; letter-spacing: -0.03em; color: var(--ink); line-height: 1; display: block; font-variant-numeric: tabular-nums; }
.stat-num .u { color: var(--accent-text); font-size: 0.55em; margin-left: 2px; }
.stat-label { font-size: 14px; color: var(--muted); margin-top: 8px; }

/* ───── SERVICIOS ───── */
.servicios { background: var(--bg-2); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.grid-services { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.card { display: flex; flex-direction: column; }
.card-media { aspect-ratio: 4 / 3; overflow: hidden; background: var(--surface-2); position: relative; }
.card-media::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, var(--surface) 0%, transparent 40%); }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s var(--ease-out); }
@media (hover: hover) { .card:hover .card-media img { transform: scale(1.06); } }
.card-body { padding: 18px 20px 20px; display: flex; flex-direction: column; flex: 1; }
.card h3 { font-size: 17.5px; font-weight: 700; margin-bottom: 8px; display: flex; align-items: center; gap: 0.55rem; }
.card .icon { width: 22px; height: 22px; color: var(--accent-text); flex-shrink: 0; }
.card .icon svg { width: 100%; height: 100%; display: block; }
.card p { color: var(--muted); font-size: 14.5px; line-height: 1.55; margin-bottom: 14px; flex: 1; }
.card details { font-size: 14px; }
.card details summary { font-weight: 600; color: var(--accent-text); cursor: pointer; list-style: none; display: inline-flex; align-items: center; gap: 0.35rem; }
.card details summary::-webkit-details-marker { display: none; }
.card details summary::after { content: '→'; transition: transform 0.25s; }
.card details[open] summary::after { transform: rotate(90deg); }
.card details > div { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); color: var(--muted); font-size: 13.5px; line-height: 1.6; }
.card details ul { margin: 6px 0 0 1.1rem; }
.card details li { margin-bottom: 3px; }
.card.card-b2b { border-color: rgba(245,166,35,0.45); }
.card-b2b-tag { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--on-accent); background: var(--accent); padding: 4px 10px; border-radius: 4px; margin-bottom: 10px; align-self: flex-start; }

/* ───── PROYECTOS ───── */
.featured-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-bottom: 56px; }
.featured-card { display: flex; flex-direction: column; }
.featured-media { aspect-ratio: 16 / 10; overflow: hidden; background: var(--surface-2); }
.featured-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s var(--ease-out); cursor: zoom-in; }
@media (hover: hover) { .featured-card:hover .featured-media img { transform: scale(1.05); } }
.featured-body { padding: 22px 24px 24px; display: flex; flex-direction: column; flex: 1; }
.featured-tag { font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent-text); margin-bottom: 8px; }
.featured-card h3 { font-size: 19px; font-weight: 700; line-height: 1.3; margin-bottom: 10px; }
.featured-card p { font-size: 14.5px; line-height: 1.6; color: var(--muted); margin-bottom: 16px; flex: 1; }
.featured-cta { color: var(--accent-text); font-size: 14px; font-weight: 600; align-self: flex-start; }
.featured-cta:hover { color: var(--ink); }
.more-obra-head { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.more-obra-head h3 { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.14em; flex-shrink: 0; }
.more-obra-line { flex: 1; height: 1px; background: var(--border); }
.thumbs-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.thumb { position: relative; overflow: hidden; border-radius: 10px; aspect-ratio: 4 / 3; background: var(--surface-2); border: 1px solid var(--border); }
.thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease-out); cursor: zoom-in; }
@media (hover: hover) { .thumb:hover img { transform: scale(1.07); } .thumb:hover .thumb-tag { color: var(--accent-text); } }
.thumb-tag { position: absolute; left: 0; right: 0; bottom: 0; font-size: 11.5px; font-weight: 600; color: #fff; padding: 22px 10px 8px; background: linear-gradient(to top, rgba(0,0,0,0.75), transparent); letter-spacing: 0.02em; transition: color 0.2s; }

/* ───── QUIÉNES SOMOS ───── */
.about .cols { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.about p { color: var(--muted); font-size: 1.02rem; line-height: 1.7; margin-bottom: 14px; }
.about p strong { color: var(--ink); }
.team-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 26px; padding-top: 24px; border-top: 1px solid var(--border); }
.team-member { display: flex; flex-direction: column; gap: 4px; }
.team-member-name { font-size: 15px; font-weight: 700; }
.team-member-role { font-size: 13px; color: var(--muted); line-height: 1.45; }
.photo-frame { position: relative; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-lg); border: 1px solid var(--border); }
.photo-frame::after { content: ''; position: absolute; inset: 0; background: linear-gradient(135deg, rgba(245,166,35,0.12), transparent 50%); pointer-events: none; }
.photo-frame img { width: 100%; }

/* ───── SHOWROOM ───── */
.showroom { background: var(--bg-2); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.showroom-stage { position: relative; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-lg); background: var(--surface); border: 1px solid var(--border); scroll-margin-top: 90px; }
.stage-photo { width: 100%; height: auto; display: block; }
.stage-detail { position: absolute; inset: 0; background: var(--surface); padding: clamp(20px, 3vw, 40px) clamp(22px, 3.5vw, 48px); display: none; z-index: 2; overflow: auto; animation: detailIn 0.35s var(--ease-out); }
.stage-detail.active { display: block; }
.stage-detail[hidden] { display: none; }
@keyframes detailIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.stage-close { position: absolute; top: 14px; right: 14px; width: 34px; height: 34px; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--border-strong); cursor: pointer; font-size: 18px; line-height: 1; color: var(--ink); z-index: 3; display: flex; align-items: center; justify-content: center; padding: 0; transition: background 0.2s, color 0.2s; }
.stage-close:hover { background: var(--accent); color: var(--on-accent); }
.detail-content { display: grid; grid-template-columns: 1fr 1.05fr; gap: clamp(18px, 3vw, 40px); height: 100%; align-items: center; }
.detail-tag { display: inline-block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.14em; color: var(--accent-text); margin-bottom: 10px; }
.stage-detail h3 { font-size: clamp(19px, 2.1vw, 27px); line-height: 1.22; font-weight: 700; margin-bottom: 12px; }
.stage-detail .detail-text p { font-size: clamp(13.5px, 1vw, 15px); line-height: 1.6; color: var(--muted); margin-bottom: 10px; }
.detail-screens { display: grid; gap: 12px; justify-self: center; align-self: center; }
.detail-screens.cols-1 { grid-template-columns: 1fr; max-width: 300px; }
.detail-screens.cols-2 { grid-template-columns: 1fr 1fr; max-width: 520px; }
.detail-screens img { width: 100%; border-radius: 14px; aspect-ratio: 600 / 1075; object-fit: cover; object-position: top center; border: 1px solid var(--border-strong); background: var(--surface-2); cursor: zoom-in; transition: transform 0.25s var(--ease-out); box-shadow: 0 10px 30px rgba(0,0,0,0.4); }
@media (hover: hover) { .detail-screens img:hover { transform: translateY(-4px) scale(1.02); } }
.showroom-tabs { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; margin-top: 14px; }
.tab-btn { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 15px 8px 13px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; cursor: pointer; font-family: inherit; font-size: 13px; font-weight: 600; color: var(--ink); transition: background 0.25s, border-color 0.25s, color 0.25s, transform 0.25s var(--ease-out), box-shadow 0.25s; }
.tab-btn svg { width: 22px; height: 22px; color: var(--muted); transition: color 0.2s; }
@media (hover: hover) { .tab-btn:hover { border-color: var(--accent-text); transform: translateY(-2px); } .tab-btn:hover svg { color: var(--accent-text); } }
.tab-btn.active { background: var(--accent); border-color: var(--accent-text); color: var(--on-accent); box-shadow: 0 10px 30px -10px var(--accent-glow); }
.tab-btn.active svg { color: var(--on-accent); }
.center { text-align: center; margin-top: 32px; }

/* ───── Lightbox ───── */
.lightbox { position: fixed; inset: 0; background: rgba(4,8,12,0.94); display: none; flex-direction: column; align-items: center; justify-content: center; gap: 18px; z-index: 1000; padding: 60px 24px 40px; cursor: zoom-out; animation: fadeIn 0.2s ease; }
.lightbox.active { display: flex; }
.lightbox img { max-width: 92vw; max-height: 78vh; border-radius: 12px; box-shadow: 0 30px 80px rgba(0,0,0,0.7); cursor: default; animation: zoomIn 0.3s var(--ease-out); }
@keyframes zoomIn { from { transform: scale(0.92); opacity: 0; } to { transform: none; opacity: 1; } }
.lightbox-caption { max-width: 720px; color: #fff; font-size: 14.5px; line-height: 1.55; text-align: center; padding: 0 16px; margin: 0; }
.lightbox-caption:empty { display: none; }
.lightbox-caption strong { color: var(--accent-text); font-weight: 700; display: block; font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 6px; }
.lightbox-close { position: absolute; top: 20px; right: 20px; width: 42px; height: 42px; border-radius: 50%; background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2); color: #fff; font-size: 22px; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.lightbox-close:hover { background: rgba(255,255,255,0.22); }
@keyframes fadeIn { from { opacity: 0 } to { opacity: 1 } }

/* ───── UBICACIÓN ───── */
.location .cols { display: grid; grid-template-columns: 1fr 1.2fr; gap: 28px; align-items: stretch; }
.location-info { padding: 28px; }
.location-info h3 { font-size: 20px; margin-bottom: 4px; }
.location-info .addr { color: var(--muted); margin-bottom: 16px; font-size: 14.5px; line-height: 1.5; }
.location-info dl { display: grid; grid-template-columns: max-content 1fr; gap: 8px 18px; font-size: 14px; }
.location-info dt { font-weight: 600; }
.location-info dd { color: var(--muted); }
.location-info .btn-primary { margin-top: 18px; }
.map { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); min-height: 320px; background: var(--surface); }
.map iframe { width: 100%; height: 100%; min-height: 320px; border: 0; display: block; filter: invert(0.92) hue-rotate(180deg) saturate(0.7); }
.map-placeholder { height: 100%; min-height: 320px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center; padding: 24px; color: var(--muted); background: radial-gradient(circle at 50% 40%, rgba(245,166,35,0.10), transparent 60%); }
.map-placeholder svg { width: 40px; height: 40px; color: var(--accent-text); }
.map-placeholder p { font-size: 14.5px; line-height: 1.5; }
.map-placeholder p strong { color: var(--ink); }
.map-placeholder small { font-size: 12px; color: var(--muted-light); max-width: 34ch; }

/* ───── CONTACTO ───── */
.contacto { background: var(--bg-2); border-top: 1px solid var(--border); }
.contacto .cols { display: grid; grid-template-columns: 1fr 1.2fr; gap: 48px; align-items: start; }
.contacto-info h3 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted-light); margin-top: 20px; margin-bottom: 4px; }
.contacto-info h3:first-child { margin-top: 0; }
.contacto-info p, .contacto-info a { color: var(--ink-soft); font-size: 16px; line-height: 1.55; }
.contacto-info a:hover { color: var(--accent-text); }
form.contacto-form { display: flex; flex-direction: column; gap: 12px; padding: 26px; }
form.contacto-form input, form.contacto-form textarea, form.contacto-form select {
  font-family: inherit; font-size: 15px; padding: 12px 14px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  background: var(--bg); color: var(--ink); outline: none; transition: border-color 0.2s, box-shadow 0.2s; width: 100%;
}
form.contacto-form input::placeholder, form.contacto-form textarea::placeholder { color: var(--muted-light); }
form.contacto-form input:focus, form.contacto-form textarea:focus, form.contacto-form select:focus { border-color: var(--accent-text); box-shadow: 0 0 0 3px var(--accent-glow); }
form.contacto-form textarea { resize: vertical; min-height: 110px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field { position: relative; }
.field label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; color: var(--muted); line-height: 1.45; cursor: pointer; }
form.contacto-form .consent input { width: 18px; height: 18px; padding: 0; margin-top: 2px; flex-shrink: 0; accent-color: var(--accent-text); }
.consent a { color: var(--ink); text-decoration: underline; }
form.contacto-form button { width: fit-content; }
form.contacto-form button[disabled] { opacity: 0.6; cursor: wait; }
.form-note { font-size: 12.5px; color: var(--muted-light); }
.form-status { font-size: 14px; font-weight: 600; margin: 0; }
.form-status:empty { display: none; }
.form-status.ok { color: #34d399; }
.form-status.error { color: #f87171; }

/* ───── FOOTER ───── */
footer { background: #06080b; color: var(--muted); padding: 48px 0 26px; border-top: 1px solid var(--border); }
footer .cols { display: grid; grid-template-columns: 1.2fr 1fr 1fr 1fr; gap: 28px; margin-bottom: 30px; }
footer img.logo-foot { height: 44px; width: auto; margin-bottom: 12px; }
footer p { font-size: 13.5px; line-height: 1.55; max-width: 32ch; }
footer h3 { font-size: 11px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 12px; }
footer a { display: block; font-size: 13.5px; color: var(--muted); padding: 3px 0; }
footer a:hover { color: var(--accent-text); }
footer .legal { border-top: 1px solid var(--border); padding-top: 16px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; font-size: 12px; color: #8494a8; }
footer .legal a { display: inline; padding: 0; color: var(--muted); }

/* ───── WhatsApp flotante (escritorio) y barra inferior (móvil) ───── */
.wa-float { position: fixed; bottom: 22px; right: 22px; width: 56px; height: 56px; background: var(--wa); border-radius: 50%; display: flex; align-items: center; justify-content: center; box-shadow: 0 10px 30px rgba(37,211,102,0.35); z-index: 90; transition: transform 0.25s var(--ease-out); }
.wa-float::before { content: ''; position: absolute; inset: -6px; border-radius: 50%; border: 2px solid rgba(37,211,102,0.5); animation: pulse 2.4s ease-out infinite; }
@keyframes pulse { 0% { transform: scale(0.85); opacity: 1; } 100% { transform: scale(1.35); opacity: 0; } }
.wa-float:hover { transform: scale(1.08); }
.wa-float svg { width: 28px; height: 28px; fill: #fff; }
.mobile-bar { display: none; }

/* ───── RESPONSIVE ───── */
@media (max-width: 980px) {
  section { padding: 64px 0; }
  /* Móvil: la foto ocupa la parte alta y se funde hacia el texto (sin Ken Burns ni parallax) */
  .hero { min-height: auto; padding: calc(var(--header-h) + 34vh) 0 56px; }
  .hero-bg img { width: 100%; height: 72%; opacity: 0.95; animation: none; object-position: center 40%; }
  .hero-bg::after { background: linear-gradient(to bottom, rgba(10,13,18,0.55) 0%, rgba(10,13,18,0.05) 18%, rgba(10,13,18,0.55) 42%, var(--bg) 62%); }
  .hero-kicker { font-size: 11px; letter-spacing: 0.12em; }
  .grid-services { grid-template-columns: repeat(2, 1fr); }
  .about .cols, .location .cols, .contacto .cols { grid-template-columns: 1fr; gap: 32px; }
  .showroom-tabs { grid-template-columns: repeat(3, 1fr); }
  .detail-content { grid-template-columns: 1fr; gap: 16px; align-items: start; }
  .showroom-stage.has-detail .stage-photo { display: none; }
  .stage-detail.active { position: relative; inset: auto; overflow: visible; }
  .detail-screens.cols-2 { max-width: 420px; justify-self: center; }
  .detail-screens.cols-1 { max-width: 260px; justify-self: center; }
  .featured-grid { grid-template-columns: 1fr; }
  .thumbs-grid { grid-template-columns: repeat(3, 1fr); }
  footer .cols { grid-template-columns: 1fr 1fr; }
  .team-list { grid-template-columns: 1fr 1fr; }
  .scroll-hint { display: none; }
  .hero-phone { display: none; }
  .section-mark { width: 50vw; right: -14vw; top: -20px; opacity: 0.09; }
}
@media (max-width: 720px) {
  :root { --header-h: 64px; }
  .logo img { height: 42px; }
  .grid-services, .dif-grid, .team-list, .form-row, footer .cols { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .stat-label { font-size: 12.5px; }
  nav ul { display: none; }
  .menu-toggle { display: flex; align-items: center; justify-content: center; }
  nav.open ul {
    display: flex; flex-direction: column; position: absolute; top: var(--header-h); left: 0; right: 0;
    background: rgba(10,13,18,0.96); backdrop-filter: blur(12px); padding: 18px 24px 22px; gap: 4px; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  }
  nav.open ul a { display: block; padding: 12px 0; font-size: 17px; border-bottom: 1px solid var(--border); }
  nav.open ul li:last-child a { border-bottom: 0; }
  .cta-long { display: none; } .cta-short { display: inline; }
  .cta { padding: 0.6rem 0.9rem; }
  .hero h1 { font-size: clamp(34px, 10vw, 44px); }
  .hero-tags { font-size: 13px; }
  .hero-kicker { font-size: 11px; letter-spacing: 0.12em; }
  .thumbs-grid { grid-template-columns: repeat(2, 1fr); }
  .showroom-tabs { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .tab-btn { font-size: 12px; padding: 12px 6px; }
  /* En móvil el botón flotante se sustituye por una barra de acciones inferior */
  .wa-float { display: none; }
  .mobile-bar {
    display: grid; grid-template-columns: 1fr 1fr 1.3fr; gap: 8px;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
    background: rgba(10,13,18,0.92); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid var(--border);
    transform: translateY(110%); transition: transform 0.35s var(--ease-out);
  }
  .mobile-bar.show { transform: none; }
  .mobile-bar a { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 12px 8px; border-radius: 10px; font-size: 13.5px; font-weight: 700; border: 1px solid var(--border-strong); color: var(--ink); background: rgba(255,255,255,0.03); }
  .mobile-bar a svg { width: 18px; height: 18px; flex-shrink: 0; }
  .mobile-bar a.wa { border-color: rgba(37,211,102,0.5); color: var(--wa); }
  .mobile-bar a.wa svg { fill: var(--wa); }
  .mobile-bar a.go { background: var(--accent); color: var(--on-accent); border-color: var(--accent-text); }
  body { padding-bottom: 0; }
  .contacto { padding-bottom: 96px; }
}
@media (max-width: 400px) {
  .showroom-tabs { grid-template-columns: repeat(2, 1fr); }
}

/* ───── Movimiento reducido: todo estático ───── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-bg img, .scroll-hint::after, .marquee, .wa-float::before { animation: none !important; }
  .hero .w, .hero .fade-in { opacity: 1; transform: none; animation: none; }
  html.js .reveal, html.js .reveal-stagger > * { opacity: 1; transform: none; transition: none; }
  .marquee { flex-wrap: wrap; width: 100%; justify-content: center; }
  .marquee-track:nth-child(2) { display: none; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
