/* ============================================
   Mejores Agencias de Marketing en Colombia — Design tokens
   ============================================ */
:root {
  /* Marca */
  --accent: #2f4be6;
  --accent-dark: #1e36b8;
  --accent-light: #5c78ff;
  --navy: #0c1130;
  --navy-mid: #111a4a;
  --navy-light: #1c2d8f;
  --red-dot: #e11d48;

  /* Texto */
  --ink-900: #111827;
  --ink-700: #374151;
  --ink-500: #4b5563;
  --ink-on-dark: #c3c9e0;
  --ink-on-dark-muted: #9aa3c4;
  --ink-footer: #a8b0cc;

  /* Superficies y bordes */
  --bg: #ffffff;
  --soft: #f5f7fb;
  --head-bg: #f8fafc;
  --tint-100: #f5f7ff;
  --tint-200: #eef2ff;
  --tint-300: #e8edff;
  --border: #e8ebf2;
  --border-soft: #eef0f5;
  --border-accent: #e1e7ff;
  --border-hover: #bfcbff;
  --line-deco: #c9d3ff;

  /* Ranking */
  --gold: #f5b700;
  --star-empty: #e5e7eb;
  --medal-gold-bg: #fdf1c7;
  --medal-gold-ink: #8a6100;
  --medal-silver-bg: #eceef2;
  --medal-bronze-bg: #fce2cf;
  --medal-bronze-ink: #9a3412;

  /* Sombras */
  --shadow-sm: 0 2px 10px rgba(17, 24, 39, 0.04);
  --shadow-hover: 0 12px 26px rgba(47, 75, 230, 0.12);
  --shadow-accent: 0 8px 20px rgba(47, 75, 230, 0.35);

  /* Radios */
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-pill: 999px;

  /* Layout */
  --container: 1140px;
  --gutter: 24px;

  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
}

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

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Inter', system-ui, sans-serif;
  color: var(--ink-900);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

a:hover {
  color: var(--accent-dark);
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

h1,
h2,
h3,
h4,
h5,
p {
  margin: 0;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}

.skip-link:focus {
  top: 16px;
  color: #fff;
}

#ranking {
  scroll-margin-top: 80px;
}

/* ============================================
   Componentes compartidos
   ============================================ */

/* Oculto sin display:none para que <use> pueda referenciar los símbolos */
.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

/* Íconos del sprite: el color se hereda con currentColor */
.icon {
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ico {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--tint-300);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  transition: transform 0.25s ease, background 0.25s ease, color 0.25s ease;
}

.ico--sm {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
}

.soft {
  background: var(--soft);
  border-radius: var(--radius-xl);
}

.section-head {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 760px;
}

.section-head--center {
  align-items: center;
  margin: 0 auto;
  text-align: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.section-title {
  font-size: 32px;
  line-height: 1.22;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.section-title em {
  font-style: normal;
  color: var(--accent);
}

.lead {
  font-size: 15.5px;
  line-height: 1.65;
  color: var(--ink-500);
}

.lead strong {
  color: var(--ink-900);
}

/* Botones */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 24px;
  border: 0;
  border-radius: var(--radius-pill);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.btn .icon {
  transition: translate 0.3s ease;
}

.btn:hover .icon {
  translate: 3px 0;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: var(--shadow-accent);
}

.btn-primary:hover {
  color: #fff;
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 14px 28px rgba(47, 75, 230, 0.45);
}

.btn-outline {
  background: var(--bg);
  color: var(--accent);
  border: 1.5px solid #cfd8ff;
}

.btn-outline:hover {
  color: var(--accent);
  border-color: var(--accent);
  transform: translateY(-2px) scale(1.04);
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
  transition: gap 0.2s ease;
}

.link-arrow:hover {
  gap: 10px;
  color: var(--accent);
}

.btn:focus-visible,
.link-arrow:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--radius-pill);
}

/* ============================================
   Header
   ============================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--border);
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-mark {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease;
}

.logo-mark .icon {
  stroke-width: 2.4;
}

.logo:hover .logo-mark {
  transform: rotate(-8deg) scale(1.08);
}

.logo-text {
  display: flex;
  flex-direction: column;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.1;
}

.logo-dot {
  color: var(--red-dot);
}

/* ============================================
   Hero
   ============================================ */
.hero {
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-mid) 55%, var(--navy-light) 100%);
  color: #fff;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 48px;
  align-items: center;
  padding-top: 72px;
  padding-bottom: 80px;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 22px;
}

.hero h1 {
  font-size: 44px;
  line-height: 1.12;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.hero h1 em {
  font-style: normal;
  color: var(--accent-light);
}

.hero-lead {
  max-width: 540px;
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink-on-dark);
}

.features {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 28px;
  margin-top: 6px;
}

.feature {
  display: flex;
  align-items: center;
  gap: 12px;
  transition: transform 0.25s ease;
}

.feature:hover {
  transform: translateX(4px);
}

.feature-icon {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.05);
  color: var(--ink-on-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  transition: background 0.25s ease, color 0.25s ease;
}

.feature:hover .feature-icon {
  background: var(--accent);
  color: #fff;
}

.feature strong {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
}

.feature small {
  font-size: 12px;
  color: var(--ink-on-dark-muted);
}

.hero-art {
  display: flex;
  justify-content: center;
}

.hero-art img {
  width: 100%;
  max-width: 400px;
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.05);
  transition: transform 0.5s ease;
}

.hero:hover .hero-art img {
  transform: scale(1.03) rotate(-0.5deg);
}

/* ============================================
   Ranking
   ============================================ */
.ranking {
  display: flex;
  flex-direction: column;
  gap: 26px;
  padding-top: 72px;
  padding-bottom: 24px;
}

.rank-table {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg);
  overflow: hidden;
}

.rank-head,
.rank-row {
  display: grid;
  grid-template-columns: 72px minmax(0, 1.15fr) minmax(0, 1.3fr) minmax(0, 1.6fr) minmax(0, 1.5fr) 128px 34px;
  align-items: center;
  gap: 12px;
}

.rank-head {
  padding: 14px 18px;
  background: var(--head-bg);
  border-bottom: 1px solid var(--border);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-500);
}

.rank-row {
  width: 100%;
  padding: 16px 18px;
  border: 0;
  border-bottom: 1px solid var(--border-soft);
  background: var(--bg);
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-list > li:last-child .rank-row:not(.is-open) {
  border-bottom: 0;
}

.rank-row:hover {
  position: relative;
  z-index: 1;
  background: var(--tint-100);
  transform: scale(1.008);
  box-shadow: 0 6px 18px rgba(47, 75, 230, 0.08);
}

.rank-row:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: -3px;
}

.rank-row.is-open {
  background: var(--tint-200);
}

.rank-agency {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.avatar {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--tint-300);
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  transition: transform 0.25s ease;
}

.rank-row:hover .avatar {
  transform: scale(1.12);
}

.rank-name {
  font-size: 15px;
  font-weight: 700;
}

.rank-cell {
  font-size: 14px;
  line-height: 1.45;
  color: var(--ink-700);
}

.rank-label {
  display: none;
}

.rank-rating {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 800;
}

/* Estrellas: capa gris de fondo y capa dorada recortada al puntaje */
.stars {
  position: relative;
  display: inline-block;
  width: 76px;
  height: 14px;
  font-size: 14px;
  line-height: 14px;
  letter-spacing: 1.5px;
}

.stars-bg,
.stars-fg {
  position: absolute;
  top: 0;
  left: 0;
  overflow: hidden;
  white-space: nowrap;
}

.stars-bg {
  color: var(--star-empty);
}

.stars-fg {
  color: var(--gold);
}

.stars--49 .stars-fg { width: 98%; }
.stars--47 .stars-fg { width: 94%; }
.stars--46 .stars-fg { width: 92%; }
.stars--45 .stars-fg { width: 90%; }
.stars--44 .stars-fg { width: 88%; }

.medal {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--star-empty);
  color: var(--ink-500);
  font-size: 12.5px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.medal--gold {
  border-color: transparent;
  background: var(--medal-gold-bg);
  color: var(--medal-gold-ink);
}

.medal--silver {
  border-color: transparent;
  background: var(--medal-silver-bg);
}

.medal--bronze {
  border-color: transparent;
  background: var(--medal-bronze-bg);
  color: var(--medal-bronze-ink);
}

.rank-toggle {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--tint-200);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease, background 0.2s ease, color 0.2s ease;
}

.rank-toggle .icon {
  stroke-width: 2.4;
}

.rank-row.is-open .rank-toggle {
  transform: rotate(180deg);
  background: var(--accent);
  color: #fff;
}

/* Ficha desplegable */
.agency-panel {
  padding: 6px 18px 26px;
  background: var(--tint-200);
  border-bottom: 1px solid var(--border);
  animation: drop 0.35s ease both;
}

.rank-list > li:last-child .agency-panel {
  border-bottom: 0;
}

.agency-panel-inner {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 28px;
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-lg);
  background: var(--bg);
}

.agency-panel-inner--full {
  gap: 30px;
}

.panel-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.agency-panel-inner:not(.agency-panel-inner--full) .panel-title {
  margin-bottom: 0;
}

.agency-desc {
  font-size: 15px;
  line-height: 1.7;
  color: var(--ink-700);
}

.agency-intro {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.agency-about {
  flex: 1 1 520px;
  min-width: 0;
}

.agency-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* Servicios */
.service-groups {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.service-group-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid #dce3ff;
  font-size: 14px;
  font-weight: 800;
}

.service-group-title .icon {
  color: var(--accent);
}

.service-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.service {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.service:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: var(--shadow-hover);
  border-color: var(--border-hover);
}

.service:hover .ico,
.industry:hover .ico {
  background: var(--accent);
  color: #fff;
}

.service-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.service h5 {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
}

.service p {
  flex: 1;
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-500);
}

/* Industrias */
.industry-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.industry {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.industry:hover {
  transform: translateY(-4px) scale(1.03);
  box-shadow: var(--shadow-hover);
}

.industry:hover .ico {
  transform: rotate(-6deg) scale(1.1);
}

.industry h4 {
  font-size: 15px;
  font-weight: 800;
}

.industry p {
  flex: 1;
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-500);
}

/* Países */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px 8px 10px;
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-pill);
  background: var(--bg);
  font-size: 14px;
  font-weight: 600;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.chip:hover {
  transform: scale(1.07);
  box-shadow: 0 8px 18px rgba(47, 75, 230, 0.15);
}

/* Banderas dibujadas con CSS */
.flag {
  position: relative;
  width: 26px;
  height: 18px;
  flex: none;
  overflow: hidden;
  border-radius: 4px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
}

.flag--co { background: linear-gradient(#fcd116 0 50%, #003893 50% 75%, #ce1126 75%); }
.flag--mx { background: linear-gradient(90deg, #006847 0 33.3%, #fff 33.3% 66.6%, #ce1126 66.6%); }
.flag--cl { background: linear-gradient(#fff 0 50%, #d52b1e 50%); }
.flag--pe { background: linear-gradient(90deg, #d91023 0 33.3%, #fff 33.3% 66.6%, #d91023 66.6%); }
.flag--es { background: linear-gradient(#aa151b 0 25%, #f1bf00 25% 75%, #aa151b 75%); }
.flag--us { background: repeating-linear-gradient(#b22234 0 1.385px, #fff 1.385px 2.77px); }

.flag--cl::before,
.flag--us::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
}

.flag--cl::before { width: 9px; height: 9px; background: #0039a6; }
.flag--us::before { width: 11px; height: 9.7px; background: #3c3b6e; }

/* ============================================
   Cómo seleccionamos
   ============================================ */
.selection {
  display: flex;
  flex-direction: column;
  gap: 44px;
  padding-top: 64px;
  padding-bottom: 32px;
}

/* Pasos en fila unidos por una línea punteada */
.steps {
  position: relative;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 18px;
}

.steps::before {
  content: '';
  position: absolute;
  top: 32px;
  left: 8%;
  right: 8%;
  border-top: 2px dashed var(--line-deco);
  pointer-events: none;
}

.step {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 0 4px;
  text-align: center;
  transition: transform 0.25s ease;
}

.step:hover {
  transform: translateY(-6px);
}

.step-icon {
  position: relative;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  box-shadow: 0 10px 22px rgba(47, 75, 230, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.step:hover .step-icon {
  transform: scale(1.12);
  box-shadow: 0 16px 30px rgba(47, 75, 230, 0.42);
}

.step-number {
  position: absolute;
  right: -4px;
  bottom: -2px;
  width: 24px;
  height: 24px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  font-size: 10.5px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.step-text {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.step h3 {
  margin-top: 4px;
  font-size: 14.5px;
  font-weight: 800;
  line-height: 1.3;
}

.step p {
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-500);
}

/* ============================================
   Cómo elegir
   ============================================ */
.choose {
  display: flex;
  flex-direction: column;
  gap: 30px;
  margin-top: 48px;
  padding: 48px 40px;
}

.guide {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.guide-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.guide-card:hover {
  transform: translateY(-5px) scale(1.03);
  box-shadow: 0 16px 30px rgba(47, 75, 230, 0.14);
  border-color: var(--border-hover);
}

.guide-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.guide-number {
  font-size: 22px;
  font-weight: 800;
  color: var(--line-deco);
  transition: color 0.25s ease;
}

.guide-card:hover .guide-number {
  color: var(--accent);
}

.guide-card:hover .ico {
  background: var(--accent);
  color: #fff;
}

.guide-card h3 {
  font-size: 15px;
  font-weight: 800;
}

.guide-card p {
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--ink-500);
}

/* ============================================
   Preguntas frecuentes
   ============================================ */
.faq {
  display: flex;
  flex-direction: column;
  gap: 28px;
  max-width: 820px;
  padding-top: 88px;
  padding-bottom: 88px;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg);
  transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.faq-item:hover {
  border-color: #d5dcf5;
  box-shadow: 0 8px 20px rgba(17, 24, 39, 0.06);
}

.faq-item.is-open {
  background: var(--tint-200);
  border-color: #dce3ff;
}

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink-900);
  text-align: left;
  cursor: pointer;
}

.faq-question:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: -3px;
  border-radius: var(--radius-md);
}

.faq-number {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--border-soft);
  color: var(--ink-700);
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  transition: background 0.25s ease, color 0.25s ease;
}

.faq-item.is-open .faq-number {
  background: var(--accent);
  color: #fff;
}

.faq-text {
  flex: 1;
}

.faq-toggle {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--tint-200);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  transition: transform 0.3s ease;
}

.faq-toggle .icon {
  stroke-width: 2.6;
}

.faq-item.is-open .faq-toggle {
  transform: rotate(45deg);
}

.faq-answer-inner {
  padding: 0 22px 18px 58px;
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--ink-700);
  animation: drop 0.3s ease both;
}

.faq-answer-inner ul {
  margin-top: 8px;
  padding-left: 18px;
  list-style: disc;
}

.faq-answer-inner li {
  margin: 3px 0;
}

/* ============================================
   Footer
   ============================================ */
.site-footer {
  background: var(--navy);
  color: #fff;
}

.footer-top {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-top: 64px;
  padding-bottom: 48px;
}

.footer-logo {
  font-size: 30px;
  line-height: 1.12;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.footer-logo .logo-dot {
  color: #f43f5e;
}

.footer-desc {
  max-width: 380px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-footer);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 18px;
  padding-bottom: 18px;
  font-size: 12.5px;
  color: var(--ink-footer);
}

.footer-tagline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.footer-tagline .icon {
  stroke-width: 2.4;
}

/* ============================================
   Animaciones
   ============================================ */
@keyframes rise {
  from { opacity: 0; translate: 0 16px; }
  to { opacity: 1; translate: 0 0; }
}

@keyframes fade-down {
  from { opacity: 0; translate: 0 -12px; }
  to { opacity: 1; translate: 0 0; }
}

@keyframes drop {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes nudge {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 3px; }
}

@keyframes draw-line {
  from { scale: 0 1; }
  to { scale: 1 1; }
}

/* Entrada inicial */
.site-header {
  animation: fade-down 0.5s ease both;
}

.hero-copy > * {
  animation: rise 0.6s var(--ease-out) both;
}

.hero-copy > :nth-child(2) { animation-delay: 0.08s; }
.hero-copy > :nth-child(3) { animation-delay: 0.16s; }
.hero-copy > :nth-child(4) { animation-delay: 0.24s; }

.hero-art {
  animation: rise 0.8s var(--ease-out) 0.2s both;
}

/* Pista: el primer puesto se puede desplegar */
.rank-list > li:first-child .rank-row:not(.is-open) .rank-toggle {
  animation: nudge 1.2s ease-in-out 1.2s 3;
}

/* Contenido de la ficha: aparece en cascada al desplegar */
.agency-panel .service,
.agency-panel .industry,
.agency-panel .chip {
  animation: rise 0.5s var(--ease-out) both;
  animation-delay: calc(var(--group-delay, 0s) + var(--item-delay, 0s));
}

.service-group:nth-child(2) { --group-delay: 0.06s; }
.service-group:nth-child(3) { --group-delay: 0.12s; }
.service-group:nth-child(4) { --group-delay: 0.18s; }

.service:nth-child(2), .industry:nth-child(2), .chip:nth-child(2) { --item-delay: 0.05s; }
.service:nth-child(3), .industry:nth-child(3), .chip:nth-child(3) { --item-delay: 0.1s; }
.service:nth-child(4), .industry:nth-child(4), .chip:nth-child(4) { --item-delay: 0.15s; }
.service:nth-child(5), .chip:nth-child(5) { --item-delay: 0.2s; }
.chip:nth-child(6) { --item-delay: 0.25s; }

/* Aparición al hacer scroll (navegadores compatibles; en los demás el contenido se ve sin animar) */
@supports (animation-timeline: view()) {
  .reveal {
    animation: rise linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 35%;
  }

  /* La línea de los pasos se dibuja al entrar en pantalla */
  .steps::before {
    transform-origin: left center;
    animation: draw-line linear both;
    animation-timeline: view();
    animation-range: entry 20% cover 40%;
  }

  @keyframes header-shadow {
    from { box-shadow: 0 0 0 rgba(17, 24, 39, 0); }
    to { box-shadow: 0 8px 24px rgba(17, 24, 39, 0.08); }
  }

  .site-header {
    animation: fade-down 0.5s ease both, header-shadow linear both;
    animation-timeline: auto, scroll();
    animation-range: normal, 0 160px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 980px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .service-groups,
  .industry-grid,
  .guide {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    row-gap: 32px;
  }

  .steps::before {
    display: none;
  }

  /* Tabla: la columna de estrellas se compacta */
  .rank-head,
  .rank-row {
    grid-template-columns: 44px minmax(0, 1.1fr) minmax(0, 1.2fr) minmax(0, 1.4fr) minmax(0, 1.3fr) 56px 30px;
  }

  .rank-row .avatar {
    display: none;
  }

  .rank-row .stars {
    display: none;
  }

  .rank-score::before {
    content: '★ ';
    color: var(--gold);
  }
}

@media (max-width: 760px) {
  :root {
    --gutter: 16px;
  }

  .section-title {
    font-size: 26px;
  }

  /* Hero: más compacto para llegar antes al ranking */
  .hero-grid {
    gap: 32px;
    padding-top: 40px;
    padding-bottom: 48px;
  }

  .hero h1 {
    font-size: 30px;
  }

  .hero-lead {
    font-size: 15px;
  }

  .btn-hero {
    align-self: stretch;
  }

  .features {
    flex-direction: column;
    gap: 14px;
  }

  .hero-art img {
    max-width: 260px;
    padding: 14px;
  }

  /* Ranking: cabecera (posición, agencia, valoración, flecha) y debajo los datos en dos columnas */
  .ranking {
    padding-top: 48px;
  }

  .rank-head {
    display: none;
  }

  .rank-row {
    grid-template-columns: 28px minmax(0, 1fr) auto 30px;
    gap: 10px;
    padding: 16px 12px;
  }

  .rank-row .avatar {
    display: flex;
  }

  .rank-rating {
    grid-column: 3;
    grid-row: 1;
    padding: 4px 10px;
    border-radius: var(--radius-pill);
    background: var(--tint-200);
    font-size: 13px;
  }

  .rank-toggle-wrap {
    grid-column: 4;
    grid-row: 1;
  }

  .rank-cell {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 10px;
    margin-top: -10px;
    padding: 8px 12px;
    background: var(--tint-100);
    font-size: 13px;
  }

  .rank-row > .rank-cell:nth-child(3) {
    margin-top: 0;
    padding-top: 12px;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  }

  .rank-row > .rank-cell:nth-child(5) {
    padding-bottom: 12px;
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  }

  .rank-row.is-open .rank-cell {
    background: var(--bg);
  }

  .rank-label {
    display: block;
    padding-top: 1px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--accent);
  }

  /* Ficha: menos márgenes, botones a todo el ancho */
  .agency-panel {
    padding: 4px 10px 14px;
  }

  .agency-panel-inner {
    padding: 18px;
  }

  .agency-panel-inner--full {
    gap: 26px;
  }

  .agency-ctas,
  .agency-ctas .btn {
    width: 100%;
  }

  .service-groups {
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
  }

  /* Servicio: ícono a la izquierda, título, texto y enlace a la derecha */
  .service {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    column-gap: 12px;
    row-gap: 4px;
    padding: 12px;
  }

  .service-head {
    display: contents;
  }

  .service .ico {
    grid-row: 1 / 4;
  }

  .service h5,
  .service p,
  .service .link-arrow {
    grid-column: 2;
  }

  /* Industrias y países en dos columnas */
  .industry-grid {
    gap: 10px;
  }

  .industry {
    padding: 14px;
  }

  .industry h4 {
    font-size: 14px;
  }

  .industry p {
    font-size: 12.5px;
  }

  .chips {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .chip {
    padding: 8px 10px;
    font-size: 13px;
  }

  /* Cómo seleccionamos: línea de tiempo vertical, ícono en columna a la izquierda */
  .selection {
    gap: 32px;
    padding-top: 48px;
  }

  .section-head--center {
    align-items: flex-start;
    text-align: left;
  }

  .steps {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 22px;
  }

  .steps::before {
    display: block;
    top: 28px;
    bottom: 28px;
    left: 27px;
    right: auto;
    border-top: 0;
    border-left: 2px dashed var(--line-deco);
    transform-origin: center top;
    animation-name: draw-line-vertical;
  }

  @keyframes draw-line-vertical {
    from { scale: 1 0; }
    to { scale: 1 1; }
  }

  .step {
    flex-direction: row;
    align-items: flex-start;
    gap: 16px;
    padding: 0;
    text-align: left;
  }

  .step:hover {
    transform: none;
  }

  .step-icon {
    width: 56px;
    height: 56px;
  }

  .step-text {
    gap: 4px;
    padding-top: 6px;
  }

  .step h3 {
    margin-top: 0;
    font-size: 15px;
  }

  .step p {
    font-size: 13.5px;
  }

  /* Cómo elegir: dos columnas para aprovechar el ancho */
  .choose {
    margin-top: 32px;
    padding: 28px 16px;
    gap: 24px;
  }

  .guide {
    gap: 10px;
  }

  .guide-card {
    gap: 8px;
    padding: 14px;
  }

  .guide-card:hover {
    transform: none;
  }

  .guide-number {
    font-size: 18px;
  }

  .guide-card h3 {
    font-size: 14px;
  }

  .guide-card p {
    font-size: 12.5px;
  }

  /* FAQ */
  .faq {
    padding-top: 56px;
    padding-bottom: 56px;
  }

  .faq-question {
    align-items: flex-start;
    gap: 12px;
    padding: 14px;
    font-size: 14.5px;
  }

  .faq-answer-inner {
    padding: 0 16px 16px 52px;
    font-size: 14px;
  }

  .footer-top {
    padding-top: 44px;
    padding-bottom: 32px;
  }

  .footer-logo {
    font-size: 26px;
  }
}

@media (max-width: 360px) {
  .guide,
  .industry-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
