:root {
  --red: #a80c0c;
  --red-dark: #7d0909;
  --red-bright: #d81f1f;
  --ice: #3ec1f5;
  --ice-dark: #1a9fd8;
  --black: #14171a;
  --charcoal: #1c2024;
  --gray: #5b6470;
  --gray-light: #f4f6f8;
  --border: #e6e9ec;
  --whatsapp: #25d366;
  --whatsapp-dark: #1ebe57;
  --radius: 12px;
  --shadow: 0 10px 30px rgba(15, 20, 25, .08);
  --shadow-lg: 0 20px 50px rgba(15, 20, 25, .16);
  font-size: 16px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Poppins', system-ui, sans-serif;
  color: var(--black);
  background: #fff;
  line-height: 1.55;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; margin: 0; padding: 0; }
body.nav-open { overflow: hidden; }

.container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Snowfall (decorative) */
.problem, #trabajos, #contacto { position: relative; overflow: hidden; }
.problem > .container, #trabajos > .container, #contacto > .container,
#trabajos > .carousel, #trabajos > .carousel-dots { position: relative; z-index: 1; }
.snowfall {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}
.snowfall span {
  position: absolute;
  top: -12px;
  border-radius: 50%;
  background: #bfe6fb;
  box-shadow: 0 0 6px 1px rgba(62,193,245,.55);
  animation: snow-fall linear infinite;
}
@keyframes snow-fall {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(var(--drift, 0px), 680px, 0); }
}
@media (prefers-reduced-motion: reduce) {
  .snowfall { display: none; }
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .6s ease, transform .6s ease;
}
.reveal.in-view { opacity: 1; transform: translateY(0); }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 74px;
}
.brand { display: flex; align-items: center; }
.brand img { height: 40px; width: auto; }
.nav {
  display: flex;
  gap: 30px;
  margin-left: auto;
  font-weight: 500;
  font-size: .95rem;
}
.nav a { color: var(--black); transition: color .15s; position: relative; }
.nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -6px;
  height: 2px;
  background: var(--red);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .2s;
}
.nav a:hover { color: var(--red); }
.nav a:hover::after { transform: scaleX(1); }

.header-right { display: flex; align-items: center; gap: 14px; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  border-radius: 8px;
}
.nav-toggle:hover { background: var(--gray-light); }
.nav-toggle-bar {
  display: block;
  width: 22px;
  height: 2px;
  margin: 0 auto;
  background: var(--black);
  border-radius: 2px;
  transition: transform .25s ease, opacity .25s ease;
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-backdrop {
  display: none;
  position: fixed;
  inset: 74px 0 0 0;
  background: rgba(15,20,25,.4);
  z-index: 90;
  opacity: 0;
  transition: opacity .2s;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: .95rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform .15s, box-shadow .15s, background .15s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.btn-lg { padding: 15px 28px; font-size: 1rem; }
.btn-whatsapp { background: var(--whatsapp); color: #fff; }
.btn-whatsapp:hover { background: var(--whatsapp-dark); }
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-dark); }
.btn-outline { border-color: rgba(255,255,255,.6); color: #fff; }
.btn-outline:hover { background: rgba(255,255,255,.12); border-color: #fff; }

/* Hero */
.hero {
  position: relative;
  min-height: clamp(600px, 88vh, 840px);
  display: flex;
  align-items: center;
  color: #fff;
}
.hero-media { position: absolute; inset: 0; z-index: 0; overflow: hidden; }
.hero-media img {
  position: absolute;
  top: -8%;
  left: 0;
  width: 100%;
  height: 116%;
  object-fit: cover;
  object-position: center 35%;
  will-change: transform;
}
.hero-overlay {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(10,14,18,.82) 0%, rgba(10,14,18,.62) 40%, rgba(10,14,18,.92) 100%),
    linear-gradient(100deg, rgba(168,12,12,.28) 0%, rgba(10,14,18,0) 45%);
}
.hero-content { position: relative; z-index: 1; padding-top: 90px; padding-bottom: 90px; max-width: 860px; }
.eyebrow {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: .1em;
  font-size: .78rem;
  font-weight: 700;
  color: #ffd9d9;
  background: rgba(168,12,12,.25);
  border: 1px solid rgba(255,255,255,.25);
  padding: 8px 16px;
  border-radius: 999px;
  margin: 0 0 30px;
}
.hero h1 {
  font-size: clamp(2rem, 3.6vw, 2.9rem);
  font-weight: 800;
  margin: 0 0 26px;
  line-height: 1.28;
  letter-spacing: -.01em;
}
.hero-sub { font-size: 1.15rem; color: #dbe1e6; margin: 0 0 40px; max-width: 600px; line-height: 1.6; }
.hero-actions { display: flex; gap: 18px; flex-wrap: wrap; margin-bottom: 40px; }
.hero-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  padding-top: 28px;
  border-top: 1px solid rgba(255,255,255,.18);
}
.hero-trust li {
  font-size: .88rem;
  color: #cdd4da;
  display: flex;
  align-items: center;
  gap: 7px;
}
.hero-trust li::before { content: "✓"; color: var(--ice); font-weight: 800; }

/* Trust bar */
.trustbar { background: var(--black); color: #fff; padding: 40px 0; }
.trustbar-inner { text-align: center; }
.stats-row {
  display: flex;
  justify-content: center;
  gap: 56px;
  flex-wrap: wrap;
  margin-bottom: 36px;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.stat { display: flex; flex-direction: column; align-items: center; }
.stat-number { font-size: 2.6rem; font-weight: 800; color: #fff; line-height: 1; }
.stat-suffix { font-size: 1.6rem; font-weight: 800; color: var(--ice); }
.stat-label { display: block; margin-top: 8px; font-size: .82rem; color: #9aa4ad; }

.trustbar-label { color: #9aa4ad; font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; margin: 0 0 18px; }
.trustbar-brands {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}
.brand-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border-radius: 10px;
  padding: 12px 22px;
  height: 56px;
}
.brand-logo img { height: 100%; width: auto; max-width: 120px; object-fit: contain; }
.trustbar-badges {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  border-top: 1px solid rgba(255,255,255,.1);
  padding-top: 28px;
}
.badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-size: .88rem;
  font-weight: 500;
  color: #d6dbdf;
}
.badge-icon { display: flex; color: var(--ice); flex-shrink: 0; }
.badge-icon svg { width: 19px; height: 19px; }

/* Sections */
.section { padding: 90px 0; }
.section-alt { background: var(--gray-light); }
.section-title { font-size: clamp(1.8rem, 3vw, 2.3rem); font-weight: 800; margin: 0 0 12px; letter-spacing: -.01em; }
.section-sub { color: var(--gray); margin: 0 0 44px; max-width: 620px; font-size: 1.02rem; }

/* Problem / consequence section */
.problem { background: #fff; }
.problem-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 40px;
}
.problem-card {
  background: var(--gray-light);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px 28px;
}
.problem-card h3 {
  margin: 0 0 18px;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  gap: 10px;
}
.problem-card h3::before {
  content: "";
  width: 8px; height: 8px;
  background: var(--red);
  border-radius: 50%;
  display: inline-block;
}
.problem-card ul { display: flex; flex-direction: column; gap: 14px; }
.problem-card li {
  position: relative;
  padding-left: 22px;
  color: var(--gray);
  font-size: .95rem;
}
.problem-card li::before {
  content: "";
  position: absolute;
  left: 0; top: 8px;
  width: 6px; height: 6px;
  background: var(--red-bright);
  border-radius: 50%;
}
.problem-cta {
  background: var(--black);
  border-radius: var(--radius);
  padding: 34px 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  color: #fff;
}
.problem-cta p { margin: 0; font-size: 1.05rem; max-width: 520px; }

/* Cards */
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px 24px;
  box-shadow: var(--shadow);
  transition: transform .2s, box-shadow .2s;
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.card-icon {
  width: 52px; height: 52px;
  display: flex; align-items: center; justify-content: center;
  background: var(--gray-light);
  border-radius: 12px;
  margin-bottom: 16px;
  color: var(--red);
}
.card-icon svg { width: 26px; height: 26px; }
.card h3 { margin: 0 0 8px; font-size: 1.1rem; }
.card p { margin: 0; color: var(--gray); font-size: .92rem; }

/* Carousel */
.carousel {
  position: relative;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}
.carousel-track {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding: 4px 4px 14px;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.carousel-track::-webkit-scrollbar { height: 6px; }
.carousel-track::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
.carousel-slide {
  flex: 0 0 auto;
  width: min(340px, 78vw);
  scroll-snap-align: start;
}
.carousel-slide img {
  width: 100%;
  height: 260px;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform .3s ease;
  -webkit-user-drag: none;
  user-select: none;
  pointer-events: none;
}
.carousel-slide:hover img { transform: scale(1.03); }
.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 46px; height: 46px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
  color: var(--black);
  transition: transform .15s, background .15s, color .15s;
}
.carousel-arrow:hover { background: var(--red); color: #fff; transform: translateY(-50%) scale(1.06); }
.carousel-arrow svg { width: 20px; height: 20px; }
.carousel-arrow.prev { left: -4px; }
.carousel-arrow.next { right: -4px; }
.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
}
.carousel-dots button {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--border);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: background .2s, transform .2s;
}
.carousel-dots button.active { background: var(--red); transform: scale(1.35); }
@media (max-width: 900px) {
  .carousel-arrow { display: none; }
}

/* About */
.about-grid {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 56px;
  align-items: center;
}
.check-list { display: flex; flex-direction: column; gap: 14px; margin-bottom: 30px; }
.check-list li {
  position: relative;
  padding-left: 30px;
  color: var(--gray);
}
.check-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--red);
  font-weight: 800;
}
.about-img { border-radius: var(--radius); box-shadow: var(--shadow-lg); }

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 48px;
}
.lead-form { display: flex; flex-direction: column; gap: 14px; }
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.lead-form input,
.lead-form select,
.lead-form textarea {
  padding: 13px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: .95rem;
  background: #fff;
}
.lead-form input:focus,
.lead-form select:focus,
.lead-form textarea:focus {
  outline: none;
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(168,12,12,.1);
}
.lead-form button { margin-top: 4px; }
.form-status { min-height: 20px; font-size: .9rem; margin: 6px 0 0; }
.form-status.ok { color: #1a7d1a; }
.form-status.err { color: var(--red); }

.contact-info {
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 30px;
  box-shadow: var(--shadow);
  height: fit-content;
}
.contact-info h3 { margin: 0 0 18px; }
.contact-line {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 0;
  border-bottom: 1px solid var(--border);
  font-weight: 500;
  transition: color .15s;
}
.contact-line:hover { color: var(--red); }
.contact-line:hover .contact-icon { color: var(--red); }
.contact-zone { display: flex; align-items: center; gap: 10px; padding-top: 15px; color: var(--gray); margin: 0; }
.contact-icon { display: flex; color: var(--gray); flex-shrink: 0; transition: color .15s; }
.contact-icon svg { width: 19px; height: 19px; }

/* Footer */
.footer { background: var(--black); color: #97a0a8; padding: 34px 0; }
.footer-inner { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.footer-logo { height: 30px; }
.footer-inner p { margin: 0; font-size: .85rem; }
.footer-link {
  margin-left: auto;
  font-size: .85rem;
  color: #97a0a8;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.footer-link:hover { color: #fff; }

/* Cookie bar */
.cookie-bar[hidden] { display: none; }
.cookie-bar {
  position: fixed;
  left: 20px;
  bottom: 20px;
  width: min(400px, calc(100vw - 40px));
  z-index: 80;
  background: rgba(20, 23, 26, .55);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 16px;
  color: #e4e8eb;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: 0 12px 32px rgba(0,0,0,.18);
}
.cookie-bar p { margin: 0; font-size: .82rem; line-height: 1.55; color: #cdd3d8; }
.cookie-bar a { text-decoration: underline; color: #fff; text-underline-offset: 2px; }
.cookie-bar-actions { display: flex; justify-content: flex-end; }
.cookie-bar .btn { padding: 8px 20px; font-size: .84rem; }
@media (max-width: 640px) {
  .cookie-bar { left: 12px; bottom: 12px; width: calc(100vw - 24px); padding: 16px 18px; }
}

/* Floating WhatsApp */
.floating-whatsapp {
  position: fixed;
  bottom: 22px;
  right: 22px;
  width: 58px;
  height: 58px;
  background: var(--whatsapp);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px rgba(0,0,0,.25);
  z-index: 60;
  transition: transform .15s;
}
.floating-whatsapp:hover { transform: scale(1.08); }
.floating-whatsapp::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--whatsapp);
  z-index: -1;
  animation: whatsapp-pulse 4.5s ease-out infinite;
}
@keyframes whatsapp-pulse {
  0%, 60% { transform: scale(1); opacity: 0; }
  68% { opacity: .45; }
  85% { transform: scale(1.7); opacity: 0; }
  100% { transform: scale(1.7); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .floating-whatsapp::after { animation: none; }
}

/* Responsive */
@media (max-width: 900px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .about-grid, .contact-grid { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .problem-grid { grid-template-columns: 1fr; }
  .trustbar-badges { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  .nav {
    position: fixed;
    top: 74px;
    left: 0; right: 0;
    background: #fff;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 24px 20px;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    z-index: 95;
    visibility: hidden;
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity .2s ease, transform .2s ease, visibility .2s;
  }
  .nav a { padding: 14px 0; border-bottom: 1px solid var(--border); }
  .nav a:last-child { border-bottom: none; }
  .nav.open { visibility: visible; opacity: 1; transform: translateY(0); }
  .nav-toggle { display: flex; }
  .nav-backdrop.open { display: block; opacity: 1; }
  .header-cta { display: none; }
  .cards { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: 1fr; }
  .trustbar-badges { grid-template-columns: 1fr; }
  .trustbar-brands { gap: 12px; }
  .brand-logo { height: 44px; padding: 9px 16px; }
  .problem-cta { flex-direction: column; align-items: flex-start; }

  .hero { min-height: 0; }
  .hero-content { padding-top: 56px; padding-bottom: 44px; }
  .eyebrow { font-size: .7rem; padding: 6px 12px; margin-bottom: 20px; }
  .hero h1 { font-size: 1.7rem; line-height: 1.3; margin-bottom: 16px; }
  .hero-sub { font-size: .98rem; margin-bottom: 26px; line-height: 1.55; }
  .hero-actions { gap: 12px; margin-bottom: 24px; }
  .hero-actions .btn { width: 100%; }
  .hero-trust { grid-template-columns: 1fr 1fr; display: grid; gap: 10px 16px; padding-top: 20px; }
  .hero-trust li { font-size: .78rem; }
}

/* Legal page (Aviso de Privacidad) */
.legal { max-width: 780px; margin: 0 auto; padding: 60px 24px 100px; }
.legal h1 { font-size: 2rem; margin-bottom: 8px; }
.legal .updated { color: var(--gray); font-size: .9rem; margin-bottom: 40px; }
.legal h2 { font-size: 1.2rem; margin: 36px 0 12px; }
.legal p, .legal li { color: var(--gray); font-size: .97rem; line-height: 1.7; }
.legal ul { padding-left: 20px; list-style: disc; margin: 12px 0; }
.legal a { color: var(--red); text-decoration: underline; }
.back-link { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 24px; font-weight: 600; color: var(--black); }
