/* =========================================================
   Macrogen Chile — Hoja de estilos principal
   Identidad corporativa: One Team. One Macrogen.
   Paleta:
     navy   #001E62  azul institucional
     teal   #00BFB2  acento ciencia
     green  #84BD00  acento bio / CTA
     red    #E0004D  acento clínico / urgencia
     ink    #0F1B2D  texto principal
     mute   #5a6d80  texto secundario
     bg     #f4f7f9  fondo claro
     line   #e5ebf1  bordes
   ========================================================= */

:root {
  --mc-navy: #001E62;
  --mc-navy-700: #0a2b6e;
  --mc-navy-900: #000F3D;
  --mc-teal: #00BFB2;
  --mc-teal-soft: #E0F7F5;
  --mc-green: #84BD00;
  --mc-green-soft: #F0F8E0;
  --mc-red: #E0004D;
  --mc-ink: #0F1B2D;
  --mc-mute: #5a6d80;
  --mc-mute-2: #8696a8;
  --mc-bg: #f4f7f9;
  --mc-bg-2: #EAF3FB;
  --mc-line: #e5ebf1;
  --mc-white: #ffffff;
  --mc-light-blue: #a8c0e0;

  --mc-radius-sm: 6px;
  --mc-radius: 12px;
  --mc-radius-lg: 20px;
  --mc-shadow-sm: 0 2px 8px rgba(0,30,98,.06);
  --mc-shadow: 0 8px 28px rgba(0,30,98,.10);
  --mc-shadow-lg: 0 18px 48px rgba(0,30,98,.14);

  --mc-font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --mc-font-mono: 'JetBrains Mono', 'SF Mono', Consolas, monospace;

  --mc-container: 1180px;
}

/* ----------- Reset ----------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--mc-font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--mc-ink);
  background: var(--mc-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--mc-navy); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--mc-teal); }
h1, h2, h3, h4, h5, h6 {
  font-family: var(--mc-font-sans);
  color: var(--mc-navy);
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -.01em;
  margin: 0 0 .6em 0;
}
h1 { font-size: clamp(2.2rem, 4.5vw, 3.4rem); letter-spacing: -.02em; }
h2 { font-size: clamp(1.6rem, 2.8vw, 2.2rem); }
h3 { font-size: 1.3rem; }
h4 { font-size: 1.1rem; }
p  { margin: 0 0 1em 0; color: var(--mc-mute); }
hr { border: none; border-top: 1px solid var(--mc-line); margin: 2.5rem 0; }

/* ----------- Layout helpers ----------- */
.container { max-width: var(--mc-container); margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: 820px; margin: 0 auto; padding: 0 24px; }
.section { padding: 80px 0; }
.section-sm { padding: 56px 0; }
.section-bg { background: var(--mc-bg); }
.section-navy { background: var(--mc-navy); color: var(--mc-white); }
.section-navy h1, .section-navy h2, .section-navy h3 { color: var(--mc-white); }
.section-navy p { color: var(--mc-light-blue); }

.eyebrow {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--mc-teal);
  margin-bottom: 14px;
}
.eyebrow.on-light { color: var(--mc-red); }
.divider {
  display: inline-block;
  width: 80px; height: 3px;
  background: var(--mc-red);
  margin-bottom: 20px;
}

.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mt-3 { margin-top: 1.5rem; }
.mb-0 { margin-bottom: 0; }

/* ----------- Buttons ----------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 26px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .5px;
  text-transform: uppercase;
  border-radius: var(--mc-radius-sm);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all .2s ease;
  text-decoration: none;
  white-space: nowrap;
}
.btn-primary {
  background: var(--mc-green);
  color: var(--mc-white);
  box-shadow: 0 6px 18px rgba(132,189,0,.28);
}
.btn-primary:hover { background: #74a800; color: var(--mc-white); transform: translateY(-1px); }
.btn-navy { background: var(--mc-navy); color: var(--mc-white); }
.btn-navy:hover { background: var(--mc-navy-700); color: var(--mc-white); }
.btn-ghost {
  background: transparent;
  color: var(--mc-navy);
  border-color: var(--mc-navy);
}
.btn-ghost:hover { background: var(--mc-navy); color: var(--mc-white); }
.btn-ghost-light {
  background: transparent;
  color: var(--mc-white);
  border-color: rgba(255,255,255,.4);
}
.btn-ghost-light:hover { background: var(--mc-white); color: var(--mc-navy); }
.btn-sm { padding: 10px 18px; font-size: 12px; }

/* ----------- Header / Nav ----------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--mc-line);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  gap: 24px;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  color: var(--mc-navy);
  font-size: 19px;
  letter-spacing: -.02em;
}
.nav-logo .logo-mark {
  display: inline-flex;
  width: 36px; height: 36px;
  background: var(--mc-navy);
  color: var(--mc-white);
  border-radius: 8px;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 13px;
  letter-spacing: 1px;
}
.nav-logo .logo-sub {
  display: block;
  font-size: 9px;
  letter-spacing: 2px;
  font-weight: 700;
  color: var(--mc-teal);
  text-transform: uppercase;
  margin-top: 2px;
}
.nav-logo .logo-img {
  height: 44px;
  width: auto;
  display: block;
}
@media (max-width: 480px) {
  .nav-logo .logo-img { height: 36px; }
}
.footer-brand .logo-img {
  height: 56px;
  width: auto;
  display: block;
  margin-bottom: 16px;
  filter: brightness(0) invert(1) opacity(0.95);
}
.nav-menu {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 28px;
  align-items: center;
}
.nav-menu a {
  font-size: 13px;
  font-weight: 600;
  color: var(--mc-ink);
  letter-spacing: .3px;
  position: relative;
  padding: 6px 0;
}
.nav-menu a:hover { color: var(--mc-teal); }
.nav-menu a.active { color: var(--mc-navy); }
.nav-menu a.active::after {
  content: '';
  position: absolute;
  left: 0; right: 0;
  bottom: -2px;
  height: 2px;
  background: var(--mc-red);
}
.nav-cta { margin-left: 8px; }
.nav-toggle {
  display: none;
  background: transparent;
  border: none;
  color: var(--mc-navy);
  font-size: 26px;
  cursor: pointer;
  padding: 4px 8px;
}
@media (max-width: 920px) {
  .nav-toggle { display: inline-block; }
  .nav-menu {
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    background: var(--mc-white);
    border-bottom: 1px solid var(--mc-line);
    padding: 16px 24px;
    gap: 16px;
    align-items: flex-start;
    display: none;
  }
  .nav-menu.is-open { display: flex; }
  .nav-cta { display: none; }
}

/* ----------- Hero ----------- */
.hero {
  position: relative;
  background: var(--mc-navy);
  color: var(--mc-white);
  padding: 100px 0 110px;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -20%; right: -10%;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(0,191,178,.18), transparent 60%);
  z-index: 0;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: -30%; left: -10%;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(132,189,0,.10), transparent 60%);
  z-index: 0;
}
.hero .container { position: relative; z-index: 1; }
.hero h1 { color: var(--mc-white); margin-bottom: 1rem; }
.hero h1 .accent { color: var(--mc-teal); }
.hero p.lead {
  font-size: 1.18rem;
  color: var(--mc-light-blue);
  max-width: 640px;
  margin-bottom: 2rem;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-mini {
  padding: 64px 0 70px;
}
.hero-mini h1 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); }

/* ----------- Pillars / Stat Cards ----------- */
.pillar-card {
  background: var(--mc-white);
  border: 1px solid var(--mc-line);
  border-radius: var(--mc-radius);
  padding: 32px 28px;
  box-shadow: var(--mc-shadow-sm);
  transition: transform .25s ease, box-shadow .25s ease;
}
.pillar-card:hover { transform: translateY(-4px); box-shadow: var(--mc-shadow); }
.pillar-icon {
  width: 52px; height: 52px;
  border-radius: 12px;
  background: var(--mc-bg-2);
  color: var(--mc-navy);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin-bottom: 18px;
}
.pillar-icon.teal { background: var(--mc-teal-soft); color: #007C72; }
.pillar-icon.green { background: var(--mc-green-soft); color: #4d7000; }
.pillar-icon.red { background: #FFE6EE; color: var(--mc-red); }
.pillar-card h3 { margin-bottom: 8px; }

.stat-card {
  text-align: center;
  padding: 28px 16px;
}
.stat-card .stat-num {
  font-size: 2.6rem;
  font-weight: 900;
  color: var(--mc-navy);
  line-height: 1;
  letter-spacing: -.02em;
}
.stat-card .stat-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--mc-mute);
  margin-top: 8px;
}

/* ----------- Service cards ----------- */
.service-card {
  background: var(--mc-white);
  border: 1px solid var(--mc-line);
  border-top: 4px solid var(--mc-navy);
  border-radius: var(--mc-radius);
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  transition: all .25s ease;
  box-shadow: var(--mc-shadow-sm);
  height: 100%;
}
.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--mc-shadow);
  border-top-color: var(--mc-teal);
}
.service-card.t-teal { border-top-color: var(--mc-teal); }
.service-card.t-green { border-top-color: var(--mc-green); }
.service-card.t-red { border-top-color: var(--mc-red); }
.service-card .badge {
  display: inline-block;
  background: var(--mc-bg-2);
  color: var(--mc-navy);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 4px 9px;
  border-radius: 4px;
  margin-bottom: 14px;
  align-self: flex-start;
}
.badge.b-teal { background: var(--mc-teal-soft); color: #007C72; }
.badge.b-green { background: var(--mc-green-soft); color: #4d7000; }
.badge.b-red { background: #FFE6EE; color: var(--mc-red); }
.service-card h3 { margin-bottom: 10px; font-size: 1.15rem; }
.service-card p { font-size: .92rem; color: var(--mc-mute); margin-bottom: 18px; }
.service-card .card-foot {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px solid var(--mc-line);
}
.service-card .card-foot a {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--mc-navy);
}
.service-card .card-foot a:hover { color: var(--mc-teal); }
.tag {
  display: inline-block;
  background: var(--mc-bg-2);
  color: var(--mc-navy);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .5px;
  padding: 3px 8px;
  border-radius: 4px;
  margin: 0 4px 4px 0;
}
.tag.t-teal { background: var(--mc-teal-soft); color: #007C72; }
.tag.t-green { background: var(--mc-green-soft); color: #4d7000; }

/* ----------- Spec table for service detail ----------- */
.spec-table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  background: var(--mc-white);
  border: 1px solid var(--mc-line);
  border-radius: var(--mc-radius);
  overflow: hidden;
}
.spec-table th, .spec-table td {
  padding: 14px 18px;
  text-align: left;
  font-size: 14px;
  border-bottom: 1px solid var(--mc-line);
}
.spec-table th {
  background: var(--mc-bg);
  color: var(--mc-navy);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: .5px;
  text-transform: uppercase;
  width: 36%;
}
.spec-table tr:last-child th, .spec-table tr:last-child td { border-bottom: none; }

/* ----------- Pipeline / Workflow ----------- */
.pipeline {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: 30px;
}
@media (max-width: 800px) { .pipeline { grid-template-columns: repeat(2, 1fr); } }
.pipeline-step {
  background: var(--mc-white);
  border: 1px solid var(--mc-line);
  border-radius: var(--mc-radius);
  padding: 24px;
  position: relative;
}
.pipeline-step .step-num {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 2px;
  color: var(--mc-teal);
  text-transform: uppercase;
  margin-bottom: 10px;
}
.pipeline-step h4 { font-size: 1.05rem; margin-bottom: 6px; }
.pipeline-step p { font-size: .88rem; margin-bottom: 0; }

/* ----------- Blog cards ----------- */
.post-card {
  background: var(--mc-white);
  border: 1px solid var(--mc-line);
  border-radius: var(--mc-radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all .25s ease;
  height: 100%;
}
.post-card:hover { box-shadow: var(--mc-shadow); transform: translateY(-3px); }
.post-thumb {
  height: 180px;
  background: linear-gradient(135deg, var(--mc-navy), var(--mc-teal));
  position: relative;
  overflow: hidden;
}
.post-thumb.t2 { background: linear-gradient(135deg, var(--mc-navy), var(--mc-green)); }
.post-thumb.t3 { background: linear-gradient(135deg, var(--mc-teal), var(--mc-green)); }
.post-thumb.t4 { background: linear-gradient(135deg, var(--mc-navy), var(--mc-red)); }
.post-thumb::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,.12), transparent 50%);
}
.post-card .post-body { padding: 22px 24px 26px; display: flex; flex-direction: column; flex: 1; }
.post-card .post-meta {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--mc-mute);
  margin-bottom: 10px;
}
.post-card .post-meta .cat { color: var(--mc-red); margin-right: 10px; }
.post-card h3 {
  font-size: 1.18rem;
  margin-bottom: 10px;
  line-height: 1.3;
}
.post-card p { font-size: .92rem; flex: 1; }
.post-card .read-more {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--mc-navy);
}
.post-card .read-more:hover { color: var(--mc-teal); }

/* ----------- Article body ----------- */
.article {
  background: var(--mc-white);
  padding: 60px 0 80px;
}
.article-header {
  border-bottom: 1px solid var(--mc-line);
  padding-bottom: 24px;
  margin-bottom: 36px;
}
.article-header .meta {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--mc-mute);
  margin-bottom: 14px;
}
.article-header .meta .cat { color: var(--mc-red); }
.article-body p { font-size: 1.02rem; color: #2a3f57; line-height: 1.75; }
.article-body h2 { margin-top: 2.2em; }
.article-body h3 { margin-top: 1.6em; }
.article-body blockquote {
  border-left: 4px solid var(--mc-teal);
  margin: 1.8em 0;
  padding: 4px 0 4px 22px;
  color: var(--mc-navy);
  font-style: italic;
  font-size: 1.1rem;
}
.article-body ul, .article-body ol { padding-left: 22px; color: #2a3f57; line-height: 1.75; }

/* ----------- Newsletter signup ----------- */
.newsletter-box {
  background: linear-gradient(135deg, var(--mc-navy) 0%, var(--mc-navy-700) 100%);
  color: var(--mc-white);
  padding: 50px 40px;
  border-radius: var(--mc-radius-lg);
  position: relative;
  overflow: hidden;
}
.newsletter-box::before {
  content: '';
  position: absolute;
  top: -50%; right: -20%;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(0,191,178,.18), transparent 60%);
}
.newsletter-box .nl-inner { position: relative; z-index: 1; max-width: 720px; }
.newsletter-box h2 { color: var(--mc-white); }
.newsletter-box p { color: var(--mc-light-blue); }
.nl-form {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 24px;
}
.nl-form input[type="email"] {
  flex: 1;
  min-width: 240px;
  padding: 14px 18px;
  font-size: 14px;
  font-family: var(--mc-font-sans);
  border: 1px solid rgba(255,255,255,.2);
  background: rgba(255,255,255,.08);
  color: var(--mc-white);
  border-radius: var(--mc-radius-sm);
  outline: none;
}
.nl-form input::placeholder { color: rgba(255,255,255,.55); }
.nl-form input:focus { border-color: var(--mc-teal); background: rgba(255,255,255,.12); }
.nl-mini-note {
  font-size: 11px;
  color: var(--mc-light-blue);
  margin-top: 12px;
  letter-spacing: .3px;
}

/* ----------- Forms ----------- */
.form-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr 1fr;
}
@media (max-width: 700px) { .form-grid { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; }
.field.full { grid-column: 1 / -1; }
.field label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .5px;
  text-transform: uppercase;
  color: var(--mc-navy);
  margin-bottom: 8px;
}
.field input, .field select, .field textarea {
  padding: 13px 16px;
  font-size: 14px;
  font-family: var(--mc-font-sans);
  border: 1px solid var(--mc-line);
  background: var(--mc-white);
  color: var(--mc-ink);
  border-radius: var(--mc-radius-sm);
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--mc-teal);
  box-shadow: 0 0 0 3px rgba(0,191,178,.15);
}
.field textarea { min-height: 120px; resize: vertical; }

/* ----------- Footer ----------- */
.site-footer {
  background: var(--mc-navy);
  color: var(--mc-light-blue);
  padding: 60px 0 28px;
}
.site-footer h4 {
  color: var(--mc-white);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 18px;
}
.site-footer a {
  color: var(--mc-light-blue);
  font-size: 13.5px;
  display: block;
  padding: 4px 0;
}
.site-footer a:hover { color: var(--mc-teal); }
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-brand p { color: var(--mc-light-blue); font-size: 13.5px; line-height: 1.7; }
.footer-brand .logo-mark {
  display: inline-flex;
  width: 40px; height: 40px;
  background: var(--mc-teal);
  color: var(--mc-navy);
  border-radius: 8px;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 14px;
  margin-bottom: 14px;
}
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  font-size: 11.5px;
  letter-spacing: .3px;
  color: var(--mc-mute-2);
  flex-wrap: wrap;
  gap: 12px;
}
.footer-bottom a { display: inline-block; padding: 0; margin-left: 14px; font-size: 11.5px; }

/* ----------- Breadcrumb ----------- */
.breadcrumb {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .5px;
  color: var(--mc-mute);
  margin-bottom: 14px;
  text-transform: uppercase;
}
.breadcrumb a { color: var(--mc-mute); }
.breadcrumb a:hover { color: var(--mc-teal); }
.breadcrumb .sep { margin: 0 8px; color: var(--mc-mute-2); }

/* ----------- CTA banner ----------- */
.cta-banner {
  background: linear-gradient(120deg, var(--mc-navy), var(--mc-navy-700) 60%, #062b6e);
  color: var(--mc-white);
  text-align: center;
  padding: 72px 24px;
  border-radius: var(--mc-radius-lg);
  position: relative;
  overflow: hidden;
}
.cta-banner h2 { color: var(--mc-white); margin-bottom: 12px; }
.cta-banner p { color: var(--mc-light-blue); max-width: 580px; margin: 0 auto 26px; }

/* ----------- Logos / Cert strip ----------- */
.cert-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  justify-content: center;
}
.cert-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--mc-white);
  border: 1px solid var(--mc-line);
  border-radius: 999px;
  padding: 9px 18px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .3px;
  color: var(--mc-navy);
}
.cert-chip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--mc-green); }

/* ----------- Utility ----------- */
.note-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  background: #FFF6EF;
  border: 1px solid #F7D3B4;
  color: var(--mc-navy);
  border-radius: var(--mc-radius);
  padding: 14px 22px;
  font-size: 12px;
  font-weight: 600;
  align-items: center;
  justify-content: center;
}
.note-bar strong { color: var(--mc-red); }
