/*
 * Lo que comparten la landing y la política de privacidad: paleta de la app (Zen-Wallet/src/theme/tokens.ts),
 * cabecera, pie, marca, selector de idioma y botón día/noche. Cada página suma después su propia hoja.
 * Sigue el modo del sistema; `site.js` fija `data-theme` cuando la persona elige claro u oscuro.
 */
:root {
  color-scheme: light dark;
  --bg: light-dark(#f4f5f7, #0d0d0d);
  --surface: light-dark(#ffffff, #1a1a1a);
  --border: light-dark(#d5d8dc, #2c2c2e);
  --text: light-dark(#1a1a1a, #ffffff);
  --muted: light-dark(#4a4b50, #b4b4b9);
  --accent: light-dark(#2e6b31, #6fcf73);
  --accent-fill: light-dark(#2e6b31, #43a047);
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --wrap: 70rem;
}

:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  -webkit-text-size-adjust: 100%;
}

a { color: var(--accent); }
a:focus-visible,
select:focus-visible,
button:focus-visible,
input:focus-visible + label {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding-inline: 1.5rem; }
.vh {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}

/* Marca: el ensō y su moneda */
.mark .ring { fill: none; stroke: var(--mark, #43a047); stroke-width: 61; stroke-linecap: round; }
.mark .coin { fill: var(--mark, #43a047); }
.brand-mark { --mark: var(--accent-fill); width: 2.25rem; height: 2.25rem; }

/* Cabecera */
.site-header {
  position: sticky; top: 0; z-index: 10; background: var(--bg); border-bottom: 1px solid var(--border);
  /* Mismo tamaño de texto sea cual sea el de la página que lo aloja (la landing lee a 17 px y la política a 16). */
  font-size: 1rem; line-height: 1.6;
}
.topbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.25rem 1.5rem; padding-block: 0.5rem; }
.brand {
  display: inline-flex; align-items: center; gap: 0.6rem; min-height: 2.75rem;
  font: 700 1.375rem var(--sans); color: var(--text); text-decoration: none;
}
.topbar nav { display: flex; flex-wrap: wrap; gap: 0 1.75rem; }
.topbar nav a {
  display: inline-flex; align-items: center; min-height: 2.75rem;
  color: var(--text); font-weight: 500; text-decoration: none;
}
.topbar nav a:hover { color: var(--accent); text-decoration: underline; }

/* Selector de idioma y botón día/noche */
.tools { display: flex; align-items: center; gap: 0.5rem; }
.language { display: flex; gap: 0.5rem; }
select,
.lang-go,
.theme-toggle {
  color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 999px;
  font: inherit; font-size: 0.9375rem;
}
select { min-height: 2.75rem; padding: 0.35rem 0.9rem; }
.lang-go { min-width: 2.75rem; min-height: 2.75rem; cursor: pointer; }
.js .lang-go { display: none; }
.theme-toggle { display: none; align-items: center; justify-content: center; width: 2.75rem; height: 2.75rem; padding: 0; cursor: pointer; }
.js .theme-toggle { display: inline-flex; }
.theme-toggle:hover { color: var(--accent); }
.theme-toggle svg { width: 1.25rem; height: 1.25rem; fill: none; stroke: currentcolor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
/* El icono dice a qué modo se pasa: luna estando en claro, sol estando en oscuro. */
.theme-toggle .sun, :root[data-theme="dark"] .theme-toggle .moon { display: none; }
:root[data-theme="dark"] .theme-toggle .sun { display: inline; }

/* Respaldo para el desplegable nativo (navegadores sin base-select). */
option { background: var(--surface); color: var(--text); }

/* Selector personalizable: el desplegable usa las tarjetas y el acento de la app. */
@supports (appearance: base-select) {
  select, ::picker(select) { appearance: base-select; }
  select::picker-icon { color: var(--muted); }
  ::picker(select) {
    margin-top: 0.25rem; padding: 0.25rem; border: 1px solid var(--border); border-radius: 1rem;
    background: var(--surface); box-shadow: 0 8px 24px rgb(0 0 0 / 18%);
  }
  option { padding: 0.5rem 0.75rem; border-radius: 10px; font-size: 0.9375rem; }
  option:hover, option:focus-visible { background: color-mix(in srgb, var(--accent) 14%, transparent); }
  option:checked { color: var(--accent); font-weight: 600; }
  option::checkmark { display: none; }
}

/* Pie */
.site-footer { border-top: 1px solid var(--border); }
.foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 2rem; padding-block: 1.5rem 2.5rem; color: var(--muted); font-size: 0.9375rem; }
.foot .brand { font-size: 1.125rem; color: var(--muted); }
.foot a { display: inline-flex; align-items: center; min-height: 2.75rem; color: inherit; text-decoration: none; }
.foot a:hover { color: var(--accent); }

@media (max-width: 40rem) {
  .site-header { position: static; }
  .topbar nav { order: 3; flex-basis: 100%; gap: 0 1.25rem; }
}
