/* ==========================================================================
   Social Masiva — estilo Y2K: rojo Masiva, cromo, nácar e iridiscencia
   ========================================================================== */

:root {
  --red: #E3101E;
  --red-deep: #A90A15;
  --red-soft: #FFD9DC;
  --ink: #24101A;
  --muted: #6A5662;
  --bg: #F4F2F8;            /* nácar */
  --surface: rgba(255, 255, 255, .78);
  --surface-solid: #FFFFFF;
  --line: rgba(36, 16, 26, .12);
  --chrome-1: #FFFFFF;
  --chrome-2: #CDD0DB;
  --chrome-3: #8E93A4;
  --holo-cyan: #8FE9F2;
  --holo-lilac: #C9B2FF;
  --shadow: 0 1px 0 rgba(255,255,255,.9) inset, 0 18px 40px -22px rgba(80, 10, 30, .45);
  --radius-l: 28px;
  --radius-m: 18px;
  --radius-s: 10px;
  --wrap: 1180px;
  --top-h: 34px;
  --head-h: 72px;
  --font-display: "Unbounded", "Arial Black", system-ui, sans-serif;
  --font-body: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --ink: #F7EEF3;
  --muted: #C2AEBB;
  --bg: #170A14;
  --surface: rgba(40, 18, 34, .78);
  --surface-solid: #26121F;
  --line: rgba(247, 238, 243, .14);
  --red-soft: #4A0D17;
  --chrome-1: #5B5F70;
  --chrome-2: #2E2F3B;
  --chrome-3: #15161C;
  --shadow: 0 1px 0 rgba(255,255,255,.08) inset, 0 18px 40px -20px rgba(0,0,0,.7);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: clip; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }

body {
  margin: 0;
  font: 400 1rem/1.6 var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(201,178,255,.35), transparent 60%),
    radial-gradient(900px 500px at -10% 30%, rgba(143,233,242,.25), transparent 60%),
    var(--bg);
  min-height: 100vh;
  overflow-x: clip;
}
:root[data-theme="dark"] body {
  background:
    radial-gradient(1200px 600px at 85% -10%, color-mix(in srgb, var(--red) 18%, transparent), transparent 60%),
    radial-gradient(900px 500px at -10% 30%, rgba(120,80,200,.18), transparent 60%),
    var(--bg);
}

img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; border-radius: 6px; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: fixed; left: 12px; top: 12px; transform: translateY(-200%); z-index: 100; background: var(--red); color: #fff; padding: 10px 16px; border-radius: 999px; text-decoration: none; transition: transform .2s; }
.skip:focus { transform: none; }

.wrap { width: min(var(--wrap), 100% - 40px); margin-inline: auto; }

#y2k-bg { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }

/* ---------- Tipografía ---------- */
h1, h2, h3, .h2 { font-family: var(--font-display); line-height: 1.12; margin: 0 0 .5em; letter-spacing: -.01em; }
.h2 { font-size: clamp(1.6rem, 1.1rem + 2vw, 2.6rem); font-weight: 700; max-width: 22ch; }
h3 { font-size: 1.08rem; font-weight: 700; }
p { margin: 0 0 1em; }
.lead { font-size: 1.08rem; color: var(--muted); max-width: 62ch; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5em; justify-content: center;
  padding: .72em 1.4em; border-radius: 999px; border: 0;
  font-weight: 600; text-decoration: none; line-height: 1.2;
  position: relative; isolation: isolate; transition: transform .15s ease, box-shadow .15s ease;
}
.btn-red {
  color: #fff;
  background: linear-gradient(180deg, color-mix(in srgb, var(--red) 75%, #fff) 0%, var(--red) 48%, var(--red-deep) 100%);
  box-shadow: 0 1px 0 rgba(255,255,255,.55) inset, 0 -2px 0 rgba(0,0,0,.18) inset, 0 10px 22px -10px color-mix(in srgb, var(--red) 80%, transparent);
}
.btn-red::after { /* brillo de gel Y2K */
  content: ""; position: absolute; inset: 3px 10% 52% 10%; border-radius: 999px;
  background: linear-gradient(180deg, rgba(255,255,255,.55), rgba(255,255,255,0)); z-index: -1; pointer-events: none;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(1px); }
.btn-lg { font-size: 1.05rem; padding: .9em 1.8em; }

.pill-btn, .round-btn {
  display: inline-flex; align-items: center; gap: .45em;
  border: 1px solid var(--line); background: var(--surface);
  color: var(--ink); text-decoration: none; border-radius: 999px;
  padding: .45em .95em; font-size: .9rem; font-weight: 500;
  backdrop-filter: blur(8px);
}
.pill-btn svg, .round-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.round-btn { width: 44px; height: 44px; padding: 0; justify-content: center; }
.round-btn:hover, .pill-btn:hover { border-color: var(--red); color: var(--red); }

/* ---------- Barra superior ---------- */
.topbar {
  height: var(--top-h); font-size: .85rem;
  background: linear-gradient(90deg, var(--red-deep), var(--red) 50%, color-mix(in srgb, var(--red) 80%, #fff));
  color: #fff;
}
.topbar-in { height: 100%; display: flex; align-items: center; gap: 16px; justify-content: flex-end; }
.topbar { position: relative; z-index: 60; }
.tb-date { }
.tb-lang { display: inline-flex; margin-right: auto; border: 1px solid rgba(255,255,255,.5); border-radius: 999px; padding: 2px; gap: 2px; }
.tb-lang a { color: #fff; text-decoration: none; font-weight: 700; font-size: .75rem; padding: 1px 9px; border-radius: 999px; line-height: 1.5; }
.tb-lang a[aria-current] { background: #fff; color: var(--red-deep); }
.tb-lang a:not([aria-current]):hover { background: rgba(255,255,255,.2); }
.tb-time { font-variant-numeric: tabular-nums; font-weight: 600; }
.tb-weather { display: inline-flex; align-items: center; gap: 6px; }
.tb-weather svg { width: 16px; height: 16px; }
.tb-search { position: relative; display: flex; align-items: center; }
.tb-search > svg { position: absolute; left: 9px; width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; pointer-events: none; opacity: .9; }
.tb-search input {
  width: 150px; height: 24px; padding: 0 10px 0 28px; border-radius: 999px; border: 1px solid rgba(255,255,255,.45);
  background: rgba(255,255,255,.16); color: #fff; font: inherit; font-size: .82rem; transition: width .2s, background .2s;
}
.tb-search input::placeholder { color: rgba(255,255,255,.85); }
.tb-search input:focus { width: 230px; background: #fff; color: var(--ink); outline: 2px solid #fff; outline-offset: 1px; }
.tb-search:focus-within > svg { color: var(--red); }
.tb-search input::-webkit-search-cancel-button { display: none; }
.search-results {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 90; width: min(380px, 92vw); max-height: 70vh; overflow-y: auto;
  background: var(--surface-solid); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius-m);
  box-shadow: 0 24px 50px -24px rgba(40,0,20,.55); padding: 6px;
}
.sr-item { display: grid; gap: 2px; padding: 9px 12px; border-radius: 12px; text-decoration: none; }
.sr-item:hover, .sr-item.on { background: var(--red-soft); }
.sr-type { font-size: .72rem; font-weight: 600; color: var(--red); }
.sr-item b { font-size: .92rem; }
.sr-item small { color: var(--muted); font-size: .8rem; line-height: 1.35; }
.sr-none { margin: 0; padding: 12px; color: var(--muted); font-size: .88rem; }

/* ---------- Encabezado ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50; height: var(--head-h);
  border-bottom: 1px solid var(--line);
}
/* El desenfoque va en un pseudo-elemento: así el menú móvil (position: fixed) se ubica respecto a la pantalla */
.site-header::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
}
.header-in { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: block; color: var(--ink); }
.logo-img { display: block; height: 34px; width: auto; max-width: 240px; object-fit: contain; }
.logo-dark { display: none; }
:root[data-theme="dark"] .logo-light { display: none; }
:root[data-theme="dark"] .logo-dark { display: block; }
.site-footer .logo-img { height: 32px; }

.main-nav { display: flex; align-items: center; gap: 10px; }
.main-nav > ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 2px; }
.main-nav .portal-btn, .portal-btn {
  display: inline-flex; align-items: center; gap: 7px; padding: 7px 14px 7px 11px; border-radius: 999px;
  font-weight: 600; font-size: .9rem; text-decoration: none; color: var(--red-deep);
  border: 1.5px solid var(--red); background: var(--red-soft); white-space: nowrap;
}
.portal-btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.main-nav .portal-btn:hover, .portal-btn:hover { background: var(--red); color: #fff; }
:root[data-theme="dark"] .portal-btn { color: #fff; }
.main-nav > .portal-btn { margin-right: 6px; }
.portal-btn-foot { color: #fff; background: transparent; border-color: color-mix(in srgb, var(--red) 70%, #fff); }
.foot-left { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.main-nav a, .drop-btn {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 8px 10px; border-radius: 999px; text-decoration: none;
  font-weight: 500; font-size: .95rem; background: none; border: 0; white-space: nowrap;
}
.main-nav ul a:hover, .drop-btn:hover, .drop-btn[aria-expanded="true"] { background: var(--red-soft); color: var(--red-deep); }
:root[data-theme="dark"] .main-nav a:hover, :root[data-theme="dark"] .drop-btn:hover, :root[data-theme="dark"] .drop-btn[aria-expanded="true"] { color: #fff; }
.drop-btn svg { width: 16px; height: 16px; transition: transform .2s; }
.drop-btn[aria-expanded="true"] svg { transform: rotate(180deg); }
.main-nav .nav-cta { background: var(--ink); color: var(--bg); margin-left: 6px; }
.main-nav .nav-cta:hover { background: var(--red); color: #fff; }

.has-drop { position: relative; }
.drop {
  position: absolute; top: calc(100% + 12px); left: 50%; transform: translateX(-50%);
  width: min(900px, 92vw); padding: 22px;
  display: none; grid-template-columns: repeat(3, 1fr); gap: 18px 22px;
  background: var(--surface-solid); border: 1px solid var(--line);
  border-radius: var(--radius-l); box-shadow: 0 30px 60px -30px rgba(40, 0, 20, .5);
}
.drop.is-open { display: grid; }
.drop-col ul { list-style: none; margin: 0; padding: 0; }
.drop-h { font-family: var(--font-display); font-size: .78rem; font-weight: 700; color: var(--red); margin: 0 0 6px; }
.drop-col a { padding: 5px 8px; font-size: .9rem; width: 100%; border-radius: var(--radius-s); gap: 8px; }
.ico-s { width: 18px; height: 18px; color: var(--red); flex: none; }
.drop-all { grid-column: 1 / -1; justify-content: center; border: 1px dashed var(--line); }

.nav-toggle { display: none; width: 46px; height: 46px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); }
.bars { display: grid; gap: 5px; width: 20px; margin: auto; }
.bars i { display: block; height: 2px; background: currentColor; border-radius: 2px; transition: transform .2s, opacity .2s; }
.nav-toggle[aria-expanded="true"] .bars i:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .bars i:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .bars i:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero + slider ---------- */
.hero { position: relative; padding: clamp(40px, 7vw, 90px) 0 36px; overflow: hidden; isolation: isolate; }
#hero-scene { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.hero-copy { max-width: var(--wrap); }
.hero h1 {
  font-size: clamp(2rem, 1.1rem + 4.2vw, 4.4rem); font-weight: 800; max-width: 17ch;
  background: linear-gradient(100deg, var(--ink) 0%, var(--ink) 40%, var(--red) 70%, var(--red-deep) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-sub { font-size: clamp(1rem, .95rem + .4vw, 1.2rem); max-width: 58ch; color: var(--muted); margin-bottom: 34px; }

.slider { position: relative; }
.slider-track {
  list-style: none; margin: 0; padding: 14px max(20px, calc((100vw - var(--wrap)) / 2)) 26px;
  display: flex; gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory;
  scroll-padding-inline: max(20px, calc((100vw - var(--wrap)) / 2));
  scrollbar-width: none;
}
.slider-track::-webkit-scrollbar { display: none; }
.slide { flex: 0 0 clamp(250px, 26vw, 300px); scroll-snap-align: start; }

.svc-card {
  height: 100%; display: flex; flex-direction: column; align-items: flex-start;
  padding: 26px 24px 24px; border-radius: var(--radius-l);
  background:
    linear-gradient(var(--surface), var(--surface)) padding-box,
    linear-gradient(135deg, rgba(255,255,255,.95), var(--holo-lilac), var(--holo-cyan), rgba(255,255,255,.9)) border-box;
  border: 1.5px solid transparent;
  backdrop-filter: blur(14px) saturate(1.3);
  box-shadow: var(--shadow);
}
:root[data-theme="dark"] .svc-card {
  background:
    linear-gradient(var(--surface), var(--surface)) padding-box,
    linear-gradient(135deg, rgba(255,255,255,.25), color-mix(in srgb, var(--red) 60%, transparent), rgba(201,178,255,.35)) border-box;
}
.orb {
  width: 96px; height: 96px; border-radius: 50%; display: grid; place-items: center; margin-bottom: 18px;
  color: var(--red);
  background:
    radial-gradient(circle at 32% 26%, #fff 0 14%, transparent 34%),
    radial-gradient(circle at 50% 60%, var(--chrome-1), var(--chrome-2) 55%, var(--chrome-3) 100%);
  box-shadow: 0 2px 0 rgba(255,255,255,.8) inset, 0 -6px 14px rgba(0,0,0,.12) inset, 0 12px 24px -12px rgba(60,0,20,.5);
}
.ico-xl { width: 50px; height: 50px; stroke-width: 1.5; }
.svc-line { font-size: .8rem; font-weight: 600; color: var(--red); margin: 0 0 4px; }
.svc-title { font-size: 1.15rem; margin-bottom: 8px; }
.svc-desc { color: var(--muted); font-size: .95rem; flex: 1; }

.slider-ctrl { display: flex; align-items: center; gap: 10px; }
.round-btn .i-play { display: none; }
.round-btn[aria-pressed="true"] .i-play { display: block; fill: currentColor; }
.round-btn[aria-pressed="true"] .i-pause { display: none; }
.sl-progress { flex: 1; height: 4px; border-radius: 4px; background: var(--line); overflow: hidden; margin-left: 8px; }
.sl-progress span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--red), var(--holo-lilac)); }

/* ---------- Marquesina de noticias ---------- */
.news { padding: 26px 0 30px; border-block: 1px solid var(--line); background: var(--surface); backdrop-filter: blur(10px); }
.news-h { width: min(var(--wrap), 100% - 40px); margin: 0 auto 14px; font-size: 1rem; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.news-h::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 4px var(--red-soft); animation: blink 1.6s infinite; }
@keyframes blink { 50% { opacity: .3; } }
.marquee { overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.marquee-track { display: flex; gap: 18px; width: max-content; animation: marquee var(--dur, 80s) linear infinite; }
.marquee:hover .marquee-track, .marquee:focus-within .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }
.news-loading { margin: 0 20px; color: var(--muted); }
.news-item {
  display: grid; grid-template-columns: 72px 1fr; gap: 12px; align-items: center;
  width: 360px; padding: 10px; border-radius: var(--radius-m);
  background: var(--surface-solid); border: 1px solid var(--line);
}
.news-thumb { width: 72px; height: 72px; border-radius: 12px; object-fit: cover; background: linear-gradient(135deg, var(--holo-lilac), var(--holo-cyan)); }
.news-src { font-size: .72rem; font-weight: 600; color: var(--red); margin: 0; }
.news-t { font-size: .9rem; font-weight: 600; line-height: 1.3; margin: 2px 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.news-x { font-size: .8rem; color: var(--muted); margin: 0; }
.news-x a { color: var(--red); font-weight: 600; white-space: nowrap; }

/* ---------- Secciones ---------- */
.section { padding: clamp(64px, 9vw, 120px) 0; scroll-margin-top: calc(var(--head-h) + 10px); }
#ubicacion, #inicio { scroll-margin-top: calc(var(--head-h) + 10px); }
.svc-item { scroll-margin-top: calc(var(--head-h) + 24px); }
.sec-head { margin-bottom: 40px; }

.chart-card {
  margin: 0; padding: 20px; border-radius: var(--radius-l);
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}
.chart-card figcaption { font-weight: 600; font-size: .95rem; margin-bottom: 10px; }
.chart-box { position: relative; height: 260px; }
.chart-box-sq { height: 300px; }
.chart-box-sm { height: 190px; }

/* Quiénes somos */
.about-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(30px, 5vw, 70px); align-items: start; }
.about-copy p { font-size: 1.06rem; max-width: 60ch; }
.about-copy p:first-of-type::first-letter { font-family: var(--font-display); font-size: 3.2em; float: left; line-height: .9; margin: 6px 10px 0 0; color: var(--red); font-weight: 800; }
.timeline { list-style: none; margin: 22px 0 0; padding: 0; border-left: 2px solid var(--red); }
.timeline li { display: grid; grid-template-columns: 64px 1fr; gap: 10px; padding: 6px 0 6px 16px; position: relative; font-size: .95rem; }
.timeline li::before { content: ""; position: absolute; left: -7px; top: 13px; width: 12px; height: 12px; border-radius: 50%; background: var(--bg); border: 2px solid var(--red); }
.tl-year { font-family: var(--font-display); font-weight: 700; font-size: .85rem; color: var(--red); padding-top: 2px; }

/* Servicios */
.lines-chart { display: grid; grid-template-columns: minmax(280px, 420px) 1fr; gap: 26px; align-items: center; margin-bottom: 34px; }
.line-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.line-tab { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: .55em 1.1em; font-weight: 500; }
.line-tab { display: inline-flex; align-items: center; gap: 8px; }
.line-tab[style]::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--dot); flex: none; }
.line-tab.is-on { background: var(--red); color: #fff; border-color: var(--red); }
.line-tab.is-on::before { box-shadow: 0 0 0 2px #fff; }
.svc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.svc-item {
  display: grid; grid-template-columns: 52px 1fr; gap: 14px; padding: 20px;
  border-radius: var(--radius-m); background: var(--surface); border: 1px solid var(--line);
}
.svc-item[hidden] { display: none; }
.svc-item:target { outline: 2px solid var(--red); outline-offset: 2px; }
.svc-ico { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; color: #fff; background: linear-gradient(160deg, color-mix(in srgb, var(--red) 70%, #fff), var(--red) 55%, var(--red-deep)); box-shadow: 0 1px 0 rgba(255,255,255,.5) inset; }
.ico-m { width: 28px; height: 28px; }
.svc-item h3 { margin-bottom: 4px; }
.svc-item p { color: var(--muted); font-size: .95rem; margin-bottom: 10px; }
.svc-item dl { margin: 0 0 10px; display: grid; gap: 4px; font-size: .86rem; }
.svc-item dl div { display: flex; gap: 6px; flex-wrap: wrap; }
.svc-item dt { font-weight: 600; }
.svc-item dt::after { content: ":"; }
.svc-item dd { margin: 0; color: var(--muted); }
.svc-item dd.price { color: var(--red); font-weight: 600; }
.link-btn { font-weight: 600; font-size: .9rem; color: var(--red); text-underline-offset: 3px; }

/* Dominios */
.domain { background: linear-gradient(120deg, color-mix(in srgb, var(--holo-cyan) 22%, transparent), color-mix(in srgb, var(--red) 6%, transparent)); }
.domain-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: clamp(30px, 5vw, 70px); align-items: center; }
.domain-box { padding: clamp(20px, 3vw, 30px); border-radius: var(--radius-l); background: var(--surface-solid); border: 1px solid var(--line); box-shadow: var(--shadow); }
.domain-form { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; }
.domain-form input, .domain-form select {
  font: inherit; color: var(--ink); padding: .8em 1em; border-radius: 999px; border: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 60%, var(--surface-solid)); min-width: 0;
}
.domain-form input { font-size: 1.05rem; }
.domain-form input:focus, .domain-form select:focus { outline: 2px solid var(--red); border-color: transparent; }
.domain-result { margin-top: 16px; min-height: 1.6em; }
.domain-result p { margin: 0 0 8px; }
.domain-result.is-free { padding: 14px 16px; border-radius: var(--radius-m); background: color-mix(in srgb, #1F8A4C 12%, transparent); }
.domain-result.is-free p b, .domain-result.is-free p { color: #17703D; }
:root[data-theme="dark"] .domain-result.is-free p { color: #7FE0A6; }
.domain-result.is-taken, .domain-result.is-unknown { padding: 14px 16px; border-radius: var(--radius-m); background: var(--red-soft); }
.domain-result.is-bad { color: var(--red); font-weight: 600; }
.domain-result.is-wait { color: var(--muted); }

/* Cifras */
.counters { list-style: none; margin: 0 0 30px; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.counters li { padding: 22px; border-radius: var(--radius-m); background: var(--surface); border: 1px solid var(--line); }
.counters b { display: block; font-family: var(--font-display); font-size: clamp(2rem, 1.4rem + 2vw, 3.2rem); line-height: 1; color: var(--red); font-variant-numeric: tabular-nums; }
.counters span { color: var(--muted); font-size: .95rem; }
.charts-2 { display: grid; grid-template-columns: 1fr 1.4fr; gap: 20px; }

/* Calculadora */
.calc { background: linear-gradient(135deg, color-mix(in srgb, var(--red) 6%, transparent), rgba(201,178,255,.18)); }
.calc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(30px, 5vw, 70px); align-items: center; }
.ranges { display: grid; gap: 22px; margin-top: 26px; }
.range span { display: flex; justify-content: space-between; gap: 10px; font-weight: 500; margin-bottom: 8px; }
.range output { font-family: var(--font-display); font-weight: 700; color: var(--red); }
input[type="range"] { width: 100%; accent-color: var(--red); height: 28px; }
.calc-out { padding: 26px; border-radius: var(--radius-l); background: var(--surface-solid); border: 1px solid var(--line); box-shadow: var(--shadow); }
.calc-nums { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 14px; }
.calc-nums p { margin: 0; font-size: .82rem; color: var(--muted); }
.calc-nums b { display: block; font-family: var(--font-display); font-size: clamp(1rem, .8rem + .9vw, 1.45rem); color: var(--ink); margin-top: 4px; font-variant-numeric: tabular-nums; }
.calc-out .btn { margin-top: 16px; width: 100%; }

/* Casos */
.cases-list { display: grid; gap: 22px; }
.case { display: grid; grid-template-columns: 1.4fr 1fr; gap: 26px; padding: 28px; border-radius: var(--radius-l); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); align-items: center; }
.case:nth-child(even) { grid-template-columns: 1fr 1.4fr; }
.case:nth-child(even) .case-copy { order: 2; }
.case-svc { display: inline-block; font-size: .8rem; font-weight: 600; color: var(--red-deep); background: var(--red-soft); padding: 3px 10px; border-radius: 999px; }
:root[data-theme="dark"] .case-svc { color: #ffc2c7; }
.case h3 { font-size: 1.3rem; }
.case-who { font-weight: 600; margin: 0; }
.case-who::before { content: "— "; color: var(--red); }
.case-chart { margin: 0; }
.case-chart figcaption { font-size: .9rem; font-weight: 600; margin-bottom: 6px; }

/* Por qué */
.why-list { list-style: none; margin: 34px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px 34px; }
.why-list li { display: grid; grid-template-columns: 30px 1fr; gap: 12px; }
.ico-spark { width: 28px; height: 28px; color: var(--red); fill: color-mix(in srgb, var(--red) 12%, transparent); }
.why-list p { color: var(--muted); margin: 0; }

/* FAQ */
.faq-wrap { display: grid; grid-template-columns: 1fr 1.6fr; gap: 40px; }
.faq-list details { border-bottom: 1px solid var(--line); padding: 4px 0; }
.faq-list summary { cursor: pointer; padding: 14px 32px 14px 0; font-weight: 600; list-style: none; position: relative; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: "+"; position: absolute; right: 4px; top: 8px; font: 700 1.5rem var(--font-display); color: var(--red); transition: transform .2s; }
.faq-list details[open] summary::after { transform: rotate(45deg); }
.faq-list p { color: var(--muted); padding-right: 30px; }

/* Contacto */
.contact-grid { display: grid; grid-template-columns: 1fr 1.25fr; gap: clamp(30px, 5vw, 70px); }
.form { padding: clamp(22px, 3vw, 34px); border-radius: var(--radius-l); background: var(--surface-solid); border: 1px solid var(--line); box-shadow: var(--shadow); display: grid; gap: 14px; }
.f-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { display: grid; gap: 6px; font-weight: 500; font-size: .92rem; }
.field input, .field select, .field textarea {
  font: inherit; font-weight: 400; color: var(--ink); width: 100%;
  padding: .75em .9em; border-radius: var(--radius-s); border: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 60%, var(--surface-solid));
}
.field textarea { resize: vertical; min-height: 84px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--red); outline-offset: 0; border-color: transparent; }
.field.invalid input, .field.invalid select { border-color: var(--red); background: var(--red-soft); }
.hp { position: absolute; left: -9999px; }
.f-privacy { font-size: .8rem; color: var(--muted); margin: 0; }
.f-status { margin: 0; font-weight: 600; min-height: 1.5em; }
.f-status.ok { color: #1F8A4C; }
.f-status.err { color: var(--red); }
.form.flash { animation: flash 1s ease; }
@keyframes flash { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--red) 50%, transparent); } 100% { box-shadow: 0 0 0 18px color-mix(in srgb, var(--red) 0%, transparent); } }

/* Mapa */
.map-sec { padding: clamp(50px, 7vw, 90px) 0 0; scroll-margin-top: var(--head-h); }
.map-head { display: flex; justify-content: space-between; align-items: end; gap: 20px; flex-wrap: wrap; margin-bottom: 20px; }
.map-head p { color: var(--muted); max-width: 46ch; margin: 0; }
.map { height: clamp(320px, 42vw, 460px); width: 100%; background: var(--chrome-2); }
:root[data-theme="dark"] .leaflet-tile-pane { filter: invert(.92) hue-rotate(180deg) saturate(.6) brightness(.9); }
.leaflet-container { font-family: var(--font-body); }

/* Pie */
.site-footer { background: var(--ink); color: var(--bg); padding: 60px 0 0; }
:root[data-theme="dark"] .site-footer { background: #0D050B; color: var(--ink); }
.site-footer .brand { color: inherit; }
.foot-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.1fr; gap: 30px; padding-bottom: 40px; }
.foot-brand p { opacity: .75; max-width: 34ch; margin-top: 14px; }
.foot-h { font-size: .85rem; font-weight: 700; margin-bottom: 12px; color: color-mix(in srgb, var(--red) 60%, #fff); }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.site-footer a { text-decoration: none; opacity: .85; }
.site-footer a:hover { opacity: 1; color: color-mix(in srgb, var(--red) 60%, #fff); }
address { font-style: normal; opacity: .85; line-height: 1.8; }
.foot-bottom { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 18px 0 26px; border-top: 1px solid rgba(255,255,255,.14); font-size: .88rem; }
.foot-bottom p { margin: 0; }
.foot-sitemap a { margin-right: 14px; opacity: .6; }
.foot-right { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-left: auto; }
.site-footer .pill-btn { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.2); color: inherit; opacity: 1; }
.site-footer .pill-btn:hover { border-color: color-mix(in srgb, var(--red) 60%, #fff); color: color-mix(in srgb, var(--red) 60%, #fff); }

/* ---------- Chatbot ---------- */
.bot { position: fixed; right: max(18px, env(safe-area-inset-right)); bottom: max(18px, env(safe-area-inset-bottom)); z-index: 80; }
.bot-fab { width: 68px; height: 68px; border: 0; padding: 0; border-radius: 50%; background: none; filter: drop-shadow(0 12px 18px rgba(120, 0, 20, .45)); transition: transform .2s; }
.bot-fab:hover { transform: scale(1.06) rotate(-4deg); }
.bot-face { width: 100%; height: 100%; }
.bot-face .eyes { transform-origin: 50% 46%; animation: happy 4s infinite; }
@keyframes happy { 0%, 86%, 100% { transform: scaleY(1); } 90% { transform: scaleY(.25); } 94% { transform: scaleY(1.1); } }
.bot[data-open="false"] .bot-fab { animation: bob 3s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-5px); } }

.bot-panel {
  position: absolute; right: 0; bottom: 84px; width: min(380px, calc(100vw - 32px)); height: min(560px, calc(100vh - 140px));
  display: flex; flex-direction: column; border-radius: var(--radius-l); overflow: hidden;
  background: var(--surface-solid); border: 1px solid var(--line);
  box-shadow: 0 30px 70px -20px rgba(60, 0, 20, .55);
  transform-origin: 100% 100%; animation: pop .35s cubic-bezier(.2, 1.4, .4, 1);
}
.bot-panel[hidden] { display: none; }
@keyframes pop { from { transform: scale(.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.bot-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; color: #fff; background: linear-gradient(120deg, var(--red-deep), var(--red) 60%, color-mix(in srgb, var(--red) 75%, #fff)); }
.bot-face-sm { width: 42px; height: 42px; flex: none; filter: drop-shadow(0 2px 4px rgba(0,0,0,.25)); }
.bot-face-sm > circle { fill: #fff; } .bot-face-sm g path { stroke: var(--red); } .bot-face-sm > path { fill: var(--red); stroke: none; }
.bot-name { font-family: var(--font-display); font-weight: 700; margin: 0; }
.bot-role { margin: 0; font-size: .8rem; opacity: .9; }
.bot-x { margin-left: auto; width: 36px; height: 36px; border-radius: 50%; border: 0; background: rgba(255,255,255,.18); display: grid; place-items: center; }
.bot-x svg { width: 18px; height: 18px; fill: none; stroke: #fff; stroke-width: 2.2; stroke-linecap: round; }
.bot-log { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; background: color-mix(in srgb, var(--bg) 70%, var(--surface-solid)); }
.msg { max-width: 86%; padding: 10px 14px; border-radius: 18px; font-size: .93rem; line-height: 1.45; animation: pop .25s ease-out; }
.msg p { margin: 0 0 .4em; } .msg p:last-child { margin: 0; }
.msg-bot { align-self: flex-start; background: var(--surface-solid); border: 1px solid var(--line); border-bottom-left-radius: 6px; }
.msg-me { align-self: flex-end; background: var(--red); color: #fff; border-bottom-right-radius: 6px; }
.msg a { color: var(--red); font-weight: 600; }
.msg .mini-btn + .mini-btn { margin-left: 6px; }
.bot-invite { font-size: .86rem; opacity: .9; }
.msg .mini-btn { display: inline-block; margin-top: 6px; padding: 5px 12px; border-radius: 999px; background: var(--red); color: #fff; text-decoration: none; font-size: .85rem; }
.typing { display: inline-flex; gap: 4px; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: dots 1s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes dots { 50% { transform: translateY(-4px); opacity: .4; } }
.bot-chips { display: flex; gap: 6px; padding: 8px 12px; overflow-x: auto; border-top: 1px solid var(--line); scrollbar-width: none; }
.bot-chips button { flex: none; border: 1px solid var(--red); color: var(--red); background: transparent; border-radius: 999px; padding: 5px 12px; font-size: .82rem; }
.bot-chips button:hover { background: var(--red); color: #fff; }
.bot-form { display: flex; gap: 8px; padding: 10px 12px 12px; }
.bot-form input { flex: 1; font: inherit; color: var(--ink); padding: .65em 1em; border-radius: 999px; border: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 60%, var(--surface-solid)); }
.bot-form button { width: 44px; height: 44px; flex: none; border-radius: 50%; border: 0; background: var(--red); display: grid; place-items: center; }
.bot-form button svg { width: 20px; height: 20px; fill: #fff; }

/* ---------- Responsive ---------- */
@media (max-width: 1240px) {
  .nav-toggle { display: grid; place-items: center; }
  .main-nav {
    position: fixed; inset: var(--nav-top, calc(var(--head-h) + var(--top-h))) 0 0 0; z-index: 60;
    background: var(--surface-solid); padding: 18px 20px 40px; overflow-y: auto;
    transform: translateX(100%); transition: transform .3s ease; visibility: hidden;
  }
  .main-nav.is-open { transform: none; visibility: visible; }
  .main-nav { flex-direction: column; align-items: stretch; }
  .main-nav > .portal-btn { margin: 0 0 10px; justify-content: center; padding: 12px; font-size: 1rem; }
  .main-nav > ul { flex-direction: column; align-items: stretch; gap: 2px; }
  .main-nav ul a, .drop-btn { width: 100%; justify-content: space-between; font-size: 1.05rem; padding: 12px 14px; }
  .main-nav .nav-cta { margin: 10px 0 0; justify-content: center; }
  .main-nav .drop-col a { justify-content: flex-start; font-size: .95rem; padding: 8px 10px; }
  .drop { position: static; transform: none; width: 100%; box-shadow: none; grid-template-columns: 1fr 1fr; margin: 6px 0 10px; padding: 14px; }
  .about-grid, .calc-grid, .contact-grid, .faq-wrap, .domain-grid { grid-template-columns: 1fr; }
  .why-list { grid-template-columns: 1fr 1fr; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  :root { --head-h: 62px; }
  .logo-img { height: 26px; max-width: 180px; }
  .tb-date { display: none; }
  .topbar-in { justify-content: space-between; }
  .lines-chart, .charts-2, .case, .case:nth-child(even) { grid-template-columns: 1fr; }
  .case:nth-child(even) .case-copy { order: 0; }
  .counters { grid-template-columns: 1fr 1fr; }
  .why-list { grid-template-columns: 1fr; }
  .line-tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: -20px; padding: 2px 20px 6px; }
  .line-tab { flex: none; }
  .f-row { grid-template-columns: 1fr; }
  .domain-form { grid-template-columns: 1fr auto; }
  .domain-form .btn { grid-column: 1 / -1; }
  .tb-search input { width: 120px; }
  .tb-search input:focus { width: 170px; }
  .tb-weather { font-size: 0; gap: 4px; }
  .tb-weather b { font-size: .85rem; }
  .drop { grid-template-columns: 1fr; }
  .svc-grid { grid-template-columns: 1fr; }
  .calc-nums { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr; }
  .news-item { width: 300px; }
  .bot-fab { width: 60px; height: 60px; }
  .bot-panel { height: min(470px, 62vh); bottom: 74px; }
}

/* ===== v3: errores del formulario ===== */
.req { color: var(--red); font-weight: 700; }
.f-err[hidden] { display: none; }
.f-err {
  display: flex; align-items: flex-start; gap: 6px; margin-top: 2px;
  color: #B3001B; font-size: .84rem; font-weight: 600; line-height: 1.35;
}
.f-err::before { content: "!"; flex: none; display: grid; place-items: center; width: 17px; height: 17px; border-radius: 50%; background: #B3001B; color: #fff; font-size: .72rem; font-weight: 800; margin-top: 1px; }
:root[data-theme="dark"] .f-err { color: #FF9AA6; }
:root[data-theme="dark"] .f-err::before { background: #FF5A6E; }
.field.invalid input, .field.invalid select, .field.invalid textarea {
  border: 2px solid #B3001B; background: color-mix(in srgb, #B3001B 7%, var(--surface-solid));
  box-shadow: 0 0 0 4px color-mix(in srgb, #B3001B 14%, transparent);
}
.field.invalid > span { color: #B3001B; }
:root[data-theme="dark"] .field.invalid > span { color: #FF9AA6; }
.f-summary {
  border-radius: var(--radius-m); padding: 14px 16px; border: 2px solid #B3001B;
  background: color-mix(in srgb, #B3001B 8%, var(--surface-solid)); color: var(--ink);
}
.f-summary p { margin: 0 0 6px; font-weight: 700; color: #B3001B; }
:root[data-theme="dark"] .f-summary p { color: #FF9AA6; }
.f-summary ul { margin: 0; padding-left: 18px; }
.f-summary a { color: inherit; }
.form.shake { animation: shake .4s ease; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.f-status.ok { padding: 12px 14px; border-radius: var(--radius-s); background: color-mix(in srgb, #1F8A4C 12%, transparent); }
.f-status.err { padding: 12px 14px; border-radius: var(--radius-s); background: color-mix(in srgb, #B3001B 10%, transparent); color: #B3001B; }
.f-privacy a { color: var(--red); }

/* ===== Promociones ===== */
.promo-sec { background: linear-gradient(160deg, color-mix(in srgb, var(--red) 9%, transparent), color-mix(in srgb, var(--holo-lilac) 18%, transparent)); }
.promo-grid { display: grid; gap: 22px; margin-top: 26px; }
.promo-grid.promo-n2 { grid-template-columns: repeat(2, 1fr); }
.promo-grid.promo-n3 { grid-template-columns: repeat(3, 1fr); }
.promo-grid.promo-n1 { grid-template-columns: 1fr; }
.promo-n1 .promo-card { grid-template-columns: minmax(240px, 420px) 1fr; align-items: center; }
.promo-card { display: grid; background: var(--surface-solid); border: 1px solid var(--line); border-radius: var(--radius-l); overflow: hidden; box-shadow: var(--shadow); }
.promo-img { position: relative; display: block; aspect-ratio: 1 / 1; background: linear-gradient(135deg, var(--holo-lilac), var(--holo-cyan)); }
.promo-img img { width: 100%; height: 100%; object-fit: cover; }
.promo-badge {
  position: absolute; left: 14px; top: 14px; padding: 6px 14px; border-radius: 999px; font-weight: 700; font-size: .9rem; color: #fff;
  background: linear-gradient(180deg, color-mix(in srgb, var(--red) 75%, #fff), var(--red) 50%, var(--red-deep));
  box-shadow: 0 8px 18px -8px color-mix(in srgb, var(--red) 80%, transparent);
}
.promo-badge-lg { font-size: 1.05rem; padding: 9px 18px; left: 18px; top: 18px; }
.promo-body { padding: 22px 24px 26px; display: grid; gap: 10px; align-content: start; }
.promo-body h3 { margin: 0; font-size: 1.2rem; }
.promo-body h3 a { text-decoration: none; }
.promo-body p { margin: 0; color: var(--muted); }
.promo-body .btn { justify-self: start; margin-top: 6px; }
.promo-ends { font-size: .88rem; font-weight: 600; color: var(--red-deep) !important; }
:root[data-theme="dark"] .promo-ends { color: #FF9AA6 !important; }
.main-nav .nav-promo { color: var(--red); font-weight: 700; }

/* ===== Páginas internas ===== */
.page-main { padding: 26px 0 70px; min-height: 60vh; }
.crumbs { font-size: .88rem; color: var(--muted); margin-bottom: 22px; }
.crumbs a { color: var(--red); }
.narrow { width: min(820px, 100% - 40px); margin-inline: auto; }
.promo-page { display: grid; grid-template-columns: minmax(280px, 1fr) 1.1fr; gap: clamp(26px, 5vw, 60px); align-items: start; }
.promo-media { position: relative; border-radius: var(--radius-l); overflow: hidden; box-shadow: var(--shadow); aspect-ratio: 1 / 1; background: linear-gradient(135deg, var(--holo-lilac), var(--holo-cyan)); }
.promo-media img { width: 100%; height: 100%; object-fit: cover; }
.promo-h1 { font-size: clamp(1.8rem, 1.2rem + 2.4vw, 3rem); font-weight: 800; }
.promo-content { display: grid; gap: 8px; align-content: start; }
.promo-content .btn { justify-self: start; margin-top: 10px; }
.promo-contact { padding-top: 60px; }
.promo-others { padding-bottom: 20px; }
.prose { font-size: 1.04rem; }
.prose h2 { font-size: 1.25rem; margin: 1.6em 0 .5em; }
.prose h3 { font-size: 1.08rem; margin: 1.3em 0 .4em; }
.prose ul { padding-left: 1.2em; margin: 0 0 1em; }
.prose li { margin-bottom: .35em; }
.prose a { color: var(--red); }
.policy { background: var(--surface-solid); border: 1px solid var(--line); border-radius: var(--radius-l); padding: clamp(24px, 4vw, 48px); box-shadow: var(--shadow); }
.muted-line { color: var(--muted); font-size: .9rem; }
.policy-nav { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; padding-top: 20px; border-top: 1px solid var(--line); }
.policy-nav a { padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line); text-decoration: none; font-size: .9rem; }
.policy-nav a:hover { border-color: var(--red); color: var(--red); }
.foot-pol { margin-bottom: 18px !important; }

/* ===== Chatbot: registro ===== */
.msg .mini-ghost { background: transparent; color: var(--red); border: 1.5px solid var(--red); font: inherit; font-size: .85rem; cursor: pointer; }
.msg button.mini-btn { border: 0; font: inherit; font-size: .85rem; cursor: pointer; }
.msg button.mini-ghost { border: 1.5px solid var(--red); }
.lead-sum { background: var(--bg); border-radius: 12px; padding: 8px 12px; }

@media (max-width: 1000px) {
  .promo-grid.promo-n3, .promo-grid.promo-n2 { grid-template-columns: 1fr 1fr; }
  .promo-page, .promo-n1 .promo-card { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .promo-grid.promo-n3, .promo-grid.promo-n2 { grid-template-columns: 1fr; }
}

.bot-actions { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 4px; }
.bot-actions .mini-btn { margin: 0; }
.msg .bot-err { color: #B3001B; font-weight: 600; }
:root[data-theme="dark"] .msg .bot-err { color: #FF9AA6; }
.msg .bot-ok { color: #17703D; font-size: .85rem; }
:root[data-theme="dark"] .msg .bot-ok { color: #7FE0A6; }
.msg:has(.bot-ok) { padding: 4px 12px; }
