/* ==========================================================
   DOMO DOMÓTICA — Landing Page (versión sobria / fondos claros)
   Mobile First · Paleta: #111318 / #FFFFFF / #E62E2D / #7A1211
   ========================================================== */

/* ---------- Tipografía local para títulos ---------- */
@font-face {
  font-family: 'Outfit';
  src: url('elementos/Outfit-bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ---------- Variables y reset ---------- */
:root {
  --black: #111318;
  --white: #ffffff;
  --bg-alt: #f8f9fa;
  --red: #e62e2d;
  --red-dark: #7a1211;
  --text: #3a3f4a;
  --muted: #6b7180;
  --line: #e4e7eb;

  --shadow-soft: 0 6px 24px rgba(17, 19, 24, .08);
  --header-h: 76px;        /* altura actual (cambia al hacer scroll) */
  --header-full: 76px;     /* altura original, para el espaciado del hero */
  --ease: cubic-bezier(.25, .46, .45, .94);
  --font-title: 'Outfit', 'Poppins', system-ui, sans-serif;
  --font-body: 'Poppins', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

/* Esquinas rectas en todo el sitio */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; border-radius: 0; }

html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--white);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
ul { list-style: none; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
input, textarea { -webkit-appearance: none; appearance: none; }

.container { width: 100%; max-width: 1200px; margin-inline: auto; padding-inline: 20px; }
.section { padding-block: 72px; }
.section--alt { background: var(--bg-alt); }

/* Títulos con Outfit Bold */
h1, h2, h3 {
  font-family: var(--font-title);
  font-weight: 700;
  line-height: 1.15;
  color: var(--black);
  letter-spacing: -.01em;
}
h2 { font-size: clamp(1.7rem, 4.2vw, 2.5rem); margin-bottom: 18px; }
h3 { font-size: 1.25rem; }

.eyebrow {
  display: inline-block;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 14px;
}
.accent { color: var(--red); }
.center { text-align: center; }

.section-head { max-width: 720px; margin: 0 auto 48px; }
.section-head p { color: var(--muted); }

:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  font-size: .92rem;
  font-weight: 600;
  letter-spacing: .02em;
  border: 2px solid transparent;
  transition: transform .25s var(--ease), background-color .25s, color .25s, border-color .25s;
}
.btn:hover { transform: translateY(-2px); }

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

.btn-dark { background: var(--black); color: var(--white); }
.btn-dark:hover { background: var(--red-dark); }

.btn-outline { border-color: var(--white); color: var(--white); background: transparent; }
.btn-outline:hover { background: var(--white); color: var(--black); }

.btn-block { width: 100%; }

/* ---------- Header (blanco) ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--header-h);
  z-index: 100;
  display: flex;
  align-items: center;
  background: var(--black);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  transition: height .3s var(--ease), transform .35s var(--ease), box-shadow .3s;
}
.site-header.is-hidden { transform: translateY(-100%); }
.site-header.scrolled { box-shadow: 0 6px 24px rgba(0, 0, 0, .35); }

.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; }

.logo { display: inline-flex; align-items: center; }
.logo img { height: 38px; width: auto; transition: height .3s var(--ease); }
html.is-scrolled { --header-h: 62px; }
html.is-scrolled .logo img { height: 32px; }

/* Navegación móvil */
.main-nav {
  position: fixed;
  top: var(--header-h);
  left: 0;
  right: 0;
  background: var(--black);
  padding: 16px 20px 28px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  border-bottom: 3px solid var(--red);
  box-shadow: var(--shadow-soft);
  transform: translateY(-12px);
  opacity: 0;
  visibility: hidden;
  transition: transform .3s var(--ease), opacity .3s, visibility .3s;
}
.main-nav.open { transform: translateY(0); opacity: 1; visibility: visible; }
.main-nav ul { display: flex; flex-direction: column; }
.nav-link {
  position: relative;
  display: block;
  padding: 13px 0;
  border-bottom: 1px solid rgba(255, 255, 255, .12);
  color: var(--white);
  font-weight: 500;
  transition: color .25s;
}
.nav-link:hover, .nav-link.active { color: var(--red); }

.header-cta { display: none; }

/* Hamburguesa */
.menu-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
}
.menu-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--white);
  transition: transform .3s var(--ease), opacity .2s;
}
.menu-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.open span:nth-child(2) { opacity: 0; }
.menu-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero (se mantiene oscuro) ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  color: var(--white);
  padding: calc(var(--header-full) + 40px) 0 150px;
  overflow: hidden;
  background: var(--black);
}
.hero-bg { position: absolute; inset: 0; background-size: cover; background-position: center; }
.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(17, 19, 24, .92) 0%, rgba(17, 19, 24, .7) 55%, rgba(17, 19, 24, .35) 100%),
    linear-gradient(0deg, rgba(17, 19, 24, .85) 0%, transparent 40%);
}
.hero-content { position: relative; z-index: 2; }
.hero-content > * { max-width: 720px; }

.tag {
  display: block;
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .85);
  margin-bottom: 16px;
}

.hero h1 {
  font-size: clamp(2.2rem, 7vw, 4.2rem);
  color: var(--white);
  margin-bottom: 22px;
}
.hero-lead {
  font-size: clamp(1rem, 2.2vw, 1.15rem);
  color: rgba(255, 255, 255, .82);
  margin-bottom: 36px;
  max-width: 560px;
  padding-left: 18px;
  border-left: 4px solid var(--red);
}
.hero-actions { display: flex; flex-direction: column; gap: 14px; }

/* ---------- Pilares (tarjetas) ---------- */
.pillars { position: relative; z-index: 5; margin-top: -90px; padding-bottom: 8px; }
.pillars-grid { display: grid; gap: 20px; }

.pillar-card {
  background: var(--white);
  padding: 32px 28px;
  border: 1px solid var(--line);
  border-top: 3px solid var(--black);
  box-shadow: var(--shadow-soft);
  transition: transform .25s var(--ease), border-color .25s;
}
.pillar-card:hover { transform: translateY(-3px); border-top-color: var(--red); }
.pillar-card p { color: var(--muted); font-size: .95rem; margin-top: 10px; }

.pillar-card--accent { background: var(--red); border-color: var(--red); border-top-color: var(--red-dark); }
.pillar-card--accent h3 { color: var(--white); }
.pillar-card--accent p { color: rgba(255, 255, 255, .9); }
.pillar-card--accent .icon-box { background: rgba(255, 255, 255, .18); color: var(--white); }
.pillar-card--accent:hover { border-top-color: var(--black); }

.icon-box {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  background: rgba(230, 46, 45, .08);
  color: var(--red);
  margin-bottom: 20px;
}
.icon-box svg { width: 26px; height: 26px; }

/* ---------- Familias vs Arquitectos ---------- */
.audience-grid { display: grid; gap: 28px; }

.audience-card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--line);
  border-top: 4px solid var(--red);
  box-shadow: var(--shadow-soft);
  transition: transform .25s var(--ease);
}
.audience-card:hover { transform: translateY(-3px); }
.audience-card:nth-child(2) { border-top-color: var(--black); }

.audience-img { aspect-ratio: 16 / 9; overflow: hidden; background: var(--bg-alt); }
.audience-img img { width: 100%; height: 100%; object-fit: cover; }

.audience-body { padding: 32px 26px 36px; display: flex; flex-direction: column; flex: 1; }
.audience-body h3 { font-size: 1.5rem; margin: 14px 0 10px; }
.audience-intro { color: var(--muted); margin-bottom: 22px; }

.badge {
  align-self: flex-start;
  padding: 6px 12px;
  background: var(--red);
  color: var(--white);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.badge--dark { background: var(--black); }

.benefit-list { display: grid; gap: 16px; margin-bottom: 30px; flex: 1; align-content: start; }
.benefit-list li { position: relative; padding-left: 34px; display: flex; flex-direction: column; }
.benefit-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 3px;
  width: 20px;
  height: 20px;
  background: var(--red) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='square'%3E%3Cpath d='m5 12 5 5 9-10'/%3E%3C/svg%3E") center/12px no-repeat;
}
.audience-card:nth-child(2) .benefit-list li::before { background-color: var(--black); }
.benefit-list strong { color: var(--black); font-weight: 600; font-size: .98rem; }
.benefit-list span { color: var(--muted); font-size: .9rem; line-height: 1.55; }

.audience-body .btn { align-self: flex-start; }

/* ---------- Sobre Nosotros ---------- */
.about-grid { display: grid; gap: 56px; align-items: center; }
.about-text p { color: var(--muted); margin-bottom: 16px; }

.check-list { margin: 22px 0 32px; display: grid; gap: 10px; }
.check-list li { position: relative; padding-left: 32px; font-weight: 500; color: var(--black); }
.check-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 4px;
  width: 20px;
  height: 20px;
  background: var(--red) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='square'%3E%3Cpath d='m5 12 5 5 9-10'/%3E%3C/svg%3E") center/12px no-repeat;
}

.about-visual { position: relative; padding-bottom: 60px; }
.about-img { aspect-ratio: 4 / 4.4; overflow: hidden; background: var(--bg-alt); box-shadow: var(--shadow-soft); }
.about-img img { width: 100%; height: 100%; object-fit: cover; }


.mini-cards { position: absolute; left: 16px; right: 16px; bottom: 0; display: flex; gap: 14px; }
.mini-card {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--white);
  color: var(--black);
  padding: 16px 18px;
  font-weight: 600;
  font-size: .92rem;
  border: 1px solid var(--line);
  border-left: 3px solid var(--red);
  box-shadow: var(--shadow-soft);
  transition: transform .25s var(--ease);
}
.mini-card:hover { transform: translateY(-3px); }
.mini-card svg { width: 24px; height: 24px; color: var(--red); flex-shrink: 0; }

/* ---------- Video ---------- */
.video-player {
  position: relative;
  max-width: 1000px;
  margin: 0 auto;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--bg-alt);
  box-shadow: var(--shadow-soft);
}
.video-player img { width: 100%; height: 100%; object-fit: cover; }
.video-shade { position: absolute; inset: 0; background: rgba(17, 19, 24, .28); }
.video-player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 80px;
  height: 80px;
  margin: -40px 0 0 -40px;
  display: grid;
  place-items: center;
  background: var(--red);
  color: var(--white);
  transition: background-color .25s, transform .25s var(--ease);
}
.play-btn svg { width: 32px; height: 32px; margin-left: 3px; }
.play-btn:hover { background: var(--red-dark); transform: scale(1.05); }

/* ---------- Soluciones ---------- */
.solutions-grid { display: grid; gap: 24px; }

.solution-card {
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
  transition: transform .25s var(--ease), border-color .25s;
}
.solution-card:hover { transform: translateY(-3px); border-color: var(--red); }

.solution-img { aspect-ratio: 16 / 10; overflow: hidden; background: var(--bg-alt); }
.solution-img img { width: 100%; height: 100%; object-fit: cover; }

.solution-body { padding: 26px 24px 28px; }
.solution-body p { color: var(--muted); font-size: .94rem; margin: 10px 0 18px; }

.icon-sm {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  margin-top: -50px;
  margin-bottom: 16px;
  position: relative;
  background: var(--red);
  color: var(--white);
}
.icon-sm svg { width: 22px; height: 22px; }

.card-link { display: inline-flex; gap: 8px; align-items: center; font-weight: 600; font-size: .9rem; color: var(--red); transition: color .25s; }
.card-link span { transition: transform .25s var(--ease); }
.card-link:hover { color: var(--red-dark); }
.card-link:hover span { transform: translateX(4px); }

/* ---------- Cobertura y garantía ---------- */
.coverage-grid { display: grid; gap: 48px; align-items: center; }

.coverage-visual { position: relative; padding-bottom: 28px; }
.coverage-visual img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--white); box-shadow: var(--shadow-soft); }
.coverage-badge {
  position: absolute;
  left: 20px;
  bottom: 0;
  background: var(--black);
  color: var(--white);
  padding: 16px 22px;
  border-left: 4px solid var(--red);
  box-shadow: var(--shadow-soft);
}
.coverage-badge strong { display: block; font-family: var(--font-title); font-size: 1.15rem; }
.coverage-badge span { font-size: .82rem; opacity: .8; }

.coverage-text > p { color: var(--muted); margin-bottom: 26px; }

.locality-grid { display: grid; grid-template-columns: 1fr; gap: 12px; margin-bottom: 28px; }
.locality-grid li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--white);
  border: 1px solid var(--line);
  font-weight: 600;
  color: var(--black);
  transition: border-color .25s, transform .25s var(--ease);
}
.locality-grid li:hover { border-color: var(--red); transform: translateY(-2px); }
.locality-grid svg { width: 22px; height: 22px; color: var(--red); flex-shrink: 0; }

.guarantee-list { display: grid; gap: 14px; }
.guarantee-list li { display: flex; flex-direction: column; padding-left: 16px; border-left: 3px solid var(--red); }
.guarantee-list strong { color: var(--black); font-weight: 600; }
.guarantee-list span { color: var(--muted); font-size: .92rem; }

/* ---------- FAQ (acordeón) ---------- */
.faq-inner { max-width: 840px; }
.faq-list { border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item h3 { font-size: inherit; }

.faq-q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 4px;
  text-align: left;
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--black);
  transition: color .25s;
}
.faq-q:hover, .faq-q[aria-expanded="true"] { color: var(--red); }

/* Icono + / − */
.faq-q i { position: relative; width: 16px; height: 16px; flex-shrink: 0; }
.faq-q i::before, .faq-q i::after {
  content: '';
  position: absolute;
  background: currentColor;
  top: 50%;
  left: 0;
  width: 100%;
  height: 2px;
  margin-top: -1px;
  transition: transform .3s var(--ease);
}
.faq-q i::after { transform: rotate(90deg); }
.faq-q[aria-expanded="true"] i::after { transform: rotate(0); }

.faq-panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .35s var(--ease); }
.faq-panel > div { overflow: hidden; }
.faq-panel p { padding: 0 4px 24px; color: var(--muted); max-width: 720px; }
.faq-item.open .faq-panel { grid-template-rows: 1fr; }

/* ---------- Contacto ---------- */
.contact-grid { display: grid; gap: 48px; }
.contact-info > p { color: var(--muted); max-width: 460px; }

.contact-list { margin-top: 32px; display: grid; gap: 18px; }
.contact-list li { display: flex; flex-direction: column; padding-left: 18px; border-left: 3px solid var(--red); }
.contact-list strong { font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.contact-list a, .contact-list span { font-weight: 500; color: var(--black); transition: color .25s; }
.contact-list a:hover { color: var(--red); }

.contact-form {
  background: var(--white);
  padding: 32px 24px;
  display: grid;
  gap: 18px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
}

.profile-select { border: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.profile-select legend { font-size: .85rem; font-weight: 600; margin-bottom: 10px; color: var(--black); }
.profile-select label { position: relative; cursor: pointer; }
.profile-select input { position: absolute; opacity: 0; inset: 0; }
.profile-select span {
  display: block;
  text-align: center;
  padding: 13px 10px;
  border: 2px solid var(--line);
  font-weight: 600;
  font-size: .92rem;
  transition: background-color .25s, border-color .25s, color .25s;
}
.profile-select label:hover span { border-color: var(--red); }
.profile-select input:checked + span { background: var(--red); border-color: var(--red); color: var(--white); }
.profile-select input:focus-visible + span { outline: 2px solid var(--black); outline-offset: 2px; }

.field { display: grid; gap: 7px; }
.field-row { display: grid; gap: 18px; }
.field label { font-size: .85rem; font-weight: 600; color: var(--black); }
.field input, .field textarea {
  width: 100%;
  padding: 14px 16px;
  font: inherit;
  font-size: .95rem;
  color: var(--text);
  background: var(--bg-alt);
  border: 2px solid var(--line);
  transition: border-color .25s, background-color .25s;
  resize: vertical;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--red); background: var(--white); }
.field.invalid input, .field.invalid textarea { border-color: var(--red); background: #fff7f7; }

.form-status { min-height: 1.4em; font-size: .9rem; text-align: center; font-weight: 500; }
.form-status.ok { color: #1f7a45; }
.form-status.error { color: var(--red); }

/* ---------- Footer (claro) ---------- */
.site-footer { background: var(--white); color: var(--muted); border-top: 1px solid var(--line); padding-top: 64px; }
.footer-grid { display: grid; gap: 40px; padding-bottom: 48px; }
.logo-footer img { height: 44px; width: auto; }
.footer-brand p { margin-top: 18px; max-width: 320px; font-size: .92rem; }
.site-footer h4 { font-family: var(--font-title); font-weight: 700; color: var(--black); font-size: 1.05rem; margin-bottom: 18px; }
.footer-nav ul { display: grid; gap: 10px; font-size: .92rem; }
.footer-nav a, .footer-bottom a { transition: color .25s; }
.footer-nav a:hover, .footer-bottom a:hover { color: var(--red); }

.social-links { display: flex; gap: 12px; }
.social-links a {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  color: var(--black);
  transition: background-color .25s, border-color .25s, color .25s, transform .25s var(--ease);
}
.social-links a:hover { background: var(--red); border-color: var(--red); color: var(--white); transform: translateY(-2px); }
.social-links svg { width: 20px; height: 20px; }

.footer-bottom {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-block: 24px;
  border-top: 1px solid var(--line);
  font-size: .85rem;
}

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

/* ---------- Select del formulario ---------- */
.field select {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  padding: 14px 44px 14px 16px;
  font: inherit;
  font-size: .95rem;
  color: var(--text);
  background: var(--bg-alt) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23111318' stroke-width='2.5' stroke-linecap='square'%3E%3Cpath d='m5 9 7 7 7-7'/%3E%3C/svg%3E") right 16px center / 14px no-repeat;
  border: 2px solid var(--line);
  cursor: pointer;
  transition: border-color .25s, background-color .25s;
}
.field select:focus { outline: none; border-color: var(--red); background-color: var(--white); }
.field.invalid select { border-color: var(--red); background-color: #fff7f7; }

/* ---------- Tecnologías y ecosistemas ---------- */
.tech-grid { display: grid; gap: 20px; }
.tech-card {
  background: var(--white);
  padding: 32px 26px;
  border: 1px solid var(--line);
  border-top: 3px solid var(--black);
  box-shadow: var(--shadow-soft);
  transition: opacity .7s var(--ease), transform .25s var(--ease), border-color .25s;
}
.tech-card.visible { transition-delay: 0s; }
.tech-card:hover { transform: translateY(-3px); border-top-color: var(--red); }
.tech-card p { color: var(--muted); font-size: .94rem; margin-top: 10px; }

.compat-strip { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 40px; }
.compat-strip li {
  padding: 10px 18px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--red);
  background: var(--white);
  color: var(--black);
  font-weight: 600;
  font-size: .85rem;
  letter-spacing: .02em;
}

/* ---------- Beneficios de invertir ---------- */
.benefits { border-top: 1px solid var(--line); }
.benefits-grid { display: grid; gap: 20px; margin-bottom: 48px; }
.benefit-card {
  position: relative;
  padding: 36px 28px 32px;
  background: var(--white);
  border: 1px solid var(--line);
  border-left: 4px solid var(--red);
  box-shadow: var(--shadow-soft);
}
.benefit-num { display: block; font-family: var(--font-title); font-weight: 700; font-size: 2.6rem; line-height: 1; color: var(--red); margin-bottom: 14px; }
.benefit-card p { color: var(--muted); font-size: .95rem; margin-top: 10px; }

.compare { overflow-x: auto; border: 1px solid var(--line); box-shadow: var(--shadow-soft); background: var(--white); }
.compare table { width: 100%; min-width: 620px; border-collapse: collapse; text-align: left; font-size: .93rem; }
.compare th, .compare td { padding: 16px 20px; border-bottom: 1px solid var(--line); vertical-align: top; }
.compare thead th {
  font-family: var(--font-title);
  font-size: 1rem;
  color: var(--white);
  background: var(--black);
  border-bottom: 0;
}
.compare thead th.is-domo { background: var(--red); }
.compare tbody th { color: var(--black); font-weight: 600; width: 28%; }
.compare tbody td { color: var(--muted); }
.compare tbody td.is-domo { color: var(--black); font-weight: 500; background: rgba(230, 46, 45, .05); border-left: 3px solid var(--red); }
.compare tbody tr:last-child th, .compare tbody tr:last-child td { border-bottom: 0; }

/* ---------- Galería masonry (estilo Pinterest) ---------- */
.masonry { column-count: 2; column-gap: 10px; }
.gallery-item {
  position: relative;
  display: block;
  break-inside: avoid;
  margin-bottom: 10px;
  overflow: hidden;
  background: var(--line);
  box-shadow: var(--shadow-soft);
}
.gallery-item img, .gallery-item video { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.gallery-item:hover img, .gallery-item:hover video { transform: scale(1.04); }
.g-sq   { aspect-ratio: 1 / 1; }
.g-tall { aspect-ratio: 3 / 4; }
.g-xtall { aspect-ratio: 2 / 3; }
.g-wide { aspect-ratio: 4 / 3; }

.gallery-item figcaption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 40px 14px 12px;
  color: var(--white);
  font-size: .78rem;
  font-weight: 500;
  background: linear-gradient(0deg, rgba(17, 19, 24, .75), transparent);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .3s, transform .3s var(--ease);
}
.gallery-item:hover figcaption, .gallery-item:focus-within figcaption { opacity: 1; transform: none; }
@media (hover: none) { .gallery-item figcaption { opacity: 1; transform: none; } }

/* ---------- Botón flotante de WhatsApp (redondo y estático) ---------- */
.wa-float {
  position: fixed;
  right: 16px;
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  z-index: 90;
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  background: #25d366;
  color: #fff;
  border-radius: 50%;
  box-shadow: 0 4px 14px rgba(17, 19, 24, .25);
  transition: background-color .2s;
}
.wa-float svg { width: 30px; height: 30px; }
.wa-float:hover { background: #1ebe5b; }

/* ---------- Revelado suave al hacer scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
  transition-delay: var(--d, 0s);
}
.reveal.visible { opacity: 1; transform: none; }

/* Una vez visibles, las tarjetas recuperan su transición de hover sin retraso */
.pillar-card.visible, .audience-card.visible, .solution-card.visible, .tech-card.visible {
  transition: opacity .7s var(--ease), transform .25s var(--ease), border-color .25s;
  transition-delay: 0s;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; scroll-behavior: auto !important; animation: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ==========================================================
   TABLET  ≥ 640px
   ========================================================== */
@media (min-width: 640px) {
  .container { padding-inline: 32px; }
  .hero-actions { flex-direction: row; }
  .pillars-grid { grid-template-columns: repeat(3, 1fr); }
  .solutions-grid { grid-template-columns: repeat(2, 1fr); }
  .tech-grid { grid-template-columns: repeat(2, 1fr); }
  .benefits-grid { grid-template-columns: repeat(3, 1fr); }
  .masonry { column-count: 2; column-gap: 18px; }
  .gallery-item { margin-bottom: 18px; }
  .wa-float { right: 24px; width: 60px; height: 60px; }
  .locality-grid { grid-template-columns: 1fr 1fr; }
  .field-row { grid-template-columns: 1fr 1fr; }
  .contact-form { padding: 40px 36px; }
  .audience-body { padding: 36px 34px 40px; }
  .footer-bottom { flex-direction: row; justify-content: space-between; }
}

/* ==========================================================
   ESCRITORIO  ≥ 960px
   ========================================================== */
@media (min-width: 960px) {
  :root { --header-h: 84px; --header-full: 84px; }
  html.is-scrolled { --header-h: 68px; }
  html.is-scrolled .logo img { height: 36px; }
  .main-nav { max-height: none; overflow: visible; }
  .section { padding-block: 104px; }

  .menu-toggle, .nav-cta-mobile { display: none; }
  .header-cta { display: inline-flex; padding: 12px 24px; justify-self: end; }
  .logo img { height: 44px; }

  .header-inner { display: grid; grid-template-columns: 1fr auto 1fr; }

  .main-nav {
    position: static;
    transform: none;
    opacity: 1;
    visibility: visible;
    background: transparent;
    padding: 0;
    border: 0;
    box-shadow: none;
  }
  .main-nav ul { flex-direction: row; gap: 22px; }
  .nav-link { padding: 8px 0; border: 0; font-size: .88rem; white-space: nowrap; }
  .nav-link::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 2px;
    background: var(--red);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .3s var(--ease);
  }
  .nav-link:hover::after, .nav-link.active::after { transform: scaleX(1); }

  .hero { padding-bottom: 180px; }
  .pillars { margin-top: -100px; }

  .audience-grid { grid-template-columns: 1fr 1fr; gap: 36px; align-items: stretch; }

  .about-grid { grid-template-columns: 1fr 1fr; gap: 88px; }
  .mini-cards { left: -32px; right: 32px; }

  .coverage-grid { grid-template-columns: 1fr 1fr; gap: 88px; }

  .contact-grid { grid-template-columns: 1fr 1.1fr; gap: 88px; align-items: start; }
  .contact-form { padding: 48px 44px; }

  .solutions-grid { grid-template-columns: repeat(4, 1fr); }
  .tech-grid { grid-template-columns: repeat(4, 1fr); }
  .masonry { column-count: 3; }

  .footer-grid { grid-template-columns: 1.6fr 1fr 1fr; }
}

@media (min-width: 1100px) {
  .main-nav ul { gap: 30px; }
  .nav-link { font-size: .93rem; }
}

@media (min-width: 1280px) {
  .container { padding-inline: 40px; }
  .masonry { column-count: 4; }
}

/* ==========================================================
   AJUSTES DE VISIBILIDAD Y RESPONSIVIDAD (móvil)
   ========================================================== */
html { overflow-x: hidden; }
@supports (overflow: clip) { html, body { overflow-x: clip; } }
h1, h2, h3, p, li, a, span, td, th { overflow-wrap: break-word; }

@media (max-width: 639px) {
  .section { padding-block: 56px; }
  .section-head { margin-bottom: 34px; }
  .hero { padding-bottom: 130px; }
  .hero-actions .btn { width: 100%; }
  .btn { padding: 14px 22px; }

  .pillar-card, .tech-card { padding: 26px 22px; }
  .audience-body { padding: 26px 20px 30px; }
  .audience-body h3 { font-size: 1.3rem; }
  .audience-body .btn { align-self: stretch; }
  .benefit-card { padding: 28px 22px; }
  .solution-body { padding: 24px 20px 26px; }
  .contact-form { padding: 26px 18px; }
  .field input, .field textarea, .field select { font-size: 1rem; } /* evita el zoom automático en iOS */

  .mini-cards { left: 10px; right: 10px; gap: 10px; }
  .mini-card { padding: 12px; gap: 8px; font-size: .85rem; }
  .mini-card svg { width: 20px; height: 20px; }
  .coverage-badge { left: 12px; padding: 14px 18px; }
  .play-btn { width: 64px; height: 64px; margin: -32px 0 0 -32px; }
  .footer-bottom { padding-bottom: 92px; } /* espacio para el botón flotante */

  .main-nav { max-height: calc(100svh - var(--header-h)); overflow-y: auto; }

  /* Tabla comparativa apilada en tarjetas */
  .compare { overflow: visible; border: 0; box-shadow: none; background: transparent; }
  .compare table, .compare tbody, .compare tr, .compare th, .compare td { display: block; width: 100%; min-width: 0; }
  .compare thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .compare tbody tr { margin-bottom: 16px; background: var(--white); border: 1px solid var(--line); box-shadow: var(--shadow-soft); }
  .compare tbody th { width: 100%; padding: 14px 18px; color: var(--white); background: var(--black); border-bottom: 0; }
  .compare tbody td { padding: 12px 18px; border-bottom: 1px solid var(--line); }
  .compare tbody td:last-child { border-bottom: 0; }
  .compare tbody td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 2px;
    font-size: .7rem;
    font-weight: 600;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--muted);
  }
}

@media (max-width: 380px) {
  .container { padding-inline: 16px; }
  .section-head p, .about-text p, .coverage-text > p { font-size: .95rem; }
}

/* ==========================================================
   AJUSTES v2: video oculto, masonry en móvil, intención dinámica
   ========================================================== */
[hidden] { display: none !important; }

/* Masonry: 2 columnas desde el celular */
@media (max-width: 639px) {
  .gallery-item figcaption { padding: 26px 8px 8px; font-size: .7rem; }
}

/* Intención dinámica (data-intent lo fija script.js) */
.hero-bg { transition: opacity .5s var(--ease); }
main { display: flex; flex-direction: column; }
.hero { order: -3; }
.pillars { order: -2; }
html[data-intent="seguridad"] #soluciones { order: -1; }
html[data-intent="airbnb"] #beneficios,
html[data-intent="domotica"] #beneficios { order: -1; }
html[data-intent="domotica"] .solution-card[data-k="conf"] { order: -1; }
