/* ==========================================================================
   Central Cargo — portal corporativo
   Mobile-first. Breakpoints: 768px (tablet) y 1024px (desktop).
   ========================================================================== */

/* Montserrat variable (400–700), subset latin, self-hosted. Licencia OFL. */
@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("assets/fonts/montserrat-latin-var.woff2") format("woff2");
}

:root {
  /* Colores */
  --color-navy: #000c2d;
  --color-white: #fff;
  --color-overlay: rgb(0 12 45 / 0.6);
  --color-text-strong: rgb(255 255 255 / 0.85);
  --color-text-soft: rgb(255 255 255 / 0.8);
  --color-text-muted: rgb(255 255 255 / 0.7);
  --color-text-label: rgb(255 255 255 / 0.55);
  --color-text-faint: rgb(255 255 255 / 0.5);
  --color-rule: rgb(255 255 255 / 0.12);

  /* Tarjetas de vidrio */
  --glass-bg: rgb(255 255 255 / 0.08);
  --glass-bg-hover: rgb(255 255 255 / 0.14);
  --glass-border: rgb(255 255 255 / 0.22);
  --glass-border-hover: rgb(255 255 255 / 0.45);
  --glass-blur: 10px;

  /* Tipografía */
  --font-sans: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --radius-card: 20px;
  --radius-pill: 999px;
  --gutter: 20px;
}

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

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

body {
  margin: 0;
  background: var(--color-navy);
  color: var(--color-white);
  font-family: var(--font-sans);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

h1, h2, p { margin: 0; }
img { display: block; max-width: 100%; }

a { color: inherit; }

/* Texto solo para lectores de pantalla */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

:focus-visible {
  outline: 3px solid var(--color-white);
  outline-offset: 3px;
}

/* ---------- Hero (video + selector de país) ---------- */
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 56px var(--gutter) 48px;
  /* El poster también va de fondo: se ve mientras carga el video y con reduced-motion. */
  background: var(--color-navy) url("assets/hero-poster.jpg") center / cover no-repeat;
}

.hero__video {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Overlay oscuro sobre el video */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--color-overlay);
}

.hero__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
  width: 100%;
}

.hero__logo {
  width: 96.6px;
  height: 68px;
}

.hero__text {
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: center;
}

.hero__text h1 {
  font-size: 32px;
  font-weight: 700;
  line-height: normal;
}

.hero__text p {
  font-size: 15px;
  line-height: 1.45;
  color: var(--color-text-soft);
}

/* ---------- Tarjetas de país ---------- */
.countries {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  width: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
}

.countries > li { display: flex; }

.card {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 24px 12px 20px;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-card);
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(var(--glass-blur));
  backdrop-filter: blur(var(--glass-blur));
  text-align: center;
  text-decoration: none;
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

a.card:hover {
  background: var(--glass-bg-hover);
  border-color: var(--glass-border-hover);
  transform: translateY(-4px);
}

a.card:focus-visible {
  outline-offset: 4px;
  background: var(--glass-bg-hover);
  border-color: var(--glass-border-hover);
}

/* Círculo de bandera: 96px con borde blanco de 3px */
.card__flag {
  position: relative;
  flex-shrink: 0;
  width: 96px;
  height: 96px;
  overflow: hidden;
  border: 3px solid rgb(255 255 255 / 0.9);
  border-radius: 50%;
  background: var(--color-white);
}

.card__flag img {
  position: absolute;
  inset: -3px;
  width: 96px;
  max-width: none; /* anula img { max-width: 100% }, que la achicaba y la corría a la izquierda */
  height: 96px;
  object-fit: cover;
}

.card__name {
  font-size: 17px;
  font-weight: 600;
  white-space: nowrap;
}

.card__domain {
  font-size: 13px;
  color: var(--color-text-muted);
  overflow-wrap: anywhere;
}

.card__cta,
.card__soon {
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.card__cta {
  background: var(--color-white);
  color: var(--color-navy);
}

.card__cta span[aria-hidden] { margin-left: 0.3em; }

/* Argentina: "Próximamente", atenuada */
.card--soon { opacity: 0.75; }

.card__soon {
  border: 1px solid rgb(255 255 255 / 0.5);
  color: var(--color-text-strong);
}

/* Pantallas muy angostas: una tarjeta por fila */
@media (max-width: 339px) {
  .countries { grid-template-columns: 1fr; }
}

/* ---------- Footer ---------- */
.footer {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 36px var(--gutter) 28px;
  background: var(--color-navy);
}

.footer__contact {
  display: grid;
  gap: 20px;
}

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

.footer__brand img {
  width: 56.8px;
  height: 40px;
}

.footer__brand p {
  font-size: 13px;
  color: var(--color-text-muted);
}

.office {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-style: normal;
}

.office h2 {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-label);
}

.office p {
  font-size: 13px;
  line-height: 1.5;
  color: var(--color-text-strong);
}

.office a {
  text-decoration: none;
  white-space: nowrap;
}

.office a:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.office .sep { margin: 0 0.3em; }

.footer hr {
  width: 100%;
  height: 1px;
  margin: 0;
  border: 0;
  background: var(--color-rule);
}

.footer__legal {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.footer__copy {
  font-size: 12px;
  color: var(--color-text-faint);
}

/* Crédito Codeana */
.credit {
  font-size: 11px;
  color: rgb(255 255 255 / 0.65);
  opacity: 0.55;
}

.credit a {
  margin-left: 0.3em;
  /* DM Sans no se carga: cae a Montserrat si el visitante no la tiene */
  font-family: "DM Sans", var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: #f6f4ee;
  text-decoration: none;
}

.credit a:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ---------- Tablet ---------- */
@media (min-width: 768px) {
  :root { --gutter: 40px; }

  .countries {
    grid-template-columns: repeat(4, minmax(0, 232px));
    justify-content: center;
  }

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

  .footer__legal {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
  }
}

/* ---------- Desktop ---------- */
@media (min-width: 1024px) {
  :root { --gutter: 80px; }

  .hero {
    min-height: 780px;
    padding-block: 72px;
  }

  .hero__content { gap: 48px; }

  .hero__logo {
    width: 136.4px;
    height: 96px;
  }

  .hero__text { gap: 12px; }
  .hero__text h1 { font-size: 48px; }
  .hero__text p { font-size: 18px; line-height: normal; }

  .countries { gap: 24px; }

  .card {
    gap: 14px;
    padding: 32px 20px 28px;
  }

  .card__name { font-size: 20px; }

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

  .footer__contact {
    /* Proporciones del diseño (1440px): 260 / 314 / flexible / 313 */
    grid-template-columns: minmax(0, 260fr) minmax(0, 314fr) minmax(0, 303fr) minmax(0, 313fr);
  }

  .footer__brand img {
    width: 73.9px;
    height: 52px;
  }
}

/* Contenido centrado en pantallas muy anchas */
@media (min-width: 1440px) {
  .footer { padding-inline: calc((100% - 1280px) / 2); }
}

/* ---------- Accesibilidad: movimiento reducido ---------- */
@media (prefers-reduced-motion: reduce) {
  .hero__video { display: none; }

  .card { transition: none; }
  a.card:hover { transform: none; }
}
