/* miliebre.com · estilos de la web (diseño de design/DESIGN.md, dirección "Asfalto").
   Tokens de DESIGN.md y clases reutilizables que sustituyen a los estilos en línea de las maquetas.
   La zona privada usa panel.css. El aviso de cookies está copiado en cookies.css para el panel. */

:root {
  --navy: #0E1B2C;        /* header, footer, bloques oscuros, texto principal */
  --navy-2: #22344D;      /* bordes sobre navy */
  --navy-3: #1C2C42;
  --lime: #C6F432;        /* color de marca, CTA principal */
  --paper: #F2F4F0;       /* fondo de página */
  --white: #FFFFFF;       /* tarjetas y formularios */
  --line: #D5DAD2;        /* bordes sobre claro */
  --muted: #3A4555;       /* texto secundario sobre claro */
  --muted-dark: #C9D1DC;  /* texto secundario sobre navy */
  --text: #26313F;        /* texto largo */
  --disabled: #5B6575;
  --error: #B42318;
  --radius-card: 18px; --radius-input: 10px; --radius-pill: 999px;
  --container: 1200px; --gutter: 40px;
  --font: 'Archivo', system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; font-family: var(--font); background: var(--paper); color: var(--navy); display: flex; flex-direction: column; }
main { flex: 1 0 auto; }
img { max-width: 100%; }
a { color: inherit; }
a:hover { opacity: .85; }
input, select, textarea, button { font: inherit; }
:focus-visible { outline: 3px solid var(--lime); outline-offset: 2px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Estructura ---------- */
.wrap { max-width: var(--container); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.section { padding-top: 96px; padding-bottom: 96px; }
.stack { display: flex; flex-direction: column; }
.grid { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(var(--min, 260px), 1fr)); }
.split { display: grid; gap: 56px; align-items: center; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); }
.band-white { background: var(--white); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.band-navy { background: var(--navy); color: var(--white); }
.band-lime { background: var(--lime); color: var(--navy); }

/* ---------- Tipografía ---------- */
.eyebrow { font-size: 13px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: var(--muted); }
.eyebrow--lime { color: var(--lime); }
.eyebrow--sm { font-size: 12px; letter-spacing: 1.5px; }
.display { margin: 0; font-stretch: 125%; font-weight: 800; letter-spacing: -2px; line-height: .98; font-size: 66px; }
.title { margin: 0; font-stretch: 125%; font-weight: 800; letter-spacing: -1px; line-height: 1.05; font-size: 42px; }
.title--lg { font-size: 46px; letter-spacing: -1.5px; line-height: 1; }
.title--md { font-size: 40px; }
.title--44 { font-size: 44px; }
.display--60 { font-size: 60px; line-height: 1; }
.display--52 { font-size: 52px; letter-spacing: -1.5px; line-height: 1; }
.subtitle { margin: 0; font-stretch: 115%; font-weight: 800; font-size: 26px; line-height: 1.1; }
.card-title { margin: 0; font-size: 21px; font-weight: 700; }
.lead { margin: 0; font-size: 19px; line-height: 1.5; max-width: 32rem; }
.on-navy .lead, .on-navy .muted { color: var(--muted-dark); }
.text { margin: 0; font-size: 16px; line-height: 1.55; color: var(--muted); }
.muted { color: var(--muted); }
.max-40 { max-width: 40rem; }
.center { align-items: center; text-align: center; }

/* ---------- Botones (píldora) ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 12px 20px; border-radius: var(--radius-pill); border: 0; font-weight: 700; font-size: 16px; text-decoration: none; cursor: pointer; text-align: center; }
.btn--lg { padding: 16px 32px; font-size: 17px; }
.btn--sm { padding: 11px 18px; font-size: 14px; }
.btn--block { display: flex; width: 100%; padding: 16px; }
.btn--block.btn--outline, .btn--block.btn--outline-light { padding: 15px; }
.btn--cta { padding: 16px 28px; }
.btn--hero { padding: 16px 30px; }
.btn--lg.btn--outline-light { padding: 15px 28px; }
.btn--slim { padding: 15px; }
.btn--lime { background: var(--lime); color: var(--navy); }
.btn--navy { background: var(--navy); color: var(--white); }
.btn--outline { background: transparent; color: var(--navy); border: 1.5px solid var(--navy); }
.btn--outline-light { background: transparent; color: var(--white); border: 1.5px solid var(--white); }
.btn--dashed { background: transparent; color: var(--navy); border: 1.5px dashed var(--disabled); }
.link-strong { font-weight: 700; font-size: 16px; padding: 12px 0; }
.stack > .link-strong { align-self: flex-start; }
.text--line { line-height: normal; }

/* ---------- Header ---------- */
.site-header { background: var(--navy); color: var(--white); border-bottom: 1px solid var(--navy-2); }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding-top: 20px; padding-bottom: 20px; }
.site-logo { display: flex; text-decoration: none; }
.site-nav { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; font-size: 15px; font-weight: 600; }
.site-nav a { text-decoration: none; padding: 12px 0; }
.site-nav a[aria-current="page"] { color: var(--lime); border-bottom: 2px solid var(--lime); }
.site-nav .btn { padding: 12px 20px; font-size: 15px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: var(--muted-dark); }
.site-footer__inner { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; padding-top: 40px; padding-bottom: 40px; font-size: 14px; }
.site-footer nav { display: flex; gap: 24px; flex-wrap: wrap; }
.site-footer nav a, .site-footer nav button { padding: 10px 0; }
.link-button { background: none; border: 0; padding: 0; color: inherit; font: inherit; line-height: inherit; cursor: pointer; text-decoration: underline; }
.site-footer .link-button { padding: 10px 0; }
.site-footer__social { display: flex; gap: 8px; list-style: none; margin: 0; padding: 0; }
.site-footer__social a { display: flex; padding: 11px; color: var(--muted-dark); }
.site-footer__social a:hover, .site-footer__social a:focus-visible { color: var(--lime); }

/* ---------- Avisos (flash) ---------- */
.flash { margin: 24px auto 0; border-radius: 12px; padding: 14px 18px; font-size: 15px; line-height: 1.5; border: 1px solid; }
.flash--success { background: #EEF9D0; border-color: #B8DB52; color: #2F4000; }
.flash--error { background: #FDECEA; border-color: #F1B5AE; color: var(--error); }
.flash--info { background: var(--white); border-color: var(--line); color: var(--navy); }
.form-card .flash { margin: 0; }

/* ---------- Portada ---------- */
.hero { background-color: var(--navy); color: var(--white); background-image: linear-gradient(90deg, rgba(14,27,44,.92) 0%, rgba(14,27,44,.72) 55%, rgba(14,27,44,.5) 100%), url(../img/hero-blur.jpg); background-size: cover; background-position: center 40%; }
.hero__inner { padding-top: 120px; padding-bottom: 160px; }
.hero__copy { gap: 24px; max-width: 46rem; }
.hero__copy .lead { color: var(--muted-dark); }
.page-hero { padding-top: 96px; padding-bottom: 112px; }
.page-hero .lead { color: var(--muted-dark); }

/* Vídeo (pendiente) y galería */
.video-slot { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: 22px; overflow: hidden; display: flex; align-items: center; justify-content: center; background: repeating-linear-gradient(135deg, var(--navy-3) 0, var(--navy-3) 14px, var(--navy-2) 14px, var(--navy-2) 28px); }
.video-slot__play { width: 96px; height: 96px; border-radius: var(--radius-pill); border: 0; background: var(--lime); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.video-slot video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: var(--navy); }
.video-slot__play { position: relative; box-shadow: 0 8px 30px rgba(14, 27, 44, .35); }
.video-slot__note { position: absolute; left: 24px; bottom: 24px; background: var(--navy); color: var(--muted-dark); font-size: 14px; font-weight: 600; padding: 10px 14px; border-radius: 10px; }
.gallery { --min: 260px; gap: 16px; }
.gallery img { width: 100%; height: 420px; object-fit: cover; border-radius: 16px; display: block; }

/* ---------- Tarjetas ---------- */
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-card); padding: 28px; display: flex; flex-direction: column; gap: 12px; }
.card--navy { background: var(--navy); color: var(--white); border-color: var(--navy); }
.card--navy .text { color: var(--muted-dark); }
.card--plain { background: transparent; padding: 32px; }
.step-num { font-stretch: 125%; font-weight: 800; font-size: 32px; }
.card--navy .step-num { color: var(--lime); }

/* ---------- Planes ---------- */
.plans { --min: 320px; max-width: 960px; width: 100%; margin: 0 auto; align-items: stretch; }
.plan { background: var(--white); border: 1px solid var(--line); border-radius: 22px; padding: 36px; display: flex; flex-direction: column; gap: 20px; }
.plan--premium { background: var(--navy); color: var(--white); border-color: var(--navy); box-shadow: 0 0 0 4px var(--lime); }
.plan__head { display: flex; flex-direction: column; gap: 6px; }
.plan__name { font-size: 20px; font-weight: 700; }
.plan__price { display: flex; align-items: baseline; gap: 8px; }
.plan__amount { font-stretch: 125%; font-weight: 800; font-size: 60px; letter-spacing: -2px; line-height: 1; }
.plan--premium .plan__amount { color: var(--lime); }
.plan__period { font-size: 17px; font-weight: 600; color: var(--muted); }
.plan__note { font-size: 15px; color: var(--muted); }
.plan--premium .plan__period, .plan--premium .plan__note { color: var(--muted-dark); }
.plan .btn { margin-top: auto; }
.badge { font-size: 12px; font-weight: 800; padding: 5px 10px; border-radius: var(--radius-pill); background: var(--lime); color: var(--navy); }
.check-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 12px; font-size: 16px; line-height: 1.4; }
.check-list li { display: flex; gap: 10px; }
.check-list svg { flex-shrink: 0; }
.check-list .is-off { color: var(--disabled); }

/* ---------- Convocatorias ---------- */
.race-card { background: var(--paper); border-radius: var(--radius-card); padding: 24px; display: flex; flex-direction: column; gap: 14px; }
.race-card__meta { font-size: 13px; font-weight: 700; color: var(--muted); }
.race-card__times { font-size: 15px; }
.race-card .btn { align-self: flex-start; }
.lock-box { background: var(--white); border: 1px dashed #A9B2A6; border-radius: 12px; padding: 14px; display: flex; gap: 10px; align-items: center; font-size: 14px; font-weight: 600; color: var(--muted); }
.lock-box svg { flex-shrink: 0; }
.empty-box { grid-column: 1 / -1; background: var(--paper); border-radius: var(--radius-card); padding: 28px; font-size: 16px; color: var(--muted); }

/* ---------- Formularios ---------- */
.form-card { background: var(--white); color: var(--navy); border-radius: var(--radius-card); padding: 32px; display: flex; flex-direction: column; gap: 16px; }
.form-card--accent { border-top: 6px solid var(--lime); }
.form-card--paper { background: var(--paper); border: 1px solid var(--line); gap: 18px; }
.form-card__title { font-stretch: 115%; font-weight: 800; font-size: 24px; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; min-width: 0; }
.input { width: 100%; min-width: 0; min-height: 44px; padding: 13px 14px; border-radius: var(--radius-input); border: 1.5px solid var(--line); background: var(--paper); color: var(--navy); font-weight: inherit; }
.form-card--paper .input { background: var(--white); }
.input--strong { font-weight: 700; padding: 12px 14px; }
.input:disabled, textarea.input:disabled, select.input:disabled { opacity: 1; color: var(--navy); cursor: not-allowed; }
textarea.input { resize: none; }
.input.is-invalid { border-color: var(--error); }
.field-error { color: var(--error); font-size: 13px; font-weight: 600; }
.form-note { font-size: 13px; line-height: 1.5; color: var(--muted); }
.legal-check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 1.45; color: var(--text); cursor: pointer; }
.legal-check input { width: 20px; height: 20px; margin: 0; flex-shrink: 0; accent-color: var(--navy); }
.legal-check a { font-weight: 700; }
.required { color: var(--error); }
.cols-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.cols-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.fieldset { margin: 0; padding: 0; border: 0; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.fieldset--form { gap: 18px; }
.fieldset legend { padding: 0; margin-bottom: 10px; font-size: 14px; font-weight: 600; }
.cols-head { font-size: 12px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); }

/* Servicio llave en mano */
.contact-box { background: var(--navy); color: var(--white); border-radius: 22px; padding: 36px; display: flex; flex-direction: column; gap: 14px; justify-self: end; width: 100%; max-width: 460px; }
.contact-box__label { font-size: 15px; font-weight: 600; color: var(--muted-dark); }
.contact-box__email { font-weight: 700; font-size: 19px; color: var(--lime); text-decoration: none; word-break: break-all; }

/* ---------- Acceso: login, registro y contraseña ---------- */
.auth { padding-top: 72px; padding-bottom: 96px; }
.auth__head { gap: 16px; max-width: 40rem; margin: 0 auto 40px; }
.auth__card { width: 100%; max-width: 480px; margin: 0 auto; }
.auth__links { display: flex; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; font-size: 14px; }
.auth__links a { font-weight: 700; padding: 12px 0; }
.auth__foot { text-align: center; font-size: 15px; color: var(--muted-dark); margin: 24px 0 0; }
.auth__foot a { color: var(--lime); font-weight: 700; }
.form-hint { font-size: 13px; font-weight: 400; color: var(--muted); }
.field .invalid-feedback { color: var(--error); font-size: 13px; font-weight: 600; }
.roles { --min: 280px; }
.role-card { text-decoration: none; color: var(--navy); height: 100%; }
.role-card.card--navy { color: var(--white); }
.role-card:hover { opacity: 1; border-color: var(--navy); }
.role-card.card--navy:hover { box-shadow: 0 0 0 4px var(--lime); }
.role-card .link-strong { margin-top: auto; padding-bottom: 0; }

/* ---------- Textos legales ---------- */
.legal-hero { padding-top: 72px; padding-bottom: 32px; gap: 16px; }
.legal-warning { margin-top: 8px; background: #FFF6D6; border: 1px solid #E8D48A; border-radius: 12px; padding: 14px 18px; font-size: 14px; line-height: 1.5; color: #4A3B00; max-width: 52rem; }
.legal-body { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-card); padding: 48px; display: flex; flex-direction: column; gap: 56px; font-size: 16px; line-height: 1.65; color: var(--text); }
.legal-body article { display: flex; flex-direction: column; gap: 14px; scroll-margin-top: 24px; }
.legal-body h2 { margin: 0; font-stretch: 115%; font-weight: 800; font-size: 30px; line-height: 1.1; color: var(--navy); }
.legal-body h3 { margin: 8px 0 0; font-size: 19px; font-weight: 700; color: var(--navy); }
.legal-body p { margin: 0; }
.legal-body ul { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 6px; }
.data-grid { margin: 0; background: var(--paper); border-radius: 12px; padding: 20px 24px; display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 8px 16px; font-size: 15px; }
.data-grid dt { font-weight: 700; color: var(--navy); }
.data-grid dd { margin: 0; }
.legal-table { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; font-size: 15px; width: 100%; table-layout: fixed; border-collapse: separate; border-spacing: 0; }
.legal-table th, .legal-table td { padding: 12px 16px; text-align: left; vertical-align: top; }
.legal-table th { background: var(--navy); color: var(--white); font-weight: 700; }
.legal-table td { border-top: 1px solid var(--line); }
.legal-table tbody tr:nth-child(even) td { background: var(--paper); }
.legal-table td:first-child { font-weight: 600; }

/* ---------- Aviso de cookies (partials/site/cookies.php + assets/js/cookies.js) ---------- */
.ck-banner, .ck-overlay {
  --ck-navy: var(--navy); --ck-lime: var(--lime); --ck-white: var(--white); --ck-muted: var(--muted);
  font-family: var(--font);
}
.ck-banner { position: fixed; left: 24px; right: 24px; bottom: 24px; z-index: 1090; background: var(--ck-white); color: var(--ck-navy); border-radius: 20px; padding: 24px 28px; display: flex; align-items: center; gap: 24px; flex-wrap: wrap; box-shadow: 0 20px 50px rgba(0,0,0,.35); }
.ck-banner[hidden], .ck-overlay[hidden] { display: none; }
.ck-banner p { margin: 0; font-size: 15px; line-height: 1.5; color: var(--ck-muted); flex: 1 1 360px; }
.ck-banner strong { display: block; font-size: 19px; color: var(--ck-navy); margin-bottom: 4px; }
.ck-banner a { color: inherit; }
.ck-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.ck-actions--end { justify-content: flex-end; padding-top: 12px; border-top: 1px solid #E3E7E0; }
.ck-btn { min-height: 44px; padding: 13px 20px; border-radius: 999px; border: 1.5px solid var(--ck-navy); background: var(--ck-white); color: var(--ck-navy); font: inherit; font-weight: 700; font-size: 15px; line-height: 1; cursor: pointer; }
.ck-btn--primary { background: var(--ck-navy); color: var(--ck-white); }
.ck-btn:focus-visible, .ck-switch:focus-visible { outline: 3px solid var(--ck-lime); outline-offset: 2px; }
.ck-overlay { position: fixed; inset: 0; z-index: 1091; background: rgba(14,27,44,.55); display: flex; align-items: center; justify-content: center; padding: 16px; }
.ck-modal { width: 100%; max-width: 560px; background: var(--ck-white); border-radius: 22px; padding: 28px; color: var(--ck-navy); }
.ck-modal h2 { margin: 0 0 8px; font-size: 24px; font-weight: 700; }
.ck-row { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 16px 0; border-top: 1px solid #E3E7E0; }
.ck-row b { display: block; margin-bottom: 4px; }
.ck-row span { font-size: 14px; color: var(--ck-muted); }
.ck-switch { appearance: none; -webkit-appearance: none; width: 52px; height: 30px; border-radius: 999px; background: #C9CFC6; position: relative; cursor: pointer; flex-shrink: 0; margin: 0; }
.ck-switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: left .15s; }
.ck-switch:checked { background: var(--ck-navy); }
.ck-switch:checked::after { left: 25px; background: var(--ck-lime); }
.ck-switch:disabled { background: #5B6575; cursor: not-allowed; }

/* ---------- Móvil ---------- */
@media (max-width: 720px) {
  :root { --gutter: 16px; }
  .display, .display--60, .display--52 { font-size: 40px; letter-spacing: -1px; }
  .title, .title--lg, .title--md, .title--44 { font-size: 30px; letter-spacing: -.5px; }
  .section { padding-top: 64px; padding-bottom: 64px; }
  .hero__inner { padding-top: 72px; padding-bottom: 96px; }
  .page-hero { padding-top: 64px; padding-bottom: 72px; }
  .split, .plans, .grid { grid-template-columns: minmax(0, 1fr); }
  .site-nav { gap: 4px 20px; }
  .gallery img { height: 300px; }
  .plan, .form-card, .contact-box { padding: 24px; }
  .legal-body { padding: 24px; gap: 40px; }
  .data-grid { grid-template-columns: minmax(0, 1fr); }
  .data-grid dd { margin-bottom: 8px; }
  .cols-3 { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 720px) {
  .ck-banner { left: 12px; right: 12px; bottom: 12px; padding: 20px; }
  .ck-banner p { flex-basis: 100%; }
  .ck-actions { width: 100%; }
  .ck-actions .ck-btn { flex: 1 1 auto; }
}
