/* ============================================================
   ARA Solutions — sistema de diseño
   Un solo archivo, sin dependencias, sin framework.

   Marca madre: antracita + la cinta de tres colores.
   Cada producto tiñe la página con su color mediante
   data-product="health | distribution | events" en <html>.
   ============================================================ */

:root {
  /* — neutros — ligeramente sesgados al verde azulado de la marca */
  --ground: #f6f8f8;
  --surface: #ffffff;
  --surface-2: #eff3f3;
  --ink: #0e1a20;
  --ink-2: #2e4149;
  --muted: #5e7178;
  --line: #dce3e3;
  --line-strong: #c3cfcf;

  /* — colores de producto —
     relleno: gráficos, cintas, iconos
     ink:     textos y enlaces (único con contraste suficiente)
     wash:    fondos suaves y etiquetas                        */
  --health: #2b8a8f;
  --health-ink: #175e62;
  --health-wash: #e4f1f1;
  --dist: #a8cc18;
  --dist-ink: #4e6b05;
  --dist-wash: #f0f7d9;
  --events: #e4386e;
  --events-ink: #a81d4e;
  --events-wash: #fce5ec;

  /* — acento activo: por defecto la marca madre — */
  --accent: var(--ink);
  --accent-ink: var(--ink);
  --accent-wash: var(--surface-2);

  --wa: #1fa855;

  --display: "Bricolage Grotesque", "Trebuchet MS", sans-serif;
  --sans: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;

  --gutter: clamp(20px, 5vw, 48px);
  --maxw: 1140px;
  --radius: 10px;
  --shadow: 0 12px 32px -16px rgba(14, 26, 32, 0.28);
}

html[data-product="health"] {
  --accent: var(--health);
  --accent-ink: var(--health-ink);
  --accent-wash: var(--health-wash);
}
html[data-product="distribution"] {
  --accent: var(--dist);
  --accent-ink: var(--dist-ink);
  --accent-wash: var(--dist-wash);
}
html[data-product="events"] {
  --accent: var(--events);
  --accent-ink: var(--events-ink);
  --accent-wash: var(--events-wash);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  /* espacio para que el botón flotante no tape el pie en el celular */
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-ink); text-underline-offset: 2px; }
a:hover { text-decoration: underline; }

:focus-visible {
  outline: 3px solid var(--accent-ink);
  outline-offset: 2px;
  border-radius: 3px;
}

h1, h2, h3 {
  font-family: var(--display);
  line-height: 1.06;
  letter-spacing: -0.025em;
  margin: 0 0 0.5em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.1rem, 5.6vw, 3.6rem); font-weight: 700; }
h2 { font-size: clamp(1.6rem, 3.6vw, 2.4rem); font-weight: 650; }
h3 { font-size: clamp(1.15rem, 2.2vw, 1.4rem); font-weight: 600; letter-spacing: -0.015em; }
p { margin: 0 0 1.05em; color: var(--ink-2); }
strong { font-weight: 600; }
p:last-child { margin-bottom: 0; }

.eyebrow {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent-ink);
  margin: 0 0 0.9rem;
  font-weight: 500;
}

/* ---------- layout ---------- */
.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding-inline: var(--gutter);
}
section { padding-block: clamp(48px, 7vw, 88px); }
.section-head { max-width: 62ch; margin-bottom: clamp(28px, 4vw, 48px); }
.lead { font-size: clamp(1.05rem, 2.2vw, 1.22rem); color: var(--ink-2); max-width: 54ch; }
.bg-surface { background: var(--surface); }
.bg-soft { background: var(--surface-2); }
.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }

/* ---------- cinta de marca ---------- */
.ribbon { height: 5px; display: flex; }
.ribbon span { flex: 1; }
.ribbon .r-h { background: var(--health); }
.ribbon .r-d { background: var(--dist); }
.ribbon .r-e { background: var(--events); }
/* dentro de un producto, la cinta es de ese color */
html[data-product] .ribbon span { background: var(--accent); }

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 50;
  background: rgba(246, 248, 248, 0.92);
  backdrop-filter: saturate(150%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 66px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.22rem;
  letter-spacing: -0.03em;
  color: var(--ink);
  text-decoration: none;
}
.brand:hover { text-decoration: none; }
.brand .mark {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  flex: none;
}
.brand .mark i { flex: 1; display: block; }
.brand .mark .m-h { background: var(--health); }
.brand .mark .m-d { background: var(--dist); }
.brand .mark .m-e { background: var(--events); }

.nav-links { display: flex; align-items: center; gap: 1.5rem; }
.nav-links a {
  color: var(--ink-2);
  font-weight: 400;
  font-size: 0.95rem;
  text-decoration: none;
  padding: 0.35rem 0;
  border-bottom: 2px solid transparent;
}
.nav-links a:hover { color: var(--ink); text-decoration: none; border-bottom-color: var(--accent); }
.nav-links a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }

.nav-actions { display: flex; align-items: center; gap: 0.55rem; }
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 0.45rem 0.55rem;
  cursor: pointer;
}
.nav-toggle i { display: block; width: 18px; height: 2px; background: var(--ink); margin: 4px 0; border-radius: 2px; }

/* ---------- botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.25rem;
  border-radius: 999px;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.2;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.06s ease, background 0.15s ease, border-color 0.15s ease;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-wa { background: var(--wa); color: #fff; }
.btn-wa:hover { background: #17924a; }
.btn-dark { background: var(--ink); color: var(--ground); }
.btn-dark:hover { background: #000; }
.btn-ghost { border-color: var(--line-strong); color: var(--ink-2); background: transparent; }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent-ink); }
.btn-sm { padding: 0.5rem 0.9rem; font-size: 0.86rem; }
.btn .ic { width: 17px; height: 17px; flex: none; }

/* ---------- etiquetas ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.25rem 0.55rem;
  border-radius: 4px;
  background: var(--accent-wash);
  color: var(--accent-ink);
  white-space: nowrap;
}
.tag-h { background: var(--health-wash); color: var(--health-ink); }
.tag-d { background: var(--dist-wash); color: var(--dist-ink); }
.tag-e { background: var(--events-wash); color: var(--events-ink); }
.tag-wip { background: var(--surface-2); color: var(--muted); }

/* ---------- hero ---------- */
.hero { padding-block: clamp(52px, 8vw, 96px) clamp(40px, 6vw, 72px); }
.hero h1 { max-width: 17ch; }
.hero .lead { margin-bottom: 1.8rem; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 0.7rem; }
.hero-note {
  font-size: 0.88rem;
  color: var(--muted);
  margin-top: 1.1rem;
  max-width: 52ch;
}

/* ---------- las tres puertas (variante A) ---------- */
.doors {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.door {
  position: relative;
  padding: clamp(26px, 3.5vw, 40px) clamp(20px, 2.5vw, 32px) clamp(28px, 3.5vw, 38px);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
}
.door:last-child { border-right: 0; }
.door:hover { background: var(--surface-2); text-decoration: none; }
.door .rule { position: absolute; top: 0; left: 0; right: 0; height: 4px; }
.door-h .rule { background: var(--health); }
.door-d .rule { background: var(--dist); }
.door-e .rule { background: var(--events); }
.door .tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 0.9rem; }
.door h3 { margin: 0 0 0.45rem; }
.door p { font-size: 0.95rem; margin-bottom: 1.3rem; }
.door .go {
  margin-top: auto;
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  font-weight: 500;
}
.door-h .go { color: var(--health-ink); }
.door-d .go { color: var(--dist-ink); }
.door-e .go { color: var(--events-ink); }

/* ---------- tarjetas y listas de beneficios ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(22px, 2.6vw, 30px);
}
.benefits { display: grid; gap: 0; border-top: 1px solid var(--line); }
.benefit {
  display: grid;
  grid-template-columns: 3.2rem minmax(0, 1fr);
  gap: clamp(12px, 2vw, 28px);
  padding-block: clamp(22px, 2.6vw, 30px);
  border-bottom: 1px solid var(--line);
  align-items: start;
}
.benefit .num {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  padding-top: 0.35rem;
}
.benefit h3 { margin: 0 0 0.35rem; }
.benefit p { max-width: 64ch; }

/* ---------- problemas (Events) ---------- */
.problems { display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.problem { border-top: 3px solid var(--accent); padding-top: 1.1rem; }
.problem h3 { margin-bottom: 0.4rem; }
.problem p { font-size: 0.97rem; }

/* ---------- preguntas frecuentes ---------- */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer;
  padding-block: 1.1rem;
  font-weight: 600;
  font-size: 1.02rem;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  font-family: var(--mono);
  font-size: 1.3rem;
  color: var(--muted);
  flex: none;
  line-height: 1;
}
.faq details[open] summary::after { content: "−"; }
.faq details[open] summary { color: var(--accent-ink); }
.faq .answer { padding-bottom: 1.2rem; max-width: 66ch; }
.faq .answer p { font-size: 0.98rem; }

/* ---------- franja de cierre ---------- */
.cta-band {
  background: var(--ink);
  color: var(--ground);
  border-radius: 16px;
  padding: clamp(32px, 5vw, 56px);
  text-align: center;
}
.cta-band h2 { color: #fff; margin-bottom: 0.4em; }
.cta-band p { color: rgba(255, 255, 255, 0.82); max-width: 50ch; margin-inline: auto; margin-bottom: 1.6rem; }
.cta-band .hero-cta { justify-content: center; }

/* ---------- aviso de estado (Events) ---------- */
.status {
  border: 1px solid var(--accent);
  background: var(--accent-wash);
  border-radius: var(--radius);
  padding: 20px 22px;
}
.status .tag { background: var(--surface); }
.status p { color: var(--ink); margin-top: 0.7rem; }

/* ---------- migas ---------- */
.crumb {
  font-family: var(--mono);
  font-size: 0.76rem;
  color: var(--muted);
  padding-top: 24px;
  margin: 0;
}
.crumb a { color: var(--muted); }
.crumb a:hover { color: var(--accent-ink); }

/* ---------- pie ---------- */
.site-footer {
  background: var(--ink);
  color: #b8c7cb;
  padding-block: clamp(40px, 5vw, 64px) 28px;
  margin-top: clamp(40px, 5vw, 72px);
}
.site-footer a { color: #b8c7cb; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 36px;
}
.footer-grid h4 {
  font-family: var(--mono);
  color: #fff;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 500;
  margin: 0 0 1rem;
}
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 0.55rem; font-size: 0.93rem; }
.site-footer .brand { color: #fff; }
.footer-about { color: #8ba0a6; font-size: 0.93rem; margin-top: 1rem; max-width: 34ch; }
.footer-bottom {
  border-top: 1px solid #22343b;
  padding-top: 20px;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: #7e9298;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.6rem;
}

/* ---------- botón flotante de WhatsApp ---------- */
.wa-float {
  position: fixed;
  right: 18px;
  bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  z-index: 60;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--wa);
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 8px 24px -6px rgba(14, 26, 32, 0.4);
  text-decoration: none;
}
.wa-float:hover { background: #17924a; text-decoration: none; }
.wa-float svg { width: 30px; height: 30px; }

/* ---------- 404 ---------- */
.err { text-align: center; padding-block: clamp(60px, 10vw, 120px); }
.err h1 { max-width: none; }
.err .hero-cta { justify-content: center; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .doors { grid-template-columns: 1fr; }
  .door { border-right: 0; border-bottom: 1px solid var(--line); }
  .door:last-child { border-bottom: 0; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  body { font-size: 16px; }
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    padding: 8px var(--gutter) 16px;
  }
  .nav-links[hidden] { display: none; }
  .nav-links a { padding: 0.75rem 0; border-bottom: 1px solid var(--line); }
  .nav-links a:last-child { border-bottom: 0; }
  .nav-actions .btn-wa { display: none; } /* el flotante se hace cargo */
  .benefit { grid-template-columns: 1fr; gap: 6px; }
  .benefit .num { padding-top: 0; }
  .footer-grid { grid-template-columns: 1fr; gap: 26px; }
  .site-footer { padding-bottom: 92px; } /* que el flotante no tape el pie */
}

/* ── Formulario de contacto (arma un WhatsApp pre-cargado, sin backend) ── */
.lead-form { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 18px; max-width: 760px; margin-top: 6px; }
.lead-form .field { display: flex; flex-direction: column; gap: 6px; }
.lead-form .field-full { grid-column: 1 / -1; }
.lead-form label { font-size: .9rem; font-weight: 600; color: var(--ink-2); }
.lead-form input, .lead-form select, .lead-form textarea {
  font: inherit; color: var(--ink); background: var(--surface);
  border: 1px solid var(--line-strong); border-radius: var(--radius);
  padding: 11px 13px; width: 100%;
}
.lead-form input:focus, .lead-form select:focus, .lead-form textarea:focus {
  outline: none; border-color: var(--health); box-shadow: 0 0 0 3px var(--health-wash);
}
.lead-form textarea { resize: vertical; min-height: 96px; }
.lead-form .btn { justify-self: start; }
.form-hint { margin: 10px 0 0; font-size: .9rem; color: var(--events-ink); }
@media (max-width: 620px) { .lead-form { grid-template-columns: 1fr; } .lead-form .btn { width: 100%; justify-self: stretch; } }
