/*
 * Hoja de estilos del sitio público. Diseño propio, sin frameworks.
 * Tipografía: fuentes del sistema (no se distribuye ningún archivo de fuente).
 * Iconos: SVG dibujados para este proyecto, en línea en las vistas.
 */

:root {
  --bg: #ffffff;
  --bg-soft: #f4f7f7;
  --surface: #ffffff;
  --text: #17212b;
  --muted: #4a5a68;
  --border: #d9e2e6;
  --brand: #0f766e;
  --brand-strong: #0b5d57;
  --brand-contrast: #ffffff;
  --accent-soft: #e6f4f2;
  --pending-bg: #fff3c4;
  --pending-text: #5c4300;
  --error: #b42318;
  --ok: #146c43;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 4px 16px rgba(16, 24, 40, .06);
  --max: 1120px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1418;
    --bg-soft: #151c21;
    --surface: #182027;
    --text: #e8eef1;
    --muted: #a7b6c1;
    --border: #2a353d;
    --brand: #2dd4bf;
    --brand-strong: #5eead4;
    --brand-contrast: #062925;
    --accent-soft: #10302d;
    --pending-bg: #4a3a05;
    --pending-text: #ffe69a;
    --error: #ff8a80;
    --ok: #7ee2b0;
    --shadow: none;
  }
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

img, svg { max-width: 100%; }

a { color: var(--brand); text-underline-offset: 3px; }
a:hover { color: var(--brand-strong); }

:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; border-radius: 4px; }

h1, h2, h3 { line-height: 1.2; letter-spacing: -.01em; }
h1 { font-size: clamp(1.9rem, 4.5vw, 2.8rem); margin: 0 0 .6em; }
h2 { font-size: clamp(1.4rem, 3vw, 1.8rem); margin: 1.8em 0 .6em; }
h3 { font-size: 1.15rem; margin: 1.4em 0 .4em; }
p, ul, ol { margin: 0 0 1em; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 760px; }

.skip-link {
  position: absolute; left: 8px; top: -60px; z-index: 10;
  background: var(--brand); color: var(--brand-contrast); padding: 10px 14px; border-radius: 8px;
}
.skip-link:focus { top: 8px; }

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

/* Marca visible para datos que faltan por completar */
mark.pending {
  background: var(--pending-bg); color: var(--pending-text);
  padding: 0 .3em; border-radius: 4px; font-weight: 600;
}

/* Cabecera */
.site-header { border-bottom: 1px solid var(--border); background: var(--bg); position: sticky; top: 0; z-index: 5; }
.site-header .container { display: flex; align-items: center; gap: 16px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--text); text-decoration: none; margin-right: auto; }
.brand svg { flex: none; }

.nav-desktop { display: none; }
.nav-desktop ul, .nav-mobile ul { list-style: none; margin: 0; padding: 0; }
.nav-desktop ul { display: flex; gap: 4px; }
.nav-link { display: block; padding: 8px 12px; border-radius: 8px; color: var(--text); text-decoration: none; white-space: nowrap; }
.nav-link:hover { background: var(--bg-soft); color: var(--text); }
.nav-link[aria-current="page"] { color: var(--brand); font-weight: 600; }

.header-actions { display: none; gap: 8px; align-items: center; }
.lang-switch { font-size: .9rem; color: var(--muted); }
.lang-switch a { color: var(--muted); }

.nav-mobile summary {
  list-style: none; cursor: pointer; padding: 8px 12px; border: 1px solid var(--border); border-radius: 8px;
}
.nav-mobile summary::-webkit-details-marker { display: none; }
.nav-mobile[open] .nav-panel {
  position: absolute; left: 0; right: 0; top: 64px; background: var(--bg);
  border-bottom: 1px solid var(--border); padding: 8px 16px 16px; box-shadow: var(--shadow);
}
.nav-panel .nav-link { padding: 12px; }
.nav-panel .btn { margin-top: 8px; width: 100%; }

@media (min-width: 1100px) {
  .nav-desktop, .header-actions { display: flex; }
  .nav-mobile { display: none; }
}
.brand span { max-width: 22ch; }

/* Botones */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 18px; border-radius: 10px; border: 1px solid transparent;
  font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
}
.btn-primary { background: var(--brand); color: var(--brand-contrast); }
.btn-primary:hover { background: var(--brand-strong); color: var(--brand-contrast); }
.btn-ghost { border-color: var(--border); color: var(--text); background: transparent; }
.btn-ghost:hover { background: var(--bg-soft); color: var(--text); }

/* Secciones */
main { display: block; }
.section { padding: 56px 0; }
.section-soft { background: var(--bg-soft); }
.page-head { padding: 48px 0 8px; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 680px; }

.hero { padding: 72px 0 56px; }
.hero .lead { margin-bottom: 1.6em; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }

.grid { display: grid; gap: 20px; grid-template-columns: 1fr; }
@media (min-width: 700px) { .grid-2 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }

.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow);
}
.card h3, .card .h3 { margin-top: 0; }
.h3 { font-size: 1.15rem; }
.card .icon { width: 40px; height: 40px; color: var(--brand); margin-bottom: 8px; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }

/* Planes */
.plan { display: flex; flex-direction: column; }
.plan .price { font-size: 1.8rem; font-weight: 700; margin: .2em 0; }
.plan .price small { font-size: .95rem; font-weight: 400; color: var(--muted); }
.plan ul { padding-left: 1.2em; }
.plan .btn { margin-top: auto; }

/* FAQ */
.faq details { border: 1px solid var(--border); border-radius: var(--radius); padding: 0 18px; margin-bottom: 12px; background: var(--surface); }
.faq summary { cursor: pointer; padding: 16px 0; font-weight: 600; }
.faq details[open] summary { border-bottom: 1px solid var(--border); margin-bottom: 12px; }

/* Textos legales */
.legal h2 { font-size: 1.3rem; }
.notice {
  border-left: 4px solid var(--brand); background: var(--accent-soft);
  padding: 12px 16px; border-radius: 8px; margin: 0 0 1.5em;
}

/* Formularios */
.form { display: grid; gap: 16px; }
.field label { display: block; font-weight: 600; margin-bottom: 6px; }
.field .hint { font-size: .9rem; color: var(--muted); margin-top: 4px; }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; color: var(--text); background: var(--surface);
  border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; min-height: 44px;
}
.field textarea { min-height: 140px; resize: vertical; }
.field .error { color: var(--error); font-size: .9rem; margin-top: 4px; }
.check { display: flex; gap: 10px; align-items: flex-start; }
.check input { width: 20px; height: 20px; margin-top: 3px; flex: none; }
.alert { padding: 12px 16px; border-radius: 10px; margin-bottom: 16px; border: 1px solid var(--border); }
.alert-ok { color: var(--ok); border-color: currentColor; }
.alert-error { color: var(--error); border-color: currentColor; }

/* Campo trampa: fuera de la vista y del orden de tabulación */
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* Pie */
.site-footer { border-top: 1px solid var(--border); padding: 40px 0 24px; margin-top: 40px; background: var(--bg-soft); }
.site-footer .grid { gap: 24px; }
@media (min-width: 800px) { .site-footer .grid { grid-template-columns: 2fr 1fr 1fr; } }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 6px; }
.site-footer a { color: var(--muted); }
.copyright { margin-top: 24px; font-size: .9rem; color: var(--muted); }

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
