/* Sawi as a Service · estilos del sitio
   Diseño responsivo, primero para celular.
   Celular: hasta 640 px · Tableta: 641 a 1024 px · Laptop: más de 1024 px */

/* ---------- Fuentes (alojadas en el propio sitio) ---------- */
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/manrope-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/manrope-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/manrope-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/manrope-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Libre Caslon Text"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/libre-caslon-text-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Libre Caslon Text"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/libre-caslon-text-latin-700-normal.woff2") format("woff2"); }

/* ---------- Identidad (manual de identidad corporativa) ---------- */
:root {
  --marino: #0E1B33;
  --carbon: #2B2F36;
  --petroleo: #1F7A7A;
  --petroleo-claro: #5FB8B3;
  --niebla: #EEF0F3;
  --blanco: #FFFFFF;
  --pizarra: #5B6573;
  --acero: #C9D1DC;
  --borde: #E1E5EB;
  --pie: #2B2F36;
  --pie-linea: #3F4550;

  --serif: "Libre Caslon Text", Georgia, "Times New Roman", serif;
  --sans: "Manrope", "Segoe UI", Arial, sans-serif;

  --ancho: 1200px;
  --margen: 20px;
  --seccion: 56px;
  --barra-movil: 76px;
}

/* Sobre fondo Niebla, el texto en petróleo usa un tono ligeramente más oscuro
   para cumplir el contraste mínimo de accesibilidad (4.5:1). */
.section--niebla, .hero, .page-hero, .box { --petroleo: #1C7373; }

@media (min-width: 641px) { :root { --margen: 24px; --seccion: 80px; } }
@media (min-width: 1025px) { :root { --seccion: 96px; } }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--blanco);
  color: var(--carbon);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  overflow-x: hidden;
}
@media (min-width: 1025px) { body { font-size: 18px; } }
img { max-width: 100%; display: block; }
a { color: var(--petroleo); }
a:hover { color: var(--marino); }
h1, h2, h3, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
:focus-visible { outline: 3px solid var(--petroleo-claro); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }

.skip-link { position: absolute; left: 12px; top: -60px; background: var(--marino); color: var(--blanco); padding: 12px 16px; z-index: 100; font-weight: 600; }
.skip-link:focus { top: 12px; color: var(--blanco); }

.container { width: 100%; max-width: var(--ancho); margin: 0 auto; padding-left: var(--margen); padding-right: var(--margen); }
.container--narrow { max-width: 900px; }

.section { padding: var(--seccion) 0; }
.section--niebla { background: var(--niebla); }
.section--marino { background: var(--marino); color: var(--blanco); }
.section--borde { border-top: 1px solid var(--borde); }
.stack { display: flex; flex-direction: column; gap: 20px; }
.stack--lg { gap: 36px; }

/* ---------- Tipografía ---------- */
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: 0.26em; text-transform: uppercase; color: var(--petroleo); }
.section--marino .eyebrow { color: var(--petroleo-claro); }
.label { font-size: 12px; font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase; color: var(--pizarra); }
.display, .h2, .h3-serif, .serif { font-family: var(--serif); font-weight: 400; color: var(--marino); }
.section--marino .display, .section--marino .h2 { color: var(--blanco); }
.display { font-size: clamp(40px, 7vw, 66px); line-height: 1.06; }
.h2 { font-size: clamp(29px, 4vw, 42px); line-height: 1.16; }
.h3-serif { font-size: clamp(22px, 2.4vw, 26px); line-height: 1.2; }
.h3 { font-size: 18px; font-weight: 700; color: var(--marino); line-height: 1.35; }
.lead { font-size: clamp(18px, 1.8vw, 21px); line-height: 1.55; max-width: 640px; }
.muted { color: var(--acero); }
.small { font-size: 15px; }
.max-text { max-width: 760px; }
.quote-line { font-family: var(--serif); font-size: clamp(22px, 2.6vw, 28px); line-height: 1.35; color: var(--marino); }

/* ---------- Botones ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 14px 26px; font-weight: 600; font-size: 17px; text-decoration: none; border: 1px solid transparent; transition: background-color .15s ease, color .15s ease; text-align: center; }
.btn--primary { background: var(--marino); color: var(--blanco); }
.btn--primary:hover { background: var(--petroleo); color: var(--blanco); }
.btn--outline { border-color: var(--marino); color: var(--marino); }
.btn--outline:hover { background: var(--marino); color: var(--blanco); }
.btn--light { background: var(--blanco); color: var(--marino); }
.btn--light:hover { background: var(--petroleo-claro); color: var(--marino); }
.btn-row { display: flex; flex-direction: column; gap: 12px; }
@media (min-width: 641px) { .btn-row { flex-direction: row; flex-wrap: wrap; gap: 16px; } }
.link-arrow { font-weight: 600; text-decoration: none; display: inline-flex; min-height: 44px; align-items: center; }
.link-arrow::after { content: " →"; white-space: pre; }
.link-arrow:hover { text-decoration: underline; }

/* ---------- Logotipo ---------- */
.logo { display: inline-flex; align-items: flex-end; gap: 10px; text-decoration: none; }
.logo__mark { display: inline-flex; align-items: flex-end; gap: 3px; }
.logo__block { width: 34px; height: 38px; background: var(--marino); display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
.logo__s { font-family: var(--serif); font-size: 29px; line-height: .85; color: var(--blanco); }
.logo__bar { width: 12px; height: 2px; background: var(--petroleo-claro); }
.logo__awi { font-family: var(--serif); font-size: 23px; line-height: .82; color: var(--marino); }
.logo__service { display: none; font-size: 10px; font-weight: 600; letter-spacing: .3em; color: var(--carbon); padding-bottom: 2px; }
.logo__service b { color: var(--petroleo); font-weight: 600; }
@media (min-width: 641px) { .logo__service { display: inline; } .logo__block { width: 38px; height: 42px; } .logo__s { font-size: 32px; } .logo__awi { font-size: 26px; } }
.logo--inverse .logo__block { background: var(--blanco); }
.logo--inverse .logo__s { color: var(--marino); }
.logo--inverse .logo__bar { background: var(--petroleo); }
.logo--inverse .logo__awi { color: var(--blanco); }
.logo--inverse .logo__service { display: inline; color: var(--acero); }
.logo--inverse .logo__service b { color: var(--petroleo-claro); }

/* ---------- Encabezado y menú ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--blanco); border-bottom: 1px solid var(--borde); }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 68px; }
@media (min-width: 1025px) { .site-header__inner { min-height: 84px; } }

.nav-toggle { width: 44px; height: 44px; border: 1px solid var(--borde); background: var(--blanco); display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; cursor: pointer; padding: 0; }
.nav-toggle span { width: 20px; height: 2px; background: var(--marino); transition: transform .2s ease, opacity .2s ease; }
.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); }

.site-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--blanco); border-bottom: 1px solid var(--borde); box-shadow: 0 12px 24px rgba(14, 27, 51, .08); }
.site-nav.is-open { display: block; }
.site-nav ul { display: flex; flex-direction: column; padding: 8px var(--margen) 20px; }
.site-nav a { display: flex; align-items: center; min-height: 52px; color: var(--carbon); text-decoration: none; font-weight: 500; border-bottom: 1px solid var(--borde); }
.site-nav a[aria-current="page"] { color: var(--petroleo); font-weight: 700; }
.site-nav .btn { margin-top: 16px; color: var(--blanco); border-bottom: 0; justify-content: center; }
.site-nav .btn[aria-current="page"] { background: var(--petroleo); color: var(--blanco); }

@media (min-width: 1025px) {
  .nav-toggle { display: none; }
  .site-nav { display: block; position: static; border: 0; box-shadow: none; background: transparent; }
  .site-nav ul { flex-direction: row; align-items: center; gap: 32px; padding: 0; }
  .site-nav a { min-height: 44px; border-bottom: 2px solid transparent; font-size: 16px; }
  .site-nav a:hover { color: var(--petroleo); }
  .site-nav a[aria-current="page"] { border-bottom-color: var(--petroleo); font-weight: 600; }
  .site-nav .btn { margin-top: 0; padding: 12px 22px; min-height: 46px; border-bottom: 0; }
}

/* Selector de idioma ES / EN (arriba a la derecha, visible en todos los tamaños) */
.site-header__inner > .logo-link { margin-right: auto; }
.site-header__inner { gap: 12px; }
.lang-switch { display: flex; align-items: center; font-size: 13px; font-weight: 600; letter-spacing: .14em; }
.lang-switch a, .lang-switch__current { display: inline-flex; align-items: center; justify-content: center; min-width: 36px; min-height: 44px; padding: 0 4px; text-decoration: none; }
.lang-switch a { color: var(--pizarra); }
.lang-switch a:hover { color: var(--petroleo); }
.lang-switch__current { color: var(--marino); text-decoration: underline; text-decoration-color: var(--petroleo); text-decoration-thickness: 2px; text-underline-offset: 6px; }
.lang-switch__sep { color: var(--acero); padding: 0 2px; }
@media (min-width: 1025px) {
  .site-header__inner { gap: 20px; }
  .lang-switch { padding-left: 20px; border-left: 1px solid var(--borde); min-height: 32px; }
}

/* Barra fija "Agenda" en celular */
.cta-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: var(--blanco); border-top: 1px solid var(--borde); padding: 12px var(--margen) calc(12px + env(safe-area-inset-bottom)); }
.cta-bar .btn { width: 100%; }
body.has-cta-bar { padding-bottom: calc(var(--barra-movil) + env(safe-area-inset-bottom)); }
@media (min-width: 641px) { .cta-bar { display: none; } body.has-cta-bar { padding-bottom: 0; } }

/* ---------- Portada ---------- */
.hero { background: var(--niebla); padding: 44px 0 56px; }
.hero__grid { display: grid; gap: 36px; align-items: center; }
.hero__photo img { width: 100%; height: 380px; object-fit: cover; object-position: center 20%; }
@media (min-width: 641px) { .hero { padding: 72px 0; } .hero__photo img { height: 480px; } }
@media (min-width: 900px) { .hero__grid { grid-template-columns: 1.1fr .9fr; gap: 64px; } .hero__photo img { height: 560px; } }
@media (min-width: 1025px) { .hero { padding: 96px 0; } }

.page-hero { background: var(--niebla); padding: 48px 0; }
@media (min-width: 641px) { .page-hero { padding: 72px 0; } }
@media (min-width: 1025px) { .page-hero { padding: 96px 0 88px; } }

/* ---------- Cifras ---------- */
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 20px; }
@media (min-width: 900px) { .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; } }
.stat { border-top: 2px solid var(--petroleo-claro); padding-top: 14px; }
.stat__num { font-family: var(--serif); font-size: clamp(28px, 3.6vw, 46px); line-height: 1.1; color: var(--blanco); }
.stat__txt { color: var(--acero); font-size: 14px; line-height: 1.4; margin-top: 4px; }
@media (min-width: 641px) { .stat__txt { font-size: 16px; } }

/* ---------- Listas con guion ---------- */
.dash-list { display: grid; gap: 18px; }
@media (min-width: 768px) { .dash-list--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 48px; } }
.dash-list li { display: flex; gap: 14px; align-items: flex-start; }
.dash-list li::before { content: ""; flex-shrink: 0; width: 16px; height: 2px; background: var(--petroleo); margin-top: 13px; }
.dash-list--compact { gap: 8px; }
.dash-list--compact li::before { width: 14px; margin-top: 12px; }

/* ---------- Dos columnas genéricas ---------- */
.split { display: grid; gap: 28px; align-items: start; }
@media (min-width: 900px) { .split { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 56px; } .split--center { align-items: center; } }

/* ---------- Tabla comparativa ---------- */
.compare { width: 100%; border-collapse: collapse; font-size: 16px; }
.compare th, .compare td { text-align: left; padding: 18px 22px; border-bottom: 1px solid var(--borde); vertical-align: top; }
.compare thead th { font-size: 13px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--pizarra); border-bottom: 2px solid var(--marino); }
.compare thead th.is-us { background: var(--marino); color: var(--blanco); }
.compare tbody th { color: var(--marino); font-weight: 700; }
.compare td.is-us { background: var(--niebla); }
@media (max-width: 640px) {
  .compare thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .compare, .compare tbody, .compare tr, .compare th, .compare td { display: block; width: 100%; }
  .compare tr { border: 1px solid var(--borde); margin-bottom: 16px; }
  .compare tbody th { padding: 14px 16px; border-bottom: 1px solid var(--borde); }
  .compare td { padding: 12px 16px; border-bottom: 0; font-size: 15px; }
  .compare td::before { content: attr(data-label); display: block; font-size: 11px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--pizarra); }
  .compare td.is-us::before { color: var(--petroleo); }
}

/* ---------- Tarjetas ---------- */
.grid-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 16px; }
@media (min-width: 641px) { .grid-cards { gap: 20px; } }
.grid-cards--wide { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.grid-cards--xwide { grid-template-columns: repeat(auto-fit, minmax(min(100%, 480px), 1fr)); gap: 24px; }
.card { background: var(--blanco); padding: 24px; display: flex; flex-direction: column; gap: 10px; }
@media (min-width: 641px) { .card { padding: 28px; } }
.card--top { border-top: 3px solid var(--marino); }
.card--top-accent { border-top: 3px solid var(--petroleo); }
.card--outline { border: 1px solid var(--borde); border-top: 3px solid var(--marino); }
.card__num { font-family: var(--serif); font-size: 22px; color: var(--petroleo); }
.card--link { background: var(--marino); color: var(--blanco); text-decoration: none; justify-content: flex-end; min-height: 160px; }
.card--link:hover { background: var(--petroleo); color: var(--blanco); }
.card--link .serif { color: var(--blanco); font-size: 24px; line-height: 1.25; }
.card--link .arrow { color: var(--petroleo-claro); font-size: 24px; }
.card--link:hover .arrow { color: var(--blanco); }
.box { background: var(--niebla); padding: 20px; display: flex; flex-direction: column; gap: 10px; }
@media (min-width: 641px) { .box { padding: 24px; } }

/* ---------- Pasos ---------- */
.steps { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); counter-reset: paso; }
@media (min-width: 641px) { .steps { gap: 32px; } }
.step { border-top: 1px solid var(--borde); padding-top: 18px; display: grid; grid-template-columns: 36px 1fr; gap: 4px 14px; align-content: start; }
@media (min-width: 900px) { .step { grid-template-columns: 1fr; } }
.step--strong { border-top: 2px solid var(--marino); }
.step__num { font-family: var(--serif); font-size: 36px; line-height: 1; color: var(--petroleo); grid-row: span 2; }
@media (min-width: 900px) { .step__num { font-size: 44px; grid-row: auto; margin-bottom: 6px; } }
.step p { font-size: 16px; }

/* ---------- Red de especialistas ---------- */
.network { display: flex; flex-direction: column; align-items: flex-start; gap: 20px; }
@media (min-width: 900px) { .network { align-items: center; } }
.network__mark { display: none; }
@media (min-width: 900px) { .network__mark { display: flex; width: 96px; height: 106px; background: var(--blanco); flex-direction: column; align-items: center; justify-content: center; gap: 5px; } .network__mark .s { font-family: var(--serif); font-size: 78px; line-height: .85; color: var(--marino); } .network__mark .bar { width: 32px; height: 3px; background: var(--petroleo); } .network__line { width: 2px; height: 32px; background: var(--petroleo-claro); } }
.network__line { display: none; }
@media (min-width: 900px) { .network__line { display: block; } }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
@media (min-width: 900px) { .network .chips { justify-content: center; max-width: 480px; } }
.chip { border: 1px solid var(--petroleo-claro); padding: 8px 14px; font-size: 14px; color: var(--blanco); }
@media (min-width: 641px) { .chip { padding: 10px 16px; font-size: 15px; } }
.chips--index .chip-link { background: var(--blanco); border: 1px solid var(--acero); padding: 10px 16px; color: var(--marino); text-decoration: none; font-size: 15px; min-height: 44px; display: inline-flex; align-items: center; }
.chips--index .chip-link:hover { border-color: var(--petroleo); color: var(--petroleo); }

/* ---------- Fotografía ---------- */
.photo-about img { width: 100%; height: 300px; object-fit: cover; object-position: center 15%; }
@media (min-width: 641px) { .photo-about img { height: 420px; } }

/* ---------- Preguntas frecuentes ---------- */
.faq { display: grid; gap: 0 48px; }
@media (min-width: 900px) { .faq { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; } }
.faq details { border-top: 1px solid var(--acero); }
.faq__col details:last-child { border-bottom: 1px solid var(--acero); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 16px; padding: 18px 0; min-height: 44px; font-weight: 700; color: var(--marino); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--petroleo); font-weight: 600; font-size: 22px; line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq details p { padding: 0 0 20px; font-size: 16px; }

/* ---------- Cierre ---------- */
.final-cta { text-align: center; }
.final-cta .stack { align-items: center; }
.final-cta .h2 { font-size: clamp(32px, 4.4vw, 52px); }
.final-cta p { max-width: 620px; }

/* ---------- Servicios ---------- */
.service { display: grid; gap: 28px; }
@media (min-width: 900px) { .service { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 64px; } }
.service__num { font-family: var(--serif); font-size: clamp(28px, 3vw, 40px); line-height: 1; color: var(--petroleo); }

/* ---------- Casos ---------- */
.case .h2 { font-size: clamp(26px, 2.4vw, 32px); }
.case p { font-size: 16px; }

/* ---------- Trayectoria ---------- */
.timeline li { display: flex; flex-wrap: wrap; gap: 4px 24px; padding: 16px 0; border-top: 1px solid var(--borde); }
.timeline__date { width: 170px; flex-shrink: 0; font-size: 15px; color: var(--pizarra); }
.timeline__what { flex: 1 1 220px; display: flex; flex-direction: column; }
.timeline__what strong { color: var(--marino); }

/* ---------- Agenda ---------- */
.facts { border-top: 1px solid var(--acero); }
.facts li { display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--acero); }
.facts li span:first-child { color: var(--pizarra); }
.facts li span:last-child { font-weight: 700; color: var(--marino); text-align: right; }
.calendar-slot { background: var(--blanco); border: 1px solid var(--acero); min-height: 460px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 32px; text-align: center; }

/* ---------- Guía (artículo largo) ---------- */
.prose > * + * { margin-top: 20px; }
.prose > h2 { margin-top: 56px; scroll-margin-top: 100px; }
.prose .h2 { font-size: clamp(26px, 3vw, 34px); }
.prose ul, .prose ol { display: grid; gap: 12px; }
.prose ul li, .prose ol li { position: relative; padding-left: 32px; }
.prose ul li::before { content: ""; position: absolute; left: 0; top: 13px; width: 16px; height: 2px; background: var(--petroleo); }
.prose ol { counter-reset: guia; }
.prose ol li { counter-increment: guia; }
.prose ol li::before { content: counter(guia); position: absolute; left: 0; top: 0; font-family: var(--serif); font-size: 22px; line-height: 1.2; color: var(--petroleo); }
.prose strong { color: var(--marino); }
.prose .compare { margin-top: 28px; }
.toc { border-left: 3px solid var(--petroleo); padding: 4px 0 4px 20px; }
.toc ol { margin-top: 10px; gap: 4px; }
.toc ol li { padding-left: 24px; }
.toc ol li::before { font-family: var(--sans); font-size: 15px; line-height: 1.6; }
.toc a { text-decoration: none; font-size: 16px; }
.toc a:hover { text-decoration: underline; }
.callout { background: var(--niebla); border-left: 3px solid var(--marino); padding: 20px 24px; display: flex; flex-direction: column; gap: 8px; }
.callout p:last-child { font-family: var(--serif); font-size: 19px; line-height: 1.5; color: var(--marino); }

/* ---------- Pie ---------- */
.site-footer { background: var(--pie); color: var(--acero); font-size: 15px; }
.site-footer a { color: var(--acero); }
.site-footer a:hover { color: var(--blanco); }
.site-footer__grid { display: grid; gap: 32px; padding: 48px 0 28px; }
@media (min-width: 768px) { .site-footer__grid { grid-template-columns: 1.4fr 1fr 1fr; } }
.site-footer__title { font-weight: 600; color: var(--blanco); margin-bottom: 4px; }
.site-footer ul { display: flex; flex-direction: column; gap: 4px; }
.site-footer ul a { display: inline-flex; min-height: 36px; align-items: center; }
.site-footer__legal { border-top: 1px solid var(--pie-linea); padding: 18px 0 32px; font-size: 13px; }

/* ---------- Utilidades ---------- */
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mt-8 { margin-top: 8px; }
