/* Base de marca ISTRAM / Buhodra — mismos tokens que el deck «Normativas con IA» (manual de identidad 2025) */
@font-face { font-family: "Korb"; src: url("../fonts/Korb-Regular.ttf") format("truetype"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Korb"; src: url("../fonts/Korb-Bold.ttf") format("truetype"); font-weight: 600 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Oswald"; src: url("../fonts/Oswald-latin.woff2") format("woff2"); font-weight: 200 700; font-style: normal; font-display: swap; }

:root {
  --azul: #6E8FC9;          /* azul corporativo (manual 3.1) */
  --azul-oscuro: #5877B3;
  --azul-tinta: #4A68A6;    /* azul para texto y botones: 5,5:1 sobre blanco */
  --azul-75: #A0A8D1;
  --azul-40: #CCD0E7;
  --azul-10: #EEF1F8;
  --verde: #7DB928;         /* solo acentos, nunca texto */
  --ink: #3A4157;
  --muted: #626A7E;          /* ≥ 4,78:1 sobre blanco, #F5F6FA y #EEF1F8 */
  --line: #DCE0EE;
  --bg: #FFFFFF;
  --bg-alt: #F5F6FA;
  --error: #B3261E;
  --error-10: #FBEDEC;
  --shadow: 0 1px 2px rgba(58, 65, 87, .05), 0 12px 30px -16px rgba(110, 143, 201, .35);
  --hex: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
  --f-body: "Korb", "Segoe UI", system-ui, sans-serif;
  --f-label: "Oswald", "Korb", system-ui, sans-serif;
  --radio: 14px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg-alt); color: var(--ink);
  font-family: var(--f-body); font-size: 17px; line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
img { max-width: 100%; height: auto; }
h1, h2, h3 { font-family: var(--f-body); line-height: 1.15; margin: 0; text-wrap: balance; }
p { margin: 0; }
a { color: var(--azul-tinta); }
button, input, select, textarea { font: inherit; color: inherit; }

.sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Etiqueta de sección: hexágono verde + Oswald, como los kickers del deck */
.kicker {
  display: flex; align-items: center; gap: 10px; margin: 0 0 14px;
  font-family: var(--f-label); font-weight: 600; font-size: .8rem; letter-spacing: .16em;
  text-transform: uppercase; color: var(--azul-tinta);
}
.kicker::before { content: ""; width: 14px; height: 16px; background: var(--verde); flex: none; clip-path: var(--hex); }

/* Botones */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 24px; border-radius: 999px; border: 2px solid transparent;
  font-weight: 700; font-size: 1rem; cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.btn-primario { background: var(--azul-tinta); color: #fff; }
.btn-primario:hover { background: #3E5A93; }
.btn-secundario { background: transparent; color: var(--azul-tinta); border-color: var(--azul-40); }
.btn-secundario:hover { border-color: var(--azul-tinta); background: var(--azul-10); }
.btn-blanco { background: #fff; color: var(--azul-tinta); }
.btn-blanco:hover { background: var(--azul-10); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
.btn:focus-visible, a:focus-visible, select:focus-visible, textarea:focus-visible, input[type="text"]:focus-visible, input[type="password"]:focus-visible, input[type="search"]:focus-visible, summary:focus-visible, [role="tab"]:focus-visible {
  outline: 3px solid var(--azul-tinta); outline-offset: 3px;
}
.azul .btn:focus-visible, .azul a:focus-visible { outline-color: #fff; }
h1[tabindex="-1"]:focus { outline: none; }

/* Campos */
.campo {
  width: 100%; min-height: 48px; padding: 10px 14px; border-radius: 10px;
  border: 1.5px solid var(--azul-40); background: #fff;
}
.campo:hover { border-color: var(--azul-75); }
.campo:focus { border-color: var(--azul-tinta); }

/* Aviso con hexágono verde (callout del deck) */
.nota {
  display: flex; gap: 12px; align-items: flex-start;
  background: var(--azul-10); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px;
  font-size: .95rem;
}
.nota::before { content: ""; flex: none; width: 13px; height: 15px; margin-top: 5px; background: var(--verde); clip-path: var(--hex); }

.error-texto { color: var(--error); font-size: .92rem; font-weight: 600; }

/* Cabecera de las páginas internas */
.cabecera {
  background: #fff; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px clamp(16px, 4vw, 32px);
}
.cabecera .logo-istram { height: 44px; width: auto; display: block; }
.cabecera .logo-buhodra { height: 22px; width: auto; display: block; }

.demo-banda { background: #FFF6D6; color: #5C4A00; text-align: center; font-size: .88rem; font-weight: 600; padding: 6px 12px; }

.pie-marca {
  font-family: var(--f-label); font-weight: 500; font-size: .7rem; letter-spacing: .1em;
  text-transform: uppercase; color: var(--muted);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
