/* ============================================================
   RedVision.Ve — Hoja de estilos compartida
   Estética tech oscura · Paleta: #05070f / #0a0e1a · rojo #ff3b4e · azul #2f7bff
   Funciona con file:// — sin CDNs, sin fuentes externas.
   ============================================================ */

:root {
  --bg: #05070f;
  --bg-2: #0a0e1a;
  --bg-3: #101627;
  --red: #ff3b4e;
  --blue: #2f7bff;
  --grad: linear-gradient(100deg, var(--red) 0%, #a03bff 52%, var(--blue) 100%);
  --text: #eef2f7;
  --muted: #9aa7bd;
  --line: rgba(154, 167, 189, 0.16);
  --card: rgba(255, 255, 255, 0.03);
  --radius: 16px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
          "Helvetica Neue", Arial, sans-serif;
  --nav-h: 72px;
  --max: 1180px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

/* Destinos de anchors bajo el header fijo */
main [id] { scroll-margin-top: 90px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

h1, h2, h3 { line-height: 1.15; margin: 0 0 0.6em; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.1rem, 5.2vw, 3.9rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.5rem); font-weight: 750; }
h3 { font-size: 1.2rem; font-weight: 700; }

p { margin: 0 0 1em; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

::selection { background: rgba(255, 59, 78, 0.45); color: #fff; }

/* Foco visible */
:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ---------- Utilidades ---------- */
.wrap { width: min(var(--max), 100% - 3rem); margin: 0 auto; }
.section { padding: clamp(3.5rem, 8vw, 6.5rem) 0; }
.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 0.9rem;
}
.eyebrow.blue { color: var(--blue); }
.lead { color: var(--muted); font-size: 1.08rem; max-width: 62ch; }
.center { text-align: center; }
.center .lead { margin-left: auto; margin-right: auto; }
.muted { color: var(--muted); }
.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.7rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1rem;
  border: 0;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
  text-decoration: none;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-primary {
  background: var(--grad);
  color: #fff;
  box-shadow: 0 8px 28px rgba(255, 59, 78, 0.35);
}
.btn-primary:hover { box-shadow: 0 12px 34px rgba(47, 123, 255, 0.45); }
.btn-ghost {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  border: 1px solid var(--line);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.12); }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 1.6rem; }

/* ---------- Nav ---------- */
.site-nav {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--nav-h);
  z-index: 100;
  transition: background 0.25s ease, border-color 0.25s ease, backdrop-filter 0.25s ease;
  border-bottom: 1px solid transparent;
}
.site-nav.scrolled {
  background: rgba(5, 7, 15, 0.82);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
}
.nav-inner {
  width: min(var(--max), 100% - 2rem);
  margin: 0 auto;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.brand { display: inline-flex; align-items: center; flex-shrink: 0; }
.brand img { height: 40px; width: auto; }
.nav-links {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  color: var(--text);
  font-weight: 600;
  font-size: 0.98rem;
  padding: 0.55rem 0.9rem;
  border-radius: 10px;
  position: relative;
}
.nav-links a:hover { text-decoration: none; background: rgba(255,255,255,0.06); }
.nav-links a[aria-current="page"] { color: #fff; }
.nav-links a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0.9rem;
  right: 0.9rem;
  bottom: 0.25rem;
  height: 2px;
  border-radius: 2px;
  background: var(--grad);
}
.nav-cta { margin-left: 0.6rem; padding: 0.6rem 1.25rem !important; font-size: 0.92rem !important; }
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  width: 46px;
  height: 46px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}
.nav-toggle .bars,
.nav-toggle .bars::before,
.nav-toggle .bars::after {
  content: "";
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  position: relative;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.nav-toggle .bars::before { position: absolute; top: -7px; }
.nav-toggle .bars::after { position: absolute; top: 7px; }
.nav-toggle[aria-expanded="true"] .bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .bars::before { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .bars::after { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero (index) ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: calc(var(--nav-h) + 2rem) 0 5rem;
}
.hero-bg { position: absolute; inset: 0; z-index: -2; }
.hero-bg video,
.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(5,7,15,0.72) 0%, rgba(5,7,15,0.45) 45%, var(--bg) 100%),
    radial-gradient(60% 50% at 75% 40%, rgba(47,123,255,0.22), transparent 70%),
    radial-gradient(50% 45% at 20% 65%, rgba(255,59,78,0.20), transparent 70%);
}
.hero-content { max-width: 800px; }
.hero h1 .reveal-line { display: block; overflow: hidden; }
.hero h1 .reveal-line > span {
  display: block;
  transform: translateY(110%);
  animation: line-up 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
}
.hero h1 .reveal-line:nth-child(2) > span { animation-delay: 0.12s; }
.hero h1 .reveal-line:nth-child(3) > span { animation-delay: 0.24s; }
@keyframes line-up { to { transform: translateY(0); } }
.hero .sub {
  color: var(--muted);
  font-size: clamp(1.02rem, 2vw, 1.25rem);
  max-width: 60ch;
  opacity: 0;
  animation: fade-up 0.9s ease 0.45s forwards;
}
.hero .btn-row { opacity: 0; animation: fade-up 0.9s ease 0.6s forwards; }
@keyframes fade-up {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}
.scroll-hint {
  position: absolute;
  left: 50%;
  bottom: 1.6rem;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 0;
  animation: fade-up 1s ease 1.1s forwards;
}
.scroll-hint .wheel {
  width: 24px;
  height: 38px;
  border: 2px solid var(--muted);
  border-radius: 14px;
  position: relative;
}
.scroll-hint .wheel::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 7px;
  width: 4px;
  height: 8px;
  margin-left: -2px;
  border-radius: 4px;
  background: var(--red);
  animation: wheel 1.8s ease-in-out infinite;
}
@keyframes wheel {
  0% { transform: translateY(0); opacity: 1; }
  60% { transform: translateY(12px); opacity: 0; }
  100% { transform: translateY(0); opacity: 0; }
}

/* ---------- Hero de páginas internas ---------- */
.page-hero {
  padding: calc(var(--nav-h) + 3.5rem) 0 3rem;
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(55% 60% at 80% 20%, rgba(47,123,255,0.16), transparent 70%),
    radial-gradient(45% 55% at 15% 70%, rgba(255,59,78,0.14), transparent 70%);
  z-index: -1;
}
.page-hero p.lead { margin-bottom: 0; }

/* ---------- Propuesta de valor ---------- */
.value-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 8px);
  padding: clamp(1.8rem, 4vw, 3rem);
  position: relative;
  overflow: hidden;
}
.value-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--grad);
}
.value-card p { font-size: 1.08rem; margin-bottom: 0; }
.value-card p strong { color: #fff; }

/* ---------- Grid de servicios ---------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.4rem;
  margin-top: 2.4rem;
}
.svc-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  text-decoration: none;
  color: var(--text);
}
.svc-card:hover {
  text-decoration: none;
  transform: translateY(-6px);
  border-color: rgba(255, 59, 78, 0.45);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255,59,78,0.25);
}
.svc-card .thumb { aspect-ratio: 16 / 10; overflow: hidden; }
.svc-card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.svc-card:hover .thumb img { transform: scale(1.06); }
.svc-card .body { padding: 1.4rem 1.4rem 1.6rem; display: flex; flex-direction: column; gap: 0.5rem; flex: 1; }
.svc-card h3 { margin: 0; font-size: 1.15rem; }
.svc-card p { color: var(--muted); font-size: 0.97rem; margin: 0; flex: 1; }
.svc-card .more {
  color: var(--red);
  font-weight: 700;
  font-size: 0.95rem;
}

/* ---------- Banner breaking news ---------- */
.breaking {
  position: relative;
  border-radius: calc(var(--radius) + 8px);
  overflow: hidden;
  border: 1px solid rgba(255, 59, 78, 0.4);
  background:
    linear-gradient(120deg, rgba(255,59,78,0.16), rgba(47,123,255,0.12)),
    var(--bg-2);
  padding: clamp(2rem, 5vw, 3.4rem);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2rem;
  align-items: center;
}
.breaking .tag {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 800;
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #fff;
  background: var(--red);
  padding: 0.45rem 1rem;
  border-radius: 999px;
  margin-bottom: 1rem;
}
.breaking .tag .dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #fff;
  animation: blink 1.4s ease-in-out infinite;
}
@keyframes blink { 50% { opacity: 0.25; } }
.breaking h2 { margin-top: 0; }

/* Tag genérico tipo "breaking" (también usado en starlink.html) */
.legal-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 800;
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #fff;
  background: var(--red);
  padding: 0.45rem 1rem;
  border-radius: 999px;
  margin-bottom: 1rem;
}
.legal-tag .dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #fff;
  animation: blink 1.4s ease-in-out infinite;
}
.breaking p { color: var(--muted); max-width: 60ch; }
.breaking .btn { white-space: nowrap; }

/* ---------- Slider antes / después ---------- */
.ba-wrap { margin-top: 2.4rem; }
.ba-compare {
  position: relative;
  border-radius: calc(var(--radius) + 8px);
  overflow: hidden;
  border: 1px solid var(--line);
  aspect-ratio: 16 / 9;
  --pos: 50%;
  user-select: none;
  touch-action: pan-y;
}
.ba-compare img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}
.ba-after { clip-path: inset(0 0 0 var(--pos)); }
.ba-line {
  position: absolute;
  top: 0; bottom: 0;
  left: var(--pos);
  width: 3px;
  background: #fff;
  transform: translateX(-50%);
  box-shadow: 0 0 12px rgba(0,0,0,0.7);
  pointer-events: none;
}
.ba-knob {
  position: absolute;
  top: 50%;
  left: var(--pos);
  transform: translate(-50%, -50%);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #fff;
  color: #111;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: 800;
  pointer-events: none;
  box-shadow: 0 6px 22px rgba(0,0,0,0.55);
}
.ba-label {
  position: absolute;
  top: 1rem;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  background: rgba(5, 7, 15, 0.75);
  color: #fff;
  border: 1px solid var(--line);
  pointer-events: none;
}
.ba-label.before { left: 1rem; }
.ba-label.after { right: 1rem; }
.ba-range {
  width: 100%;
  margin-top: 1rem;
  -webkit-appearance: none;
  appearance: none;
  height: 8px;
  border-radius: 8px;
  background: linear-gradient(90deg, var(--red), var(--blue));
  cursor: ew-resize;
}
.ba-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--red);
  cursor: ew-resize;
}
.ba-range::-moz-range-thumb {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--red);
  cursor: ew-resize;
}
.ba-caption { color: var(--muted); font-size: 0.95rem; margin-top: 0.8rem; }

/* ---------- Teaser proyectos ---------- */
.teaser-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-top: 2.2rem;
}
.teaser-grid a {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  display: block;
}
.teaser-grid img {
  aspect-ratio: 4 / 3;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.teaser-grid a:hover img { transform: scale(1.07); }
.teaser-grid a:hover { text-decoration: none; }

/* ---------- Spot ---------- */
.spot-frame {
  position: relative;
  border-radius: calc(var(--radius) + 8px);
  overflow: hidden;
  border: 1px solid var(--line);
  aspect-ratio: 16 / 9;
  background: #000;
  margin-top: 2.2rem;
}
.spot-frame video { width: 100%; height: 100%; object-fit: cover; }
.spot-play {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
  background: rgba(5, 7, 15, 0.45);
  border: 0;
  cursor: pointer;
  color: #fff;
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 700;
  width: 100%;
  transition: opacity 0.3s ease;
}
.spot-play[hidden] { display: none; }
.spot-play .circle {
  width: 92px;
  height: 92px;
  border-radius: 50%;
  background: var(--grad);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  box-shadow: 0 12px 40px rgba(255, 59, 78, 0.5);
  transition: transform 0.2s ease;
}
.spot-play:hover .circle { transform: scale(1.08); }

/* ---------- CTA final ---------- */
.cta-final {
  text-align: center;
  background:
    radial-gradient(60% 90% at 50% 110%, rgba(255,59,78,0.18), transparent 70%),
    radial-gradient(50% 80% at 50% -20%, rgba(47,123,255,0.16), transparent 70%),
    var(--bg-2);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 8px);
  padding: clamp(2.5rem, 6vw, 4.5rem) clamp(1.5rem, 4vw, 3rem);
}
.cta-final .btn-row { justify-content: center; }
.cta-final .ig-link {
  display: inline-block;
  margin-top: 1.4rem;
  color: var(--muted);
  font-weight: 600;
}
.cta-final .ig-link:hover { color: var(--text); }

/* ---------- Fichas de servicio (servicios.html) ---------- */
.svc-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.6rem, 4vw, 3.2rem);
  align-items: center;
  padding: clamp(2rem, 4vw, 3rem) 0;
  border-bottom: 1px solid var(--line);
}
.svc-detail:last-of-type { border-bottom: 0; }
.svc-detail.flip .svc-media { order: 2; }
.svc-media img {
  border-radius: calc(var(--radius) + 4px);
  border: 1px solid var(--line);
  aspect-ratio: 4 / 3;
  width: 100%;
  object-fit: cover;
}
.includes {
  list-style: none;
  margin: 1.1rem 0 1.4rem;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}
.includes li {
  position: relative;
  padding-left: 1.7rem;
  color: var(--muted);
  font-size: 0.99rem;
}
.includes li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.52em;
  width: 0.85rem;
  height: 0.5rem;
  border-left: 3px solid var(--red);
  border-bottom: 3px solid var(--red);
  transform: rotate(-45deg) translateY(-0.1rem);
}

/* ---------- Timeline (starlink.html) ---------- */
.timeline {
  list-style: none;
  margin: 2.4rem 0 0;
  padding: 0;
  position: relative;
  display: grid;
  gap: 1.6rem;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 23px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: linear-gradient(180deg, var(--red), var(--blue));
  opacity: 0.6;
}
.timeline li {
  position: relative;
  padding-left: 4.2rem;
}
.timeline .step-num {
  position: absolute;
  left: 0;
  top: 0;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--bg-3);
  border: 2px solid var(--red);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.1rem;
  color: #fff;
}
.timeline h3 { margin-bottom: 0.35rem; }
.timeline p { color: var(--muted); margin: 0; max-width: 62ch; }

/* ---------- Beneficios ---------- */
.benefits {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.2rem;
  margin-top: 2.2rem;
  padding: 0;
  list-style: none;
}
.benefits li {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
}
.benefits strong { display: block; margin-bottom: 0.35rem; font-size: 1.05rem; }
.benefits span { color: var(--muted); font-size: 0.98rem; }

/* ---------- FAQ acordeón ---------- */
.faq { margin-top: 2.2rem; display: grid; gap: 0.9rem; }
.faq-item {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  overflow: hidden;
}
.faq-q {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  background: none;
  border: 0;
  color: var(--text);
  font-family: var(--font);
  font-size: 1.05rem;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}
.faq-q .icon {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 59, 78, 0.14);
  border: 1px solid rgba(255, 59, 78, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  line-height: 1;
  transition: transform 0.25s ease, background 0.25s ease;
}
.faq-q[aria-expanded="true"] .icon { transform: rotate(45deg); background: var(--red); color: #fff; }
.faq-a { max-height: 0; overflow: hidden; transition: max-height 0.35s ease; }
.faq-a .inner { padding: 0 1.5rem 1.5rem; color: var(--muted); }
.faq-a p { margin: 0; }

/* ---------- Galería (proyectos.html) ---------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
  margin-top: 2.4rem;
}
.g-item {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--card);
  padding: 0;
  cursor: zoom-in;
  font-family: var(--font);
  color: var(--text);
  text-align: left;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, border-color 0.25s ease;
}
.g-item:hover { transform: translateY(-4px); border-color: rgba(47,123,255,0.5); }
.g-item img { aspect-ratio: 4 / 3; width: 100%; object-fit: cover; }
.g-item figcaption {
  padding: 1rem 1.2rem 1.2rem;
  font-size: 0.95rem;
  color: var(--muted);
  flex: 1;
}

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(3, 5, 10, 0.94);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  padding: 1.5rem;
}
.lightbox[hidden] { display: none; }
.lb-stage {
  position: relative;
  max-width: min(1100px, 94vw);
  max-height: 78vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lb-stage img {
  max-width: 100%;
  max-height: 78vh;
  border-radius: 12px;
  border: 1px solid var(--line);
  object-fit: contain;
}
.lb-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(5, 7, 15, 0.8);
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lb-btn:hover { background: var(--red); border-color: var(--red); }
.lb-prev { left: -70px; }
.lb-next { right: -70px; }
.lb-close {
  position: absolute;
  top: 1.2rem;
  right: 1.2rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(5, 7, 15, 0.8);
  color: #fff;
  font-size: 1.4rem;
  cursor: pointer;
}
.lb-close:hover { background: var(--red); border-color: var(--red); }
.lb-caption { color: var(--muted); font-size: 0.95rem; max-width: 70ch; text-align: center; }
.lb-counter { color: var(--muted); font-size: 0.85rem; letter-spacing: 0.1em; }

/* ---------- Cotizador (contacto.html) ---------- */
.quote-builder {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 8px);
  padding: clamp(1.6rem, 4vw, 2.8rem);
  margin-top: 2.2rem;
  position: relative;
  overflow: hidden;
}
.quote-builder::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--grad);
}
.quote-services { display: grid; gap: 1rem; margin: 1.6rem 0; }
.q-service {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem 1.3rem;
  background: var(--card);
  transition: border-color 0.2s ease, background 0.2s ease;
}
.q-service:has(input:checked) {
  border-color: rgba(255, 59, 78, 0.6);
  background: rgba(255, 59, 78, 0.05);
}
.q-service .row {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
}
.q-service input[type="checkbox"] {
  width: 22px;
  height: 22px;
  margin-top: 0.15rem;
  accent-color: var(--red);
  flex-shrink: 0;
  cursor: pointer;
}
.q-service label { font-weight: 700; cursor: pointer; font-size: 1.05rem; }
.q-service .hint { color: var(--muted); font-size: 0.92rem; margin: 0.3rem 0 0; }
.q-detail {
  margin-top: 0.8rem;
  display: none;
}
.q-service:has(input:checked) .q-detail { display: block; }
.q-detail input,
.field input,
.field textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  padding: 0.8rem 1rem;
}
.q-detail input::placeholder,
.field input::placeholder,
.field textarea::placeholder { color: #6b7791; }
.q-detail input:focus,
.field input:focus,
.field textarea:focus {
  border-color: var(--blue);
  outline: none;
  box-shadow: 0 0 0 3px rgba(47, 123, 255, 0.25);
}
.q-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 0.4rem; }
.field label { display: block; font-weight: 700; margin-bottom: 0.45rem; }
.field label .req { color: var(--red); }
.field .sub { color: var(--muted); font-size: 0.88rem; font-weight: 400; margin-bottom: 0.45rem; display: block; }
.preview-label { font-weight: 700; margin: 1.8rem 0 0.6rem; }
#qPreview {
  width: 100%;
  min-height: 220px;
  background: #04060c;
  border: 1px dashed rgba(47, 123, 255, 0.5);
  border-radius: var(--radius);
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.95rem;
  line-height: 1.7;
  padding: 1.2rem 1.4rem;
  white-space: pre-wrap;
  resize: vertical;
}
.quote-actions { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 1.2rem; }
#copyStatus { color: var(--muted); font-size: 0.95rem; margin-top: 0.8rem; min-height: 1.5em; }
#copyStatus.ok { color: #4ade80; }
.form-error {
  display: none;
  color: #ffb4bd;
  background: rgba(255, 59, 78, 0.1);
  border: 1px solid rgba(255, 59, 78, 0.4);
  border-radius: 10px;
  padding: 0.8rem 1.1rem;
  margin-top: 1rem;
  font-size: 0.95rem;
}
.form-error.show { display: block; }

/* ---------- Bloque de contacto ---------- */
.contact-block {
  position: relative;
  border-radius: calc(var(--radius) + 8px);
  overflow: hidden;
  border: 1px solid var(--line);
  margin-top: 3rem;
}
.contact-block .bg {
  position: absolute;
  inset: 0;
}
.contact-block .bg img { width: 100%; height: 100%; object-fit: cover; opacity: 0.35; }
.contact-block .overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(5,7,15,0.94) 30%, rgba(5,7,15,0.6));
}
.contact-block .content { position: relative; padding: clamp(2rem, 5vw, 3.5rem); }
.contact-block p { color: var(--muted); max-width: 56ch; }

/* ---------- Footer ---------- */
footer {
  border-top: 1px solid var(--line);
  background: var(--bg-2);
  padding: 3rem 0 2rem;
  margin-top: 2rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2.5rem;
}
.footer-brand img { height: 44px; width: auto; margin-bottom: 1rem; }
.footer-brand .tagline { font-weight: 800; font-size: 1.1rem; margin-bottom: 0.5rem; }
.footer-brand p { color: var(--muted); font-size: 0.94rem; }
footer h4 {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--muted);
  margin: 0 0 1rem;
}
.footer-nav { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.55rem; }
.footer-nav a { color: var(--text); font-weight: 600; font-size: 0.97rem; }
.ig-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--grad);
  color: #fff;
  font-weight: 700;
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
}
.ig-cta:hover { text-decoration: none; transform: translateY(-2px); }
.footer-bottom {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.8rem;
  color: var(--muted);
  font-size: 0.9rem;
}

/* ---------- Reveal on scroll ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
}
[data-reveal].revealed { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .teaser-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .lb-prev { left: 8px; }
  .lb-next { right: 8px; }
}

@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; }
  .nav-links {
    position: absolute;
    top: var(--nav-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    background: rgba(5, 7, 15, 0.97);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
    padding: 0.8rem 1rem 1.2rem;
    gap: 0.2rem;
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 0.85rem 1rem; font-size: 1.05rem; }
  .nav-links a[aria-current="page"]::after { display: none; }
  .nav-links a[aria-current="page"] { background: rgba(255,59,78,0.12); }
  .nav-cta { margin-left: 0; margin-top: 0.4rem; text-align: center; }
  .svc-detail { grid-template-columns: 1fr; }
  .svc-detail.flip .svc-media { order: 0; }
  .benefits { grid-template-columns: 1fr; }
  .breaking { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 1.8rem; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .services-grid { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: 1fr; }
  .teaser-grid { grid-template-columns: repeat(2, 1fr); gap: 0.7rem; }
  .q-fields { grid-template-columns: 1fr; }
  .ba-compare { aspect-ratio: 4 / 3; }
  .timeline li { padding-left: 3.6rem; }
  .lb-btn { width: 44px; height: 44px; }
}

/* ---------- Movimiento reducido ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .hero h1 .reveal-line > span { transform: none; animation: none; }
  .hero .sub, .hero .btn-row, .scroll-hint { opacity: 1; animation: none; }
  [data-reveal] { opacity: 1; transform: none; transition: none; }
  .scroll-hint { display: none; }
}

/* Brand lockup: real RV mark + text wordmark */
.brand{display:inline-flex;align-items:center;gap:.6rem;text-decoration:none;line-height:1}
.brand-mark{display:block;height:44px;width:auto}
.brand-word{display:inline-flex;align-items:center;gap:.55rem;font-weight:800;font-size:1.35rem;letter-spacing:-.02em;color:#fff;white-space:nowrap}
.brand-word em{font-style:normal;background:linear-gradient(90deg,#ff3b4e,#2f7bff);-webkit-background-clip:text;background-clip:text;color:transparent}
footer .brand-mark{height:38px}
footer .brand-word{font-size:1.15rem}
@media (max-width:400px){.brand-word{font-size:1.15rem}.brand-mark{height:38px}}
