/* ==========================================================
   Nodo Salud Ocupacional — estilos
   Colores y tipografía tomados de Nodo_Materiales_Logo_4.pdf (pág. 5)
   ========================================================== */

@font-face {
  font-family: "DejaVu Sans";
  src: url("../assets/fonts/DejaVuSans.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "DejaVu Sans";
  src: url("../assets/fonts/DejaVuSans-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Paleta (valores exactos del PDF) */
  --navy:        #0B2540;  /* paneles oscuros y texto principal */
  --teal-dark:   #086257;  /* banda "Cobertura para obras" */
  --teal:        #008C81;  /* íconos, líneas de acento */
  --mint:        #DDF3EF;  /* fondo de íconos */
  --border:      #ADC6CF;  /* bordes de tarjetas */
  --muted:       #425969;  /* texto secundario */
  --muted-2:     #26435A;  /* pie */
  --divider:     #66899F;  /* separador barra de contacto */
  /* Colores del logo */
  --logo-navy:   #00214C;
  --logo-teal:   #00A98A;

  --font: "DejaVu Sans", Verdana, "Segoe UI", sans-serif;
  --radius-lg: 22px;
  --radius:    14px;
  --gap: clamp(14px, 2.2vw, 22px);
  --container: 1120px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 96px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--navy);
  background: #fff;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
h1, h2, h3 { margin: 0; font-weight: 700; line-height: 1.2; }
p { margin: 0; }
a { color: inherit; }

.sprite { display: none; }
.nowrap { white-space: nowrap; }

.container {
  width: min(var(--container), 100% - 2 * clamp(16px, 4vw, 40px));
  margin-inline: auto;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--teal);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 76px;
}
.brand img { height: 52px; width: auto; }

.nav { display: flex; align-items: center; gap: 28px; }
.nav a {
  text-decoration: none;
  font-size: .95rem;
  color: var(--navy);
}
.nav a:hover { color: var(--teal); }
.nav .nav-cta {
  background: var(--navy);
  color: #fff;
  padding: 10px 18px;
  border-radius: 10px;
}
.nav .nav-cta:hover { background: var(--teal-dark); color: #fff; }

.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  padding: 0 11px;
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
}
.nav-toggle span { display: block; height: 2px; background: var(--navy); border-radius: 2px; transition: transform .2s, opacity .2s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { padding-top: clamp(20px, 4vw, 40px); }
.hero-card {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  background: var(--navy);
  color: #fff;
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.hero-text {
  padding: clamp(28px, 5vw, 64px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(18px, 2.5vw, 28px);
}
.hero h1 {
  font-size: clamp(1.65rem, 3.7vw, 2.75rem);
  letter-spacing: .01em;
}
.hero-text p {
  font-size: clamp(1rem, 1.5vw, 1.2rem);
  line-height: 1.6;
  max-width: 34ch;
  letter-spacing: .02em;
}
.btn {
  align-self: flex-start;
  display: inline-block;
  background: var(--logo-teal);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  padding: 13px 24px;
  border-radius: 10px;
  transition: background .2s;
}
.btn:hover { background: var(--teal); }
.btn:focus-visible, .nav a:focus-visible, .contact-bar a:focus-visible, .nav-toggle:focus-visible {
  outline: 3px solid var(--logo-teal);
  outline-offset: 3px;
}

.hero-media img {
  width: 100%;
  height: 100%;
  min-height: 320px;
  object-fit: cover;
  object-position: center 30%;
}

/* ---------- Bloques ---------- */
.section-tight { margin-top: var(--gap); }

.icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  border-radius: 10px;
  background: var(--mint);
}
.icon svg, .contact-bar svg {
  width: 26px; height: 26px;
  fill: none;
  stroke: var(--teal);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icon--light { background: #fff; }

.feature {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  background: var(--teal-dark);
  color: #fff;
  border-radius: var(--radius);
  padding: clamp(18px, 2.6vw, 26px) clamp(18px, 3vw, 32px);
}
.feature h2 { font-size: clamp(1.25rem, 2.2vw, 1.6rem); margin: 6px 0 10px; }
.feature p  { font-size: clamp(.95rem, 1.3vw, 1.08rem); line-height: 1.6; letter-spacing: .01em; }

.cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--gap);
}
.card {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(18px, 2.4vw, 24px);
  background: #fff;
  transition: border-color .2s, box-shadow .2s;
}
.card:hover { border-color: var(--teal); box-shadow: 0 6px 20px rgba(11, 37, 64, .08); }
.card h3 { font-size: clamp(1.05rem, 1.6vw, 1.2rem); margin: 10px 0 12px; letter-spacing: .01em; }
.card p  { font-size: .98rem; line-height: 1.55; }

/* ---------- Contacto ---------- */
.contact-bar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--navy);
  border-radius: var(--radius);
  padding: 8px clamp(16px, 3vw, 32px);
}
.contact-bar a {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 0;
  color: #fff;
  text-decoration: none;
  font-size: clamp(.95rem, 1.4vw, 1.1rem);
  overflow-wrap: anywhere;
}
.contact-bar a:hover { color: var(--mint); text-decoration: underline; text-underline-offset: 4px; }
.contact-bar a + a {
  border-left: 1px solid var(--divider);
  padding-left: clamp(16px, 3vw, 32px);
}
.contact-bar svg { flex: none; width: 30px; height: 30px; stroke: var(--logo-teal); }

/* ---------- Footer ---------- */
.site-footer {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 24px;
  padding: 16px 0 40px;
  font-size: .82rem;
  color: var(--muted-2);
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .hero-card { grid-template-columns: 1fr; }
  .hero-media { order: -1; }
  .hero-media img { min-height: 0; aspect-ratio: 16 / 10; }
}

@media (max-width: 760px) {
  .nav-toggle { display: flex; }
  .nav {
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: #fff;
    border-bottom: 1px solid var(--teal);
    padding: 8px clamp(16px, 4vw, 40px) 16px;
    display: none;
  }
  .nav.is-open { display: flex; }
  .nav a { padding: 14px 4px; border-bottom: 1px solid var(--mint); }
  .nav .nav-cta { margin-top: 12px; text-align: center; border-bottom: 0; }

  .cards { grid-template-columns: 1fr; }
  .contact-bar { grid-template-columns: 1fr; }
  .contact-bar a + a { border-left: 0; border-top: 1px solid var(--divider); padding-left: 0; }
}

@media (max-width: 420px) {
  .brand img { height: 42px; }
  .header-inner { min-height: 64px; }
}
