/*
 * Diseño "Bastión": plano técnico, tipografía Space Grotesk + Source Serif 4,
 * acento ocre. Migrado desde html-original/plantilla-html/bastion-theme.
 */

:root{
  --bg: #F1F3F0;
  --bg-panel: #E7EAE4;
  --ink: #16223D;
  --ink-soft: #4A5568;
  --accent: #C97A2B;
  --accent-soft: #E9CBA4;
  --line: #D2D7CD;
  --line-strong: #16223D;
  --white: #FBFBF9;
  --max: 1180px;
}

*{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
body{
  margin:0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Source Serif 4', serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
h1,h2,h3, .display{
  font-family: 'Space Grotesk', sans-serif;
  color: var(--ink);
  margin: 0;
  letter-spacing: -0.01em;
}
a{ color: inherit; }
.mono{ font-family: 'JetBrains Mono', monospace; }
.wrap{ max-width: var(--max); margin: 0 auto; padding: 0 32px; }
@media (max-width: 640px){ .wrap{ padding: 0 20px; } }

:focus-visible{ outline: 2px solid var(--accent); outline-offset: 3px; }

/* ---------- ACCESIBILIDAD: enlace "saltar al contenido" ---------- */
.screen-reader-text{
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
  word-wrap: normal !important;
}
.skip-link.screen-reader-text:focus{
  background: var(--white);
  border: 1px solid var(--line-strong);
  clip: auto !important;
  clip-path: none;
  color: var(--ink);
  display: block;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 14px;
  font-weight: 600;
  height: auto;
  left: 16px;
  top: 16px;
  padding: 12px 18px;
  position: absolute;
  text-decoration: none;
  width: auto;
  z-index: 100000;
}

/* ---------- HEADER ---------- */
header{
  position: sticky; top:0; z-index: 50;
  background: rgba(241,243,240,0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.nav{
  display:flex; align-items:center; justify-content: space-between;
  padding: 20px 0;
  gap: 20px;
}
.logo{
  display:flex; align-items:center; gap:10px;
  font-family:'Space Grotesk', sans-serif; font-weight:700; font-size:20px;
  text-decoration:none;
}
.logo-mark{
  width:26px; height:26px; flex-shrink:0;
}
.custom-logo-link img{ max-height: 32px; width:auto; display:block; }
.nav-links{ display:flex; gap:36px; list-style:none; margin:0; padding:0; }
.nav-links a{
  text-decoration:none; font-family:'Space Grotesk',sans-serif; font-size:15px;
  color: var(--ink-soft); font-weight:500;
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  transition: border-color .15s ease, color .15s ease;
}
.nav-links a:hover{ color: var(--ink); border-color: var(--accent); }
.nav-cta{
  font-family:'Space Grotesk',sans-serif; font-weight:600; font-size:14.5px;
  background: var(--ink); color: var(--white);
  padding: 10px 20px; text-decoration:none; border-radius: 3px;
  transition: background .15s ease;
  white-space: nowrap;
}
.nav-cta:hover{ background: var(--accent); }

/* Menú móvil */
.nav-toggle{
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 3px;
  cursor: pointer;
  padding: 0;
  order: 2;
}
.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after{
  content: '';
  display: block;
  width: 20px; height: 2px;
  background: var(--ink);
}
.nav-toggle-bars{ position: relative; }
.nav-toggle-bars::before{ position: absolute; top: -6px; left: 0; }
.nav-toggle-bars::after{ position: absolute; top: 6px; left: 0; }

@media (max-width: 860px){
  .nav-toggle{ display: inline-flex; }
  .nav-links{
    display: none;
    order: 3;
    flex-basis: 100%;
    flex-direction: column;
    gap: 4px;
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--bg);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    padding: 8px 0;
  }
  .nav-links.is-open{ display: flex; }
  .nav-links a{ padding: 12px 32px; }
  .nav{ flex-wrap: wrap; }
}

/* ---------- HERO ---------- */
.hero{
  padding: 88px 0 64px; border-top: none;
  display:grid; grid-template-columns: 1.1fr 0.9fr; gap: 56px; align-items:center;
}
.hero > .wrap{ display: contents; }
@media (max-width: 900px){ .hero{ grid-template-columns:1fr; padding: 56px 0 40px; } }

.hero-eyebrow{
  font-family:'JetBrains Mono', monospace; font-size:13px; color: var(--ink-soft);
  margin-bottom: 18px; display:flex; align-items:center; gap:10px;
}
.hero-eyebrow::before{
  content:''; width:8px; height:8px; background: var(--accent); display:inline-block;
}
.hero h1{
  font-size: clamp(34px, 4.4vw, 54px);
  line-height: 1.08;
  font-weight: 600;
  max-width: 15ch;
}
.hero p.lede{
  font-size: 19px; color: var(--ink-soft); max-width: 46ch; margin-top: 22px;
}
.hero-actions{ display:flex; gap:16px; margin-top: 34px; flex-wrap:wrap; align-items:center; }
.btn-primary{
  font-family:'Space Grotesk',sans-serif; font-weight:600; font-size: 15.5px;
  background: var(--accent); color: var(--white);
  padding: 14px 26px; border-radius: 3px; text-decoration:none;
  border: 1px solid var(--accent);
  transition: background .15s ease, color .15s ease;
  display:inline-block;
}
.btn-primary:hover{ background: transparent; color: var(--ink); }
.btn-primary--dark{ background: var(--ink); border-color: var(--ink); }
.btn-secondary{
  font-family:'Space Grotesk',sans-serif; font-weight:500; font-size: 15.5px;
  color: var(--ink); text-decoration:none;
  padding: 14px 4px; border-bottom: 1px solid var(--ink);
}
.hero-trust{
  margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line);
  font-size: 14px; color: var(--ink-soft); display:flex; gap: 28px; flex-wrap:wrap;
}
.hero-trust b{ color: var(--ink); font-family:'Space Grotesk',sans-serif; font-size: 20px; display:block; }

/* Hero diagram */
.diagram-frame{
  border: 1px solid var(--line-strong);
  background: var(--white);
  padding: 28px;
  position: relative;
}
.diagram-frame::before, .diagram-frame::after{
  content:''; position:absolute; width:14px; height:14px;
  border: 1px solid var(--line-strong);
}
.diagram-frame::before{ top:-1px; left:-1px; border-right:none; border-bottom:none; }
.diagram-frame::after{ bottom:-1px; right:-1px; border-left:none; border-top:none; }
.diagram-label{
  font-family:'JetBrains Mono', monospace; font-size: 11.5px; color: var(--ink-soft);
  margin-bottom: 14px;
}
svg#systemMap{ width:100%; height:auto; display:block; }
.node-label{
  font-family:'Space Grotesk',sans-serif; font-size: 13px; font-weight:600; fill: var(--ink);
}
.node-sub{ font-family:'JetBrains Mono',monospace; font-size: 10px; fill: var(--ink-soft); }
.draw-line{
  stroke-dasharray: 260; stroke-dashoffset: 260;
  animation: drawLine 1.4s ease forwards;
}
.draw-line.d2{ animation-delay: .25s; }
.draw-line.d3{ animation-delay: .5s; }
@keyframes drawLine{ to{ stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce){
  .draw-line{ animation: none; stroke-dashoffset: 0; }
  html{ scroll-behavior: auto; }
}

/* ---------- SECTION SHELL ---------- */
section{ padding: 84px 0; border-top: 1px solid var(--line); }
.section-head{
  display:flex; justify-content:space-between; align-items:flex-end; gap: 40px;
  margin-bottom: 52px;
}
@media (max-width: 700px){ .section-head{ flex-direction:column; align-items:flex-start; gap:16px; } }
.section-head h2{ font-size: clamp(26px,3vw,36px); font-weight:600; max-width: 18ch; }
.section-head .section-note{
  max-width: 34ch; color: var(--ink-soft); font-size: 15.5px; text-align: right;
}
@media (max-width: 700px){ .section-head .section-note{ text-align:left; } }

/* ---------- PROCESS ---------- */
.process{ position:relative; }
.process-row{
  display:grid; grid-template-columns: 90px 1fr 180px; gap: 28px;
  padding: 28px 0; border-top: 1px solid var(--line);
  align-items: start;
}
.process-row:last-child{ border-bottom: 1px solid var(--line); }
@media (max-width: 760px){
  .process-row{ grid-template-columns: 56px 1fr; }
  .process-row .process-meta{ grid-column: 1 / -1; padding-left: 56px; }
}
.process-num{
  font-family:'JetBrains Mono', monospace; font-size: 15px; color: var(--accent); font-weight:500;
  padding-top: 3px;
}
.process-body h3{ font-size: 20px; font-weight: 600; margin-bottom: 8px; }
.process-body p{ color: var(--ink-soft); font-size: 15.5px; max-width: 56ch; margin:0; }
.process-meta{
  font-family:'JetBrains Mono', monospace; font-size: 12.5px; color: var(--ink-soft);
  text-align: right; padding-top: 4px; line-height:1.7;
}
@media (max-width: 760px){ .process-meta{ text-align:left; margin-top: 6px; } }

/* ---------- SERVICES ---------- */
.services-grid{
  display:grid; grid-template-columns: repeat(2, 1fr); gap: 0;
  border-top: 1px solid var(--line); border-left: 1px solid var(--line);
}
@media (max-width: 760px){ .services-grid{ grid-template-columns: 1fr; } }
.service-item{
  padding: 30px 32px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.service-item h3{
  font-size: 18px; font-weight: 600; margin-bottom: 10px;
}
.service-item p{ color: var(--ink-soft); font-size: 15px; margin: 0 0 16px; }
.service-spec{
  display:flex; gap: 18px; font-family:'JetBrains Mono',monospace; font-size: 12.5px; color: var(--ink);
  border-top: 1px dashed var(--line); padding-top: 12px;
}
.service-spec span b{ display:block; color: var(--ink-soft); font-weight:400; font-size: 10.5px; margin-bottom:2px; }

/* ---------- BAND / STATS ---------- */
.band{
  background: var(--ink); color: var(--white); border-top: none;
}
.band .wrap{
  display:grid; grid-template-columns: repeat(3, 1fr); gap: 40px;
}
@media (max-width: 700px){ .band .wrap{ grid-template-columns: 1fr; gap: 32px; } }
.stat b{
  font-family:'Space Grotesk',sans-serif; font-size: 40px; font-weight: 600; display:block;
  color: var(--accent-soft);
}
.stat span{ color: #C7CDD8; font-size: 14.5px; }

/* ---------- QUOTE ---------- */
.quote-block{ max-width: 720px; }
.quote-block p{
  font-family:'Space Grotesk', sans-serif; font-size: clamp(20px, 2.4vw, 27px);
  font-weight: 500; line-height: 1.5; color: var(--ink);
}
.quote-attr{
  margin-top: 20px; font-size: 14.5px; color: var(--ink-soft);
  display:flex; gap:10px; align-items:center;
}
.quote-attr::before{ content:''; width:26px; height:1px; background: var(--ink-soft); display:inline-block; }

/* ---------- FINAL CTA ---------- */
.cta-band{ background: var(--accent-soft); border-top: 1px solid var(--line); }
.cta-inner{
  display:flex; justify-content:space-between; align-items:center; gap: 32px; flex-wrap:wrap;
}
.cta-inner h2{ font-size: clamp(26px,3vw,34px); max-width: 16ch; }
.cta-inner p{ color: var(--ink-soft); max-width: 40ch; margin-top:10px; }

/* ---------- FOOTER ---------- */
footer{ padding: 48px 0; }
.footer-grid{
  display:flex; justify-content:space-between; gap: 32px; flex-wrap:wrap;
  padding-bottom: 28px; border-bottom: 1px solid var(--line); margin-bottom: 20px;
}
.footer-col h4{
  font-family:'Space Grotesk',sans-serif; font-size:13px; color: var(--ink-soft); font-weight:500; margin-bottom:12px;
}
.footer-col a{ display:block; text-decoration:none; color: var(--ink); font-size:14.5px; margin-bottom:8px; }
.footer-col a:hover{ color: var(--accent); }
.footer-bottom{
  display:flex; justify-content:space-between; font-size: 13px; color: var(--ink-soft); flex-wrap:wrap; gap:10px;
}

/* Navegación de pie de página y barra lateral opcionales (infraestructura
   nativa del tema; permanecen sin estilos propios hasta que se usen). */
.footer-navigation ul{ list-style:none; margin:0; padding:0; }
.footer-navigation a{ color: var(--ink); text-decoration:none; }
.footer-navigation a:hover{ color: var(--accent); }
