/* Identidad D2 · Escalas: paleta, tipografía y medidas. Único archivo con colores literales. */
:root {
  --color-bg: #F7F3EC;
  --color-ink: #172D3B;
  --color-ink-hover: #0B1820;
  --color-accent: #B5532E;
  --color-accent-text: #AE502C;
  --color-surface: #FFFFFF;
  --color-border: #E6DFD3;
  --color-text-2: #3B4C57;
  --color-text-3: #5C6B75;
  --color-eyebrow: #8A4B2E;
  --color-on-ink: #F7F3EC;
  --color-on-ink-2: #C9D3D9;
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Inter", system-ui, sans-serif;
  --radius-pill: 999px;
  --radius-card: 18px;
  --radius-media: 16px;
  --content-max: 1200px;
  --gutter: 24px;
}

/* Fraunces variable (opsz 9–144, wght; normal e itálica) e Inter variable (wght), subsets latin y latin-ext.
   La itálica de Fraunces solo la usa el énfasis del título de la landing. */
@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(fonts/fraunces-latin-ext-opsz-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(fonts/fraunces-latin-opsz-normal.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: "Fraunces";
  font-style: italic;
  font-display: swap;
  font-weight: 100 900;
  src: url(fonts/fraunces-latin-ext-opsz-italic.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Fraunces";
  font-style: italic;
  font-display: swap;
  font-weight: 100 900;
  src: url(fonts/fraunces-latin-opsz-italic.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: "Inter";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(fonts/inter-latin-ext-wght-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(fonts/inter-latin-wght-normal.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;
}

/* D2 · Escalas. Solo variables de tokens.css: acá no hay colores literales. */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
[hidden] { display: none !important; }
img { max-width: 100%; height: auto; }
a { color: var(--color-ink); text-underline-offset: 0.18em; }
a:hover { color: var(--color-ink-hover); }
:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 3px; border-radius: 4px; }

.wrap { max-width: var(--content-max); margin: 0 auto; padding-inline: var(--gutter); }

.skip {
  position: absolute; left: var(--gutter); top: -100px; z-index: 10;
  background: var(--color-ink); color: var(--color-on-ink);
  padding: 10px 18px; border-radius: var(--radius-pill); font-weight: 600; text-decoration: none;
}
.skip:focus { top: 12px; color: var(--color-on-ink); }

/* Botones pill */
.btn {
  display: inline-block; padding: 12px 20px; border-radius: var(--radius-pill);
  font-weight: 600; line-height: 1.2; text-decoration: none; white-space: nowrap;
}
.btn-ink { background: var(--color-ink); color: var(--color-on-ink); }
.btn-ink:hover { background: var(--color-ink-hover); color: var(--color-on-ink); }
.btn-accent { background: var(--color-accent); color: var(--color-surface); }
.btn-accent:hover { background: var(--color-accent-text); color: var(--color-surface); }
.btn-outline { border: 1.5px solid var(--color-ink); padding: 11px 20px; }
.btn-outline:hover { background: var(--color-ink); color: var(--color-on-ink); }
.btn-lg { padding: 17px 30px; font-size: 17px; }
.btn-outline.btn-lg { padding: 15.5px 26px; }

/* Encabezado */
.site-header-row {
  display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between;
  padding-block: 24px;
}
.logo {
  font-family: var(--font-display); font-size: 28px; font-weight: 600; line-height: 1;
  letter-spacing: -0.5px; text-decoration: none;
}
.logo-dot { color: var(--color-accent-text); }
.site-nav { display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: center; font-size: 15px; }
.site-nav a:not(.btn) { text-decoration: none; }
.site-nav a:not(.btn):hover, .site-nav a[aria-current="page"] {
  text-decoration: underline; text-decoration-color: var(--color-accent); text-decoration-thickness: 2px;
}

/* Tipografía de display */
.display, .guide-head h1 {
  margin: 0; font-family: var(--font-display); font-weight: 400;
}
.display { font-size: clamp(46px, 7.5vw, 96px); line-height: 0.98; letter-spacing: -0.03em; }
.eyebrow {
  margin: 0 0 20px; font-size: 14px; font-weight: 600; letter-spacing: 2px;
  text-transform: uppercase; color: var(--color-eyebrow);
}
.lede { margin: 28px 0 0; max-width: 620px; font-size: clamp(18px, 1.6vw, 20px); line-height: 1.55; color: var(--color-text-2); }

/* Índice */
.hero { padding-top: clamp(32px, 6vw, 64px); }
.search { margin-top: 36px; max-width: 620px; }
.search label { display: block; margin-bottom: 10px; font-size: 15px; font-weight: 600; }
.search input {
  width: 100%; padding: 16px 24px; font: inherit; font-size: 18px; color: var(--color-ink);
  background: var(--color-surface); border: 1.5px solid var(--color-ink); border-radius: var(--radius-pill);
  -webkit-appearance: none; appearance: none;
}
.search input::placeholder { color: var(--color-text-3); opacity: 1; }
.search input:focus-visible { outline-offset: 2px; }

.route-wrap { padding-block: 40px 48px; }
.route { display: block; width: 100%; height: auto; overflow: visible; }
.route-line {
  fill: none; stroke: var(--color-ink); stroke-width: 2; stroke-dasharray: 2 9; stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}
.stop { fill: var(--color-bg); stroke: var(--color-ink); stroke-width: 2; vector-effect: non-scaling-stroke; }
.stop-start { fill: var(--color-ink); }
.stop-end { fill: var(--color-accent); stroke: none; }
/* En pantallas chicas el dibujo se achica: las paradas crecen para seguir leyéndose. */
@media (max-width: 600px) {
  .stop { r: 16px; }
  .stop-end { r: 20px; }
}

.empty { margin: 0 auto 48px; font-size: 18px; color: var(--color-text-2); }

.group { background: var(--color-surface); border-block: 1px solid var(--color-border); }
.group + .group { margin-top: -1px; }
.group-row { display: grid; gap: 20px 48px; padding-block: 48px; }
.group h2 {
  display: flex; align-items: center; gap: 14px; margin: 0;
  font-family: var(--font-display); font-weight: 400; font-size: clamp(28px, 3vw, 38px);
  line-height: 1.1; letter-spacing: -0.5px;
}
/* Cada grupo es una parada de la ruta; la última, en acento. */
.group h2::before {
  content: ""; flex: none; width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid var(--color-ink); background: var(--color-surface);
}
.group:last-child h2::before { background: var(--color-accent); border-color: var(--color-accent); }
@media (min-width: 800px) {
  .group-row { grid-template-columns: minmax(220px, 1fr) 2fr; padding-block: 64px; }
  .group h2 { align-self: start; }
}

/* Lista de guías (índice y «Otras guías») */
.guide-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--color-border); }
.guide-list li { border-bottom: 1px solid var(--color-border); }
.guide-list a {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 20px; align-items: center;
  padding: 18px 0; text-decoration: none;
}
.guide-list a::after {
  content: "→"; grid-column: 2; grid-row: 1 / span 2; font-size: 20px; color: var(--color-accent-text);
  transition: transform 160ms ease;
}
.guide-list a:hover::after { transform: translateX(4px); }
.guide-title { font-size: 18px; font-weight: 600; line-height: 1.35; }
.guide-summary { grid-column: 1; color: var(--color-text-2); font-size: 16px; line-height: 1.5; }
.guide-list a:hover .guide-title { text-decoration: underline; text-decoration-color: var(--color-accent); text-decoration-thickness: 2px; }

/* Página de guía */
.guide-head { padding-block: clamp(24px, 5vw, 48px) 40px; }
.crumbs { font-size: 15px; color: var(--color-text-2); }
.crumbs a { font-weight: 600; text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.crumbs span { margin-inline: 6px; }
.guide-head h1 {
  margin: 20px 0; max-width: 22ch; font-size: clamp(38px, 5.5vw, 64px);
  line-height: 1.04; letter-spacing: -0.02em; overflow-wrap: break-word;
}
.guide-meta { margin: 0; max-width: 72ch; font-size: 15px; color: var(--color-text-2); }

.guide-band { background: var(--color-surface); border-block: 1px solid var(--color-border); }
/* Columna de lectura de 72ch (medidos con la letra del cuerpo, también para pre y tablas). */
.prose { display: grid; grid-template-columns: minmax(0, 72ch); padding-block: clamp(40px, 6vw, 72px); }
.prose > :first-child { margin-top: 0; }
.prose > :last-child { margin-bottom: 0; }
.prose p, .prose ul, .prose ol, .prose blockquote { margin: 0 0 1.1em; }
.prose h2 {
  margin: 1.2em 0 0.5em; font-family: var(--font-display); font-weight: 400;
  font-size: clamp(28px, 3vw, 36px); line-height: 1.12; letter-spacing: -0.5px;
}
.prose h3 { margin: 1em 0 0.4em; font-size: 20px; font-weight: 600; line-height: 1.3; }
.prose li { margin-bottom: 0.35em; }
.prose li::marker { color: var(--color-text-2); }
.prose a { color: var(--color-accent-text); text-decoration-thickness: 1px; }
.prose a:hover { color: var(--color-ink-hover); }
.prose strong { font-weight: 600; }
.prose blockquote {
  padding: 4px 0 4px 20px; border-left: 3px solid var(--color-accent); color: var(--color-text-2);
}
.prose picture { display: block; }
.prose img {
  display: block; border: 1px solid var(--color-border); border-radius: var(--radius-media);
  background: var(--color-bg);
}
.prose code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.88em;
  padding: 0.1em 0.35em; background: var(--color-bg); border: 1px solid var(--color-border); border-radius: 6px;
  overflow-wrap: anywhere;
}
.prose pre {
  margin: 0 0 1.4em; padding: 18px 20px; overflow-x: auto;
  background: var(--color-ink); color: var(--color-on-ink); border-radius: var(--radius-media);
  font-size: 15px; line-height: 1.55;
}
.prose pre code { padding: 0; background: none; border: 0; color: inherit; font-size: inherit; overflow-wrap: normal; }
.table-wrap { margin: 0 0 1.4em; overflow-x: auto; }
.prose table { width: 100%; border-collapse: collapse; font-size: 16px; }
.prose th, .prose td { padding: 12px 10px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--color-border); }
.prose thead th { border-bottom: 2px solid var(--color-ink); font-weight: 600; white-space: nowrap; }
.prose tbody tr:last-child > * { border-bottom: 0; }

.related { padding-top: clamp(48px, 7vw, 88px); }
.related h2 {
  margin: 0 0 24px; font-family: var(--font-display); font-weight: 400;
  font-size: clamp(28px, 3vw, 38px); line-height: 1.1; letter-spacing: -0.5px;
}
.related .guide-list { max-width: 72ch; }

/* Pedí una demo */
.demo-hero { padding-bottom: clamp(40px, 6vw, 64px); }
.demo-hero .display { max-width: 16ch; font-size: clamp(40px, 6vw, 76px); }
.demo-band { background: var(--color-surface); border-block: 1px solid var(--color-border); }
.demo-form, .demo-ok { max-width: 640px; padding-block: clamp(40px, 6vw, 72px); }
.demo-form { display: grid; gap: 22px; }
.field { display: grid; gap: 8px; margin: 0; }
.field > label, .choices legend { font-size: 15px; font-weight: 600; }
.optional { font-weight: 400; color: var(--color-text-3); }
.field input, .field textarea {
  width: 100%; padding: 13px 16px; font: inherit; font-size: 17px; color: var(--color-ink);
  background: var(--color-surface); border: 1.5px solid var(--color-text-3); border-radius: 12px;
}
.field textarea { resize: vertical; min-height: 120px; }
.field input:focus-visible, .field textarea:focus-visible { border-color: var(--color-ink); outline-offset: 2px; }
.choices { border: 0; padding: 0; gap: 10px; }
.choices legend { padding: 0; margin-bottom: 10px; }
.choices .choice { display: flex; gap: 10px; align-items: center; font-size: 17px; font-weight: 400; }
.choice input { width: 20px; height: 20px; margin: 0; accent-color: var(--color-ink); }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.demo-form .btn { justify-self: start; border: 0; font: inherit; font-weight: 600; cursor: pointer; }
.demo-form .btn:disabled { opacity: 0.7; cursor: progress; }
.demo-error { margin: 0; font-weight: 600; color: var(--color-accent-text); }
.fine-print { margin: 0; font-size: 14px; line-height: 1.5; color: var(--color-text-3); }
.fine-print a { color: var(--color-text-2); }
.demo-ok h2 {
  margin: 0 0 12px; font-family: var(--font-display); font-weight: 400;
  font-size: clamp(30px, 3.4vw, 42px); line-height: 1.1; letter-spacing: -0.5px;
}
.demo-ok p { margin: 0; color: var(--color-text-2); }
.demo-ok:focus { outline: none; }
/* La leyenda de Google ya está bajo el botón: el badge flotante se oculta. */

/* Landing (agenciar.io) */
.landing-hero { padding-block: clamp(32px, 6vw, 64px) 32px; }
.landing-title { font-size: clamp(50px, 8vw, 112px); letter-spacing: -0.03em; overflow-wrap: break-word; }
.landing-title em { font-style: italic; color: var(--color-accent-text); }
.landing-hero-row {
  display: flex; flex-wrap: wrap; gap: 28px; align-items: center; justify-content: space-between; margin-top: 36px;
}
.landing-hero-row .lede { margin: 0; flex: 1 1 440px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
@media (max-width: 480px) {
  .landing-hero-row .lede { flex-basis: 100%; }
  .actions .btn { white-space: normal; text-align: center; }
}

.landing-route { padding-block: 48px clamp(56px, 8vw, 88px); }
.route-steps {
  list-style: none; margin: 18px 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 24px;
}
.route-steps p { margin: 0; color: var(--color-text-2); line-height: 1.5; }
.route-steps .step-title { margin: 0 0 4px; font-family: var(--font-display); font-size: 22px; color: var(--color-ink); }

.band { background: var(--color-surface); border-block: 1px solid var(--color-border); }
.section-title {
  margin: 0 0 14px; font-family: var(--font-display); font-weight: 400;
  font-size: clamp(32px, 4vw, 52px); line-height: 1.05; letter-spacing: -1px;
}
.section-lede { margin: 0 0 44px; max-width: 640px; font-size: 18px; color: var(--color-text-2); }
.landing-section { padding-block: clamp(64px, 9vw, 96px); }

.compare {
  display: flex; flex-wrap: wrap; gap: 48px; align-items: flex-start; padding-block: clamp(64px, 9vw, 88px);
}
.compare-text { flex: 1 1 340px; min-width: 0; }
.compare-text p { margin: 0; font-size: 18px; line-height: 1.55; color: var(--color-text-2); }
.compare .table-wrap { flex: 1 1 480px; min-width: 0; margin: 0; }
.compare-table { width: 100%; border-collapse: collapse; font-size: 16px; }
.compare-table th, .compare-table td { padding: 14px 8px; border-bottom: 1px solid var(--color-border); }
.compare-table thead > tr > * { border-bottom: 2px solid var(--color-ink); font-weight: 600; }
.compare-table thead th { color: var(--color-text-3); }
.compare-table thead .brand-col { font-family: var(--font-display); font-size: 20px; color: var(--color-ink); }
.compare-table tbody th { text-align: left; font-weight: 500; }
.compare-table tbody td { text-align: center; font-weight: 600; }
.compare-table tbody td.muted { font-weight: 400; color: var(--color-text-3); }
.compare-table tbody tr:last-child > * { border-bottom: 0; }

.shots { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 28px; align-items: start; }
.shot { margin: 0; }
.shot-frame {
  overflow: hidden; background: var(--color-surface);
  border: 1px solid var(--color-border); border-radius: var(--radius-media);
}
.shot-frame picture { display: contents; }
/* Recortes apaisados (~2:1) del bloque que importa; en pantallas chicas, el mismo bloque en el celular (4:5). */
.shot-frame img { display: block; width: 100%; height: auto; }
.shot figcaption { margin-top: 14px; color: var(--color-text-2); line-height: 1.5; }
.shot figcaption strong { font-weight: 600; color: var(--color-ink); }

.profiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 20px; }
.profile {
  display: flex; flex-direction: column; gap: 18px; padding: 30px;
  background: var(--color-bg); border-radius: var(--radius-card);
}
.profile h3 { margin: 0 0 6px; font-family: var(--font-display); font-weight: 400; font-size: 26px; line-height: 1.15; }
.profile-who { margin: 0; color: var(--color-text-3); }
.profile ul { flex-grow: 1; display: grid; align-content: start; gap: 8px; margin: 0; padding: 0 0 0 20px; color: var(--color-text-2); line-height: 1.5; }
.profile .btn { align-self: flex-start; }
.profile-featured { background: var(--color-ink); color: var(--color-on-ink); }
.profile-featured .profile-who, .profile-featured ul { color: var(--color-on-ink-2); }

.security {
  display: flex; flex-wrap: wrap; gap: 40px; align-items: center; padding-block: 72px;
}
.security h2 {
  flex: 1 1 320px; margin: 0; font-family: var(--font-display); font-weight: 400;
  font-size: clamp(28px, 3vw, 38px); line-height: 1.1;
}
.security-points {
  flex: 2 1 520px; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px;
  color: var(--color-text-2); line-height: 1.5;
}
.security-points p { margin: 0; }
.security-points strong { font-weight: 600; color: var(--color-ink); }
@media (max-width: 600px) { .security-points { flex-basis: 100%; } }

.closing { background: var(--color-ink); color: var(--color-on-ink); text-align: center; }
.closing .wrap { padding-block: clamp(72px, 10vw, 104px); }
.closing h2 {
  margin: 0 auto; max-width: 860px; font-family: var(--font-display); font-weight: 400;
  font-size: clamp(38px, 5.5vw, 72px); line-height: 1.02; letter-spacing: -0.03em;
}
.closing p { margin: 20px auto 32px; font-size: 19px; color: var(--color-on-ink-2); }
/* La landing termina en la banda oscura: el pie va pegado. */
#contenido:has(> .closing:last-child) + .site-footer { margin-top: 0; }

/* Pie */
.site-footer { margin-top: clamp(56px, 8vw, 96px); }
.site-footer-row {
  display: flex; flex-wrap: wrap; gap: 20px; justify-content: space-between;
  padding-block: 32px; font-size: 14px; color: var(--color-text-3);
}

@media (prefers-reduced-motion: reduce) {
  .guide-list a::after { transition: none; }
}
