/* ==========================================================================
   Legal Growers · base (reseteo, tipografía, layout y utilidades)
   Mobile-first: la base es para < 768px.
   ========================================================================== */

/* ---------- fuentes (alojadas en el sitio, sin pedidos a terceros) ----------
   Raleway es variable: un archivo por subconjunto cubre los pesos 700 a 900.
   latin cubre el español; latin-ext solo baja si aparece un carácter fuera de ese rango. */
@font-face {
  font-family: "Raleway"; font-style: normal; font-weight: 700 900; font-display: swap;
  src: url("/assets/fonts/raleway-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Raleway"; font-style: normal; font-weight: 700 900; font-display: swap;
  src: url("/assets/fonts/raleway-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Raleway"; font-style: italic; font-weight: 800; font-display: swap;
  src: url("/assets/fonts/raleway-italic-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Raleway"; font-style: italic; font-weight: 800; font-display: swap;
  src: url("/assets/fonts/raleway-italic-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Poppins"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("/assets/fonts/poppins-400-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Poppins"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("/assets/fonts/poppins-400-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Poppins"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("/assets/fonts/poppins-600-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Poppins"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("/assets/fonts/poppins-600-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------- reseteo ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + env(safe-area-inset-top, 0px) + 16px);
}
body {
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--c-bg);
  color: var(--c-text);
  font-family: var(--f-text);
  font-size: var(--fs-body);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img, svg, video { display: block; max-width: 100%; height: auto; }
svg { flex-shrink: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
/* :where() deja la especificidad en 0, así los componentes pueden definir su propio padding */
:where(ul[class], ol[class]) { list-style: none; padding: 0; }
p, li, dd, summary, figcaption { overflow-wrap: break-word; text-wrap: pretty; }
strong { font-weight: 600; }
[hidden] { display: none !important; }

/* superficies del navegador con la paleta: selección, cursor de texto, barras de scroll, controles nativos */
html { scrollbar-color: var(--c-border-strong) var(--c-bg); accent-color: var(--c-accent); }
body { caret-color: var(--c-accent); }
::selection { background: var(--c-accent); color: var(--c-on-accent); }
.final ::selection, .ticker ::selection, .paper ::selection { background: var(--c-on-accent); color: var(--c-accent); }
a { text-underline-offset: .18em; }
.mono, .sem-count, #semCount { font-variant-numeric: tabular-nums; }

/* scroll lock cuando el menú móvil está abierto */
html.is-locked, html.is-locked body { overflow: hidden; }

/* ---------- foco y accesibilidad ---------- */
:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 3px; border-radius: 6px; }
.skip {
  position: absolute; left: -9999px; top: 8px; z-index: 100;
  min-height: var(--tap); display: inline-flex; align-items: center;
  padding: 0 1rem; border-radius: 10px;
  background: var(--c-accent); color: var(--c-on-accent); font-weight: 600; text-decoration: none;
}
.skip:focus { left: max(var(--gutter), env(safe-area-inset-left, 0px)); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* ---------- contenedor ---------- */
.wrap {
  width: 100%;
  max-width: calc(var(--container) + 2 * var(--gutter));
  margin: 0 auto;
  padding-inline: var(--gutter);
  padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
}

/* ---------- secciones ---------- */
.section { padding-block: var(--section-y); }
.section-tight { padding-top: 0; }
section:focus { outline: none; }

/* ---------- tipografía ---------- */
.display {
  font-family: var(--f-display); font-weight: 900; font-size: var(--fs-display);
  line-height: .98; letter-spacing: -.035em; text-wrap: balance;
}
.h2 {
  font-family: var(--f-display); font-weight: 800; font-size: var(--fs-h2);
  line-height: 1.05; letter-spacing: -.025em; text-wrap: balance;
}
/* con el texto agrandado, una palabra larga puede partirse antes que desbordar */
.display, .h2, .h3, .h4 { overflow-wrap: break-word; }   /* sin guiones: un título nunca se corta en sílabas */
.h3 { font-family: var(--f-display); font-weight: 800; font-size: var(--fs-h3); line-height: 1.1; letter-spacing: -.015em; }
.h4 { font-family: var(--f-display); font-weight: 800; font-size: var(--fs-h4); line-height: 1.2; }
.lede, .sec-lede { font-size: var(--fs-lede); line-height: 1.6; color: var(--c-text-2); max-width: 36em; text-wrap: pretty; }
.lede strong, .sec-lede strong { color: var(--c-text); }
.mono { font-family: var(--f-mono); font-size: .86em; letter-spacing: 0; }
.accent, .hl-text { color: var(--c-accent); }
.hl { color: var(--c-accent); white-space: nowrap; }
.dim { color: var(--c-text-2); }

/* ---------- encabezado de sección ---------- */
.sec-head { display: flex; flex-direction: column; gap: 1.25rem; margin-bottom: clamp(2.5rem, 2rem + 2vw, 4rem); max-width: 860px; }
.sec-head-row { max-width: none; display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.25rem; align-items: end; }
.sec-head-row > div { display: flex; flex-direction: column; gap: 1.25rem; min-width: 0; }

@media (min-width: 768px) {
  :root { --gutter: 2rem; }
}
@media (min-width: 1024px) {
  .sec-head-row { grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); column-gap: 4rem; }
}

/* ---------- movimiento ---------- */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important; animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}
