/* KaroVox v7 "the world is open": the 51-languages block. A night panel (dark in both themes: the globe only glows on dark)
   with the concept title and the big number; the globe (globe.js, [data-globe]) beside it on wide
   screens, under it on phones; three facts under the panel as glass cards (dark glass / light glass by theme).
   Uses the tokens of premium.css. No external files. Classes: kg-*. */

.kg-sec .x-wrap { position: relative; }

/* ---------- the night panel ---------- */
.kg-panel {
  position: relative; isolation: isolate; overflow: hidden;
  display: grid; grid-template-columns: minmax(0, 1fr); align-items: center;
  border-radius: var(--radius-l, 26px);
  border: 1px solid rgba(162, 139, 255, 0.16);
  color: #f3f4ff;
  background:
    radial-gradient(1px 1px at 22px 34px, rgba(255, 255, 255, 0.75), transparent 70%),
    radial-gradient(1px 1px at 118px 92px, rgba(214, 206, 255, 0.6), transparent 70%),
    radial-gradient(1.4px 1.4px at 64px 148px, rgba(255, 255, 255, 0.55), transparent 70%),
    radial-gradient(1px 1px at 162px 18px, rgba(140, 240, 230, 0.55), transparent 70%),
    radial-gradient(1px 1px at 190px 128px, rgba(255, 255, 255, 0.4), transparent 70%),
    radial-gradient(1.2px 1.2px at 92px 60px, rgba(255, 190, 225, 0.45), transparent 70%),
    radial-gradient(60% 50% at 78% 58%, rgba(124, 92, 255, 0.30), transparent 70%),
    radial-gradient(45% 40% at 70% 40%, rgba(255, 46, 126, 0.16), transparent 70%),
    radial-gradient(70% 60% at 0% 0%, rgba(20, 16, 51, 0.95), transparent 70%),
    radial-gradient(60% 60% at 10% 100%, rgba(40, 224, 208, 0.07), transparent 70%),
    linear-gradient(180deg, #0b0d24 0%, #05060f 55%, #070818 100%);
  background-size: 210px 170px, 210px 170px, 210px 170px, 210px 170px, 210px 170px, 210px 170px, auto, auto, auto, auto, auto;
  background-color: #05060f;
  box-shadow: 0 40px 90px -40px rgba(5, 4, 30, 0.9), 0 0 0 1px rgba(255, 255, 255, 0.02) inset, 0 1px 0 rgba(255, 255, 255, 0.06) inset;
}
html[data-theme="light"] .kg-panel { box-shadow: 0 44px 90px -38px rgba(36, 24, 120, 0.55), 0 14px 30px -18px rgba(36, 24, 120, 0.35); border-color: rgba(124, 92, 255, 0.28); }
/* soft top light so the edge reads as glass, not a hole */
.kg-panel::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 3;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), transparent 22%); }

.kg-copy { position: relative; z-index: 2; padding: 38px 16px 0; text-align: center; }
.kg-title {
  margin: 0; font-family: var(--display); font-weight: 600; letter-spacing: var(--tr-display, -0.035em); line-height: 1.02;
  font-size: clamp(34px, 9.6vw, 64px); color: #f6f5ff; text-wrap: balance;
}
.kg-count { display: flex; align-items: baseline; justify-content: center; gap: 12px; margin: 14px 0 0; }
.kg-big {
  margin: 0; font-family: var(--display); font-weight: 600; letter-spacing: -0.05em; line-height: 0.84;
  font-size: clamp(92px, 30vw, 172px); font-variant-numeric: lining-nums tabular-nums;
  background: linear-gradient(105deg, #ff4fa3 0%, #ff2e7e 32%, #a28bff 70%, #6fe8dc 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 26px rgba(255, 46, 126, 0.35)) drop-shadow(0 0 60px rgba(124, 92, 255, 0.3));
}
.kg-cap { font: 600 14px/1 var(--mono); letter-spacing: 0.2em; text-transform: uppercase; color: #b9a8ff; }

.kg-stage { position: relative; z-index: 1; width: 100%; max-width: 540px; margin: -8px auto -4px; aspect-ratio: 1 / 1; }
.kg-globe { position: absolute; inset: 0; pointer-events: none; touch-action: pan-y; }
/* no JS / no canvas: a still CSS planet */
.kg-globe:not(.kg-on)::before {
  content: ""; position: absolute; left: 11.5%; top: 11.5%; width: 77%; height: 77%; border-radius: 50%;
  background:
    radial-gradient(circle at 34% 30%, rgba(176, 150, 255, 0.55), transparent 42%),
    radial-gradient(circle at 36% 34%, #2a1f78 0%, #151046 45%, #0a0a26 85%, #0c0b2c 100%);
  box-shadow: 0 0 0 1px rgba(190, 160, 255, 0.45), 0 0 34px 6px rgba(176, 150, 255, 0.4), 0 0 90px 20px rgba(124, 92, 255, 0.22), inset -30px -40px 60px rgba(3, 3, 14, 0.7), inset 0 0 24px rgba(255, 120, 190, 0.35);
}

/* language label (tap a pin) and the passing greeting; dark glass in both themes, they live inside the night panel */
.kg-pop, .kg-tag { position: absolute; left: 0; top: 0; z-index: 4; color: #f3f4ff; --ax: 50%; }
.kg-pop[hidden], .kg-tag[hidden] { display: none; }
.kg-pop {
  width: max-content; min-width: 200px; max-width: min(272px, calc(100% - 12px)); box-sizing: border-box; padding: 14px 16px 16px;
  border-radius: 18px; border: 1px solid transparent; text-align: left;
  background: linear-gradient(180deg, rgba(28, 24, 78, 0.94), rgba(12, 12, 40, 0.94)) padding-box,
    linear-gradient(140deg, rgba(255, 79, 163, 0.75), rgba(124, 92, 255, 0.4) 50%, rgba(40, 224, 208, 0.6)) border-box;
  box-shadow: 0 24px 50px -18px rgba(0, 0, 0, 0.85), 0 0 44px -12px rgba(255, 46, 126, 0.55);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  opacity: 0; transform: translateY(6px) scale(0.96); transform-origin: var(--ax) 100%;
  transition: opacity 0.18s var(--ease-out, ease), transform 0.28s var(--ease-out, ease);
}
.kg-pop.kg-below { transform-origin: var(--ax) 0; transform: translateY(-6px) scale(0.96); }
.kg-pop.kg-show { opacity: 1; transform: none; }
.kg-pop::after, .kg-tag::after { content: ""; position: absolute; left: var(--ax); bottom: -5px; width: 9px; height: 9px; margin-left: -5px; transform: rotate(45deg);
  background: rgba(14, 13, 44, 0.96); border-right: 1px solid rgba(162, 139, 255, 0.45); border-bottom: 1px solid rgba(162, 139, 255, 0.45); }
.kg-below::after { bottom: auto; top: -5px; transform: rotate(225deg); }
.kg-pop-hi { margin: 0 26px 6px 0; font: 600 26px/1.15 var(--display); letter-spacing: -0.02em; overflow-wrap: anywhere;
  background: linear-gradient(100deg, #ff7ab8 0%, #ff4fa3 35%, #b9a8ff 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.kg-pop-hi[dir="rtl"] { text-align: right; margin: 0 26px 6px 0; }
.kg-pop-name { margin: 0; font: 400 14px/1.35 var(--font); color: #c9cbee; overflow-wrap: anywhere; }
.kg-pop-name b { font-weight: 650; color: #ffffff; }
.kg-pop-go { display: block; width: 100%; min-height: 42px; margin: 13px 0 0; padding: 9px 14px; border: 0; border-radius: 999px; cursor: pointer;
  font: 650 14px/1.2 var(--font); color: #fff; background: var(--grad-btn, linear-gradient(110deg, #ff2e7e, #9a4cf2));
  box-shadow: 0 10px 26px -10px rgba(255, 46, 126, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.3); }
.kg-pop-go:hover { background: var(--grad-btn-hover, linear-gradient(110deg, #ff4f93, #a660ff)); }
.kg-pop-go:focus-visible, .kg-pop-x:focus-visible { outline: 2px solid #a28bff; outline-offset: 2px; }
.kg-pop-x { position: absolute; top: 6px; right: 6px; width: 32px; height: 32px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, 0.06); color: #c9cbee; font: 400 20px/1 var(--font); cursor: pointer; }
.kg-pop-x:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }
.kg-tag { pointer-events: none; white-space: nowrap; padding: 6px 12px; border-radius: 999px; font: 600 14px/1.2 var(--font);
  background: rgba(14, 13, 44, 0.9); border: 1px solid rgba(255, 79, 163, 0.5); box-shadow: 0 0 22px -4px rgba(255, 46, 126, 0.6);
  opacity: 0; transform: translateY(4px); transition: opacity 0.35s ease, transform 0.35s ease; }
.kg-tag::after { width: 7px; height: 7px; margin-left: -4px; bottom: -4px; border-color: rgba(255, 79, 163, 0.5); }
.kg-tag.kg-show { opacity: 1; transform: none; }

/* ---------- three facts under the panel ---------- */
.kg-facts { list-style: none; margin: 14px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.kg-facts li {
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start; text-align: center; gap: 11px;
  min-width: 0; padding: 18px 8px 16px; border-radius: 20px; border: 1px solid transparent;
  background:
    linear-gradient(180deg, rgba(20, 22, 62, 0.82), rgba(10, 11, 34, 0.72)) padding-box,
    linear-gradient(140deg, rgba(255, 79, 163, 0.5), rgba(124, 92, 255, 0.22) 45%, rgba(40, 224, 208, 0.4)) border-box;
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  box-shadow: 0 22px 44px -26px rgba(0, 0, 0, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
html[data-theme="light"] .kg-facts li {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.72)) padding-box,
    linear-gradient(140deg, rgba(255, 46, 126, 0.5), rgba(124, 92, 255, 0.28) 48%, rgba(40, 224, 208, 0.5)) border-box;
  box-shadow: 0 20px 44px -24px rgba(58, 40, 150, 0.38), 0 4px 12px -6px rgba(58, 40, 150, 0.14), inset 0 1px 0 #ffffff;
}
.kg-ico {
  flex: none; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 15px;
  background: linear-gradient(140deg, #ff4fa3 0%, #ff2e7e 35%, #7c5cff 100%);
  box-shadow: 0 10px 24px -8px rgba(255, 46, 126, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}
.kg-facts li:nth-child(2) .kg-ico { background: linear-gradient(140deg, #a28bff 0%, #7c5cff 40%, #28e0d0 100%); box-shadow: 0 10px 24px -8px rgba(124, 92, 255, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.4); }
.kg-facts li:nth-child(3) .kg-ico { background: linear-gradient(140deg, #28e0d0 0%, #4aa8f0 45%, #7c5cff 100%); box-shadow: 0 10px 24px -8px rgba(40, 224, 208, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.4); }
.kg-ico svg { width: 24px; height: 24px; fill: none; stroke: #ffffff; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.kg-facts b { display: block; max-width: 100%; font: 650 13.5px/1.25 var(--font); letter-spacing: -0.005em; color: var(--text); overflow-wrap: anywhere; }

@media (min-width: 560px) {
  .kg-facts { gap: 12px; }
  .kg-facts li { flex-direction: row; text-align: left; padding: 18px 18px; gap: 14px; }
  .kg-facts b { font-size: 15.5px; }
}
@media (min-width: 900px) {
  .kg-panel { grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr); min-height: 560px; }
  .kg-copy { padding: 64px 0 64px 64px; text-align: left; }
  .kg-count { justify-content: flex-start; margin-top: 22px; }
  .kg-stage { max-width: 640px; margin: 0 0 0 auto; }
  .kg-facts { margin-top: 16px; gap: 16px; }
  .kg-facts li { padding: 22px 24px; }
  .kg-facts b { font-size: 17px; }
}
@media (prefers-reduced-motion: reduce) { .kg-pop, .kg-tag { transition: none; } }
