/* ============================================================
   KUKAFLEX — Bridge / country selector
   Brand styles (self-contained, no external requests)
   ============================================================ */

/* ---- Fonts (bundled locally) ---- */
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../assets/fonts/poppins-400.woff2") format("woff2");
}
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../assets/fonts/poppins-600.woff2") format("woff2");
}
@font-face {
  font-family: "Open Sans";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../assets/fonts/opensans-700.woff2") format("woff2");
}

/* ---- Brand palette ---- */
:root {
  --green: #56a53d;
  --green-dark: #3f7d2d;
  --green-tint: #f1f8ea;
  --ink: #2e2a39;
  --ink-soft: #6b6776;
  --paper: #fdfbf7;
  --accent: #edffa7;
  --card: #ffffff;
  --radius: 22px;
  --shadow: 0 24px 60px -22px rgba(46, 42, 57, 0.35);
  --ring: 0 0 0 4px rgba(86, 165, 61, 0.35);
}

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

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

body {
  margin: 0;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
  font-family: "Poppins", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: var(--ink);
  background: linear-gradient(155deg, #f5fbec 0%, #d9efc6 45%, #b7df9a 100%);
  background-attachment: fixed;
}

/* Soft decorative glow behind the card */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(60% 50% at 50% 0%, rgba(237, 255, 167, 0.55), transparent 70%),
    radial-gradient(45% 40% at 85% 100%, rgba(86, 165, 61, 0.18), transparent 70%);
  pointer-events: none;
}

/* ---- The "window" card ---- */
.window {
  position: relative;
  width: 100%;
  max-width: 540px;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(32px, 5vw, 52px);
  text-align: center;
  border: 1px solid rgba(86, 165, 61, 0.12);
}

.logo {
  width: clamp(150px, 42%, 200px);
  height: auto;
  margin: 0 auto 22px;
  display: block;
}

.question {
  font-family: "Open Sans", "Poppins", sans-serif;
  font-weight: 700;
  font-size: clamp(1.35rem, 1rem + 2.2vw, 1.85rem);
  line-height: 1.25;
  color: var(--ink);
  margin: 0 0 6px;
  text-wrap: balance;
}

.subtitle {
  font-size: 0.98rem;
  color: var(--ink-soft);
  margin: 0 0 30px;
}

/* ---- Choice buttons ---- */
.choices {
  display: flex;
  gap: 14px;
}

.btn {
  flex: 1 1 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  padding: 16px 18px;
  border-radius: 14px;
  font-family: "Poppins", sans-serif;
  font-weight: 600;
  font-size: 1.02rem;
  letter-spacing: 0.2px;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease,
    background-color 0.15s ease, border-color 0.15s ease;
  border: 2px solid transparent;
}

.btn .flag {
  width: 28px;
  height: 20px;
  flex: 0 0 auto;
  border-radius: 4px;
  object-fit: cover;
  box-shadow: 0 0 0 1px rgba(46, 42, 57, 0.14);
}

.btn--mx {
  background: var(--green);
  color: #ffffff;
  box-shadow: 0 12px 22px -10px rgba(86, 165, 61, 0.85);
}
.btn--mx:hover {
  background: var(--green-dark);
  transform: translateY(-2px);
  box-shadow: 0 16px 26px -10px rgba(86, 165, 61, 0.9);
}

.btn--us {
  background: #ffffff;
  color: var(--ink);
  border-color: rgba(46, 42, 57, 0.16);
}
.btn--us:hover {
  background: var(--green-tint);
  border-color: var(--green);
  transform: translateY(-2px);
}

.btn:focus-visible {
  outline: none;
  box-shadow: var(--ring);
}

/* ---- US apology page ---- */
.message {
  font-family: "Open Sans", "Poppins", sans-serif;
  font-weight: 700;
  font-size: clamp(1.25rem, 1rem + 1.8vw, 1.6rem);
  line-height: 1.35;
  color: var(--ink);
  margin: 8px 0 6px;
  text-wrap: balance;
}

.message-note {
  font-size: 0.98rem;
  color: var(--ink-soft);
  margin: 0 0 30px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: 12px;
  font-family: "Poppins", sans-serif;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  color: var(--green-dark);
  background: var(--green-tint);
  border: 2px solid transparent;
  transition: transform 0.15s ease, background-color 0.15s ease,
    border-color 0.15s ease;
}
.back-link:hover {
  background: #e6f3d9;
  border-color: var(--green);
  transform: translateY(-2px);
}
.back-link:focus-visible {
  outline: none;
  box-shadow: var(--ring);
}

/* ---- Responsive: stack choices on narrow screens ----
   Breakpoint at 600px so the long "ESTADOS UNIDOS" label never
   gets cramped side-by-side; side-by-side only on comfortably
   wide screens where the card reaches its full width. ---- */
@media (max-width: 600px) {
  .choices { flex-direction: column; }
  .btn { width: 100%; }
}

/* ---- Footer privacy link (fixed, out of the centered-card flow) ---- */
.site-footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 14px;
  z-index: 5;
  text-align: center;
  font-family: "Poppins", sans-serif;
  font-size: 0.8rem;
}
.site-footer a {
  color: var(--ink-soft);
  text-decoration: none;
  opacity: 0.9;
}
.site-footer a:hover {
  color: var(--green-dark);
  text-decoration: underline;
}

/* ---- Non-blocking cookie note (injected by assets/track.js) ---- */
.cookie-note {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px 16px;
  padding: 12px 18px;
  background: var(--ink);
  color: #ffffff;
  font-family: "Poppins", sans-serif;
  font-size: 0.86rem;
  line-height: 1.4;
  box-shadow: 0 -8px 24px -16px rgba(46, 42, 57, 0.6);
}
.cookie-note a {
  color: var(--accent);
  text-decoration: underline;
}
.cookie-note__ok {
  flex: 0 0 auto;
  cursor: pointer;
  border: 0;
  border-radius: 10px;
  padding: 9px 18px;
  font-family: "Poppins", sans-serif;
  font-weight: 600;
  font-size: 0.86rem;
  color: #ffffff;
  background: var(--green);
  transition: transform 0.15s ease, background-color 0.15s ease;
}
.cookie-note__ok:hover {
  background: var(--green-dark);
  transform: translateY(-1px);
}
.cookie-note__ok:focus-visible {
  outline: none;
  box-shadow: var(--ring);
}

/* ---- Respect reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
  .btn,
  .back-link,
  .cookie-note__ok { transition: none; }
  .btn:hover,
  .back-link:hover,
  .cookie-note__ok:hover { transform: none; }
}
