/* World News Garden — standing pages. */

:root {
  --bg: #050a14;
  --ink: #f4f7fa;
  --dim: #a3b0be;
  --faint: #6f7d8c;
  --accent: #4dfd8b;
  --navy: #1f3f73;
  --line: rgba(255, 255, 255, 0.11);
  --line-strong: rgba(255, 255, 255, 0.2);
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Inter, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16.5px;
  line-height: 1.68;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }

/* ---------- loader ---------- */

.loader {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  gap: 20px;
  align-content: center;
  background: var(--bg);
  transition: opacity 0.5s ease, visibility 0.5s;
}
.loader.done { opacity: 0; visibility: hidden; }
.loader img {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  animation: loader-pulse 1.7s ease-in-out infinite;
}
.loader-bar {
  width: 148px;
  height: 2px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
}
.loader-bar span {
  display: block;
  width: 40%;
  height: 100%;
  border-radius: 2px;
  background: var(--accent);
  animation: loader-slide 1.15s ease-in-out infinite;
}
@keyframes loader-pulse {
  0%, 100% { transform: scale(1); opacity: 0.85; }
  50%      { transform: scale(1.07); opacity: 1; }
}
@keyframes loader-slide {
  0%   { transform: translateX(-110%); }
  100% { transform: translateX(320%); }
}

/* ---------- rotating globe ---------- */

/* A sphere is really a circular window onto a repeating flat map. The map
   tiles at the date line, so sliding it by exactly one tile loops forever
   with no visible seam. */
.stage {
  position: fixed;
  inset: 0;
  z-index: -2;
  display: grid;
  place-items: center;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(1100px 700px at 78% 4%, rgba(31, 63, 115, 0.32), transparent 66%),
    radial-gradient(800px 600px at 6% 96%, rgba(37, 179, 101, 0.1), transparent 70%);
}

.globe {
  --size: min(62vw, 560px);
  position: relative;
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  overflow: hidden;
  opacity: 0.22;
  box-shadow:
    0 0 90px rgba(60, 130, 210, 0.22),
    0 0 160px rgba(37, 179, 101, 0.12);
}
.globe-map {
  position: absolute;
  inset: 0;
  background-image: url('/assets/earth-map.webp');
  background-repeat: repeat-x;
  /* Half the world across the disc, which is what a sphere actually shows. */
  background-size: calc(var(--size) * 2) 100%;
  animation: globe-spin 140s linear infinite;
}
@keyframes globe-spin {
  to { background-position-x: calc(var(--size) * -2); }
}

/* Shading is what stops it reading as a flat spinning disc. */
.globe-shade {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 26%, rgba(255, 255, 255, 0.16), transparent 46%),
    radial-gradient(circle at 50% 50%, transparent 46%, rgba(0, 0, 0, 0.62) 100%);
  box-shadow: inset -22px -16px 60px rgba(0, 0, 0, 0.55);
}
.globe-rim {
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  border: 1px solid rgba(120, 190, 255, 0.22);
}

@media (prefers-reduced-motion: reduce) {
  .globe-map { animation: none; }
  .loader img, .loader-bar span { animation: none; }
}

/* ---------- header ---------- */

.top {
  position: sticky;
  top: 0;
  z-index: 5;
  background: rgba(5, 10, 20, 0.78);
  backdrop-filter: saturate(150%) blur(18px);
  border-bottom: 1px solid var(--line);
}
.top-in {
  max-width: 880px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; }
.brand img {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.14), 0 2px 12px rgba(0, 0, 0, 0.5);
}
.brand span {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.top nav { display: flex; gap: 3px; }
.top nav a {
  position: relative;
  padding: 8px 13px;
  border-radius: 8px;
  color: var(--dim);
  font-size: 14px;
  text-decoration: none;
  transition: color 0.16s, background 0.16s;
}
.top nav a:hover { color: var(--ink); background: rgba(255, 255, 255, 0.06); }
.top nav a[aria-current] { color: var(--accent); }
.top nav a[aria-current]::after {
  content: '';
  position: absolute;
  left: 13px;
  right: 13px;
  bottom: 2px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
}

/* ---------- content ---------- */

.wrap { max-width: 880px; margin: 0 auto; padding: 0 24px; }
.page { padding: 64px 0 30px; }

h1 {
  font-size: clamp(34px, 6vw, 52px);
  line-height: 1.04;
  letter-spacing: -0.032em;
  margin: 0 0 14px;
}
.lede { margin: 0 0 40px; max-width: 62ch; color: var(--dim); font-size: 18.5px; line-height: 1.6; }

h2 {
  position: relative;
  font-size: 21px;
  letter-spacing: -0.015em;
  margin: 52px 0 14px;
  padding-top: 30px;
  border-top: 1px solid var(--line);
}
h2::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 0;
  width: 34px;
  height: 2px;
  background: var(--accent);
}
h2:first-of-type { margin-top: 0; }
h3 { font-size: 16px; margin: 28px 0 6px; }

p, li { color: var(--dim); max-width: 68ch; }
p { margin: 0 0 16px; }
ul { margin: 0 0 16px; padding-left: 22px; }
li { margin-bottom: 9px; }
li::marker { color: var(--faint); }
strong { color: var(--ink); font-weight: 600; }

a.link {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid rgba(77, 253, 139, 0.34);
}
a.link:hover { border-bottom-color: var(--accent); }

.card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.016));
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px 24px;
  margin: 0 0 14px;
  backdrop-filter: blur(4px);
  transition: border-color 0.18s;
}
.card:hover { border-color: var(--line-strong); }
.card h3 { margin-top: 0; }
.card p:last-child { margin-bottom: 0; }

.stat { display: flex; flex-wrap: wrap; gap: 12px; margin: 0 0 20px; padding: 0; list-style: none; }
.stat li {
  flex: 1 1 150px;
  margin: 0;
  padding: 18px 20px;
  max-width: none;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(31, 63, 115, 0.26), rgba(255, 255, 255, 0.02));
  backdrop-filter: blur(4px);
}
.stat b {
  display: block;
  font-size: 27px;
  font-weight: 650;
  color: var(--accent);
  letter-spacing: -0.02em;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}
.stat span {
  font-size: 11.5px;
  color: var(--faint);
  text-transform: uppercase;
  letter-spacing: 0.13em;
}

.updated { font-size: 13px; color: var(--faint); margin: -28px 0 40px; }

.cta {
  display: inline-block;
  margin: 10px 10px 0 0;
  padding: 13px 26px;
  border-radius: 999px;
  background: var(--accent);
  color: #06170d;
  font-weight: 650;
  font-size: 15px;
  text-decoration: none;
  box-shadow: 0 6px 20px rgba(77, 253, 139, 0.16);
  transition: transform 0.14s, box-shadow 0.18s;
}
.cta:hover { transform: translateY(-1px); box-shadow: 0 10px 26px rgba(77, 253, 139, 0.24); }
.cta.ghost { background: transparent; border: 1px solid var(--line-strong); color: var(--ink); box-shadow: none; }
.cta.ghost:hover { border-color: rgba(255, 255, 255, 0.42); background: rgba(255, 255, 255, 0.04); }

/* ---------- footer ---------- */

.foot {
  margin-top: 80px;
  border-top: 1px solid var(--line);
  background: rgba(5, 10, 20, 0.72);
  backdrop-filter: blur(16px);
}
.foot-in {
  max-width: 880px;
  margin: 0 auto;
  padding: 48px 24px 28px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
}
/* The full lockup finally has room to be read here. */
.foot-brand img { width: 210px; height: auto; margin-bottom: 6px; }
.foot-brand p { font-size: 14px; margin: 0 0 16px; max-width: 34ch; }

.foot h4 {
  margin: 0 0 12px;
  font-size: 11.5px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--faint);
  font-weight: 600;
}
.foot ul { list-style: none; margin: 0; padding: 0; }
.foot li { margin-bottom: 9px; max-width: none; }
.foot a { color: var(--dim); text-decoration: none; font-size: 14.5px; }
.foot a:hover { color: var(--accent); }

.foot-base {
  max-width: 880px;
  margin: 0 auto;
  padding: 20px 24px 34px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  justify-content: space-between;
  color: var(--faint);
  font-size: 13px;
}
.foot-base p { margin: 0; color: var(--faint); max-width: 62ch; }

/* ---------- narrow screens ---------- */

@media (max-width: 780px) {
  .foot-in { grid-template-columns: 1fr 1fr; gap: 32px; }
  .foot-brand { grid-column: 1 / -1; }
}

@media (max-width: 680px) {
  body { font-size: 16px; }
  .top-in { padding: 10px 16px; gap: 10px; }
  .brand img { width: 29px; height: 29px; }
  .brand span { font-size: 10.5px; letter-spacing: 0.1em; }
  .top nav { gap: 0; }
  .top nav a { padding: 6px 9px; font-size: 13px; }
  .wrap, .foot-in, .foot-base { padding-left: 18px; padding-right: 18px; }
  .page { padding: 40px 0 20px; }
  .stat li { flex: 1 1 100%; }
  .globe { --size: min(88vw, 460px); opacity: 0.17; }
}

@media (max-width: 420px) {
  .brand span { display: none; }
}
