/* WALAWA legal — sitio estático sin dependencias externas. Tipografía y colores de la app. */

@font-face { font-family: "Plus Jakarta Sans"; font-weight: 400; font-style: normal; font-display: swap; src: url("/fonts/PlusJakartaSans-Regular.woff2") format("woff2"); }
@font-face { font-family: "Plus Jakarta Sans"; font-weight: 600; font-style: normal; font-display: swap; src: url("/fonts/PlusJakartaSans-SemiBold.woff2") format("woff2"); }
@font-face { font-family: "Plus Jakarta Sans"; font-weight: 700; font-style: normal; font-display: swap; src: url("/fonts/PlusJakartaSans-Bold.woff2") format("woff2"); }

:root {
  color-scheme: light dark;
  --bg: #ffffff;
  --surface: #f5f8f8;
  --ink: #0f1a1c;
  --muted: #4b5b5e;
  --faint: #66767a;
  --border: #e6eced;
  --brand: #1bcad3;
  --brand-press: #14b4bc;
  --link: #0a7a83;
  --tint: #e6f9fa;
  --warn-bg: #fef3df;
  --warn-ink: #6b4300;
  --hero-from: #1bcad3;
  --hero-to: #9deaee;
  --hero-ink: #0f1a1c;
  --hero-muted: #14393d;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(15, 26, 28, .05), 0 10px 30px rgba(15, 26, 28, .07);
  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1415;
    --surface: #112022;
    --ink: #eaf4f5;
    --muted: #a9bcbf;
    --faint: #8da3a6;
    --border: #1f3336;
    --link: #4fd9e0;
    --tint: #0f2a2d;
    --warn-bg: #2d2410;
    --warn-ink: #f4d58a;
    --hero-from: #0d5f66;
    --hero-to: #0a2f33;
    --hero-ink: #f1fbfc;
    --hero-muted: #b9dfe2;
    --shadow: none;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 17px/1.7 var(--font); -webkit-font-smoothing: antialiased; }
img, svg { max-width: 100%; display: block; }
a { color: var(--link); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; border-radius: 4px; }
html[data-lang="es"] [lang="en"], html[data-lang="en"] [lang="es"] { display: none !important; }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.skip { position: absolute; left: 12px; top: -60px; background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 10px; z-index: 100; text-decoration: none; font-weight: 600; }
.skip:focus { top: 12px; }

/* ---------- Cabecera ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px); border-bottom: 1px solid var(--border); }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 700; font-size: 18px; letter-spacing: .14em; }
.brand img { width: 34px; height: 34px; border-radius: 10px; }
.nav { display: flex; align-items: center; gap: 4px; margin-left: auto; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a { white-space: nowrap; font-size: 14.5px; font-weight: 600; color: var(--muted); text-decoration: none; padding: 8px 12px; border-radius: 999px; }
.nav a:hover { color: var(--ink); background: var(--surface); }
.nav a[aria-current="page"] { color: var(--ink); background: var(--tint); }
.lang { display: inline-flex; padding: 3px; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; flex: none; }
.lang button { font: 700 12.5px/1 var(--font); letter-spacing: .06em; border: 0; background: none; color: var(--muted); padding: 7px 12px; border-radius: 999px; cursor: pointer; }
.lang button[aria-pressed="true"] { background: var(--brand); color: #0f1a1c; cursor: default; }
@media (max-width: 860px) {
  .bar { flex-wrap: wrap; padding-top: 10px; padding-bottom: 6px; row-gap: 4px; }
  .nav { order: 3; flex: 1 0 100%; margin: 0 -20px; padding: 0 16px 6px; }
  .lang { margin-left: auto; }
}

/* ---------- Inicio ---------- */
.hero { background: linear-gradient(135deg, var(--hero-from), var(--hero-to)); color: var(--hero-ink); padding: 64px 0 72px; }
.hero h1 { font-size: clamp(32px, 5.4vw, 52px); line-height: 1.08; letter-spacing: -.02em; margin: 0 0 16px; max-width: 18ch; }
.hero p { font-size: clamp(17px, 2.2vw, 20px); color: var(--hero-muted); max-width: 60ch; margin: 0; }
.eyebrow { display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 14px; opacity: .85; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; margin: -36px auto 0; padding-bottom: 8px; position: relative; }
.card { display: flex; flex-direction: column; gap: 8px; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; text-decoration: none; color: var(--ink); box-shadow: var(--shadow); transition: transform .15s ease, border-color .15s ease; }
.card:hover { transform: translateY(-2px); border-color: var(--brand); }
.card .ico { width: 44px; height: 44px; border-radius: 12px; background: var(--tint); color: var(--link); display: grid; place-items: center; margin-bottom: 6px; }
.card .ico svg { width: 22px; height: 22px; }
.card h2 { font-size: 19px; line-height: 1.3; margin: 0; }
.card p { margin: 0; color: var(--muted); font-size: 15.5px; line-height: 1.55; }
.card .go { margin-top: auto; padding-top: 10px; font-weight: 700; font-size: 14.5px; color: var(--link); }
.section { padding: 56px 0 8px; }
.section h2 { font-size: 24px; letter-spacing: -.01em; margin: 0 0 6px; }
.section > .wrap > p { color: var(--muted); margin: 0 0 20px; max-width: 62ch; }
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.contact-item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; }
.contact-item > span { display: block; font-size: 12.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); margin-bottom: 4px; }
.contact-item a, .contact-item b { font-weight: 600; color: var(--ink); text-decoration: none; word-break: break-word; }
.contact-item a:hover { color: var(--link); text-decoration: underline; }

/* ---------- Documentos ---------- */
.doc-head { background: var(--surface); border-bottom: 1px solid var(--border); padding: 44px 0 32px; }
.doc-head .eyebrow { color: var(--link); opacity: 1; }
.doc-head h1 { font-size: clamp(30px, 4.6vw, 44px); line-height: 1.12; letter-spacing: -.02em; margin: 0 0 14px; max-width: 24ch; }
.doc-head .lead-sm { color: var(--muted); font-size: 18px; max-width: 64ch; margin: 0 0 16px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font-size: 13.5px; font-weight: 600; color: var(--muted); background: var(--bg); border: 1px solid var(--border); border-radius: 999px; padding: 5px 12px; }
.doc { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 56px; padding-top: 36px; padding-bottom: 72px; }
@media (min-width: 1000px) { .doc { grid-template-columns: 270px minmax(0, 1fr); } }
.toc { margin-bottom: 28px; }
@media (min-width: 1000px) { .toc { position: sticky; top: 92px; align-self: start; max-height: calc(100vh - 116px); overflow: auto; margin-bottom: 0; padding-right: 8px; } }
.toc details { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 4px 16px; }
@media (min-width: 1000px) { .toc details { background: none; border: 0; padding: 0; } .toc summary { display: none; } }
.toc summary { cursor: pointer; font-weight: 700; font-size: 15px; padding: 12px 0; }
.toc .toc-title { display: none; font-size: 12.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); margin: 0 0 10px; }
@media (min-width: 1000px) { .toc .toc-title { display: block; } }
.toc ol { list-style: none; margin: 0; padding: 0 0 10px; }
.toc a { display: block; padding: 6px 12px; margin-left: -12px; border-left: 2px solid transparent; font-size: 14.5px; line-height: 1.4; color: var(--muted); text-decoration: none; border-radius: 0 8px 8px 0; }
.toc a:hover { color: var(--ink); background: var(--surface); }
.toc a.active { color: var(--link); border-left-color: var(--brand); background: var(--tint); font-weight: 600; }

.prose { min-width: 0; max-width: 74ch; }
.prose > :first-child { margin-top: 0; }
.prose p { margin: 0 0 16px; }
.prose .lead { font-size: 19px; line-height: 1.65; color: var(--ink); }
.prose h2 { font-size: 24px; line-height: 1.25; letter-spacing: -.01em; margin: 48px 0 14px; padding-top: 8px; }
.prose h3 { font-size: 18px; line-height: 1.35; margin: 28px 0 8px; }
.prose ul, .prose ol { margin: 0 0 18px; padding-left: 24px; }
.prose li { margin: 0 0 8px; padding-left: 4px; }
.prose li::marker { color: var(--link); }
.prose strong { font-weight: 700; }
.note { background: var(--tint); border: 1px solid color-mix(in srgb, var(--brand) 40%, var(--border)); border-radius: var(--radius); padding: 16px 20px; margin: 0 0 24px; }
.note p:last-child, .note ul:last-child { margin-bottom: 0; }
.note.warn { background: var(--warn-bg); border-color: color-mix(in srgb, #f5a524 45%, var(--border)); color: var(--warn-ink); }
.steps { list-style: none; counter-reset: step; padding: 0 !important; }
.steps li { counter-increment: step; position: relative; padding: 4px 0 4px 52px; margin-bottom: 14px; min-height: 40px; }
.steps li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 36px; height: 36px; border-radius: 50%; background: var(--brand); color: #0f1a1c; font-weight: 700; display: grid; place-items: center; }
.table-wrap { overflow-x: auto; margin: 0 0 24px; border: 1px solid var(--border); border-radius: var(--radius); }
table { border-collapse: collapse; width: 100%; font-size: 15.5px; line-height: 1.5; }
th, td { text-align: left; vertical-align: top; padding: 12px 16px; border-bottom: 1px solid var(--border); }
th { background: var(--surface); font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); }
tr:last-child td { border-bottom: 0; }
td:first-child { font-weight: 600; white-space: nowrap; }
dl.defs { margin: 0 0 20px; }
dl.defs dt { font-weight: 700; margin-top: 18px; }
dl.defs dd { margin: 4px 0 0; }
dl.clauses { margin: 0 0 20px; padding: 0; counter-reset: clause; }
dl.clauses dt { font-weight: 700; margin-top: 20px; }
dl.clauses dd { margin: 4px 0 0; }
dl.clauses dd ul { margin-top: 10px; }
details.faq { border: 1px solid var(--border); border-radius: 14px; margin: 0 0 10px; background: var(--bg); }
details.faq[open] { border-color: color-mix(in srgb, var(--brand) 55%, var(--border)); }
details.faq summary { list-style: none; cursor: pointer; padding: 16px 52px 16px 20px; font-weight: 600; position: relative; line-height: 1.45; }
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after { content: ""; position: absolute; right: 20px; top: 50%; width: 9px; height: 9px; margin-top: -7px; border-right: 2px solid var(--faint); border-bottom: 2px solid var(--faint); transform: rotate(45deg); transition: transform .15s ease; }
details.faq[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
details.faq .a { padding: 0 20px 6px; color: var(--muted); }
details.faq .a p:last-child { margin-bottom: 14px; }
.only-es { background: var(--warn-bg); color: var(--warn-ink); border-radius: var(--radius); padding: 14px 18px; margin: 0 0 24px; font-size: 15.5px; }

/* ---------- Pie ---------- */
.site-footer { background: var(--surface); border-top: 1px solid var(--border); margin-top: 24px; padding: 44px 0 28px; font-size: 15px; color: var(--muted); }
.foot { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 32px; }
.foot h3 { font-size: 12.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); margin: 0 0 12px; }
.foot ul { list-style: none; margin: 0; padding: 0; }
.foot li { margin: 0 0 8px; }
.foot a { color: var(--muted); text-decoration: none; }
.foot a:hover { color: var(--link); text-decoration: underline; }
.foot .brand { margin-bottom: 12px; }
.legalline { border-top: 1px solid var(--border); margin-top: 32px; padding-top: 18px; font-size: 13.5px; color: var(--faint); }

/* ---------- Visor de la app (?app=1) ---------- */
.in-app .brand, .in-app .nav, .in-app .skip, .in-app .site-footer { display: none; }
.in-app .site-header { position: static; border-bottom: 0; }
.in-app .bar { min-height: 52px; justify-content: flex-end; padding-top: 6px; padding-bottom: 0; }
.in-app .doc-head { padding: 24px 0 20px; }
.in-app .hero { padding: 36px 0 56px; }

/* ---------- 404 ---------- */
.center { text-align: center; padding: 96px 0; }
.center h1 { font-size: 64px; margin: 0; letter-spacing: -.03em; }

@media print {
  .site-header, .toc, .lang, .skip, .site-footer .foot { display: none !important; }
  body { font-size: 12pt; background: #fff; color: #000; }
  .doc-head { background: none; border: 0; padding: 0 0 12px; }
  .doc { display: block; padding: 0; }
  .prose { max-width: none; }
  a { color: #000; text-decoration: none; }
  details.faq .a { display: block; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .card { transition: none; } }
