/* Compra Fácil USA — Landing selector de país
   Sin fuentes ni recursos externos a propósito: mantiene el CSP en default-src 'self'. */

:root {
  --cf-blue: #113589;
  --cf-blue-dark: #0c2760;
  --cf-orange: #d53c1b;
  --cf-white: #ffffff;
  --cf-text-on-blue: #ffffff;
  --cf-text-muted: #c7d1ea;
  --radius: 14px;
  --focus-ring: 3px solid #ffd166;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--cf-blue);
  color: var(--cf-text-on-blue);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Accesibilidad — enlace para saltar al contenido, visible solo con teclado */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--cf-white);
  color: var(--cf-blue);
  padding: 10px 16px;
  border-radius: 0 0 8px 0;
  z-index: 1000;
  font-weight: 700;
}
.skip-link:focus {
  left: 0;
}

:focus-visible {
  outline: var(--focus-ring);
  outline-offset: 3px;
}

.landing {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(32px, 8vw, 96px);
  padding: clamp(24px, 6vw, 64px);
  max-width: 1100px;
  margin: 0 auto;
  flex-wrap: wrap;
}

/* ── Marca ─────────────────────────────────────── */
.brand {
  flex: 1 1 320px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 18px;
}

.brand__logo {
  width: min(240px, 60vw);
  height: auto;
  filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.25));
}

.brand__tagline {
  margin: 0;
  max-width: 320px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--cf-text-muted);
}

/* ── Selector de país ──────────────────────────── */
.countries {
  flex: 1 1 360px;
  max-width: 420px;
  width: 100%;
}

.countries__title {
  margin: 0 0 16px;
  font-size: 22px;
  font-weight: 800;
  text-align: center;
}

.countries__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.country__link {
  all: unset;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 14px 18px;
  background: var(--cf-white);
  color: var(--cf-blue-dark);
  border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer;
  font-size: 17px;
  font-weight: 700;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease, background .15s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.country__link:hover,
.country__link:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.22);
  border-color: var(--cf-orange);
}

.country__link:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
}

.country__flag {
  flex: 0 0 auto;
  width: 28px;
  height: 20px;
  object-fit: cover;
  border-radius: 3px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.15);
}

.country__name {
  flex: 1;
  text-align: left;
}

.country__chevron {
  flex: 0 0 auto;
  font-size: 18px;
  color: var(--cf-orange);
  transition: transform .15s ease;
}
.country__link:hover .country__chevron {
  transform: translateX(3px);
}

.country__badge {
  flex: 0 0 auto;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .3px;
  text-transform: uppercase;
  color: #fff;
  background: var(--cf-orange);
  padding: 4px 9px;
  border-radius: 999px;
  white-space: nowrap;
}

.country--soon .country__link--disabled {
  background: #f2f2f2;
  color: #8a8a8a;
  cursor: pointer; /* sigue siendo clicable — abre el modal informativo */
}
.country--soon .country__link--disabled:hover,
.country--soon .country__link--disabled:focus-visible {
  border-color: var(--cf-orange);
}
.country--soon .country__flag {
  filter: grayscale(35%);
  opacity: .85;
}

/* ── Aviso de geo-detección (oculto por defecto) ── */
.geo-banner {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  background: var(--cf-white);
  color: var(--cf-blue-dark);
  padding: 14px 20px;
  border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: calc(100vw - 32px);
  z-index: 500;
}
.geo-banner[hidden] { display: none; }
.geo-banner p { margin: 0; font-size: 14px; font-weight: 600; }
.geo-banner__actions { display: flex; gap: 8px; flex: 0 0 auto; }
.geo-banner__go,
.geo-banner__cancel {
  border: none;
  border-radius: 8px;
  padding: 8px 14px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
}
.geo-banner__go { background: var(--cf-orange); color: #fff; }
.geo-banner__cancel { background: #eee; color: #333; }

/* ── Modal "en construcción" ──────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(8, 18, 46, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 999;
}
.modal-overlay[hidden] { display: none; }

.modal {
  background: var(--cf-white);
  color: #222;
  border-radius: 16px;
  padding: 32px 28px;
  max-width: 420px;
  width: 100%;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.modal h2 {
  margin: 0 0 12px;
  font-size: 20px;
  color: var(--cf-blue-dark);
}

.modal p {
  margin: 0 0 24px;
  line-height: 1.6;
  font-size: 15px;
  color: #444;
}

.modal__close {
  position: absolute;
  top: 12px;
  right: 14px;
  background: none;
  border: none;
  font-size: 26px;
  line-height: 1;
  color: #999;
  cursor: pointer;
}
.modal__close:hover { color: #333; }

.modal__ok {
  width: 100%;
  padding: 12px;
  background: var(--cf-blue);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  transition: opacity .15s;
}
.modal__ok:hover { opacity: .9; }

/* ── Footer ────────────────────────────────────── */
.footer {
  text-align: center;
  padding: 18px;
  font-size: 12px;
  color: var(--cf-text-muted);
}

/* ── Responsive ────────────────────────────────── */
@media (max-width: 640px) {
  .landing {
    flex-direction: column;
    text-align: center;
    gap: 32px;
    padding: 32px 20px;
  }
  .countries { max-width: 100%; }
}

/* ── Preferencia de movimiento reducido ──────────── */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}