/*
 * Infragrowth AI legal pages.
 *
 * Tokens: memoria/marketing/context/_assets/palette.json (kit 05, «Eléctrico
 * con criterio / Bold chat»), the same values as axelrivero.com. Rules:
 * memoria/marketing/context/visual.md. Long explanation reads on light
 * (visual.md §2: «Claro para explicación extensa»), framed by the ink header
 * and the carbon footer of axelrivero.com. One theme; no JavaScript and no
 * inline styles (the CSP in _headers forbids both).
 */

@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/ibm-plex-sans-latin-400-normal.woff2") format("woff2");
}

@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/ibm-plex-sans-latin-600-normal.woff2") format("woff2");
}

@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/ibm-plex-sans-latin-700-normal.woff2") format("woff2");
}

:root {
  --ink: #080808;
  --carbon: #161616;
  --paper: #fafafa;
  --white: #ffffff;
  --violet-500: #8b00ff;
  --violet-700: #5e00b0;
  --violet-900: #2e0057;
  --accent: #ff7f00;
  --accent-light: #ffb700;
  /* palette.json text-muted-light / text-muted-dark / line-light */
  --muted-on-light: #666666;
  --muted-on-dark: #b5b5b5;
  --line: #dddddd;

  /* One column for header, text and footer: about 70 characters of body text. */
  --measure: 37.5rem;
  --gutter: 16px;
  --font: "IBM Plex Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  color-scheme: light;
}

@media (min-width: 40em) {
  :root {
    --gutter: 32px;
  }
}

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

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

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

@media (min-width: 48em) {
  body {
    font-size: 1.125rem;
  }
}

main {
  flex: 1 0 auto;
}

.column {
  width: 100%;
  max-width: calc(var(--measure) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

::selection {
  background: var(--violet-500);
  color: var(--white);
}

:focus-visible {
  outline: 2px solid var(--violet-700);
  outline-offset: 3px;
  border-radius: 2px;
}

.site-header :focus-visible,
.site-footer :focus-visible,
.skip-link:focus-visible {
  outline-color: var(--accent-light);
}

/* ---------------------------------------------------------------- chrome -- */

.skip-link {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 10;
  padding: 10px 16px;
  border-radius: 8px;
  background: var(--accent);
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
}

.preview-banner {
  margin: 0;
  padding: 10px var(--gutter);
  background: var(--accent-light);
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.4;
  text-align: center;
}

/*
 * The signature follows visual.md §3 and the header of axelrivero.com: the
 * lockup (name + INFRAGROWTH AI) needs its 360 px file width, so it shows from
 * 40em; below that the name alone at its 160 px minimum. The chat mark goes
 * first, at 32 px or more. The lockup file has generous empty space above and
 * below the letters; the 96 px bar trims it, as on axelrivero.com.
 */
.site-header {
  background: var(--ink);
  color: var(--paper);
}

.site-header .column {
  display: flex;
  align-items: center;
  height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  height: 100%;
  overflow: hidden;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  flex: none;
  width: 32px;
  height: auto;
}

.brand-name {
  display: block;
  width: 160px;
  height: auto;
}

@media (min-width: 40em) {
  .site-header .column {
    height: 96px;
  }

  .brand {
    gap: 20px;
  }

  .brand-mark {
    width: 36px;
  }

  .brand-name {
    width: 360px;
  }
}

.site-footer {
  padding-block: 40px calc(40px + env(safe-area-inset-bottom));
  background: var(--carbon);
  color: var(--muted-on-dark);
  font-size: 1rem;
  line-height: 1.6;
}

.footer-entity {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
}

.footer-mark {
  flex: none;
  width: 32px;
  height: auto;
}

.nobreak {
  white-space: nowrap;
}

.site-footer a {
  color: var(--paper);
  text-underline-offset: 0.2em;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 24px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

.footer-links a {
  display: inline-block;
  padding-block: 4px;
  font-weight: 600;
  text-decoration: none;
}

.footer-links a:hover {
  text-decoration: underline;
}

.footer-links a[aria-current="page"] {
  color: var(--accent-light);
}

/* ------------------------------------------------------------------ text -- */

.doc {
  padding-block: 40px 72px;
}

@media (min-width: 48em) {
  .doc {
    padding-block: 64px 96px;
  }
}

/* One orange line per page, where the reading starts (visual.md §2). */
.doc h1::before {
  content: "";
  display: block;
  width: 40px;
  height: 4px;
  margin-bottom: 20px;
  border-radius: 2px;
  background: var(--accent);
}

.doc h1 {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

@media (min-width: 48em) {
  .doc h1 {
    font-size: 2.5rem;
  }
}

.doc-meta {
  margin: 16px 0 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
  color: var(--muted-on-light);
  font-size: 1rem;
}

.doc h2 {
  margin: 2.2em 0 0.5em;
  font-size: 1.375rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.005em;
  text-wrap: balance;
}

@media (min-width: 48em) {
  .doc h2 {
    font-size: 1.5rem;
  }
}

.doc h3 {
  margin: 1.6em 0 0.4em;
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.35;
}

.doc h2 + h3 {
  margin-top: 0.8em;
}

.doc p,
.doc ul,
.doc ol {
  margin: 0 0 1em;
}

.doc p {
  text-wrap: pretty;
}

.doc ul,
.doc ol {
  padding-left: 1.4em;
}

.doc li {
  margin-top: 0.4em;
}

.doc li > ul,
.doc li > ol {
  margin: 0.4em 0 0;
}

.doc li::marker {
  color: var(--violet-500);
}

.doc strong {
  font-weight: 600;
}

.doc a {
  color: var(--violet-700);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

.doc a:hover {
  color: var(--violet-900);
  text-decoration-thickness: 2px;
}

.doc .doc-index {
  list-style: none;
  padding-left: 0;
}

.doc-index li {
  margin-top: 0.6em;
}

/* The public home at /. Orange only on its one action (visual.md). */
.doc .home-lead {
  margin: 20px 0 28px;
  font-size: 1.25rem;
  line-height: 1.45;
}

.doc a.home-action {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 28px;
  border-radius: 8px;
  background: var(--accent);
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}

.doc a.home-action:hover {
  background: var(--accent-light);
  color: var(--ink);
}

.doc .home-english {
  margin-top: 2em;
  padding-top: 1.2em;
  border-top: 1px solid var(--line);
  color: var(--muted-on-light);
  font-size: 1rem;
}

/* Preview builds only: a pending marker, loud enough to find while scrolling. */
mark.pendiente {
  padding: 0.05em 0.3em;
  border-radius: 4px;
  background: var(--accent-light);
  color: var(--ink);
  font-weight: 600;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

@media print {
  .skip-link,
  .preview-banner,
  .site-header,
  .footer-links,
  .footer-mark {
    display: none;
  }

  body {
    background: #fff;
    color: #000;
  }

  .site-footer {
    padding: 0;
    background: none;
    color: #000;
  }

  .doc {
    padding-block: 0 24px;
  }

  .doc a,
  .site-footer a {
    color: #000;
  }
}
