/* ============================================================
   SIP Software — sitio estático (SPA sencilla)
   Paleta: base clara + acentos verdes sobrios + secciones oscuras
   ============================================================ */

:root {
  --ink:      #0c1a1e;
  --ink-2:    #51656a;
  --bg:       #ffffff;
  --bg-alt:   #f3f7f5;
  --line:     #e3ebe8;

  --brand:      #0b7a43;   /* verde profundo para acciones/enlaces */
  --brand-dark: #0a6a3a;
  --brand-soft: #e7f4ec;   /* wash muy suave */
  --accent:     #1fd67e;   /* verde vivo, solo sobre fondos oscuros */

  --dark:     #0c1a1e;
  --dark-2:   #0f2429;

  --r:   14px;
  --r-lg: 20px;
  --shadow-sm: 0 1px 2px rgba(12,26,30,.06), 0 4px 14px rgba(12,26,30,.05);
  --shadow-md: 0 10px 40px rgba(12,26,30,.10);

  --wrap: 1160px;
  --font-head: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  --font-body: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { font-family: var(--font-head); font-weight: 600; line-height: 1.15; letter-spacing: -.01em; margin: 0; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 200;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 0 0 10px 0;
}
.skip-link:focus { left: 0; }

:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 4px; }

/* ---------- Botones ---------- */
.btn {
  --_bg: var(--brand); --_fg: #fff; --_bd: transparent;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-head); font-weight: 500; font-size: .98rem;
  padding: 13px 22px; border-radius: 999px;
  background: var(--_bg); color: var(--_fg); border: 1px solid var(--_bd);
  cursor: pointer; transition: transform .15s ease, background .15s ease, box-shadow .15s ease;
  text-decoration: none; white-space: nowrap;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { --_bg: var(--brand); box-shadow: 0 8px 20px rgba(11,122,67,.25); }
.btn-primary:hover { --_bg: var(--brand-dark); }
.btn-ghost { --_bg: transparent; --_fg: #fff; --_bd: rgba(255,255,255,.35); }
.btn-ghost:hover { --_bg: rgba(255,255,255,.08); }
.btn-sm { padding: 10px 18px; font-size: .9rem; }
.btn-block { width: 100%; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.82);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 24px; height: 68px; }

.brand { display: inline-flex; align-items: center; }
.brand:hover { text-decoration: none; }
.brand-logo { display: block; height: 30px; width: auto; color: #00a04f; }

.nav { display: flex; gap: 6px; margin-left: auto; }
.nav a {
  color: var(--ink-2); font-size: .94rem; font-weight: 500;
  padding: 8px 12px; border-radius: 8px; transition: color .15s, background .15s;
}
.nav a:hover, .nav a.active { color: var(--ink); background: var(--bg-alt); text-decoration: none; }

.header-cta { margin-left: 4px; }

.nav-toggle {
  display: none; margin-left: auto; width: 42px; height: 42px;
  background: transparent; border: 1px solid var(--line); border-radius: 10px;
  cursor: pointer; padding: 0;
}
.nav-toggle span {
  display: block; width: 18px; height: 2px; margin: 4px auto; background: var(--ink);
  border-radius: 2px; transition: transform .2s, opacity .2s;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { position: relative; color: #eaf3ef; background: var(--dark); overflow: hidden; isolation: isolate; }
.hero-bg { position: absolute; inset: 0; z-index: -1; }
.hero-grid {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, transparent, rgba(12,26,30,.65) 78%, var(--dark)),
    linear-gradient(120deg, #06231d 0%, #0a3628 45%, #0c1a1e 100%);
}
.hero-grid::after {
  content: ""; position: absolute; inset: 0; opacity: .5;
  background-image:
    linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: radial-gradient(120% 80% at 70% 0%, #000 30%, transparent 75%);
}
.hero-glow {
  position: absolute; width: 620px; height: 620px; right: -140px; top: -220px;
  background: radial-gradient(circle, rgba(31,214,126,.45), transparent 62%);
  filter: blur(30px);
}

.hero-inner { padding: 92px 24px 84px; max-width: 900px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: .82rem; font-weight: 500; letter-spacing: .04em; text-transform: uppercase;
  color: #9ac9b4; margin: 0 0 22px;
}
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgba(31,214,126,.18); }
.hero h1 { font-size: clamp(2.4rem, 6vw, 3.9rem); font-weight: 700; letter-spacing: -.03em; }
.hero .grad {
  background: linear-gradient(92deg, var(--accent), #7df3b9);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero .lead { font-size: clamp(1.05rem, 2.4vw, 1.28rem); color: #b9d3c8; margin: 22px 0 34px; max-width: 640px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }

.hero-stats {
  display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 20px;
  margin: 60px 0 0; padding: 26px 0 0; border-top: 1px solid rgba(255,255,255,.12);
}
.hero-stats div { margin: 0; }
.hero-stats dt { font-family: var(--font-head); font-size: 1.7rem; font-weight: 700; color: #fff; }
.hero-stats dd { margin: 4px 0 0; font-size: .9rem; color: #9fbcae; }
.hero-note { margin: 22px 0 0; font-size: .92rem; line-height: 1.55; color: #8fb0a2; max-width: 560px; }
.hero-note strong { color: #d7e8e0; font-weight: 600; }

/* ---------- Strip clientes ---------- */
.strip { background: var(--bg); border-bottom: 1px solid var(--line); padding: 40px 0; }
.strip-title { text-align: center; font-size: .82rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); margin: 0 0 24px; }
.logos { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; }
.logos li { flex: 0 0 auto; }
.logos a {
  display: grid; place-items: center; width: 150px; height: 84px; padding: 12px;
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--r);
  transition: border-color .15s, transform .15s;
}
.logos a:hover { border-color: var(--brand); transform: translateY(-2px); }
.logos img { max-height: 56px; width: auto; object-fit: contain; }

/* ---------- Secciones ---------- */
.section { padding: 96px 0; }
.section-alt { background: var(--bg-alt); }
.section-head { max-width: 640px; margin: 0 0 52px; }
.kicker {
  display: inline-block; font-size: .8rem; font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; color: var(--brand); margin: 0 0 12px;
}
.section-head h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); }
.section-sub { color: var(--ink-2); font-size: 1.06rem; margin: 14px 0 0; }

.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* ---------- Cards de producto ---------- */
.card {
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 28px; transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: #d3e3db; }
.card-icon {
  display: grid; place-items: center; width: 48px; height: 48px; border-radius: 12px;
  background: var(--brand-soft); color: var(--brand); margin-bottom: 18px;
}
.card-icon svg, .mini-icon svg, .ci-ico svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.card h3 { font-size: 1.16rem; margin-bottom: 8px; }
.card p { margin: 0; color: var(--ink-2); font-size: .96rem; }

/* ---------- Features (servicios) ---------- */
.feature {
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 34px;
}
.feature-num { font-family: var(--font-head); font-weight: 700; font-size: .9rem; color: var(--brand); letter-spacing: .1em; }
.feature h3 { font-size: 1.35rem; margin: 12px 0 10px; }
.feature p { color: var(--ink-2); margin: 0 0 18px; }
.ticks { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.ticks li { position: relative; padding-left: 28px; font-size: .95rem; }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: 3px; width: 18px; height: 18px; border-radius: 50%;
  background: var(--brand-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230b7a43' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 12px no-repeat;
}

/* ---------- Mini cards (por qué) ---------- */
.mini { padding: 24px; border-radius: var(--r); border: 1px solid var(--line); background: var(--bg); }
.mini-icon {
  display: grid; place-items: center; width: 42px; height: 42px; border-radius: 10px;
  background: var(--dark); color: var(--accent); margin-bottom: 14px;
}
.mini h3 { font-size: 1.05rem; margin-bottom: 6px; }
.mini p { margin: 0; color: var(--ink-2); font-size: .92rem; }

/* ---------- CTA band ---------- */
.cta-band { background: var(--dark); color: #eaf3ef; }
.cta-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 28px;
  padding: 56px 24px;
}
.cta-band h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
.cta-band p { margin: 8px 0 0; color: #a9c6b9; }

/* ---------- Contacto ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 48px; align-items: start; }
.contact-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 26px; }
.contact-list li { display: flex; gap: 16px; }
.ci-ico {
  flex: 0 0 auto; display: grid; place-items: center; width: 42px; height: 42px;
  border-radius: 10px; background: var(--brand-soft); color: var(--brand);
}
.contact-list h3 { font-size: 1rem; margin-bottom: 3px; }
.contact-list p { margin: 0; color: var(--ink-2); font-size: .95rem; }

.contact-form {
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 30px; box-shadow: var(--shadow-sm);
}
.field { margin-bottom: 16px; }
.field label { display: block; font-size: .88rem; font-weight: 500; margin-bottom: 6px; }
.field .opt { color: var(--ink-2); font-weight: 400; }
.field input, .field textarea {
  width: 100%; font: inherit; color: var(--ink);
  padding: 11px 14px; border: 1px solid var(--line); border-radius: 10px; background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
.field input:focus, .field textarea:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(11,122,67,.14);
}
.field textarea { resize: vertical; }
.form-note { font-size: .9rem; margin: 12px 0 0; min-height: 1.2em; }
.form-note.ok { color: var(--brand); }
.form-note.err { color: #c0392b; }

/* Honeypot anti-spam: fuera de la vista y del tabulador */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Footer ---------- */
.site-footer { background: var(--dark); color: #b7cfc4; padding: 56px 0 28px; }
.footer-inner { display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.site-footer .brand-logo { color: #fff; height: 28px; }
.footer-brand p { margin: 12px 0 0; font-size: .92rem; max-width: 320px; }
.footer-nav { display: flex; flex-direction: column; gap: 10px; }
.footer-nav a { color: #b7cfc4; font-size: .92rem; }
.footer-nav a:hover { color: #fff; }
.footer-bottom {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px;
  margin-top: 40px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.12);
  font-size: .84rem; color: #86a596;
}
.footer-bottom p { margin: 0; color: #86a596; }

/* ---------- Chat widget ---------- */
.chat { position: fixed; right: 22px; bottom: 22px; z-index: 120; display: flex; flex-direction: column; align-items: flex-end; gap: 14px; }
.chat-fab {
  width: 58px; height: 58px; border-radius: 50%; border: none; cursor: pointer;
  background: var(--brand); color: #fff; box-shadow: 0 12px 30px rgba(11,122,67,.4);
  display: grid; place-items: center; transition: transform .18s, background .18s;
}
.chat-fab:hover { transform: translateY(-2px); background: var(--brand-dark); }
.chat-fab svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.chat-ico-close { display: none; }
.chat.open .chat-ico-open { display: none; }
.chat.open .chat-ico-close { display: block; }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .5s ease, transform .5s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; gap: 34px; }
}
@media (max-width: 860px) {
  .nav, .header-cta { display: none; }
  .nav-toggle { display: block; }
  .site-header.menu-open { border-bottom-color: transparent; }
  .site-header.menu-open .nav {
    display: flex; flex-direction: column; gap: 2px;
    position: absolute; left: 0; right: 0; top: 100%;
    background: #fff; border-bottom: 1px solid var(--line);
    padding: 12px 20px 16px; box-shadow: var(--shadow-md);
  }
  .site-header.menu-open .nav a { padding: 13px 12px; font-size: 1.02rem; border-radius: 10px; }
  .site-header.menu-open .nav a:last-child {
    margin-top: 6px; background: var(--brand); color: #fff; text-align: center;
  }
}
@media (max-width: 620px) {
  .section { padding: 68px 0; }
  .hero-inner { padding: 68px 24px 60px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .hero-stats { grid-template-columns: 1fr; gap: 16px; text-align: left; }
  .cta-inner { flex-direction: column; align-items: flex-start; text-align: left; }
  .footer-inner { flex-direction: column; }
}

/* ============================================================
   Página legal (política de datos)
   ============================================================ */
.legal-topbar { background: var(--dark); color: #eaf3ef; }
.legal-topbar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 64px; }
.legal-topbar .brand-logo { color: #fff; height: 26px; }
.legal-back { color: #9ac9b4; font-size: .9rem; font-weight: 500; }
.legal-back:hover { color: #fff; text-decoration: none; }

.legal-intro { background: var(--bg-alt); border-bottom: 1px solid var(--line); padding: 54px 0; }
.legal-intro h1 { font-size: clamp(1.9rem, 4vw, 2.7rem); max-width: 22ch; }
.legal-meta { margin: 16px 0 0; display: flex; flex-wrap: wrap; gap: 10px 22px; color: var(--ink-2); font-size: .93rem; }
.legal-meta strong { color: var(--ink); font-weight: 600; }
.legal-actions { margin-top: 24px; }

.legal-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 56px; padding: 52px 0 96px; align-items: start; }
.legal-toc { position: sticky; top: 24px; font-size: .9rem; }
.legal-toc p { font-family: var(--font-head); font-weight: 600; font-size: .74rem; letter-spacing: .09em; text-transform: uppercase; color: var(--ink-2); margin: 0 0 12px; }
.legal-toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.legal-toc a { color: var(--ink-2); display: block; padding: 6px 0 6px 16px; border-left: 2px solid var(--line); line-height: 1.35; }
.legal-toc a:hover, .legal-toc a.active { color: var(--brand); border-color: var(--brand); text-decoration: none; }

.legal-body { max-width: 74ch; }
.legal-body > section { margin-bottom: 44px; scroll-margin-top: 24px; }
.legal-body > section:last-child { margin-bottom: 0; }
.legal-body h2 { font-size: 1.45rem; margin: 0 0 14px; padding-top: 6px; }
.legal-body h3 { font-size: 1.08rem; margin: 26px 0 10px; }
.legal-body p { color: #33484d; margin: 0 0 14px; }
.legal-body ul, .legal-body ol { color: #33484d; margin: 0 0 16px; padding-left: 22px; }
.legal-body li { margin-bottom: 8px; }
.legal-body li::marker { color: var(--brand); }
.legal-body dl { margin: 0 0 8px; }
.legal-body dt { font-weight: 600; color: var(--ink); margin-top: 14px; }
.legal-body dd { margin: 3px 0 0; color: #33484d; }
.legal-body a { color: var(--brand); }

.legal-callout {
  background: var(--brand-soft); border: 1px solid #cfe7d8; border-radius: var(--r);
  padding: 22px 24px;
}
.legal-callout h2 { margin-bottom: 4px; }
.legal-callout .legal-callout-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 24px; margin-top: 16px; }
.legal-callout dl { margin: 0; }
.legal-callout dt { margin: 0; font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-2); font-weight: 600; }
.legal-callout dd { margin: 3px 0 0; color: var(--ink); font-weight: 500; }

.legal-footer { background: var(--dark); color: #86a596; padding: 30px 0; font-size: .86rem; }
.legal-footer .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.legal-footer a { color: #b7cfc4; }
.legal-footer a:hover { color: #fff; }

@media (max-width: 900px) {
  .legal-layout { grid-template-columns: 1fr; gap: 0; padding-top: 32px; }
  .legal-toc { position: static; margin-bottom: 36px; padding: 18px 20px; background: var(--bg-alt); border-radius: var(--r); }
  .legal-toc ol { grid-template-columns: repeat(2, 1fr); gap: 2px 18px; }
  .legal-body { max-width: none; }
}
@media (max-width: 560px) {
  .legal-callout .legal-callout-grid { grid-template-columns: 1fr; }
  .legal-toc ol { grid-template-columns: 1fr; }
}

/* ---------- Impresión / guardar como PDF (política) ---------- */
@media print {
  @page { margin: 18mm 16mm 20mm; }

  html { font-size: 100%; }
  body { background: #fff; color: #000; font-size: 10.5pt; line-height: 1.5; }

  .legal-toc, .legal-actions, .legal-footer, .legal-back, .skip-link { display: none !important; }

  .wrap { max-width: none; padding: 0; }

  .legal-topbar { background: #fff !important; color: #000; }
  .legal-topbar .wrap { display: block; height: auto; padding: 0; }
  .legal-topbar .brand-logo { color: #0b7a43 !important; height: 20pt; }

  .legal-intro { background: #fff; border: none; padding: 12pt 0 10pt; }
  .legal-intro::after {
    content: ""; display: block; margin-top: 12pt;
    border-bottom: 2px solid #0b7a43;
  }
  .legal-intro h1 { font-size: 20pt; max-width: none; color: #0b7a43; }
  .legal-meta { margin-top: 8pt; font-size: 9pt; color: #333; gap: 4px 16px; }
  .legal-meta strong { color: #000; }

  .legal-layout { display: block; padding: 16pt 0 0; }
  .legal-body { max-width: none; }
  .legal-body > section { margin-bottom: 14pt; page-break-inside: avoid; }
  .legal-body h2 {
    font-size: 12.5pt; color: #0b7a43; margin-bottom: 8pt;
    padding-bottom: 3pt; border-bottom: 1px solid #cfe0d7;
  }
  .legal-body h3 { font-size: 10.5pt; margin: 12pt 0 5pt; }
  .legal-body p, .legal-body li, .legal-body dd { color: #1a1a1a; margin-bottom: 6pt; }
  .legal-body dt { color: #000; margin-top: 8pt; }
  .legal-body ul, .legal-body ol { padding-left: 16pt; }
  .legal-body li { margin-bottom: 4pt; }
  .legal-body a { color: #000 !important; text-decoration: none; }

  .legal-callout {
    background: #fff !important; border: 1px solid #999; border-radius: 6px;
    padding: 12pt 14pt; page-break-inside: avoid;
  }
  .legal-callout h2 { border: none; }
  .legal-callout .legal-callout-grid { grid-template-columns: repeat(2, 1fr); gap: 8pt 20pt; margin-top: 10pt; }
  .legal-callout dt { color: #555; }
  .legal-callout dd { color: #000; }

  .reveal { opacity: 1 !important; transform: none !important; }
}
