/* ============================================================
   Country pages — hero with globe, stats, prose, grid of cards.
   Globe canvas is dark; cards adapt to light/dark theme.
   ============================================================ */

/* ---------- Globe ---------- */
.cglobe {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  max-width: 460px;
  margin-inline: auto;
  display: grid;
  place-items: center;
}
.cglobe__canvas {
  width: 100%;
  height: 100%;
  display: block;
  filter: drop-shadow(0 24px 60px oklch(0.2 0.05 var(--c-hue, 200) / 0.45));
}
.cglobe__fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 10px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, oklch(0.30 0.05 var(--c-hue, 200)), oklch(0.16 0.04 var(--c-hue, 200)));
  width: 78%;
  height: 78%;
  margin: auto;
  color: #fff;
}
.cglobe__iso {
  font-family: var(--font-mono);
  font-size: 34px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.cglobe__fallback-name { font-size: 14px; opacity: 0.8; }
.cglobe__fallback.is-error .cglobe__spinner { display: none; }
.cglobe__spinner {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-top-color: #fff;
  animation: cglobe-spin 0.8s linear infinite;
}
@keyframes cglobe-spin { to { transform: rotate(360deg); } }

.cglobe__caption {
  position: absolute;
  bottom: 6%;
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(10, 14, 30, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.03em;
  white-space: nowrap;
}
.cglobe__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: oklch(0.85 0.14 var(--c-hue, 200));
  box-shadow: 0 0 0 3px oklch(0.85 0.14 var(--c-hue, 200) / 0.3);
}

/* ---------- Detail hero ---------- */
.country-hero {
  position: relative;
  padding-block: clamp(20px, 3vw, 40px) clamp(28px, 4vw, 56px);
  isolation: isolate;
  overflow: visible;
}
.country-hero::before {
  content: "";
  position: absolute;
  inset: -20% -10% auto auto;
  width: 70%;
  height: 120%;
  background: radial-gradient(closest-side, oklch(0.6 0.16 var(--c-hue, 200) / 0.16), transparent 70%);
  z-index: -1;
  pointer-events: none;
}
.country-hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(28px, 4vw, 56px);
  align-items: center;
}
@media (max-width: 900px) {
  .country-hero__grid { grid-template-columns: 1fr; }
  .country-hero__viz { order: -1; }
}
/* Detail globe: big, round, floating — free to spill past the hero */
.country-hero__viz .cglobe {
  max-width: 600px;
  aspect-ratio: 1 / 1;
}
.country-hero__viz .cglobe__canvas {
  filter: drop-shadow(0 34px 90px oklch(0.2 0.06 var(--c-hue, 200) / 0.55));
}
@media (min-width: 901px) {
  .country-hero__viz { margin-bottom: -40px; }
}
.country-hero__title {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1.0;
  letter-spacing: -0.03em;
  margin: 12px 0 0;
  color: var(--ink);
}
.country-hero__kicker {
  margin: 16px 0 0;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(19px, 2vw, 25px);
  line-height: 1.35;
  color: var(--ink);
}
.country-hero__intro {
  margin: 18px 0 0;
  font-size: clamp(16px, 1.4vw, 18px);
  line-height: 1.65;
  color: var(--ink-soft);
  max-width: 56ch;
  text-wrap: pretty;
}
.country-office {
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
.country-office__city {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.country-office__meta {
  margin-top: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-mute);
}

/* ---------- Stats ---------- */
.country-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
@media (max-width: 720px) { .country-stats { grid-template-columns: 1fr; } }
.country-stat {
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--paper-2);
}
.country-stat__v {
  font-size: clamp(22px, 2.4vw, 30px);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.country-stat__k {
  margin-top: 6px;
  font-size: 14px;
  line-height: 1.45;
  color: var(--ink-soft);
}

/* ---------- Prose ---------- */
.country-prose {
  max-width: 68ch;
}
.country-prose p {
  font-size: clamp(16px, 1.4vw, 18px);
  line-height: 1.7;
  color: var(--ink-soft);
  margin: 0 0 18px;
  text-wrap: pretty;
}
.country-prose p:last-child { margin-bottom: 0; }
.country-note {
  margin: 24px 0 0;
  padding: 16px 20px;
  border-inline-start: 3px solid oklch(0.7 0.14 var(--accent-hue, 200));
  background: var(--paper-2);
  border-radius: 0 12px 12px 0;
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 68ch;
}

/* ---------- Index grid ---------- */
.country-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}
@media (max-width: 760px) { .country-grid { grid-template-columns: 1fr; } }
.country-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--paper-2);
  text-decoration: none;
  color: inherit;
  transition: border-color 240ms var(--ease), transform 240ms var(--ease), box-shadow 240ms var(--ease);
}
.country-card:hover {
  border-color: var(--line-strong);
  transform: translateY(-4px);
  box-shadow: 0 24px 50px -28px oklch(0.2 0.05 var(--c-hue, 200) / 0.5);
}
.country-card__viz {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(120% 120% at 70% 10%, oklch(0.26 0.05 var(--c-hue, 200)), oklch(0.13 0.03 var(--c-hue, 200)));
  padding: 0;
}
.country-card__viz .cglobe {
  max-width: none;
  width: 100%;
  aspect-ratio: 16 / 11;
  margin: 0;
}
.country-card__viz .cglobe__canvas { filter: none; }
.country-card__viz .cglobe__caption { font-size: 11px; bottom: 14px; }
.country-card__body { padding: 22px 24px 24px; }
.country-card__name {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.country-card__role {
  margin-top: 4px;
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-mute);
}
.country-card__kicker {
  margin: 14px 0 0;
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink-soft);
  text-wrap: pretty;
}
.country-card__foot {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13.5px;
  color: var(--ink-soft);
}
.country-card__foot strong { color: var(--accent); font-weight: 500; white-space: nowrap; }

/* ---------- Imagery gallery ---------- */
.country-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
@media (max-width: 760px) { .country-gallery { grid-template-columns: 1fr; } }
.country-gallery__slot {
  display: block;
  width: 100%;
  height: 280px;
}
.country-gallery__hint {
  margin: 14px 0 0;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.02em;
  color: var(--ink-mute);
}

/* ---------- Index hero glow allowed to spread ---------- */
.sub-hero--bleed {
  overflow: clip;
  overflow-clip-margin: 280px;
}
