/* Campervan Rental Reviews — estilos
   Fuentes alojadas en el propio servidor (sin Google Fonts, sin cookies).
   Si los .woff2 no están en /assets/fonts/, se usan las alternativas del sistema. */

@font-face { font-family: "Barlow Condensed"; font-weight: 600; font-style: normal; font-display: swap;
  src: url("/assets/fonts/barlow-condensed-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 500; font-style: normal; font-display: swap;
  src: url("/assets/fonts/barlow-condensed-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Atkinson Hyperlegible"; font-weight: 400; font-style: normal; font-display: swap;
  src: url("/assets/fonts/atkinson-hyperlegible-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Atkinson Hyperlegible"; font-weight: 700; font-style: normal; font-display: swap;
  src: url("/assets/fonts/atkinson-hyperlegible-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Atkinson Hyperlegible"; font-weight: 400; font-style: italic; font-display: swap;
  src: url("/assets/fonts/atkinson-hyperlegible-latin-400-italic.woff2") format("woff2"); }

:root {
  --paper: #F4F6F3;      /* papel frío de la hoja de inspección */
  --sheet: #FFFFFF;      /* superficie de tablas y formularios */
  --ink: #1D2B36;        /* tinta azul pizarra */
  --pen: #2F5D8A;        /* azul bolígrafo: enlaces y marcas */
  --pen2: #2E7D6B;       /* verde azulado: segunda empresa en el mapa */
  --mark: #B8382E;       /* marca de daño, solo en el dibujo */
  --muted: #5E6B76;      /* texto secundario */
  --rule: #D3DAD6;       /* líneas del formulario */
  --pen-wash: #E3EBF3;   /* fondo de avisos */
  --focus: #2F5D8A;

  --display: "Barlow Condensed", "Roboto Condensed", "Arial Narrow", "Helvetica Neue Condensed", sans-serif-condensed, system-ui, sans-serif;
  --text: "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --measure: 68ch;
  --wide: 72rem;
  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.3rem;
  --step-2: 1.7rem;
  --step-3: 2.3rem;
  --step-4: clamp(2.4rem, 5.2vw, 3.9rem);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #131B21; --sheet: #1A242C; --ink: #E6ECEF; --pen: #8DB6DD; --pen2: #7CC4B0; --mark: #E07A70;
    --muted: #A2B0BA; --rule: #2E3B45; --pen-wash: #1E2D3B; --focus: #8DB6DD;
  }
}
:root[data-theme="dark"] {
  --paper: #131B21; --sheet: #1A242C; --ink: #E6ECEF; --pen: #8DB6DD; --pen2: #7CC4B0; --mark: #E07A70;
  --muted: #A2B0BA; --rule: #2E3B45; --pen-wash: #1E2D3B; --focus: #8DB6DD;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--text); font-size: var(--step-0); line-height: 1.6;
}
img, svg { max-width: 100%; height: auto; }
a { color: var(--pen); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 2px; }

.skip { position: absolute; left: -999px; top: 0; background: var(--sheet); padding: .6rem 1rem; z-index: 10; }
.skip:focus { left: 1rem; top: 1rem; }

.wrap { max-width: var(--wide); margin: 0 auto; padding: 0 1.25rem; }

/* Cabecera */
.site-head { border-bottom: 1px solid var(--rule); }
.site-head .wrap { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .5rem 2rem; padding-top: 1.1rem; padding-bottom: 1rem; }
.brand { font-family: var(--display); font-weight: 600; font-size: 1.55rem; letter-spacing: .01em; color: var(--ink); text-decoration: none; line-height: 1.1; }
.brand small { display: block; font-family: var(--text); font-weight: 400; font-size: var(--step--1); color: var(--muted); letter-spacing: 0; }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .25rem 1.4rem; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 700; font-size: var(--step--1); padding: .2rem 0; border-bottom: 2px solid transparent; }
.nav a:hover, .nav a[aria-current="page"] { border-bottom-color: var(--pen); }

/* Tipografía */
h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.08; letter-spacing: .005em; margin: 0; }
h1 { font-size: var(--step-4); margin-bottom: 1rem; max-width: 22ch; }
h2 { font-size: var(--step-3); margin-top: 3rem; margin-bottom: .75rem; }
h3 { font-size: var(--step-2); font-weight: 500; margin-top: 2rem; margin-bottom: .5rem; }
p, ul, ol { margin: 0 0 1rem; }
.prose { max-width: var(--measure); }
.prose li { margin-bottom: .45rem; }
.lead { font-size: var(--step-1); line-height: 1.5; color: var(--ink); max-width: 46ch; }
.meta { color: var(--muted); font-size: var(--step--1); }
.crumbs { font-size: var(--step--1); color: var(--muted); margin: 1.5rem 0 1rem; }
.crumbs a { color: var(--muted); }

main { padding-bottom: 4rem; }
.page-head { padding: 1rem 0 .5rem; }

/* Portada: dibujo de inspección */
.hero { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2rem; padding: 2.5rem 0 1rem; align-items: center; }
@media (min-width: 900px) { .hero { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 3rem; padding-top: 3.5rem; } }
.inspection { background: var(--sheet); border: 1px solid var(--rule); padding: 1rem 1rem .75rem; }
.inspection figcaption { font-size: var(--step--1); color: var(--muted); margin-top: .5rem; }
.inspection .van { stroke: var(--ink); fill: none; stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; }
.inspection .grid line { stroke: var(--rule); stroke-width: 1; }
.inspection .mark { stroke: var(--mark); fill: none; stroke-width: 2.4; stroke-linecap: round; }
.inspection .lab { fill: var(--pen); font-family: var(--display); font-size: 23px; font-weight: 500; }
.inspection .lead-line { stroke: var(--pen); stroke-width: 1.3; fill: none; }
@media (prefers-reduced-motion: no-preference) {
  .inspection .mark { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw .6s ease-out forwards; }
  .inspection .mark:nth-of-type(2) { animation-delay: .35s; }
  .inspection .mark:nth-of-type(3) { animation-delay: .7s; }
  .inspection .mark:nth-of-type(4) { animation-delay: 1.05s; }
  @keyframes draw { to { stroke-dashoffset: 0; } }
}

/* Tablas */
.table-wrap { position: relative; overflow-x: auto; margin: 1rem 0 1.5rem; border: 1px solid var(--rule); background: var(--sheet); }
table { border-collapse: collapse; width: 100%; font-size: var(--step--1); }
th, td { text-align: left; vertical-align: top; padding: .7rem .9rem; border-bottom: 1px solid var(--rule); }
thead th { font-weight: 700; color: var(--muted); }
tbody tr:last-child td, tbody tr:last-child th { border-bottom: 0; }
tbody th { font-weight: 700; width: 32%; }
td .src { display: block; margin-top: .25rem; color: var(--muted); }

/* Bloques */
.note { background: var(--pen-wash); border-left: 3px solid var(--pen); padding: .9rem 1.1rem; margin: 1.25rem 0; max-width: var(--measure); }
.note p:last-child { margin-bottom: 0; }
.empty { border: 1px dashed var(--rule); background: var(--sheet); padding: 1.25rem; max-width: var(--measure); }
.empty p:last-child { margin-bottom: 0; }
.button { display: inline-block; background: var(--pen); color: var(--paper); font-weight: 700; text-decoration: none; padding: .7rem 1.2rem; border: 2px solid var(--pen); }
.button:hover { background: transparent; color: var(--pen); }
.split { display: grid; gap: 0 3rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.linklist { list-style: none; padding: 0; max-width: var(--measure); }
.linklist li { border-top: 1px solid var(--rule); padding: .8rem 0; margin: 0; }
.linklist li:last-child { border-bottom: 1px solid var(--rule); }
.linklist a { font-weight: 700; }
.linklist span { display: block; color: var(--muted); font-size: var(--step--1); }
.steps { counter-reset: s; list-style: none; padding: 0; max-width: var(--measure); }
.steps > li { counter-increment: s; position: relative; padding-left: 2.6rem; margin-bottom: 1.1rem; }
.steps > li::before { content: counter(s); position: absolute; left: 0; top: -.15rem; font-family: var(--display); font-weight: 600; font-size: 1.6rem; color: var(--pen); }
.sources { font-size: var(--step--1); color: var(--muted); max-width: var(--measure); }
.sources li { margin-bottom: .3rem; }

/* Formularios */
form.sheet { background: var(--sheet); border: 1px solid var(--rule); padding: 1.25rem; max-width: 44rem; }
.field { margin-bottom: 1.1rem; }
.field label, fieldset legend { display: block; font-weight: 700; margin-bottom: .3rem; }
.field .hint { display: block; font-weight: 400; color: var(--muted); font-size: var(--step--1); }
input[type="text"], input[type="email"], input[type="url"], input[type="date"], select, textarea {
  width: 100%; font: inherit; color: var(--ink); background: var(--paper);
  border: 1px solid var(--muted); border-radius: 2px; padding: .55rem .65rem;
}
textarea { min-height: 9rem; resize: vertical; }
fieldset { border: 0; padding: 0; margin: 0 0 1.1rem; }
.rating { display: flex; flex-wrap: wrap; gap: .5rem 1.2rem; }
.check { display: flex; gap: .6rem; align-items: flex-start; margin-bottom: .8rem; }
.check input { margin-top: .35rem; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.row2 { display: grid; gap: 0 1rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) { .row2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
button.button { font: inherit; font-weight: 700; cursor: pointer; }

/* Pie */
.site-foot { border-top: 1px solid var(--rule); padding: 2rem 0 3rem; font-size: var(--step--1); color: var(--muted); }
.site-foot .wrap { display: grid; gap: 1rem 3rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 800px) { .site-foot .wrap { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); } }
.site-foot ul { list-style: none; padding: 0; margin: 0; }
.site-foot li { margin-bottom: .35rem; }
.site-foot a { color: var(--muted); }

@media print { .site-head nav, .site-foot, .skip { display: none; } body { background: #fff; color: #000; } }
.caption-foot { caption-side: bottom; text-align: left; padding: .6rem .9rem; }

/* Gráficos de barras con <meter> */
.chart { margin: 1rem 0 1.5rem; max-width: 52rem; }
.bars { list-style: none; padding: 0; margin: 0; }
.bars li { display: grid; grid-template-columns: minmax(0, 22rem) minmax(0, 1fr) 3.2rem; gap: .25rem 1rem; align-items: center; padding: .3rem 0; }
.bars .bv { color: var(--muted); font-size: var(--step--1); text-align: right; }
.bars meter { width: 100%; height: 1rem; appearance: none; -webkit-appearance: none; background: var(--rule); border: 0; border-radius: 1px; }
.bars meter::-webkit-meter-bar { background: var(--rule); border: 0; border-radius: 1px; height: 1rem; }
.bars meter::-webkit-meter-optimum-value, .bars meter::-webkit-meter-suboptimum-value, .bars meter::-webkit-meter-even-less-good-value { background: var(--pen); border-radius: 1px; }
.bars meter::-moz-meter-bar { background: var(--pen); }
@media (max-width: 640px) {
  .bars li { grid-template-columns: minmax(0, 1fr) 3rem; }
  .bars .bl { grid-column: 1 / -1; font-size: var(--step--1); }
}

/* ---------- Portada: ranking ---------- */
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hero-rank { --paper: #F4F6F3; --rule: #D3DAD6; background: #1D2B36; color: #F4F6F3; padding: 3rem 0 3.25rem; }
.hero-rank a { color: inherit; }
.hero-rank-grid { display: grid; gap: 2rem; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 960px) { .hero-rank-grid { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 3.5rem; } }
.hero-rank h1 { color: #F4F6F3; max-width: 14ch; }
.hero-rank .lead { color: var(--paper); }
.hero-rank .meta { color: var(--rule); max-width: 46ch; }
.ranking { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--paper); }
.rank { display: grid; grid-template-columns: 2.6rem minmax(0, 1fr) auto; grid-template-areas: "pos name score" "pos meter meter"; gap: .35rem 1rem; padding: 1rem 0 1.1rem; border-bottom: 1px solid color-mix(in srgb, var(--paper) 25%, transparent); align-items: baseline; }
.rank-pos { grid-area: pos; font-family: var(--display); font-weight: 600; font-size: 2.6rem; line-height: 1; }
.rank-name { grid-area: name; font-family: var(--display); font-weight: 600; font-size: 1.7rem; line-height: 1.1; }
.rank-name a { text-decoration: none; border-bottom: 1px solid currentColor; }
.rank-name small { display: block; font-family: var(--text); font-weight: 400; font-size: var(--step--1); opacity: .8; margin-top: .2rem; }
.rank-score { grid-area: score; text-align: right; white-space: nowrap; }
.rank-score b { font-family: var(--display); font-weight: 600; font-size: 2.4rem; line-height: 1; }
.rank-score small { display: block; font-size: var(--step--1); opacity: .85; }
.rank-meter { grid-area: meter; width: 100%; height: .55rem; appearance: none; -webkit-appearance: none; background: color-mix(in srgb, var(--paper) 22%, transparent); border: 0; }
.rank-meter::-webkit-meter-bar { background: color-mix(in srgb, var(--paper) 22%, transparent); border: 0; height: .55rem; }
.rank-meter::-webkit-meter-optimum-value, .rank-meter::-webkit-meter-suboptimum-value, .rank-meter::-webkit-meter-even-less-good-value { background: var(--paper); }
.rank-meter::-moz-meter-bar { background: var(--paper); }
.rank.is-worst .rank-meter::-webkit-meter-optimum-value, .rank.is-worst .rank-meter::-webkit-meter-suboptimum-value, .rank.is-worst .rank-meter::-webkit-meter-even-less-good-value { background: var(--alert); }
.rank.is-worst .rank-meter::-moz-meter-bar { background: var(--alert); }
.rank.is-worst .rank-pos, .rank.is-worst .rank-score b { color: var(--alert); }
.board-note { font-size: var(--step--1); opacity: .8; margin-top: .9rem; }

/* ---------- Mención especial (señal de peligro) ---------- */
:root { --alert: #E8574B; --alert-wash: #FBEAE7; --alert-ink: #8E2A21; --sign-yellow: #F2C230; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --alert: #F07A6F; --alert-wash: #2B1A1A; --alert-ink: #F3B3AC; } }
:root[data-theme="dark"] { --alert: #F07A6F; --alert-wash: #2B1A1A; --alert-ink: #F3B3AC; }
.alert { background: var(--alert-wash); border-bottom: 4px solid var(--alert); padding: 2.75rem 0 2.5rem; }
.alert-grid { display: grid; gap: 1.75rem 3rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 960px) { .alert-grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); } .alert-head { grid-column: 1 / -1; } }
.alert-head { display: flex; gap: 1.25rem; align-items: flex-start; }
.sign { width: 5.2rem; flex: none; }
.sign-edge { fill: #C62D22; }
.sign-face { fill: #FFFFFF; }
.sign-mark { fill: #1D2B36; }
.alert-kicker { font-weight: 700; color: var(--alert-ink); margin: 0 0 .3rem; }
.alert h2 { margin: 0 0 .7rem; font-size: var(--step-3); max-width: 24ch; color: var(--ink); }
.alert-lead { max-width: 60ch; margin: 0; }
.worst-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0; }
.worst-list li { border-top: 1px solid color-mix(in srgb, var(--alert) 45%, transparent); padding: .9rem 0; display: grid; grid-template-columns: 6.5rem minmax(0, 1fr); gap: .1rem 1rem; align-items: baseline; }
.worst-list li:last-child { border-bottom: 1px solid color-mix(in srgb, var(--alert) 45%, transparent); }
.worst-list b { grid-row: span 2; font-family: var(--display); font-weight: 600; font-size: 2.9rem; line-height: .95; color: var(--alert-ink); }
.worst-list b small { font-size: 1.1rem; }
.worst-list span { font-weight: 700; }
.worst-list .vs { color: var(--muted); font-size: var(--step--1); }
.alert-themes h3 { margin-top: 0; font-size: var(--step-2); }
.alert-themes .bars meter::-webkit-meter-optimum-value, .alert-themes .bars meter::-webkit-meter-suboptimum-value, .alert-themes .bars meter::-webkit-meter-even-less-good-value { background: var(--alert); }
.alert-themes .bars meter::-moz-meter-bar { background: var(--alert); }
.alert-themes .bars li { grid-template-columns: minmax(0, 15rem) minmax(0, 1fr) 3rem; }
.alert-actions { margin-top: 1.1rem; display: flex; flex-wrap: wrap; gap: .8rem 1.4rem; align-items: center; }
.button-alert { background: var(--alert-ink); border-color: var(--alert-ink); color: #fff; }
.button-alert:hover { color: var(--alert-ink); }
.alert-note { grid-column: 1 / -1; font-size: var(--step--1); color: var(--muted); max-width: 80ch; margin: 0; }

/* ---------- Comparativa ---------- */
.compare td.flag { color: var(--alert-ink); font-weight: 700; background: var(--alert-wash); }
.compare tr.muted th, .compare tr.muted td { color: var(--muted); font-weight: 400; }
@media (max-width: 640px) {
  .alert-head { flex-direction: column; gap: .6rem; }
  .sign { width: 3.4rem; }
  .alert h2 { font-size: var(--step-2); }
  .rank-name { font-size: 1.4rem; }
  .rank-score b { font-size: 2rem; }
  .alert-themes .bars li { grid-template-columns: minmax(0, 1fr) 3rem; }
}

/* ---------- Idiomas, rankings por país y sedes ---------- */
.langs ul { list-style: none; margin: 0; padding: 0; display: flex; gap: .2rem; }
.langs a { display: inline-block; font-size: var(--step--1); font-weight: 700; color: var(--muted); text-decoration: none; padding: .15rem .55rem; border: 1px solid var(--rule); border-radius: 2px; }
.langs a[aria-current="true"] { color: var(--ink); border-color: var(--ink); }
.langs a:hover { color: var(--pen); border-color: var(--pen); }
.site-head .langs { order: 2; }
.site-head .nav { order: 3; flex-basis: 100%; }
@media (min-width: 960px) { .site-head .nav { flex-basis: auto; } }
.board + .board { margin-top: 2.4rem; }
.board-title { font-size: var(--step-2); color: #F4F6F3; margin: 0 0 .6rem; display: flex; flex-wrap: wrap; align-items: baseline; gap: .2rem .7rem; }
.board-title small { font-family: var(--text); font-weight: 400; font-size: var(--step--1); opacity: .8; }
.board-light { --paper: var(--ink); margin: 1.5rem 0 2rem; max-width: 46rem; }
.toc { margin: 1.5rem 0 1rem; }
.toc .meta { margin: 0 0 .4rem; }
.toc-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .35rem 1.1rem; }
.toc-list a { font-weight: 700; }
.country-block { scroll-margin-top: 1rem; }
.country-block h2 { margin-top: 2.4rem; }

/* Nota de Google a petición (página de sedes) */
.g-lugar { margin-left: .5rem; font: inherit; font-size: .875rem; padding: .15rem .6rem; border: 1px solid var(--rule); border-radius: 6px; background: transparent; color: inherit; cursor: pointer; }
.g-lugar:disabled { opacity: .6; cursor: progress; }
.g-res:empty { display: none; }
.g-res { margin-top: .5rem; font-size: .9rem; }
.g-res .g-resenas { list-style: none; padding: 0; margin: .5rem 0; }
.g-res .g-resenas li { border-top: 1px solid var(--rule); padding: .4rem 0; }
.g-res p { margin: .2rem 0; }

/* Mapa de sedes (SVG propio) */
.map-fig { margin: 1.5rem auto; max-width: 56rem; }
.map-svg { width: 100%; height: auto; display: block; border: 1px solid var(--rule); border-radius: 8px; background: var(--sheet); }
.map-mar { fill: var(--paper); }
.map-tierra { fill: var(--pen-wash); stroke: var(--muted); stroke-opacity: .5; stroke-width: 1; }
.map-pt circle { fill: var(--pen); fill-opacity: .85; stroke: var(--paper); stroke-width: 2; }
.map-pt.e2 circle { fill: var(--pen2); }
.map-key.e2 { background: var(--pen2); }
.map-pt:hover circle, .map-pt:focus circle { fill: var(--mark); fill-opacity: 1; }
.map-pt:focus { outline: none; }
.map-pt:focus-visible circle { stroke: var(--ink); stroke-width: 3; }
.map-leyenda { list-style: none; padding: 0; margin: .5rem 0; display: flex; flex-wrap: wrap; gap: 1rem; }
.map-key { display: inline-block; width: .8rem; height: .8rem; border-radius: 50%; background: var(--pen); margin-right: .4rem; vertical-align: middle; }

/* Experiencia propia: galería de fotos */
.caso-galeria { display: grid; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); gap: 1rem; margin: 1.5rem 0; }
.caso-foto { margin: 0; }
.caso-foto img { width: 100%; height: auto; display: block; border-radius: 6px; border: 1px solid var(--rule); }
.caso-foto figcaption { font-size: var(--step--1); color: var(--muted); margin-top: .35rem; }
