/* Brigada 112 — sistema visual
   Negro operativo + rojo de emergencia + cinta de balizamiento ámbar como firma.
   Display: "Big Shoulders Display" (letras estructurales, nacida de las escaleras
   de incendio de Chicago) · Cuerpo: "Inter" (regular con buen cuerpo, muy legible
   en negro) · Utilidad: "IBM Plex Mono". */

:root {
  --black: #0a0a0a;
  --black-2: #131313;
  --black-3: #1b1b1b;
  --red: #d31f2c;
  --red-dark: #8f1119;
  --white: #f5f3ee;
  --steel-dim: #4a4f55;
  --amber: #f2a71b;
  --line: rgba(245, 243, 238, 0.14);
  --radius: 2px;
  --container: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

body {
  margin: 0;
  background: var(--black);
  color: var(--white);
  font-family: 'Inter', -apple-system, Segoe UI, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; }

.wrap { max-width: var(--container); margin: 0 auto; padding: 0 24px; }

h1, h2, h3, .display {
  font-family: 'Big Shoulders Display', sans-serif;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  line-height: 0.95;
  margin: 0;
}

.eyebrow {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--amber);
}

a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
}

/* ── Hazard divider — cinta de balizamiento real, en movimiento ── */
.hazard {
  height: 10px;
  background: repeating-linear-gradient(-45deg, var(--amber) 0 18px, var(--black) 18px 36px);
  background-size: 200% 200%;
  animation: hazard-move 3.4s linear infinite;
}
@keyframes hazard-move {
  from { background-position: 0 0; }
  to { background-position: 72px 0; }
}

/* ── Nav ── */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(10, 10, 10, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.nav-row { display: flex; align-items: center; justify-content: space-between; height: 108px; }
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; }
.brand img { height: 80px; width: auto; }
.brand-word { font-family: 'Big Shoulders Display', sans-serif; font-weight: 800; font-size: 26px; letter-spacing: 0.02em; }
.brand-word b { color: var(--red); }
.nav-main { display: flex; gap: 32px; list-style: none; margin: 0; padding: 0; }
.nav-main a {
  text-decoration: none; font-family: 'IBM Plex Mono', monospace; font-size: 13px;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--white); opacity: 0.68;
  padding: 6px 0; border-bottom: 2px solid transparent; transition: opacity .15s, border-color .15s;
}
.nav-main a:hover, .nav-main a.is-current { opacity: 1; border-color: var(--red); }
.nav-cta {
  font-family: 'IBM Plex Mono', monospace; font-size: 13px; letter-spacing: 0.06em;
  text-transform: uppercase; text-decoration: none; color: var(--black); background: var(--amber);
  padding: 10px 18px; border-radius: var(--radius); white-space: nowrap;
}
.nav-toggle { display: none; }

/* ── Hero — texto alineado con el logo (izquierda), foto visible a la derecha ── */
.hero {
  position: relative; overflow: hidden;
  padding: 96px 0 96px;
  min-height: 640px;
  display: flex; align-items: center;
  background-image:
    linear-gradient(to right, var(--black) 0%, rgba(10,10,10,.88) 30%, rgba(10,10,10,.42) 52%, rgba(10,10,10,.05) 70%),
    radial-gradient(ellipse 640px 480px at 92% 15%, rgba(211, 31, 44, 0.22), transparent 62%),
    url('/assets/images/hero-bg.jpg');
  background-repeat: no-repeat, no-repeat, no-repeat;
  background-position: 0 0, 0 0, center right;
  background-size: 100% 100%, 100% 100%, cover;
  background-color: var(--black);
  border-bottom: 1px solid var(--line);
}
.hero .wrap { display: flex; justify-content: flex-start; width: 100%; }
.hero-content { max-width: 600px; text-align: left; }
.hero-badge {
  position: absolute; top: 40px; right: 24px; width: 140px; height: 140px;
  animation: spin 40s linear infinite;
  filter: drop-shadow(0 6px 18px rgba(0,0,0,.6));
}
@keyframes spin { to { transform: rotate(360deg); } }
.hero-eyebrow { margin-bottom: 18px; }
.hero h1 { font-size: clamp(38px, 5.2vw, 68px); max-width: 13ch; }
.hero h1 em { font-style: normal; color: var(--red); }
.hero-sub {
  margin: 26px 0 0; max-width: 48ch; color: var(--white);
  font-size: 18px; line-height: 1.65;
}
.hero-actions { display: flex; gap: 16px; margin-top: 38px; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: 'IBM Plex Mono', monospace; font-size: 13.5px; letter-spacing: 0.06em;
  text-transform: uppercase; text-decoration: none; padding: 15px 26px; border-radius: var(--radius);
  border: 1px solid transparent; transition: transform .15s, background .15s, border-color .15s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--red); color: var(--white); }
.btn-primary:hover { background: #ea2c3a; }
.btn-outline { border-color: var(--steel-dim); color: var(--white); }
.btn-outline:hover { border-color: var(--white); }
.btn-dark { background: var(--black); color: var(--amber); border-color: var(--amber); }

/* ── Sections ── */
section { padding: 88px 0; }
.section-head { max-width: 60ch; margin-bottom: 48px; }
.section-head h2 { font-size: clamp(30px, 4vw, 48px); margin-top: 14px; }
.section-head p { color: var(--white); font-size: 17px; margin-top: 16px; }

/* Intro / valores */
.values { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.value { background: var(--black); padding: 34px 28px; }
.value .eyebrow { display: block; margin-bottom: 14px; }
.value h3 { font-size: 22px; margin-bottom: 12px; }
.value p { color: var(--white); font-size: 15.5px; margin: 0; }

/* Split — dos líneas de formación */
.tracks { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.track {
  background: var(--black-2); padding: 48px 40px; text-decoration: none; color: inherit;
  display: flex; flex-direction: column; min-height: 340px; position: relative;
  transition: background .18s;
}
.track:hover { background: var(--black-3); }
.track-red { background: var(--red); color: var(--white); }
.track-red:hover { background: #b81723; }
.track .eyebrow { color: rgba(245,243,238,0.65); }
.track-red .eyebrow { color: var(--white); }
.track h3 { font-size: clamp(28px, 3.4vw, 38px); margin: 16px 0 18px; }
.track ul { list-style: none; margin: 0 0 auto; padding: 0; font-size: 14.5px; color: var(--white); opacity: .92; }
.track-red ul { color: var(--white); opacity: .92; }
.track li { padding: 6px 0; border-top: 1px solid var(--line); }
.track-red li { border-top-color: rgba(245,243,238,0.28); }
.track li:first-child { border-top: none; }
.track-cta {
  margin-top: 28px; font-family: 'IBM Plex Mono', monospace; font-size: 13px;
  letter-spacing: 0.08em; text-transform: uppercase;
  position: relative; display: inline-block; padding-bottom: 4px; align-self: flex-start;
}
.track-cta::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 2px; width: 100%;
  background: currentColor; transform: scaleX(0); transform-origin: left;
  transition: transform .32s ease;
}
.track:hover .track-cta::after { transform: scaleX(1); }

/* Ámbitos — grid de iconos (mismos 4 iconos del logo) */
.scopes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.scope { border: 1px solid var(--line); padding: 30px 22px; text-align: left; }
.scope svg { width: 34px; height: 34px; stroke: var(--red); fill: none; stroke-width: 1.6; margin-bottom: 20px; }
.scope h3 { font-size: 18px; margin-bottom: 8px; }
.scope p { color: var(--white); font-size: 14.5px; margin: 0; }

/* CTA band — con formulario embebido */
.cta-band { background: var(--red); }
.cta-band .section-head-inline p.eyebrow { color: rgba(10,10,10,.6); }
.cta-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 56px; align-items: center; }
.cta-copy h2 { font-size: clamp(32px, 4.4vw, 52px); color: var(--white); }
.cta-copy p { color: rgba(245,243,238,0.9); font-size: 17px; margin: 18px 0 0; max-width: 44ch; }
.cta-copy .btn { margin-top: 32px; }
.cta-copy .btn-outline { border-color: rgba(245,243,238,0.5); }
.cta-copy .btn-outline:hover { border-color: var(--white); }
.cta-form-card {
  background: var(--black); border-radius: 4px; padding: 36px; box-shadow: 0 20px 50px rgba(0,0,0,.35);
}
.cta-form-card .field { margin-bottom: 16px; }
.cta-form-card .btn-primary { width: 100%; justify-content: center; }

/* Page header (páginas interiores) */
.page-header { padding: 64px 0 56px; border-bottom: 1px solid var(--line); background: var(--black-2); }
.page-header h1 { font-size: clamp(34px, 5.5vw, 60px); margin-top: 14px; }
.page-header p { color: var(--white); max-width: 60ch; margin-top: 20px; font-size: 17px; }

/* Catálogo de formaciones */
.catalog { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.cat-block { background: var(--black); padding: 40px; }
.cat-block h2 { font-size: 26px; margin-bottom: 22px; display: flex; align-items: baseline; gap: 14px; }
.cat-block h2 .eyebrow { font-size: 13px; }
.cat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px 40px; list-style: none; margin: 0; padding: 0; }
.cat-grid li {
  font-size: 15px; color: var(--white); opacity: .9; padding: 10px 0 10px 22px; border-top: 1px solid var(--line);
  position: relative;
}
.cat-grid li::before { content: "—"; position: absolute; left: 0; color: var(--red); }
.cat-grid li:nth-child(-n+2) { border-top: none; }

/* Contacto */
.contact-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 64px; align-items: start; }
.contact-info dl { display: grid; gap: 22px; margin: 32px 0 0; }
.contact-info dt { font-family: 'IBM Plex Mono', monospace; font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--amber); }
.contact-info dd { margin: 6px 0 0; font-size: 17px; }
.contact-info a { text-decoration: none; }
.contact-info a:hover { color: var(--red); }

.field { margin-bottom: 20px; }
.field label { display: block; font-family: 'IBM Plex Mono', monospace; font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--white); opacity: .8; margin-bottom: 8px; }
.field input, .field textarea {
  width: 100%; background: var(--black-2); border: 1px solid var(--steel-dim); color: var(--white);
  padding: 13px 14px; font-family: 'Inter', sans-serif; font-size: 15px; border-radius: var(--radius);
}
.field textarea { min-height: 130px; resize: vertical; }
.field input:focus, .field textarea:focus { border-color: var(--amber); }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; color: var(--white); opacity: .85; margin-bottom: 24px; }
.consent input { margin-top: 3px; }
.hp-field { position: absolute; left: -9999px; top: -9999px; }
.form-status { min-height: 22px; font-size: 14px; margin-top: 4px; }
.form-status.ok { color: #6fce7a; }
.form-status.err { color: #ff8f8f; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 56px 0 40px; background: var(--black-2); }
.footer-grid { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 40px; }
.footer-brand { display: flex; align-items: center; gap: 14px; }
.footer-brand img { height: 64px; }
.footer-cols { display: flex; gap: 64px; flex-wrap: wrap; }
.footer-col h4 { font-family: 'IBM Plex Mono', monospace; font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--amber); margin: 0 0 14px; }
.footer-col a, .footer-col span { display: block; color: var(--white); opacity: .82; text-decoration: none; font-size: 14.5px; margin-bottom: 10px; }
.footer-col a:hover { opacity: 1; color: var(--red); }
.footer-bottom { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); color: var(--white); opacity: .5; font-size: 13px; }
.footer-bottom a { opacity: 1; }

/* Mobile */
@media (max-width: 900px) {
  .nav-row { height: 88px; }
  .brand img { height: 60px; }
  .nav-main { position: fixed; top: 88px; left: 0; right: 0; bottom: 0; background: var(--black);
    flex-direction: column; padding: 32px 24px; gap: 4px; transform: translateY(-110%); transition: transform .2s; z-index: 39; }
  .nav-main.is-open { transform: translateY(0); }
  .nav-main a { display: block; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 15px; opacity: .82; }
  .nav-toggle {
    display: block; background: none; border: none; color: var(--white); font-size: 26px; line-height: 1;
    cursor: pointer; padding: 6px;
  }
  .values, .tracks, .scopes, .cat-grid, .contact-grid, .cta-grid { grid-template-columns: 1fr; }
  .contact-grid { gap: 40px; }
  .cta-grid { gap: 36px; }
  .cta-form-card { padding: 26px; }
  .hero-badge { width: 88px; height: 88px; top: 20px; right: 16px; }
  .hero .wrap { justify-content: flex-start; }
  .hero-content { max-width: none; }
  .hero {
    min-height: 0;
    background-image:
      linear-gradient(180deg, rgba(10,10,10,.6) 0%, rgba(10,10,10,.95) 62%),
      radial-gradient(ellipse 900px 500px at 85% -10%, rgba(211, 31, 44, 0.25), transparent 60%),
      url('/assets/images/hero-bg.jpg');
    background-position: 0 0, 0 0, center 30%;
  }
}
