/* =========================================================
   WebDigital360 — estilos compartidos (mobile-first)
   Cada página cambia los colores con una clase en <body>.
   ========================================================= */

:root {
  --brand: #4f46e5;
  --brand-ink: #ffffff;      /* texto sobre --brand */
  --accent: #c6f432;
  --ink: #0f172a;
  --muted: #475569;
  --bg: #ffffff;
  --bg-soft: #f4f5fb;
  --card: #ffffff;
  --line: rgba(15, 23, 42, .1);
  --radius: 20px;
  --shadow: 0 10px 30px -12px rgba(15, 23, 42, .25);
  --font-body: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-head: var(--font-body);
  --nav-h: 64px;
  --wa: #128c4b;
}

/* ---------- Temas por demo ---------- */
.theme-resto {
  --brand: #b4441f; --brand-ink: #fff; --accent: #f2c14e;
  --ink: #2a1a12; --muted: #6b5246; --bg: #fffaf3; --bg-soft: #f8eedf; --card: #fff;
  --font-head: "Fraunces", Georgia, serif;
}
.theme-salud {
  --brand: #0f766e; --brand-ink: #fff; --accent: #5eead4;
  --ink: #0b2b2a; --muted: #3f5f5d; --bg: #ffffff; --bg-soft: #ecfbf8; --card: #fff;
}
.theme-industrial {
  --brand: #f59e0b; --brand-ink: #111827; --accent: #f59e0b;
  --ink: #e5e7eb; --muted: #a3acb9; --bg: #0f141b; --bg-soft: #161d27; --card: #1b2430;
  --line: rgba(255, 255, 255, .1);
  --shadow: 0 10px 30px -12px rgba(0, 0, 0, .6);
}
.theme-tienda {
  --brand: #111111; --brand-ink: #fff; --accent: #e8577a;
  --ink: #111111; --muted: #555; --bg: #ffffff; --bg-soft: #f6f1ee; --card: #fff;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font-body); color: var(--ink); background: var(--bg);
  line-height: 1.6; font-size: 1rem; -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.1; margin: 0 0 .5em; letter-spacing: -.02em; }
h1 { font-size: clamp(2.3rem, 9vw, 4.6rem); font-weight: 800; }
h2 { font-size: clamp(1.8rem, 6vw, 3rem); font-weight: 800; }
h3 { font-size: 1.2rem; font-weight: 700; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
.container { width: min(1180px, 100% - 2.5rem); margin-inline: auto; }
.section { padding: 4.5rem 0; }
.section--soft { background: var(--bg-soft); }
.eyebrow {
  display: inline-block; font-size: .8rem; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--brand); margin-bottom: .8rem;
}
.theme-industrial .eyebrow { color: var(--accent); }
.section-head { max-width: 680px; margin-bottom: 2.5rem; }
.section-head p { color: var(--muted); font-size: 1.1rem; }
.skip-link { position: absolute; left: -999px; top: 0; background: var(--ink); color: var(--bg); padding: .6rem 1rem; z-index: 999; }
.skip-link:focus { left: 1rem; top: 1rem; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  min-height: 52px; padding: .85rem 1.5rem; border-radius: 999px; border: 2px solid transparent;
  font: inherit; font-weight: 700; text-decoration: none; cursor: pointer;
  background: var(--brand); color: var(--brand-ink);
  transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.btn:active { transform: translateY(0); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--light { background: #fff; color: #111; }
.btn--wa { background: var(--wa); color: #fff; }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: .8rem; }

/* ---------- Barra "sitio de ejemplo" ---------- */
.demo-bar {
  background: #111; color: #fff; font-size: .82rem; text-align: center; padding: .45rem 1rem;
}
.demo-bar a { color: #c6f432; font-weight: 700; }

/* ---------- Navegación ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  transition: transform .35s ease;
}
.site-header.is-hidden { transform: translateY(-100%); }
.nav {
  height: var(--nav-h); display: flex; align-items: center;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(160%) blur(12px); -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav .container { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.logo { font-family: var(--font-head); font-weight: 800; font-size: 1.25rem; text-decoration: none; letter-spacing: -.02em; }
.logo span { color: var(--brand); }
.theme-industrial .logo span { color: var(--accent); }
.nav-links { display: none; }
.nav-links a { text-decoration: none; font-weight: 600; color: var(--muted); transition: color .2s; }
.nav-links a:hover { color: var(--ink); }

.burger {
  width: 46px; height: 46px; border: 0; background: transparent; cursor: pointer;
  display: grid; place-content: center; gap: 6px; color: var(--ink);
}
.burger span { display: block; width: 24px; height: 2px; background: currentColor; border-radius: 2px; transition: transform .3s ease, opacity .2s ease; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

.mobile-menu {
  position: absolute; left: 0; right: 0; top: 100%;
  background: var(--bg); border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
  padding: .5rem 1.25rem 1.5rem;
  opacity: 0; transform: translateY(-10px); visibility: hidden;
  transition: opacity .25s ease, transform .25s ease, visibility .25s;
}
.mobile-menu.is-open { opacity: 1; transform: none; visibility: visible; }
.mobile-menu a:not(.btn) {
  display: block; padding: .9rem 0; font-size: 1.15rem; font-weight: 700; text-decoration: none;
  border-bottom: 1px solid var(--line);
}
.mobile-menu .btn { width: 100%; margin-top: 1rem; }

/* ---------- Hero ---------- */
.hero { padding: calc(var(--nav-h) + 4rem) 0 4rem; position: relative; overflow: hidden; }
.hero p.lead { font-size: clamp(1.1rem, 3.6vw, 1.35rem); color: var(--muted); max-width: 620px; }
.hero--image { color: #fff; min-height: 88svh; display: flex; align-items: flex-end; }
.hero--image .hero-bg { position: absolute; inset: 0; z-index: -2; }
.hero--image .hero-bg img { width: 100%; height: 100%; object-fit: cover; }
.hero--image::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(0,0,0,.25) 0%, rgba(0,0,0,.75) 100%);
}
.hero--image p.lead { color: rgba(255,255,255,.9); }
.hero--image .eyebrow { color: var(--accent); }
.hero-badges { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.5rem; }
.badge {
  display: inline-flex; align-items: center; gap: .4rem; font-size: .85rem; font-weight: 600;
  padding: .4rem .85rem; border-radius: 999px; background: var(--bg-soft); color: var(--ink);
}
.hero--image .badge { background: rgba(255,255,255,.15); color: #fff; backdrop-filter: blur(6px); }

/* ---------- Grids y tarjetas ---------- */
.grid { display: grid; gap: 1.25rem; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.5rem; transition: transform .25s ease, box-shadow .25s ease, border-color .25s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card p { color: var(--muted); margin: 0; }
.icon {
  width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center;
  background: color-mix(in srgb, var(--brand) 12%, transparent); color: var(--brand); margin-bottom: 1rem;
}
.theme-industrial .icon { background: rgba(245,158,11,.14); color: var(--accent); }
.icon svg { width: 24px; height: 24px; }

/* Imagen con degradado de respaldo (si la foto no carga) */
.media { position: relative; overflow: hidden; background: linear-gradient(135deg, var(--brand), var(--accent)); }
.media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.media img.is-broken { display: none; }

/* ---------- Animación al hacer scroll ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
.reveal-d1 { transition-delay: .08s; } .reveal-d2 { transition-delay: .16s; } .reveal-d3 { transition-delay: .24s; }

/* ---------- WhatsApp flotante ---------- */
.wa-float {
  position: fixed; right: 1rem; bottom: 1rem; z-index: 60;
  width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center;
  background: #25d366; color: #fff; box-shadow: 0 10px 25px -6px rgba(0,0,0,.4);
  transition: transform .2s ease;
}
.wa-float:hover { transform: scale(1.08); }
.wa-float svg { width: 32px; height: 32px; }
.wa-float::before {
  content: ""; position: absolute; inset: 0; border-radius: 50%; background: #25d366;
  animation: pulse 2.4s ease-out infinite; z-index: -1;
}
@keyframes pulse { 0% { transform: scale(1); opacity: .5; } 100% { transform: scale(1.6); opacity: 0; } }

/* ---------- Horario, mapa, formulario ---------- */
.hours { width: 100%; border-collapse: collapse; }
.hours td { padding: .75rem 0; border-bottom: 1px solid var(--line); }
.hours td:last-child { text-align: right; font-weight: 700; }
.map { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); aspect-ratio: 4 / 3; background: var(--bg-soft); }
.map iframe { width: 100%; height: 100%; border: 0; }

.form { display: grid; gap: 1rem; }
.form label { font-weight: 600; font-size: .95rem; display: grid; gap: .4rem; }
.form input, .form textarea, .form select {
  font: inherit; color: var(--ink); background: var(--card);
  border: 1.5px solid var(--line); border-radius: 14px; padding: .9rem 1rem; min-height: 52px;
  transition: border-color .2s, box-shadow .2s;
}
.form input:focus, .form textarea:focus, .form select:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 20%, transparent);
}
.form small { color: var(--muted); }

/* ---------- Galería ---------- */
.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: .75rem; }
.gallery .media { border-radius: 16px; aspect-ratio: 1; }
.gallery .media:hover img { transform: scale(1.06); }

/* ---------- Estadísticas / logos ---------- */
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.stat strong { display: block; font-family: var(--font-head); font-size: clamp(2rem, 7vw, 3rem); line-height: 1; color: var(--brand); }
.theme-industrial .stat strong { color: var(--accent); }
.stat span { color: var(--muted); font-size: .95rem; }
.logos { display: flex; flex-wrap: wrap; gap: .75rem; }
.logos span {
  flex: 1 1 140px; text-align: center; padding: 1.1rem; border: 1px dashed var(--line); border-radius: 14px;
  font-weight: 800; letter-spacing: .06em; color: var(--muted);
}

/* ---------- Filtros (menú / catálogo) ---------- */
.chips { display: flex; gap: .5rem; overflow-x: auto; padding-bottom: .5rem; margin-bottom: 1.5rem; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; font: inherit; font-weight: 600; padding: .6rem 1.1rem; border-radius: 999px; cursor: pointer;
  border: 1.5px solid var(--line); background: var(--card); color: var(--ink); transition: all .2s;
}
.chip[aria-pressed="true"] { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
[data-item].is-filtered { display: none; }

/* ---------- Precio (agencia) ---------- */
.price-card {
  background: var(--ink); color: #fff; border-radius: 28px; padding: 2.2rem 1.6rem; position: relative; overflow: hidden;
}
.price-card::before {
  content: ""; position: absolute; width: 320px; height: 320px; right: -120px; top: -120px; border-radius: 50%;
  background: radial-gradient(circle, var(--brand) 0%, transparent 70%); opacity: .7;
}
.price { font-size: clamp(2.6rem, 11vw, 4.5rem); font-weight: 800; letter-spacing: -.03em; line-height: 1; margin: .5rem 0; }
.price small { font-size: 1rem; font-weight: 600; opacity: .7; }
.check-list { list-style: none; padding: 0; margin: 1.5rem 0; display: grid; gap: .6rem; }
.check-list li { display: flex; gap: .6rem; align-items: flex-start; }
.check-list li::before { content: "✓"; color: var(--accent); font-weight: 800; }

/* ---------- Footer ---------- */
.footer { padding: 3rem 0 6rem; border-top: 1px solid var(--line); font-size: .95rem; color: var(--muted); }
.footer .container { display: grid; gap: 1.5rem; }
.footer a { color: var(--ink); }
.footer-credit { font-size: .85rem; }

/* ---------- CTA final ---------- */
.cta-band { border-radius: 28px; padding: 2.5rem 1.6rem; background: var(--brand); color: var(--brand-ink); text-align: center; }
.cta-band h2 { color: inherit; }
.cta-band p { opacity: .9; max-width: 560px; margin-inline: auto; margin-bottom: 1.5rem; }
.cta-band .btn-row { justify-content: center; }

/* ---------- Computador (min 768px) ---------- */
@media (min-width: 768px) {
  .section { padding: 6.5rem 0; }
  .hero { padding: calc(var(--nav-h) + 6rem) 0 6rem; }
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .gallery { grid-template-columns: repeat(4, 1fr); }
  .gallery .media:first-child { grid-column: span 2; grid-row: span 2; }
  .stats { grid-template-columns: repeat(4, 1fr); }
  .split { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
  .footer .container { grid-template-columns: 2fr 1fr 1fr; }
  .cta-band { padding: 4rem; }
  .price-card { padding: 3rem; }
}
@media (min-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
  .nav-links { display: flex; align-items: center; gap: 2rem; }
  .nav-links .btn { min-height: 44px; padding: .6rem 1.2rem; color: var(--brand-ink); }
  .burger, .mobile-menu { display: none; }
}

/* ---------- Respeta "reducir movimiento" ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- Ajustes ---------- */
.hero { isolation: isolate; }
section[id] { scroll-margin-top: 90px; }
