/* =========================================================
   VALRYN WORLD EXPLORER
   world.css — Production Replacement
   PART 1
   ========================================================= */

:root {
  --header-height: 70px;
  --bg: #020814;
  --panel: #071427;
  --panel-2: #0b1d36;
  --text: #ffffff;
  --muted: #c8d3e2;
  --green: #2ddf8c;
  --blue: #0b5cff;
  --border: rgba(111, 157, 226, 0.34);
}

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

html {
  width: 100%;
  min-height: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
}

body {
  width: 100%;
  min-width: 320px;
  min-height: 100%;
  margin: 0;
  overflow-x: hidden;
  color: var(--text);
  background: var(--bg);
  font-family: Inter, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

button,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

[hidden] {
  display: none !important;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

button:focus-visible,
select:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(45, 223, 140, 0.82);
  outline-offset: 3px;
}

/* =========================================================
   TOPBAR
   ========================================================= */

.topbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--header-height);

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;

  padding: 0 clamp(22px, 4vw, 48px);

  border-bottom: 1px solid rgba(255, 255, 255, 0.12);

  background: rgba(2, 8, 20, 0.98);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;

  color: #ffffff;

  text-decoration: none;

  font-size: 1.32rem;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.brand small {
  color: var(--green);

  font-size: 0.65rem;
  letter-spacing: 0.24em;
}

.top-logo {
  width: 44px;
  height: 44px;

  object-fit: contain;
}

.topbar nav {
  display: flex;
  gap: clamp(15px, 2vw, 28px);

  overflow-x: auto;

  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.topbar nav::-webkit-scrollbar {
  display: none;
}

.topbar nav a {
  flex: 0 0 auto;

  color: #ffffff;

  text-decoration: none;

  font-size: 0.88rem;
  font-weight: 800;

  white-space: nowrap;
}

.topbar nav a.active,
.topbar nav a:hover {
  color: #77ffc2;
}

/* =========================================================
   WORLD HERO
   ========================================================= */

.world-hero {
  position: relative;

  isolation: isolate;

  min-height: calc(100vh - var(--header-height));
  min-height: calc(100svh - var(--header-height));

  display: grid;
  place-items: center;

  overflow: hidden;

  background:
    radial-gradient(
      circle at 72% 42%,
      rgba(11, 92, 255, 0.22),
      transparent 34%
    ),
    radial-gradient(
      circle at 24% 28%,
      rgba(45, 223, 140, 0.08),
      transparent 28%
    ),
    linear-gradient(
      180deg,
      #020814 0%,
      #01040a 100%
    );
}

.world-hero::before {
  content: "";

  position: absolute;
  inset: 0;

  z-index: 0;

  pointer-events: none;

  opacity: 0.74;

  background-image:
    radial-gradient(
      circle,
      rgba(255, 255, 255, 0.95) 0 1px,
      transparent 1.4px
    ),
    radial-gradient(
      circle,
      rgba(122, 183, 255, 0.82) 0 1px,
      transparent 1.5px
    ),
    radial-gradient(
      circle,
      rgba(255, 255, 255, 0.58) 0 0.8px,
      transparent 1.2px
    ),
    radial-gradient(
      circle,
      rgba(75, 220, 255, 0.66) 0 1.2px,
      transparent 1.6px
    );

  background-position:
    0 0,
    43px 68px,
    94px 31px,
    157px 112px;

  background-size:
    118px 118px,
    181px 181px,
    247px 247px,
    329px 329px;

  animation:
    worldStarPulse
    7s
    ease-in-out
    infinite
    alternate;
}

.world-overlay {
  position: absolute;
  inset: 0;

  z-index: 1;

  pointer-events: none;

  background:
    radial-gradient(
      circle at 72% 40%,
      rgba(45, 223, 140, 0.12),
      transparent 32%
    ),
    linear-gradient(
      90deg,
      rgba(2, 8, 20, 0.92),
      rgba(2, 8, 20, 0.14)
    );
}

.world-content {
  position: relative;

  z-index: 5;

  width: min(1120px, 92vw);

  display: grid;

  grid-template-columns:
    1.05fr
    0.95fr;

  gap: 18px 50px;

  align-items: center;
}

.eyebrow {
  grid-column: 1;

  margin: 0;

  color: #7bffc2;

  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.28em;
}

.world-content h1 {
  grid-column: 1;

  margin: 0;

  font-size: clamp(3.6rem, 7vw, 6.6rem);

  line-height: 0.94;
}

.world-intro {
  grid-column: 1;

  margin: 0;

  color: var(--muted);

  font-size: 1.08rem;

  line-height: 1.65;
}

.world-search {
  grid-column: 1;

  display: grid;

  grid-template-columns:
    1fr
    auto;

  gap: 12px;
}

.world-search select,
.country-controls select {
  min-height: 52px;

  padding: 0 16px;

  color: #07111b;

  border:
    1px solid
    rgba(255, 255, 255, 0.22);

  border-radius: 12px;

  background: #ffffff;
}

.world-search button,
.hero-buttons button,
.country-controls button {
  min-height: 52px;

  padding: 0 22px;

  color: #04111a;

  border: 0;

  border-radius: 12px;

  background:
    linear-gradient(
      180deg,
      #9effcd,
      #2ddf8c
    );

  font-weight: 900;
}

.hero-buttons {
  grid-column: 1;

  display: flex;

  flex-wrap: wrap;

  gap: 10px;
}

.hero-buttons button:nth-child(n + 2),
.country-controls button:nth-child(n + 3) {
  color: #ffffff;

  border:
    1px solid
    rgba(255, 255, 255, 0.18);

  background:
    rgba(9, 25, 47, 0.88);
}
/* =========================================================
   HERO BUTTONS & GLOBE
   ========================================================= */

.world-globe {
  position: relative;

  grid-column: 2;
  grid-row: 1 / span 5;

  width: min(400px, 34vw);

  aspect-ratio: 1;

  overflow: hidden;

  border:
    1px solid
    rgba(132, 187, 255, 0.25);

  border-radius: 50%;

  background-color: #03101d;

  background-image:
    radial-gradient(
      circle at 31% 25%,
      rgba(255,255,255,.20),
      transparent 18%
    ),
    linear-gradient(
      90deg,
      rgba(0,0,0,.10),
      transparent 30%,
      transparent 66%,
      rgba(0,0,0,.42)
    ),
    url("../assets/images/earth2.jpg");

  background-position:
    center,
    center,
    0 center;

  background-size:
    100% 100%,
    100% 100%,
    auto 100%;

  background-repeat:
    no-repeat,
    no-repeat,
    repeat-x;

  box-shadow:
    inset -46px -28px 76px rgba(0,0,0,.62),
    inset 18px 10px 32px rgba(115,188,255,.12),
    0 0 78px rgba(11,92,255,.34),
    0 0 130px rgba(75,220,255,.10);

  animation:
    worldEarthRotate 72s linear infinite,
    worldEarthFloat 8s ease-in-out infinite;

  will-change:
    background-position,
    transform;
}

.world-globe::before{
  content:"";

  position:absolute;
  inset:0;

  border-radius:50%;

  pointer-events:none;

  background:
    radial-gradient(
      circle at 34% 25%,
      rgba(205,235,255,.18),
      transparent 18%
    ),
    radial-gradient(
      circle at 69% 70%,
      transparent 44%,
      rgba(0,0,0,.42) 72%
    ),
    linear-gradient(
      106deg,
      rgba(255,255,255,.08),
      transparent 35%,
      transparent 70%,
      rgba(0,0,0,.42)
    );
}

.world-globe::after{
  content:"";

  position:absolute;
  inset:-9%;

  border:
    1px solid
    rgba(100,164,255,.24);

  border-radius:50%;

  pointer-events:none;

  transform:
    rotateX(67deg)
    rotateZ(-16deg);

  animation:
    worldOrbitRing
    22s
    linear
    infinite;
}

/* =========================================================
   COUNTRY HERO
   ========================================================= */

.country-panel{
  background:#020814;

  scroll-margin-top:
    var(--header-height);
}

.country-hero{

  --hero-image:none;

  position:relative;

  min-height:390px;

  display:flex;

  align-items:center;

  overflow:hidden;

  background-image:

    linear-gradient(
      90deg,
      rgba(2,8,20,.98) 0%,
      rgba(2,8,20,.86) 35%,
      rgba(2,8,20,.30) 74%,
      rgba(2,8,20,.40) 100%
    ),

    var(--hero-image);

  background-position:center;

  background-size:cover;
}

.country-hero-overlay{
  position:absolute;
  inset:0;

  background:
    linear-gradient(
      180deg,
      transparent 60%,
      rgba(2,8,20,.46)
    );
}

.country-hero-content{

  position:relative;

  z-index:1;

  width:
    min(
      1450px,
      calc(100% - 72px)
    );

  margin:auto;
}

.back-to-explorer{

  margin-bottom:16px;

  padding:0;

  color:#e8eff9;

  border:0;

  background:transparent;

  font-size:1rem;
}

.country-identity-row{

  display:flex;

  align-items:center;

  justify-content:space-between;

  gap:30px;
}

.country-identity{

  min-width:0;

  display:flex;

  align-items:center;

  gap:28px;
}

.country-flag{

  font-size:
    clamp(
      4.5rem,
      8vw,
      7rem
    );

  line-height:1;

  filter:
    drop-shadow(
      0 16px 28px
      rgba(0,0,0,.38)
    );
}

.country-label,
.country-detail-label{

  margin:0;

  color:#4ff3a6;

  font-size:.76rem;

  font-weight:900;

  letter-spacing:.26em;
}

.country-heading-group h2{

  margin:8px 0 0;

  overflow-wrap:anywhere;

  font-size:
    clamp(
      4rem,
      7vw,
      6.6rem
    );

  line-height:.9;

  text-shadow:
    0 5px 20px
    rgba(0,0,0,.58);
}

.country-location-line{

  display:flex;

  flex-wrap:wrap;

  gap:10px;

  margin:15px 0 0;

  color:#e4edf8;

  font-size:1rem;

  font-weight:750;
}

.country-tagline{

  max-width:570px;

  margin:17px 0 0;

  color:#d4dfec;

  line-height:1.55;
}

.close-country-panel{

  min-height:48px;

  padding:0 20px;

  color:#fff;

  border:
    1px solid
    rgba(255,255,255,.25);

  border-radius:12px;

  background:
    rgba(4,15,31,.82);

  font-weight:900;
}
/* =========================================================
   COUNTRY CONTROLS
   ========================================================= */

.country-controls {
  max-width: 1040px;

  margin-top: 24px;

  padding: 14px;

  display: grid;

  grid-template-columns:
    minmax(250px, 1fr)
    auto
    auto
    auto;

  gap: 10px;

  border:
    1px solid
    rgba(66, 199, 255, 0.28);

  border-radius: 12px;

  background:
    rgba(4, 18, 36, 0.72);

  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* =========================================================
   COUNTRY SHELL
   ========================================================= */

.country-shell {
  width:
    min(
      1450px,
      calc(100% - 72px)
    );

  margin: 0 auto;

  padding: 26px 0 70px;
}

.quick-facts {
  margin-top: 0;
}

/* =========================================================
   FACT GRID
   ========================================================= */

.fact-grid {
  margin-top: 12px;

  padding-bottom: 8px;

  display: grid;

  grid-template-columns:
    repeat(
      10,
      minmax(120px, 1fr)
    );

  gap: 12px;

  overflow-x: auto;

  scrollbar-width: thin;

  scrollbar-color:
    rgba(45, 223, 140, 0.5)
    rgba(255, 255, 255, 0.04);

  -webkit-overflow-scrolling: touch;
}

.fact-grid::-webkit-scrollbar {
  height: 8px;
}

.fact-grid::-webkit-scrollbar-track {
  background:
    rgba(255, 255, 255, 0.04);

  border-radius: 999px;
}

.fact-grid::-webkit-scrollbar-thumb {
  background:
    rgba(45, 223, 140, 0.5);

  border-radius: 999px;
}

.fact-card {
  min-width: 125px;

  min-height: 145px;

  padding: 18px 16px;

  border:
    1px solid
    var(--border);

  border-radius: 12px;

  background:
    linear-gradient(
      145deg,
      #0b1d36,
      #071426
    );

  box-shadow:
    inset 0 1px 0
    rgba(255, 255, 255, 0.05);
}

.fact-card span {
  display: block;

  color: #bdcadc;

  font-size: 0.76rem;

  line-height: 1.25;
}

.fact-card strong {
  display: block;

  margin-top: 11px;

  overflow-wrap: anywhere;

  color: #ffffff;

  font-size: 1.1rem;

  line-height: 1.25;
}

/* =========================================================
   COUNTRY KNOWLEDGE
   ========================================================= */

.country-knowledge {
  margin-top: 22px;
}

.country-tabs {
  display: grid;

  grid-template-columns:
    repeat(7, 1fr);

  overflow: hidden;

  border:
    1px solid
    var(--border);

  border-radius:
    12px
    12px
    0
    0;

  background: #061225;
}

.country-tab {
  min-height: 56px;

  color: #e4edf8;

  border: 0;

  border-right:
    1px solid
    rgba(255, 255, 255, 0.09);

  background: transparent;

  font-weight: 800;
}

.country-tab:last-child {
  border-right: 0;
}

.country-tab:hover {
  color: #77ffc2;

  background:
    rgba(45, 223, 140, 0.06);
}

.country-tab.is-active {
  color: #04111a;

  background:
    linear-gradient(
      180deg,
      #8effc4,
      #2ddf8c
    );
}

/* =========================================================
   COUNTRY CONTENT PANEL
   ========================================================= */

.country-content-panel {
  min-height: 270px;

  padding: 26px 30px;

  display: grid;

  grid-template-columns:
    1fr
    1.08fr;

  align-items: center;

  gap: 28px;

  border:
    1px solid
    var(--border);

  border-top: 0;

  border-radius:
    0
    0
    12px
    12px;

  background:
    linear-gradient(
      145deg,
      #081a31,
      #061426
    );
}

.country-content-copy {
  min-width: 0;
}

.country-content-copy h3 {
  margin: 10px 0 0;

  font-size:
    clamp(
      2rem,
      3vw,
      2.8rem
    );
}

.country-content-copy p:not(.country-detail-label) {
  margin: 16px 0 0;

  color: #d4deeb;

  font-size: 1.02rem;

  line-height: 1.7;
}

.country-content-panel img {
  width: 100%;

  height: 215px;

  object-fit: cover;

  border:
    1px solid
    rgba(255, 255, 255, 0.14);

  border-radius: 10px;

  background: #071427;
}

/* =========================================================
   LOCKED COUNTRY SCREEN MODE
   ========================================================= */

body.country-mode {
  overflow-y: auto;

  background: #020814;
}

body.country-mode .world-hero {
  display: none;
}

body.country-mode .country-panel {
  display: block;

  min-height:
    calc(
      100vh -
      var(--header-height)
    );

  min-height:
    calc(
      100svh -
      var(--header-height)
    );
}

body:not(.country-mode) .country-panel {
  display: none !important;
}

body.country-mode .country-hero {
  scroll-margin-top:
    var(--header-height);
}










/* =========================================================
   SPACE EFFECT SYSTEM
   Single optimized animation system used by world.js.
   ========================================================= */

.space-effects,
.space-effect-layer {
  position: absolute;

  inset: 0;

  overflow: hidden;

  pointer-events: none;
}

.space-effects {
  z-index: 3;

  contain:
    layout
    paint
    style;
}

.space-effect-layer {
  z-index: 1;
}

.space-effect-layer > span {
  position: absolute !important;

  display: block;

  width: max-content;
  height: max-content;

  line-height: 1;

  pointer-events: none;

  user-select: none;

  backface-visibility: hidden;

  transform-origin: center;

  will-change:
    transform,
    opacity;

  filter:
    drop-shadow(
      0 0 5px
      rgba(255, 255, 255, 0.7)
    )
    drop-shadow(
      0 0 13px
      rgba(46, 126, 255, 0.42)
    );
}

/* =========================================================
   STATIC STAR FIELD
   ========================================================= */

.stars-layer > span {
  color: #ffffff;

  text-shadow:
    0 0 5px
    rgba(255, 255, 255, 0.95),
    0 0 12px
    rgba(76, 153, 255, 0.72);
}

.space-star {
  animation-name:
    worldStarTwinkle;

  animation-timing-function:
    ease-in-out;

  animation-iteration-count:
    infinite;

  animation-direction:
    alternate;
}

/* =========================================================
   MOVING OBJECT TYPES
   ========================================================= */

.meteors-layer > span,
.comets-layer > span {
  filter:
    drop-shadow(
      0 0 7px
      rgba(255, 255, 255, 0.9)
    )
    drop-shadow(
      0 0 17px
      rgba(74, 151, 255, 0.68)
    );
}

.planes-layer > span {
  color: #f5f9ff;
}

.satellites-layer > span {
  filter:
    drop-shadow(
      0 0 6px
      rgba(255, 255, 255, 0.82)
    )
    drop-shadow(
      0 0 15px
      rgba(75, 220, 255, 0.52)
    );
}

.spacecraft-layer > span {
  filter:
    drop-shadow(
      0 0 6px
      rgba(255, 255, 255, 0.76)
    )
    drop-shadow(
      0 0 16px
      rgba(45, 223, 140, 0.45)
    );
}

.space-object-plane {
  color: #f5f9ff;
}

.space-object-satellite {
  z-index: 1;
}

.space-object-meteor,
.space-object-comet {
  z-index: 2;
}

.space-object-rocket {
  z-index: 2;
}

/* =========================================================
   STAR ANIMATIONS
   ========================================================= */

@keyframes worldStarPulse {
  from {
    opacity: 0.48;
  }

  to {
    opacity: 0.82;
  }
}

@keyframes worldStarTwinkle {
  0% {
    opacity: 0.2;

    transform:
      scale(0.72);
  }

  50% {
    opacity: 0.85;

    transform:
      scale(1);
  }

  100% {
    opacity: 0.35;

    transform:
      scale(0.82);
  }
}

/* =========================================================
   EARTH ANIMATIONS
   ========================================================= */

@keyframes worldEarthRotate {
  from {
    background-position:
      center,
      center,
      0 center;
  }

  to {
    background-position:
      center,
      center,
      -200% center;
  }
}

@keyframes worldEarthFloat {
  0%,
  100% {
    transform:
      translateY(0);
  }

  50% {
    transform:
      translateY(-12px);
  }
}

@keyframes worldOrbitRing {
  from {
    transform:
      rotateX(67deg)
      rotateZ(-16deg);
  }

  to {
    transform:
      rotateX(67deg)
      rotateZ(344deg);
  }
}

/* =========================================================
   STRAIGHT FLIGHT PATH
   Used primarily by aircraft.
   ========================================================= */

@keyframes spaceTraverse {
  0% {
    opacity: 0;

    transform:
      translate3d(
        -18vw,
        0,
        0
      )
      rotate(-5deg)
      scale(0.72);
  }

  8% {
    opacity: 1;
  }

  48% {
    transform:
      translate3d(
        55vw,
        -6vh,
        0
      )
      rotate(2deg)
      scale(1);
  }

  92% {
    opacity: 1;
  }

  100% {
    opacity: 0;

    transform:
      translate3d(
        125vw,
        3vh,
        0
      )
      rotate(7deg)
      scale(0.88);
  }
}

/* =========================================================
   CURVED UPWARD PATH
   Used by rockets and rising spacecraft.
   ========================================================= */

@keyframes spaceTraverseCurveUp {
  0% {
    opacity: 0;

    transform:
      translate3d(
        -20vw,
        18vh,
        0
      )
      rotate(42deg)
      scale(0.68);
  }

  8% {
    opacity: 1;
  }

  48% {
    transform:
      translate3d(
        52vw,
        -18vh,
        0
      )
      rotate(42deg)
      scale(1);
  }

  92% {
    opacity: 1;
  }

  100% {
    opacity: 0;

    transform:
      translate3d(
        126vw,
        -48vh,
        0
      )
      rotate(42deg)
      scale(0.9);
  }
}

/* =========================================================
   CURVED DOWNWARD PATH
   Used by meteors.
   ========================================================= */

@keyframes spaceTraverseCurveDown {
  0% {
    opacity: 0;

    transform:
      translate3d(
        -20vw,
        -18vh,
        0
      )
      rotate(-15deg)
      scale(0.7);
  }

  8% {
    opacity: 1;
  }

  48% {
    transform:
      translate3d(
        54vw,
        13vh,
        0
      )
      rotate(-15deg)
      scale(1);
  }

  92% {
    opacity: 1;
  }

  100% {
    opacity: 0;

    transform:
      translate3d(
        126vw,
        38vh,
        0
      )
      rotate(-15deg)
      scale(0.88);
  }
}

/* =========================================================
   WAVE PATH
   Used by satellites and distant comets.
   ========================================================= */

@keyframes spaceTraverseWave {
  0% {
    opacity: 0;

    transform:
      translate3d(
        -20vw,
        0,
        0
      )
      rotate(-4deg)
      scale(0.68);
  }

  8% {
    opacity: 1;
  }

  25% {
    transform:
      translate3d(
        20vw,
        -8vh,
        0
      )
      rotate(2deg)
      scale(0.88);
  }

  50% {
    transform:
      translate3d(
        55vw,
        6vh,
        0
      )
      rotate(-2deg)
      scale(1);
  }

  75% {
    transform:
      translate3d(
        88vw,
        -6vh,
        0
      )
      rotate(3deg)
      scale(0.94);
  }

  92% {
    opacity: 1;
  }

  100% {
    opacity: 0;

    transform:
      translate3d(
        126vw,
        2vh,
        0
      )
      rotate(6deg)
      scale(0.86);
  }
}
/* =========================================================
   DESKTOP
   ========================================================= */

@media (min-width: 1051px) {
  .world-hero {
    max-height:
      calc(
        100vh -
        var(--header-height)
      );

    max-height:
      calc(
        100svh -
        var(--header-height)
      );
  }

  .world-content {
    min-height: 0;

    align-content: center;

    padding-block: 20px;
  }
}

/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 1050px) {
  .world-content {
    grid-template-columns: 1fr;

    text-align: center;
  }

  .eyebrow,
  .world-content h1,
  .world-intro,
  .world-search,
  .hero-buttons,
  .world-globe {
    grid-column: 1;
  }

  .world-globe {
    grid-row: auto;

    width:
      min(
        280px,
        52vw
      );

    justify-self: center;
  }

  .country-controls {
    grid-template-columns:
      1fr
      1fr;
  }

  .fact-grid {
    grid-template-columns:
      repeat(
        5,
        minmax(150px, 1fr)
      );
  }

  .country-tabs {
    grid-template-columns:
      repeat(
        4,
        1fr
      );
  }

  .country-content-panel {
    grid-template-columns:
      1fr
      1fr;
  }
}

/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 720px) {
  :root {
    --header-height: 116px;
  }

  .topbar {
    height:
      var(--header-height);

    padding:
      10px
      18px;

    flex-direction:
      column;

    align-items:
      flex-start;

    justify-content:
      center;

    gap: 8px;
  }

  .brand small {
    display: none;
  }

  .topbar nav {
    width: 100%;
  }

  .world-hero {
    min-height:
      calc(
        100vh -
        var(--header-height)
      );

    min-height:
      calc(
        100svh -
        var(--header-height)
      );

    padding:
      34px
      0;
  }

  .world-content {
    width:
      min(
        100% - 28px,
        1120px
      );

    gap: 16px;
  }

  .world-content h1 {
    font-size:
      clamp(
        3.2rem,
        16vw,
        4.8rem
      );
  }

  .world-intro {
    font-size:
      0.98rem;
  }

  .world-search {
    grid-template-columns:
      1fr;
  }

  .world-search button,
  .hero-buttons button {
    width: 100%;
  }

  .hero-buttons {
    width: 100%;
  }

  .world-globe {
    width:
      min(
        250px,
        72vw
      );
  }

  .country-hero {
    min-height: 650px;

    background-position:
      62%
      center;
  }

  .country-hero-content,
  .country-shell {
    width:
      min(
        100% - 28px,
        1450px
      );
  }

  .country-identity-row,
  .country-identity {
    flex-direction: column;

    align-items: flex-start;
  }

  .country-heading-group h2 {
    font-size:
      clamp(
        3.5rem,
        16vw,
        5rem
      );
  }

  .close-country-panel {
    width: 100%;
  }

  .country-controls {
    grid-template-columns:
      1fr;
  }

  .country-controls button,
  .country-controls select {
    width: 100%;
  }

  .fact-grid {
    grid-template-columns:
      repeat(
        2,
        minmax(145px, 1fr)
      );
  }

  .country-tabs {
    display: flex;

    overflow-x: auto;

    scrollbar-width: none;

    -webkit-overflow-scrolling:
      touch;
  }

  .country-tabs::-webkit-scrollbar {
    display: none;
  }

  .country-tab {
    min-width: 145px;
  }

  .country-content-panel {
    grid-template-columns:
      1fr;

    padding: 22px;
  }

  .country-content-panel img {
    height: 200px;
  }

  .space-effect-layer > span {
    filter: none;
  }
}

/* =========================================================
   SMALL MOBILE
   ========================================================= */

@media (max-width: 390px) {
  .topbar {
    padding-inline: 14px;
  }

  .brand {
    font-size: 1.12rem;
  }

  .top-logo {
    width: 40px;
    height: 40px;
  }

  .world-content {
    width:
      min(
        100% - 20px,
        1120px
      );
  }

  .world-content h1 {
    font-size:
      clamp(
        2.85rem,
        15vw,
        4rem
      );
  }

  .country-hero-content,
  .country-shell {
    width:
      min(
        100% - 20px,
        1450px
      );
  }

  .country-heading-group h2 {
    font-size:
      clamp(
        3rem,
        15vw,
        4.4rem
      );
  }
}

/* =========================================================
   TOUCH DEVICES
   ========================================================= */

@media (hover: none) and (pointer: coarse) {
  .topbar nav a:hover {
    color: #ffffff;
  }

  button,
  select,
  .topbar nav a {
    min-height: 44px;
  }

  .country-tab:hover {
    color: #e4edf8;

    background: transparent;
  }

  .country-tab.is-active:hover {
    color: #04111a;

    background:
      linear-gradient(
        180deg,
        #8effc4,
        #2ddf8c
      );
  }
}

/* =========================================================
   REDUCED MOTION
   ========================================================= */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .world-hero::before,
  .space-effects {
    display: none;
  }

  .world-globe,
  .world-globe::after {
    animation: none;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;

    transition-duration:
      0.01ms !important;

    animation-duration:
      0.01ms !important;

    animation-iteration-count:
      1 !important;
  }
}
.country-discovery-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 20px;
}

.country-discovery-grid article {
    display: grid;
    gap: 8px;
    padding: 18px;
    border: 1px solid rgba(70, 82, 150, .16);
    border-radius: 16px;
    background: rgba(255, 255, 255, .82);
}

.country-discovery-grid span {
    color: #5b63a5;
    font-size: .76rem;
    font-weight: 800;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.country-attribution {
    margin: 16px 2px 0;
    color: #6d718c;
    font-size: .78rem;
}

.country-attribution a {
    color: inherit;
}

.country-content-panel img[data-fallback="true"] {
    display: none;
}

@media (max-width: 680px) {
    .country-discovery-grid {
        grid-template-columns: 1fr;
    }
}
