/* ---------- Global Reach (#reach) ----------
   The words on the left and the world on the right, in pale blue air over a soft floor of light. js/reach.js draws
   the globe (SVG, Natural Earth outlines), places it for the screen, lights Clarion's network (every destination
   country in gold, each with one route from Tanzania; a country's name shows only on hover or tap), and plays
   Why <-> Global Reach, the container rising into a bright haze as the world comes up out of it. All rules are scoped
   to .reach-*. */

.reach {
  --reach-navy: #0b1f33;
  --reach-ink: #2a3d55;
  --reach-gold: #c79a2b;
  --reach-gold-deep: #bc7e0f;
  --reach-pad: clamp(24px, 5.4vw, 96px);
  position: relative;
  color: var(--reach-navy);
  background: #f2f7fd;
}

.reach-stage {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
  overflow: clip;
  isolation: isolate;
}

/* The air: brightest about the globe, a pale blue towards the edges, and a floor of soft light beneath it. */
.reach-air {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(ellipse 48% 52% at 57% 47%, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0) 72%),
    radial-gradient(ellipse 70% 60% at 0% 20%, rgba(234, 243, 252, 0.9), rgba(234, 243, 252, 0) 70%),
    linear-gradient(180deg, #eef5fc 0%, #f5f9fe 42%, #f1f6fc 72%, #e9f2fb 100%);
}
.reach-air::before, /* two long, faint sweeps of light across the floor */
.reach-air::after {
  content: "";
  position: absolute;
  left: -20%;
  right: -20%;
  pointer-events: none;
}
.reach-air::before {
  bottom: -38%;
  height: 70%;
  background: radial-gradient(ellipse 50% 50% at 50% 50%, rgba(255, 255, 255, 0) 55%, rgba(255, 255, 255, 0.95) 60.5%, rgba(255, 255, 255, 0) 67%);
  transform: rotate(-3deg);
  opacity: 0.45;
}
.reach-air::after {
  bottom: -30%;
  height: 58%;
  background: radial-gradient(ellipse 50% 50% at 50% 50%, rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0) 65%);
  opacity: 0.8;
}

/* The bright band the container rises into (js/reach.js moves it; it shows only while Why <-> Global Reach plays). */
.reach-haze {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  z-index: 3;
  height: 46%;
  opacity: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 70% 42% at 50% 46%, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0) 100%),
    linear-gradient(180deg, rgba(248, 251, 255, 0) 0%, rgba(248, 251, 255, 0.96) 40%, rgba(246, 250, 254, 0.9) 58%, rgba(242, 247, 253, 0) 100%);
}

/* Why Choose Clarion, over this view as it gives way to it: from the bottom up it thins into the haze beneath, the
   edge rising with --reach-edge (js/reach.js). */
.why.is-lifting {
  -webkit-mask-image: linear-gradient(180deg, #000 calc(var(--reach-edge, 130%) - 30%), transparent var(--reach-edge, 130%));
  mask-image: linear-gradient(180deg, #000 calc(var(--reach-edge, 130%) - 30%), transparent var(--reach-edge, 130%));
}

/* ---------- The words ---------- */
.reach-copy {
  position: absolute;
  left: var(--reach-pad);
  top: 46%;
  z-index: 2;
  max-width: 36%;
  transform: translateY(-50%);
}
.reach-label {
  display: flex;
  align-items: center;
  gap: 22px;
  font-family: var(--font-nav);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--reach-ink);
}
.reach-label::before { content: ""; width: 40px; height: 2px; background: var(--reach-gold); opacity: 0.85; }
.reach-title {
  margin: clamp(22px, 3.4vh, 38px) 0 clamp(24px, 3.8vh, 40px);
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 4.4vw, 5.2rem);
  font-weight: 500;
  line-height: 1.04;
  letter-spacing: -0.012em;
  white-space: nowrap;
  color: var(--reach-navy);
}
.reach-dot { color: var(--reach-gold-deep); }
.reach-trade {
  font-family: var(--font-nav);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--reach-ink);
}
.reach-trade span { margin: 0 0.35em 0 0.1em; color: #8a99ab; }

/* ---------- The world ---------- */
.reach-world {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none; /* only the globe itself takes the pointer */
}
.reach-globe {
  position: absolute;
  left: 0;
  top: 0;
  overflow: visible;
  -webkit-user-select: none;
  user-select: none;
}
.reach-globe .reach-hit {
  pointer-events: auto;
  cursor: grab;
  touch-action: pan-y; /* a finger drawn across turns the globe; up or down, it is the page's (js/reach.js) */
}
.reach-globe.is-dragging .reach-hit { cursor: grabbing; }

/* The network's countries: always Clarion gold on their true outlines, softly lit (the glow is on their group, see
   js/reach.js), a little brighter while named. */
.reach-country {
  fill: url(#reachGold);
  fill-opacity: 0.86;
  stroke: rgba(255, 238, 200, 0.85);
  stroke-width: 0.55;
  stroke-linejoin: round;
  cursor: default;
  outline: none;
  pointer-events: auto;
  transition: fill-opacity 0.35s ease, stroke 0.35s ease;
}
.reach-country.is-hover,
.reach-country:focus-visible {
  fill-opacity: 1;
  stroke: rgba(255, 246, 222, 1);
}
/* Tanzania, lit only as the world closes in on Dar es Salaam on the way to Contact (js/reach.js, js/contact.js). */
.reach-home {
  fill: url(#reachGold);
  stroke: rgba(255, 238, 200, 0.9);
  stroke-width: 0.8;
  stroke-linejoin: round;
  opacity: 0;
}
/* A country or territory not on the network, under the mouse: its own fill, a little darker (js/reach.js). */
.reach-land-hover {
  fill: #16304f;
  fill-opacity: 0;
  transition: fill-opacity 0.18s ease-out;
}
.reach-land-hover.is-on { fill-opacity: 0.12; }
/* A small country's wider, invisible hit area, around its true outline. */
.reach-country-hit {
  fill: none;
  stroke: transparent;
  stroke-width: 16;
  stroke-linejoin: round;
  pointer-events: stroke;
}
.reach-globe.is-dragging .reach-country,
.reach-globe.is-dragging .reach-country-hit { cursor: grabbing; }

/* The routes from Tanzania: many, so each one thin and faint (its opacity is set per route in js/reach.js). */
.reach-route {
  fill: none;
  stroke: var(--reach-gold);
  stroke-width: 0.85;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}
.reach-route-glow {
  fill: none;
  stroke: rgba(236, 196, 110, 0.32);
  stroke-width: 3;
  stroke-linecap: round;
  pointer-events: none;
}
.reach-node { fill: #c68a1c; pointer-events: none; }

/* ---------- The name of the hovered (or tapped) country ---------- */
.reach-tags {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.reach-tag {
  position: absolute;
  left: 0;
  top: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px 10px 13px;
  border: 1px solid rgba(11, 31, 51, 0.06);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 14px 30px -18px rgba(11, 31, 51, 0.38), 0 2px 6px -2px rgba(11, 31, 51, 0.08);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  font-family: var(--font-nav);
  font-size: 0.86rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  color: var(--reach-navy);
  opacity: 0;
  transition: opacity 0.45s ease;
  will-change: transform;
}
.reach-tag::before {
  content: "";
  flex: none;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--reach-gold-deep);
  box-shadow: 0 0 0 3px rgba(199, 154, 43, 0.18);
}
.reach-tag.is-shown { opacity: 1; }
.reach-tag.is-away { opacity: 0 !important; } /* its country has turned to the far side */
@media (prefers-reduced-motion: reduce) {
  .reach-tag, .reach-country, .reach-land-hover { transition: none; }
}

/* ---------- The invitation ---------- */
.reach-hint {
  position: absolute;
  left: 50%;
  top: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  font-family: var(--font-nav);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.36em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--reach-navy);
  transform: translateX(-50%);
  pointer-events: none;
}
.reach-hint__mouse {
  width: 22px;
  height: 34px;
  fill: none;
  stroke: var(--reach-navy);
  stroke-width: 1.3;
  stroke-linecap: round;
}
.reach-hint__line { width: 1px; height: 30px; background: var(--reach-gold); opacity: 0.8; }

/* ---------- Tablets and phones: the words above, the world beneath them ---------- */
@media (max-width: 899px) {
  .reach { --reach-pad: clamp(20px, 6vw, 56px); }
  .reach-copy {
    position: relative;
    left: auto;
    top: auto;
    max-width: none;
    padding: 132px var(--reach-pad) 0;
    transform: none;
  }
  .reach-title { font-size: clamp(2.5rem, 10vw, 4.4rem); }
  .reach-trade { font-size: 0.7rem; letter-spacing: 0.3em; }
  .reach-hint { font-size: 0.64rem; letter-spacing: 0.3em; gap: 12px; }
  .reach-tag { padding: 8px 14px 8px 11px; font-size: 0.8rem; }
}
@media (min-width: 561px) and (max-width: 899px) {
  .reach-copy { padding-top: 172px; } /* the taller nav above 560px */
}
@media (max-width: 420px) {
  .reach-copy { padding-top: 116px; }
  .reach-trade { letter-spacing: 0.22em; }
  .reach-hint { letter-spacing: 0.22em; }
}
.reach-hint[hidden] { display: none; }
