/* Stolasimp — sitio legal. Sin dependencias externas: debe verse igual para
   siempre, incluso si un revisor de Google lo abre dentro de un año. */

:root {
  --ink: #14213d;
  --ink-soft: #46506a;
  --muted: #6b7280;
  --line: #e3e0d9;
  --bg: #f7f5f1;
  --surface: #ffffff;
  --accent: #9a7b3f;
  --accent-soft: rgba(154, 123, 63, 0.12);
  --radius: 10px;
  --measure: 74ch;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: 880px; margin: 0 auto; padding: 0 24px; }

/* ── Encabezado ─────────────────────────────────────── */
.site-head {
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.site-head .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 18px;
  padding-bottom: 18px;
  flex-wrap: wrap;
}

.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand img { width: 36px; height: 36px; display: block; }
.brand-name { font-weight: 700; letter-spacing: -0.01em; }
.brand-sub { display: block; font-size: 12px; color: var(--muted); font-weight: 500; letter-spacing: 0.02em; }

.site-nav { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.site-nav a { color: var(--ink-soft); text-decoration: none; font-size: 14.5px; font-weight: 500; }
.site-nav a:hover { color: var(--accent); }
.site-nav a.here { color: var(--ink); font-weight: 600; }

/* ── Menú desplegable (nativo con <details>, sin JS) ─── */
.menu { position: relative; }
.menu > summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink);
  padding: 4px 0;
}
.menu > summary::-webkit-details-marker { display: none; }
.menu > summary::after {
  content: "";
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  opacity: 0.55;
  transition: transform 150ms ease;
}
.menu[open] > summary { color: var(--accent); }
.menu[open] > summary::after { transform: rotate(180deg); }
.menu-panel {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  z-index: 30;
  min-width: 232px;
  max-width: calc(100vw - 48px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 14px 30px -16px rgba(20, 33, 61, 0.4);
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.menu-panel a {
  padding: 9px 11px;
  border-radius: 6px;
  font-size: 14px;
  color: var(--ink-soft);
  text-decoration: none;
}
.menu-panel a:hover { background: var(--accent-soft); color: var(--ink); }
.menu-panel .menu-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--muted);
  padding: 6px 11px 4px;
  font-weight: 700;
}

.lang { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; background: var(--surface); }
.lang button {
  border: 0;
  background: none;
  padding: 5px 12px;
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
}
.lang button.on { background: var(--accent-soft); color: var(--ink); }
.lang button:hover { color: var(--ink); }

[hidden] { display: none !important; }

/* ── Portada minimalista (raíz) ─────────────────────── */
.cover-body { min-height: 100vh; display: grid; place-items: center; }
.cover { text-align: center; padding: 48px 24px; }
.cover-mark { width: 56px; height: 56px; display: block; margin: 0 auto 18px; }
.cover-name { font-size: clamp(2.4rem, 7vw, 3.5rem); letter-spacing: -0.045em; margin: 0 0 12px; }
.cover-line { color: var(--ink-soft); margin: 0 0 28px; }
.cover-links { display: flex; gap: 22px; justify-content: center; flex-wrap: wrap; margin-bottom: 14px; }
.cover-links a { color: var(--accent); text-decoration: none; font-weight: 600; }
.cover-links a:hover { text-decoration: underline; }
.cover-contact { margin: 0; font-size: 14px; }
.cover-contact a { color: var(--muted); text-decoration: none; }
.cover-contact a:hover { color: var(--accent); }
.cover-bot { margin: 0 0 12px; font-size: 13.5px; color: var(--muted); }
.cover-bot a { color: var(--accent); text-decoration: none; }
.cover-bot a:hover { text-decoration: underline; }

/* Dos grupos claros en la portada: chatbot y scraper */
.cover-groups {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
  max-width: 520px;
  margin: 4px auto 22px;
  text-align: left;
}
.cover-group {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 14px 16px;
}
.cover-group .t {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}
.cover-group a {
  display: block;
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  font-size: 14.5px;
  padding: 3px 0;
}
.cover-group a:hover { text-decoration: underline; }
.cover-lang { position: fixed; top: 18px; right: 20px; }

/* ── Portada ────────────────────────────────────────── */
.hero { padding: 56px 0 40px; }
.hero h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); line-height: 1.15; letter-spacing: -0.03em; margin: 0 0 14px; }
.hero .lead { font-size: 1.06rem; color: var(--ink-soft); max-width: var(--measure); margin: 0; }

.pill {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 999px;
  padding: 5px 12px;
  margin-bottom: 18px;
}

/* ── Tarjetas ───────────────────────────────────────── */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; margin: 34px 0 8px; }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
}
.card h3 { margin: 0 0 8px; font-size: 1rem; letter-spacing: -0.01em; }
.card p { margin: 0; color: var(--ink-soft); font-size: 14.5px; }

/* ── Contenido legal ────────────────────────────────── */
.doc { background: var(--surface); border-top: 1px solid var(--line); margin-top: 40px; padding: 44px 0 60px; }
.doc section { max-width: var(--measure); }

.doc h2 { font-size: 1.42rem; letter-spacing: -0.02em; margin: 42px 0 6px; }
.doc h2:first-of-type { margin-top: 0; }
.doc h3 { font-size: 1.02rem; margin: 26px 0 6px; }
.doc p, .doc li { color: var(--ink-soft); }
.doc p { margin: 0 0 12px; }
.doc ul { margin: 0 0 14px; padding-left: 22px; }
.doc li { margin-bottom: 6px; }

.doc a { color: var(--accent); }

.meta { font-size: 13.5px; color: var(--muted); border-bottom: 1px solid var(--line); padding-bottom: 20px; margin-bottom: 8px; }

.callout {
  background: var(--accent-soft);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 14px 18px;
  margin: 18px 0 22px;
  font-size: 14.5px;
  color: var(--ink);
}

table { width: 100%; border-collapse: collapse; margin: 4px 0 18px; font-size: 14.5px; }
th, td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: 0.07em; color: var(--muted); }

.lang-sep { border-top: 1px dashed var(--line); margin: 34px 0 0; padding-top: 30px; }

/* ── Pie ────────────────────────────────────────────── */
.site-foot { border-top: 1px solid var(--line); background: var(--surface); padding: 28px 0 40px; font-size: 14px; color: var(--muted); }
.site-foot .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.site-foot a { color: var(--ink-soft); text-decoration: none; }
.site-foot a:hover { color: var(--accent); }
.site-foot .links { display: flex; gap: 18px; flex-wrap: wrap; }

@media (max-width: 640px) {
  .hero { padding: 38px 0 26px; }
  .doc { padding: 32px 0 48px; }
  .site-head .wrap { padding-top: 14px; padding-bottom: 14px; }
}

/* Móvil: los menús pasan a acordeón de ancho completo para no desbordar */
@media (max-width: 700px) {
  .site-nav { width: 100%; gap: 12px; align-items: flex-start; }
  .menu { width: 100%; }
  .menu > summary { width: 100%; }
  .menu-panel {
    position: static;
    margin-top: 8px;
    min-width: 0;
    max-width: 100%;
    width: 100%;
    box-shadow: none;
  }
  .cover-groups { grid-template-columns: 1fr; }
}
