/* trawen.org: hoja de estilo única. Sin fuentes externas, sin scripts. */
:root {
  --bg: #fbfbf8;
  --surface: #ffffff;
  --text: #15222c;
  --muted: #56646e;
  --line: #dfe4e7;
  --accent: #0c5a73;
  --accent-soft: #e6f0f3;
  --max: 64rem;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f161b;
    --surface: #151f26;
    --text: #e6ecef;
    --muted: #9eabb4;
    --line: #26333c;
    --accent: #7cc4da;
    --accent-soft: #17303a;
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #0f161b;
  --surface: #151f26;
  --text: #e6ecef;
  --muted: #9eabb4;
  --line: #26333c;
  --accent: #7cc4da;
  --accent-soft: #17303a;
  color-scheme: dark;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
}

a { color: var(--accent); text-underline-offset: 0.15em; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }

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

.skip {
  position: absolute;
  left: -999px;
}
.skip:focus { left: 1rem; top: 0.5rem; background: var(--surface); padding: 0.25rem 0.5rem; }

/* Cabecera */
.site-header { border-bottom: 1px solid var(--line); }
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4rem;
  flex-wrap: wrap;
}
.brand {
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text);
  text-decoration: none;
}
.site-nav { display: flex; gap: 1.25rem; flex-wrap: wrap; font-size: 0.95rem; }
.site-nav a { color: var(--muted); text-decoration: none; }
.site-nav a:hover { color: var(--text); text-decoration: underline; }
.site-nav .lang { color: var(--accent); font-weight: 600; }

/* Portada */
.hero { padding: 3.5rem 0 2.5rem; }
.hero h1 {
  font-size: clamp(2rem, 5vw, 2.75rem);
  line-height: 1.15;
  margin: 0 0 0.75rem;
  letter-spacing: -0.01em;
}
.hero .lead { font-size: 1.25rem; color: var(--text); margin: 0 0 1rem; max-width: 40rem; }
.hero p { max-width: 42rem; color: var(--muted); margin: 0 0 1rem; }
.facts {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  font-size: 0.95rem;
  color: var(--muted);
}
.facts li { white-space: nowrap; }

section { padding: 2rem 0; }
section > .wrap > h2,
.page h2 { font-size: 1.5rem; margin: 0 0 0.5rem; }
.section-intro { color: var(--muted); margin: 0 0 1.5rem; max-width: 42rem; }

/* Tarjetas */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 26rem), 1fr));
  gap: 1rem;
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
}
.card h3 { margin: 0 0 0.25rem; font-size: 1.3rem; }
.tag {
  display: inline-block;
  font-size: 0.8rem;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 4px;
  padding: 0.1rem 0.5rem;
  margin: 0 0 0.75rem;
  align-self: flex-start;
}
.card p { margin: 0 0 0.75rem; }
.card ul { margin: 0 0 0.75rem; padding-left: 1.2rem; }
.card li { margin-bottom: 0.35rem; }
.card .meta { color: var(--muted); font-size: 0.95rem; }
.card .link { margin-top: auto; padding-top: 0.5rem; font-weight: 600; }

/* Contacto */
.contact { border-top: 1px solid var(--line); }
.contact p { margin: 0 0 0.5rem; }
.contact .mail { font-size: 1.2rem; font-weight: 600; }

/* Páginas legales */
.page { padding: 2.5rem 0 3rem; }
.page h1 { font-size: clamp(1.75rem, 4vw, 2.25rem); margin: 0 0 1rem; }
.page h2 { margin-top: 2rem; font-size: 1.2rem; }
.page p, .page ul { max-width: 46rem; }
.page .updated { color: var(--muted); font-size: 0.95rem; margin-top: 2rem; }
dl.legal {
  display: grid;
  grid-template-columns: minmax(8rem, 14rem) 1fr;
  gap: 0.5rem 1.5rem;
  max-width: 46rem;
  margin: 1.5rem 0;
  padding: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}
dl.legal dt { color: var(--muted); }
dl.legal dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 34rem) {
  dl.legal { grid-template-columns: 1fr; gap: 0.1rem; }
  dl.legal dd { margin-bottom: 0.6rem; }
}

/* Pie */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 1.5rem 0 2rem;
  font-size: 0.9rem;
  color: var(--muted);
}
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; }
.site-footer a { color: var(--muted); }

.nowrap { white-space: nowrap; }

/* Webs para clientes */
.client-list { list-style: none; padding: 0; margin: 0; max-width: 46rem; }
.client-list li { padding: 0.6rem 0; border-top: 1px solid var(--line); }
.client-list li:last-child { border-bottom: 1px solid var(--line); }
