/* ============ Salud Laboral — Estilos base ============ */

:root {
  /* Brand — verde + azul del logo */
  --green: #0d8c72;
  --green-deep: #0a6f5a;
  --green-soft: #e6f4f0;
  --green-tint: #f3faf7;

  --blue: #1d4596;
  --blue-deep: #143372;
  --blue-soft: #eaf0fa;
  --blue-tint: #f4f7fc;

  /* Primary brand color (toggleable) — set to literal hex via JS */
  --brand: #1d4596;
  --brand-deep: #143372;
  --brand-soft: #eaf0fa;
  --brand-tint: #f4f7fc;

  /* Neutrals (cool-tinted) */
  --ink: #0a1628;
  --ink-2: #2a3a4d;
  --muted: #5a6a7d;
  --muted-2: #8a96a8;
  --line: #e3e8ef;
  --line-2: #eef1f5;
  --bg: #ffffff;
  --bg-soft: #f7f9fc;

  /* Type — corporativo médico */
  --font-sans: "Inter", "Manrope", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-display: "Plus Jakarta Sans", "Inter", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* Layout */
  --container: 1240px;
  --radius: 14px;
  --radius-lg: 22px;
  --radius-sm: 8px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(13, 30, 26, 0.04), 0 1px 1px rgba(13, 30, 26, 0.03);
  --shadow-md: 0 10px 30px -12px rgba(13, 140, 114, 0.18), 0 2px 6px rgba(13, 30, 26, 0.04);
  --shadow-lg: 0 24px 60px -20px rgba(13, 140, 114, 0.25), 0 6px 16px rgba(13, 30, 26, 0.06);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-size: 16px;
  line-height: 1.5;
  scroll-behavior: smooth;
}

body { overflow-x: hidden; }

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
img { max-width: 100%; display: block; }

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

/* ============ Type ============ */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brand-deep);
  font-family: var(--font-sans);
}
.eyebrow::before {
  content: "";
  width: 28px;
  height: 1.5px;
  background: var(--brand);
  display: inline-block;
}
.eyebrow.center::before { display: none; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.08;
  color: var(--ink);
  margin: 0;
}

h1 { font-size: clamp(40px, 5.4vw, 72px); font-weight: 800; letter-spacing: -0.035em; }
h2 { font-size: clamp(30px, 4vw, 50px); font-weight: 700; }
h3 { font-size: clamp(20px, 2vw, 28px); line-height: 1.2; font-weight: 700; }
h4 { font-size: 18px; line-height: 1.25; font-weight: 600; letter-spacing: -0.01em; }

p { margin: 0; color: var(--ink-2); }
.lead { font-size: 18px; color: var(--ink-2); line-height: 1.6; max-width: 60ch; }

.italic-serif { font-style: normal; color: var(--brand-deep); font-weight: 800; }
.brand-accent { color: var(--brand-deep); }

/* ============ Buttons ============ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: 100px;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.005em;
  transition: transform 180ms cubic-bezier(.2,.8,.2,1), box-shadow 180ms, background 180ms, color 180ms;
  white-space: nowrap;
  border: 1px solid transparent;
}
.btn-primary {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 8px 20px -8px rgba(29, 69, 150, 0.5);
}
.btn-primary:hover { background: var(--brand-deep); transform: translateY(-1px); box-shadow: 0 12px 28px -10px rgba(29, 69, 150, 0.65); }

.btn-green {
  background: var(--green);
  color: #fff;
  box-shadow: 0 8px 20px -8px rgba(13, 140, 114, 0.5);
}
.btn-green:hover { background: var(--green-deep); transform: translateY(-1px); }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}
.btn-ghost:hover { border-color: var(--ink); }

.btn-link {
  padding: 0;
  background: transparent;
  color: var(--brand-deep);
  font-weight: 600;
}
.btn-link:hover { color: var(--brand); }

.btn .arr {
  display: inline-flex;
  width: 18px;
  height: 18px;
  align-items: center;
  justify-content: center;
  transition: transform 180ms;
}
.btn:hover .arr { transform: translateX(3px); }

/* ============ Reveal animations ============ */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 700ms cubic-bezier(.2,.7,.2,1), transform 700ms cubic-bezier(.2,.7,.2,1);
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}
.reveal-stagger > * {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 600ms cubic-bezier(.2,.7,.2,1), transform 600ms cubic-bezier(.2,.7,.2,1);
}
.reveal-stagger.in > * { opacity: 1; transform: translateY(0); }
.reveal-stagger.in > *:nth-child(1) { transition-delay: 60ms; }
.reveal-stagger.in > *:nth-child(2) { transition-delay: 130ms; }
.reveal-stagger.in > *:nth-child(3) { transition-delay: 200ms; }
.reveal-stagger.in > *:nth-child(4) { transition-delay: 270ms; }
.reveal-stagger.in > *:nth-child(5) { transition-delay: 340ms; }
.reveal-stagger.in > *:nth-child(6) { transition-delay: 410ms; }

/* ============ Sections ============ */
section { padding: 120px 0; position: relative; }
section.tight { padding: 80px 0; }

.section-head {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: end;
  margin-bottom: 64px;
}
.section-head .right { color: var(--ink-2); font-size: 17px; line-height: 1.6; max-width: 50ch; }

@media (max-width: 860px) {
  .section-head { grid-template-columns: 1fr; gap: 24px; margin-bottom: 40px; }
  section { padding: 80px 0; }
}
@media (max-width: 560px) {
  .container { padding: 0 20px; }
  section { padding: 64px 0; }
  h1 { font-size: clamp(34px, 9vw, 44px); }
  h2 { font-size: clamp(26px, 7vw, 34px); }
  .btn { padding: 13px 20px; font-size: 14px; }
}

/* ============ Image placeholder ============ */
.img-ph {
  position: relative;
  background: repeating-linear-gradient(
    135deg,
    var(--brand-soft) 0 8px,
    var(--brand-tint) 8px 16px
  );
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand-deep);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  padding: 12px;
  text-align: center;
}
.img-ph::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 30%, rgba(29,69,150,0.06), transparent 50%);
  pointer-events: none;
}
.img-ph .label {
  background: rgba(255,255,255,0.85);
  padding: 6px 10px;
  border-radius: 4px;
  z-index: 1;
  border: 1px solid rgba(29,69,150,0.15);
}

/* ============ Cards (generic) ============ */
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 200ms, box-shadow 200ms, transform 200ms;
}

/* ============ Decorative circles ============ */
.deco-circles {
  position: absolute;
  pointer-events: none;
  user-select: none;
  opacity: 0.7;
}

/* ============ Footer ============ */
footer {
  background: #0a1628;
  color: #cfd8d5;
  padding: 80px 0 32px;
}
footer h4 { color: #fff; font-size: 14px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 16px; }
footer a { color: #cfd8d5; transition: color 180ms; }
footer a:hover { color: #5a8fd8; }

/* Scrollbar */
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--line); border-radius: 100px; border: 3px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--muted-2); }

/* Selection */
::selection { background: var(--brand); color: #fff; }
