/* Supervisión de la IA · hoja de estilos única (SPEC.md, sección 8) */

/* 1. Fuentes autoalojadas (T-05, D-02) */
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/poppins-400.woff2") format("woff2");
}
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/poppins-600.woff2") format("woff2");
}
@font-face {
  font-family: "Lora";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("../fonts/lora-regular.woff2") format("woff2");
}
@font-face {
  font-family: "Lora";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/lora-italic.woff2") format("woff2");
}

/* 2. Tokens (D-01) */
:root {
  --ink: #18212F;
  --text: #1C2430;
  --muted: #5A6474;
  --paper: #FFFFFF;
  --tint: #F1F3F6;
  --rule: #D9DCE1;
  --signal: #C8102E;
  --signal-dark: #A80D26;
  --on-ink: #DCE1E8;
  --on-ink-muted: #9AA3B0;
  --heading: "Poppins", system-ui, sans-serif;
  --body: "Lora", Georgia, serif;
  color-scheme: light;
}

/* 3. Base y tipografía (D-02) */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  font-size: 100%;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--body);
  font-size: 19px;
  line-height: 1.6;
  color: var(--text);
  background: var(--paper);
}

h1, h2, h3, legend, label, button, .btn, .kicker {
  font-family: var(--heading);
  font-weight: 600;
  line-height: 1.12;
  color: var(--ink);
}

h1 { font-size: 56px; margin: 0 0 24px; }
h2 { font-size: 36px; margin: 0 0 24px; }
h3 { font-size: 24px; margin: 0 0 12px; }

p, ul, ol { margin: 0 0 20px; }
p, li { max-width: 68ch; }
small, .small { font-size: 16px; }

a { color: var(--ink); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--signal); }

em { font-style: italic; }
strong { font-weight: 600; }

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

img { max-width: 100%; height: auto; display: block; }

/* 4. Layout (D-03) */
.container {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 0 24px;
}
.container--wide { max-width: 1040px; }

.section { padding: 96px 0; }
.section--tint { background: var(--tint); }
.section--ink { background: var(--ink); color: var(--on-ink); }
.section--ink h1,
.section--ink h2,
.section--ink h3 { color: #FFFFFF; }
.section--ink a { color: #FFFFFF; }

.text-center { text-align: center; }
.text-center p,
.text-center li { margin-left: auto; margin-right: auto; }
.mt-0 { margin-top: 0; }

/* 5. Cabecera y navegación */
.site-header {
  background: var(--ink);
  color: var(--on-ink);
  padding: 20px 0;
}
.site-header .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
}
.site-header__brand {
  font-family: var(--heading);
  font-weight: 600;
  font-size: 17px;
  color: #FFFFFF;
  text-decoration: none;
}
.site-header__brand:hover { color: #FFFFFF; }
.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
}
.site-nav a {
  font-family: var(--heading);
  font-size: 16px;
  color: var(--on-ink);
  text-decoration: none;
}
.site-nav a:hover,
.site-nav a[aria-current="page"] { color: #FFFFFF; text-decoration: underline; text-underline-offset: 4px; }

/* 6. Hero (D-03) */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--ink);
  color: var(--on-ink);
  padding: 96px 0;
}
.hero .container { position: relative; z-index: 1; }
.hero h1 { color: #FFFFFF; }
.hero__subtitle {
  font-size: 22px;
  color: var(--on-ink);
  margin-bottom: 40px;
}
.hero__numeral {
  position: absolute;
  right: -0.08em;
  bottom: -0.28em;
  font-family: var(--heading);
  font-weight: 600;
  font-size: 520px;
  line-height: 1;
  color: var(--signal);
  opacity: 0.4;
  pointer-events: none;
  user-select: none;
}

/* 7. Kicker (D-04) */
.kicker {
  display: block;
  font-size: 14px;
  color: var(--signal);
  margin: 0 0 16px;
}
.kicker::before {
  content: "";
  display: block;
  width: 24px;
  height: 2px;
  background: var(--signal);
  margin-bottom: 12px;
}
.hero .kicker,
.section--ink .kicker { color: var(--on-ink-muted); }

/* 8. Botones (D-04, D-05) */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 28px;
  border-radius: 8px;
  border: 1.5px solid transparent;
  font-family: var(--heading);
  font-weight: 600;
  font-size: 17px;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 150ms, color 150ms, border-color 150ms;
}
.btn--primary {
  background: var(--signal);
  border-color: var(--signal);
  color: #FFFFFF;
}
.btn--primary:hover { background: var(--signal-dark); border-color: var(--signal-dark); color: #FFFFFF; }
.btn--secondary {
  background: transparent;
  border-color: var(--ink);
  color: var(--ink);
}
.btn--secondary:hover { background: var(--ink); color: #FFFFFF; }
.btn--on-dark { border-color: #FFFFFF; color: #FFFFFF; }
.btn--on-dark:hover { background: #FFFFFF; color: var(--ink); }
.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

/* 9. Tarjetas (D-03) */
.cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}
.card {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 32px;
}
.card__number {
  display: block;
  font-family: var(--heading);
  font-weight: 600;
  font-size: 40px;
  line-height: 1;
  color: var(--signal);
  margin-bottom: 16px;
}
.card__title { margin-bottom: 12px; }
.card p { font-size: 17px; margin: 0; }

/* 10. Frase destacada (C-03) */
.statement {
  font-family: var(--body);
  font-style: italic;
  font-size: 28px;
  line-height: 1.4;
  color: var(--ink);
  max-width: 32ch;
  margin: 0;
}

/* 11. Lista de contenidos (C-04) */
.list {
  padding-left: 24px;
  list-style: square;
}
.list li { margin-bottom: 12px; }
.list li::marker { color: var(--signal); }

/* 12. Autor (C-05) */
.author { display: flex; gap: 32px; align-items: flex-start; }
.author__photo {
  width: 160px;
  flex: 0 0 160px;
  border-radius: 12px;
  filter: grayscale(1);
}

/* 13. CTA final (C-06) */
.cta { text-align: center; }
.cta p { margin-left: auto; margin-right: auto; }
.cta .btn { margin-top: 8px; }

/* 14. Pie */
.site-footer {
  background: var(--tint);
  border-top: 1px solid var(--rule);
  padding: 40px 0;
  font-size: 16px;
  color: var(--muted);
}
.site-footer p { margin-bottom: 12px; }
.site-footer__links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 0;
}
.site-footer__links li + li::before {
  content: "·";
  margin: 0 10px;
  color: var(--muted);
}
.site-footer__links a { color: var(--muted); }
.site-footer__links a:hover { color: var(--signal); }

/* 15. Autoevaluación (D-04, T-13) */
.scale-legend {
  list-style: none;
  margin: 0 0 40px;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  font-family: var(--heading);
  font-size: 16px;
  color: var(--muted);
}
.scale-legend b {
  font-weight: 600;
  color: var(--ink);
}

.group {
  border: 0;
  margin: 0 0 48px;
  padding: 0;
  min-width: 0;
}
.group__title {
  font-size: 36px;
  padding: 0;
  margin-bottom: 8px;
}

.item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  padding: 20px 0;
  margin: 0;
  border: 0;
  border-bottom: 1px solid var(--rule);
  min-width: 0;
}
.item__text {
  float: left;
  width: 100%;
  padding: 0;
  font-family: var(--body);
  font-weight: 400;
  font-size: 19px;
  line-height: 1.6;
  color: var(--text);
  margin: 0;
}
.item__text span { color: var(--muted); font-family: var(--heading); font-size: 16px; margin-right: 8px; }

.scale {
  display: flex;
  gap: 8px;
}
.scale__option {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1.5px solid var(--ink);
  border-radius: 8px;
  font-family: var(--heading);
  font-weight: 600;
  font-size: 18px;
  color: var(--ink);
  background: var(--paper);
  cursor: pointer;
  transition: background-color 150ms, color 150ms;
}
.scale__option:hover { background: var(--tint); }
input[type="radio"]:checked + .scale__option {
  background: var(--ink);
  color: #FFFFFF;
}
input[type="radio"]:focus-visible + .scale__option {
  outline: 3px solid var(--signal);
  outline-offset: 3px;
}

.tools {
  font-size: 16px;
  color: var(--muted);
  margin-bottom: 40px;
}
.tools a { color: var(--muted); }

/* Resultado (C-09) */
.result {
  background: var(--tint);
  border-radius: 12px;
  padding: 32px;
  margin: 48px 0;
}
.result h2 { margin-bottom: 16px; }
.result__total {
  font-family: var(--heading);
  font-weight: 600;
  font-size: 36px;
  line-height: 1.12;
  color: var(--ink);
  margin: 0 0 24px;
}
.result__total b,
.result__total output { font-weight: 600; color: var(--signal); }
.bars {
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
}
.bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 2fr auto;
  gap: 16px;
  align-items: center;
  padding: 8px 0;
}
.bar__label {
  font-family: var(--heading);
  font-weight: 600;
  font-size: 16px;
  color: var(--ink);
}
.bar__track {
  height: 12px;
  background: var(--rule);
  border-radius: 6px;
  overflow: hidden;
}
.bar__fill {
  display: block;
  height: 100%;
  width: 0;
  background: var(--signal);
}
.bar__score {
  font-family: var(--heading);
  font-size: 16px;
  color: var(--ink);
  min-width: 3.5em;
  text-align: right;
}
.result__zero { margin-bottom: 12px; }
.result__note {
  font-size: 16px;
  color: var(--muted);
}

/* 16. Formulario (F-05, T-09) */
.form { max-width: 480px; }
.form__field { margin-bottom: 20px; }
.form__field label {
  display: block;
  font-size: 16px;
  margin-bottom: 8px;
}
.form__field input[type="email"],
.form__field input[type="text"] {
  width: 100%;
  height: 52px;
  padding: 0 16px;
  border: 1.5px solid var(--rule);
  border-radius: 8px;
  font-family: var(--body);
  font-size: 18px;
  color: var(--text);
  background: var(--paper);
}
.form__field input:focus-visible {
  border-color: var(--ink);
  outline-offset: 2px;
}
.form__check {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
}
.form__check input[type="checkbox"] {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  margin: 3px 0 0;
  accent-color: var(--ink);
}
.form__check label {
  font-family: var(--body);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
}
.form__actions { margin-top: 24px; }
.form__note {
  font-size: 16px;
  color: var(--muted);
  margin-top: 8px;
}
.form__status {
  font-family: var(--heading);
  font-size: 16px;
  color: var(--ink);
  margin-top: 16px;
  min-height: 1.5em;
}
.hp {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* 17. Prosa legal */
.prose h2 { font-size: 24px; margin-top: 48px; }
.prose h2:first-child { margin-top: 0; }
.prose ul { padding-left: 24px; }
.prose li { margin-bottom: 8px; }

/* 18. Utilidades */
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* 19. Tablet y móvil (D-02, D-03) */
@media (min-width: 640px) {
  .container { padding: 0 48px; }
}
@media (min-width: 1140px) {
  .container { padding: 0 24px; }
}
@media (max-width: 899.98px) {
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 639.98px) {
  body { font-size: 18px; }
  h1 { font-size: 36px; }
  h2, .group__title { font-size: 28px; }
  h3 { font-size: 22px; }
  .section, .hero { padding: 64px 0; }
  .hero__subtitle { font-size: 19px; }
  .hero__numeral { display: none; }
  .cards { grid-template-columns: minmax(0, 1fr); }
  .card { padding: 24px; }
  .statement { font-size: 22px; }
  .author { flex-direction: column; }
  .item { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .item__text { font-size: 18px; }
  .bar { grid-template-columns: minmax(0, 1fr) auto; }
  .bar__track { grid-column: 1 / -1; }
  .result { padding: 24px; }
  .result__total { font-size: 28px; }
  .btn { width: 100%; }
}

/* 20. Movimiento (D-05) */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}

/* 21. Impresión (T-16) */
@media print {
  @page { size: A4; margin: 18mm; }
  body { font-size: 11pt; color: #000; background: #fff; }
  .site-header, .site-nav, .site-footer, .form, .cta, .btn, .btn-group,
  .hero__numeral, .tools { display: none !important; }
  .section, .hero { padding: 0 0 24px; }
  .hero, .section--ink { background: none; color: #000; }
  .hero h1, .section--ink h2 { color: #000; }
  .container { max-width: none; padding: 0; }
  .group { break-inside: avoid; margin-bottom: 24px; }
  .group__title { font-size: 16pt; }
  .item { grid-template-columns: minmax(0, 1fr) auto; gap: 16px; padding: 8px 0; break-inside: avoid; }
  .item__text { font-size: 11pt; }
  .scale__option { width: 28px; height: 28px; font-size: 11pt; border-color: #000; }
  input[type="radio"]:checked + .scale__option {
    background: #000 !important;
    color: #fff !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .result { background: none; border: 1px solid #000; padding: 16px; margin: 16px 0; break-inside: avoid; }
  .bar__track { border: 1px solid #000; background: #fff; }
  .bar__fill { background: #000; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  a { color: #000; text-decoration: none; }
}
