/* Homepage: hero globe, highlights, statement, honesty card and the FAQ accordion. */

/* Hero */

.hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: min(calc(100vh - var(--header-height)), 920px);
  padding: 0 0 64px;
  overflow: hidden;
}

.hero-inner {
  position: relative;
  z-index: 2;
}

.hero-copy {
  display: grid;
  justify-items: start;
  gap: 6px;
}

.hero-status {
  margin-bottom: 6px;
}

.hero-title {
  color: var(--light);
  font-size: clamp(2.8rem, 6.2vw, 6.2rem);
  line-height: 1.02;
  text-wrap: balance;
}

.br-narrow {
  display: none;
}

.hero-sub {
  color: var(--light);
  font: 700 clamp(1.2rem, 2.2vw, 1.85rem)/1.25 var(--font-display);
}

.hero-download {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
  margin-top: 28px;
}

.hero-download p {
  color: var(--gray);
  font-size: var(--text-small);
}

/* The globe fills the hero and fades out behind the headline. */
.globe-stage {
  position: absolute;
  inset: 0;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(180deg, #000 45%, transparent 90%);
  mask-image: linear-gradient(180deg, #000 45%, transparent 90%);
}

.globe-stage canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.globe-pins {
  position: absolute;
  inset: 0;
}

.map-pin {
  position: absolute;
  top: 0;
  left: 0;
  visibility: hidden;
}

.map-pin-dot {
  position: absolute;
  width: 10px;
  height: 10px;
  border: 2px solid #1a1d26;
  border-radius: 50%;
  background: var(--light);
  transform: translate(-50%, -50%);
  transition: background-color 0.3s ease, width 0.3s ease, height 0.3s ease;
}

.map-pin.active .map-pin-dot {
  width: 14px;
  height: 14px;
  background: var(--brand);
  box-shadow: 0 0 10px 1px rgba(254, 45, 118, 0.55);
}

/* The app's route card (arrive-overwolf ServerSelect/RouteCard): the city Arrive is heading for, its game
   and a ping. */
.route-card {
  position: absolute;
  right: var(--track-inset);
  bottom: 64px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 300px;
  padding: 13px 18px 13px 14px;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  background: var(--glass-bg);
  box-shadow: var(--shadow-float);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}


.route-text {
  display: grid;
  flex: 1;
  min-width: 0;
  line-height: 1.25;
}

.route-text strong {
  color: var(--light);
  font-size: 1rem;
  font-weight: 700;
}

.route-text span {
  margin-top: 2px;
  color: var(--gray);
  font-size: 0.85rem;
}

.route-ping {
  color: var(--gray);
  font: 700 0.7rem/1 var(--font-body);
  text-transform: uppercase;
}

.route-ping strong {
  margin-right: 2px;
  color: var(--light);
  font: 800 1.6rem/1 var(--font-display);
  letter-spacing: -0.02em;
}

/* A new city fades its name and ping in rather than overwriting them. */
.route-card .swap-in {
  animation: swap-in 0.35s ease-out both;
}

@keyframes swap-in {
  from {
    opacity: 0;
    translate: 0 4px;
  }
}

/* Games: a band just below the hero, so the page steps from the hero straight onto it, holding a row of the app's
   game tiles that each link to their guide. */

.games {
  padding-bottom: calc(var(--section-space) / 2);
  padding-top: calc(var(--section-space) / 2);
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  background: var(--band-bg);
}

.games .section-head {
  justify-items: center;
  margin-inline: auto;
  text-align: center;
}

.games .game-tiles.is-row {
  justify-content: center;
}

.game-tiles.is-row {
  display: flex;
  flex-wrap: wrap;
  gap: 20px 40px;
}

.game-tiles.is-row .game-tile {
  --tile-size: 52px;
  --tile-icon: 28px;
  border-radius: var(--radius-md);
}

.game-tiles.is-row .game-tiles-name {
  font: 800 var(--text-lead) / 1.2 var(--font-display);
}

.game-tiles.is-row a {
  min-height: var(--tap);
  transition: color var(--ease);
}

.game-tiles.is-row a:hover {
  color: var(--aqua);
}

/* Highlights */

.highlights h2 {
  margin-bottom: 48px;
}

.highlight-track {
  display: flex;
  gap: 20px;
  padding: 0 var(--track-inset) 24px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-padding-inline: var(--track-inset);
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.highlight-track::-webkit-scrollbar {
  display: none;
}

@media (pointer: fine) {
  .highlight-track {
    cursor: grab;
  }
}

.highlight-track.is-dragging {
  scroll-snap-type: none;
  cursor: grabbing;
  user-select: none;
}

.highlight-tile {
  display: flex;
  flex: none;
  flex-direction: column;
  gap: 24px;
  width: min(400px, 82vw);
  height: 540px;
  padding: 36px 32px 32px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(90% 60% at 100% 100%, var(--brand-soft), transparent 70%),
    var(--tile-bg);
  scroll-snap-align: start;
  /* A swipe moves one tile, however hard the flick. */
  scroll-snap-stop: always;
}

.highlight-caption {
  color: var(--gray);
  font-size: var(--text-lead);
  line-height: 1.45;
}

.highlight-caption strong {
  color: var(--light);
  font-weight: 700;
}

.highlight-visual {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
}

.highlight-controls {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 16px;
}

.round-button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--hairline);
  color: var(--light);
  transition: background-color var(--ease), opacity var(--ease);
}

.round-button:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.14);
}

.round-button:disabled {
  opacity: 0.3;
  cursor: default;
}

.ping-readout {
  display: flex;
  align-items: flex-end;
  gap: 18px;
}

.ping-value {
  color: var(--light);
  font: 800 7rem/0.8 var(--font-display);
  letter-spacing: -0.03em;
}

.ping-value small {
  margin-left: 6px;
  color: var(--gray);
  font-size: 1.4rem;
  letter-spacing: 0;
  text-transform: uppercase;
}

.ping-bars {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 40px;
}

.ping-bars i {
  width: 7px;
  border-radius: 2px;
  background: var(--brand);
}

.ping-bars i:nth-child(1) { height: 30%; }
.ping-bars i:nth-child(2) { height: 55%; }
.ping-bars i:nth-child(3) { height: 80%; }
.ping-bars i:nth-child(4) { height: 100%; }

.highlight-visual .status {
  font-size: 12px;
}

.jitter-chart {
  width: 100%;
  height: auto;
  overflow: visible;
}

.jitter-rough {
  stroke: var(--disabled);
  stroke-width: 2;
  stroke-linejoin: round;
  opacity: 0.55;
}

.jitter-smooth {
  stroke: var(--brand);
  stroke-width: 3;
  stroke-linecap: round;
  filter: drop-shadow(0 0 6px rgba(254, 45, 118, 0.55));
}

.jitter-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 20px;
  color: var(--gray);
  font-size: 14px;
}

.jitter-legend span {
  display: flex;
  align-items: center;
  gap: 8px;
}

.jitter-legend i {
  width: 14px;
  height: 3px;
  border-radius: 2px;
}

.legend-rough {
  background: var(--disabled);
}

.legend-smooth {
  background: var(--brand);
}

.server-list {
  width: 100%;
  padding: 16px 0 8px;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  background: var(--fill-subtle);
}

.server-list-title {
  padding: 0 18px 12px;
  border-bottom: 1px solid var(--hairline);
  color: var(--light);
  font: 700 12px/1 var(--font-mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.server-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 18px;
  color: var(--contrast);
  font-size: 15px;
}

.server-row i {
  width: 14px;
  height: 14px;
  border: 1.5px solid var(--disabled);
  border-radius: 50%;
}

.server-row em {
  margin-left: auto;
  padding: 3px 9px;
  border-radius: var(--radius-sm);
  background: var(--aqua-soft);
  color: var(--aqua);
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.server-row b {
  margin-left: auto;
  color: var(--light);
  font: 800 17px/1 var(--font-display);
}

.server-row em + b {
  margin-left: 14px;
}

.server-row small {
  margin-left: 2px;
  color: var(--gray);
  font-size: 10px;
  text-transform: uppercase;
}

.server-row.selected {
  background: var(--brand-soft);
}

.server-row.selected i {
  border-color: var(--brand);
  background: radial-gradient(circle, var(--brand) 0 3px, transparent 3.5px);
}

.big-type {
  background: linear-gradient(100deg, var(--aqua), var(--brand) 70%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font: 800 clamp(4rem, 9vw, 5.6rem)/1 var(--font-display);
  letter-spacing: -0.03em;
}

.highlight-visual-route .route-diagram {
  gap: 24px;
}

.highlight-visual-big-type .big-type {
  font-size: clamp(2.6rem, 5.4vw, 3.5rem);
}

/* Statement */

.statement .container {
  display: grid;
  justify-items: center;
  gap: 32px;
  text-align: center;
}

.statement h2 {
  max-width: 900px;
  font-size: clamp(2.6rem, 6vw, 5rem);
  line-height: 1;
  letter-spacing: -0.03em;
}

.statement p {
  max-width: 760px;
  color: var(--gray);
  font-size: clamp(1.15rem, 1.8vw, 1.4rem);
  line-height: 1.55;
}

.statement strong {
  color: var(--light);
  font-weight: 600;
}

/* Honesty: what Arrive can't do, said plainly in big two-tone type (white, then blue-gray). */

.honesty .container {
  display: grid;
  justify-items: center;
}

.honesty-body {
  display: grid;
  justify-items: center;
  gap: 24px;
  max-width: 900px;
  text-align: center;
}

.honesty h2 {
  font-size: clamp(2.6rem, 6vw, 5rem);
  line-height: 1.02;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.honesty h2 span {
  color: var(--gray);
}

.honesty-lead {
  max-width: 680px;
  color: var(--light);
  font-size: clamp(1.15rem, 1.8vw, 1.4rem);
  line-height: 1.55;
}

/* The coverage map under the statement (coverage-map.js): the world in dots with Arrive's regions lit, and a
   legend in the app's status style. */

.coverage {
  display: grid;
  gap: 24px;
  width: 100%;
  margin-top: 56px;
}

.coverage-map canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.coverage-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 32px;
}

.coverage-legend .is-testing .status-led {
  background: var(--aqua);
  box-shadow: var(--aqua-glow);
}

/* A small map of North America where servers keep lighting up (server-map.js). */
.server-map {
  width: min(100%, 420px);
}

.server-map canvas {
  display: block;
  width: 100%;
  height: 100%;
}

/* The hopeful part: aqua, as the app marks what's going well. */
.honesty-note {
  color: var(--aqua);
  font: 700 clamp(1.15rem, 1.8vw, 1.4rem) / 1.35 var(--font-display);
}

/* FAQ: one panel, one answer open at a time, and a visual for the open answer on the right (after the
   iPad page's "Significant others" section). */

.faq-panel {
  position: relative;
  display: grid;
  /* Tall enough for the longest open answer, so the panel keeps one height as answers change. */
  --panel-height: 640px;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  min-height: var(--panel-height);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(70% 60% at 100% 100%, rgba(254, 45, 118, 0.07), transparent 70%),
    var(--tile-bg);
}

/* Centred in the panel: as answers open and close, the questions glide up or down to stay centred. */
.faq-list {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 40px 32px 40px 48px;
}

.faq-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: 100%;
  padding: 16px 0;
  color: var(--light);
  font: 700 clamp(1.35rem, 2vw, 1.7rem)/1.25 var(--font-display);
  text-align: left;
}

/* Closed answers collapse to nothing; opening one grows it to its own height. */
.faq-panel.is-ready .faq-tray {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.45s var(--ease-out);
}

.faq-panel.is-ready .faq-item.is-open .faq-tray {
  grid-template-rows: 1fr;
}

.faq-tray-inner {
  min-height: 0;
  overflow: hidden;
}

.faq-body {
  padding: 0 0 20px;
  color: var(--text);
  font-size: var(--text-body);
  line-height: var(--leading-body);
}

.faq-body p + p,
.faq-body p + ul,
.faq-body ul + p {
  margin-top: 12px;
}

.faq-body ul {
  padding-left: 20px;
  list-style: disc;
}

.faq-body strong {
  color: var(--contrast);
}

.faq-body h6 {
  margin: 8px 0 0;
  color: var(--gray);
  font-size: 15px;
  font-weight: 400;
}

.faq-see-all {
  margin-top: 12px;
  padding-top: 8px;
  border-top: 1px solid var(--hairline);
}

/* Each answer's visual fills the panel's right half while its answer is open. */
.faq-visual {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  display: grid;
  place-items: center;
  width: 50%;
  padding: 48px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.45s ease;
}

.faq-item.is-open .faq-visual {
  opacity: 1;
}

/* The app's subscription picker: the free plan chosen, the Supporter plan alongside. */
.plan-list {
  display: grid;
  gap: 12px;
  width: min(100%, 400px);
}

.plan-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  background: var(--glass-bg);
  color: var(--gray);
  font-size: 14px;
}

.plan-row.selected {
  border-color: rgba(254, 45, 118, 0.7);
  background: radial-gradient(200% 200% at 50% 25%, var(--brand-bg) 0%, transparent 60%), var(--primary);
}

.plan-row i {
  flex: none;
  width: 16px;
  height: 16px;
  border: 1.5px solid var(--disabled);
  border-radius: 50%;
}

.plan-row.selected i {
  border-color: var(--brand);
  background: radial-gradient(circle, var(--brand) 0 3.5px, transparent 4px);
}

.plan-row span {
  display: grid;
  flex: 1;
  gap: 2px;
  min-width: 0;
}

.plan-row strong {
  color: var(--light);
  font: 800 1rem/1.2 var(--font-display);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.plan-row b {
  flex: none;
  margin-left: auto;
  color: var(--light);
  font: 800 1.6rem/1 var(--font-display);
}

.region-list,
.toggle-list,
.game-tiles.is-panel {
  width: min(100%, 380px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  background: var(--glass-bg);
  box-shadow: var(--shadow-float);
}

.region-row,
.toggle-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 20px;
  color: var(--light);
  font-weight: 600;
}

.region-row + .region-row,
.toggle-row + .toggle-row {
  border-top: 1px solid var(--hairline);
}

.region-row b {
  margin-left: auto;
  color: var(--gray);
  font: 700 12px/1 var(--font-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.region-row.on .status-led {
  background: var(--brand);
  box-shadow: var(--brand-glow);
}

.region-row.on b {
  color: var(--contrast);
}

/* The app's server-list badge. */
.region-row em {
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  background: var(--aqua-soft);
  color: var(--aqua);
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.game-tiles.is-panel {
  display: grid;
  gap: 4px;
  padding: 10px;
}

.game-tiles.is-panel li {
  padding: 6px 8px;
}

.route-diagram {
  position: relative;
  display: grid;
  gap: 48px;
  width: min(100%, 340px);
}

/* The route line: aqua where you start, pink at the server, as on the map. */
.route-diagram::before {
  content: '';
  position: absolute;
  top: 12px;
  bottom: 12px;
  left: 11px;
  width: 2px;
  border-radius: 1px;
  background: linear-gradient(180deg, var(--aqua), var(--brand));
  box-shadow: 0 0 10px rgba(254, 45, 118, 0.3);
}

.route-node {
  position: relative;
  display: grid;
  padding-left: 44px;
  color: var(--gray);
  font-size: 15px;
}

.route-node strong {
  color: var(--light);
  font: 700 1.2rem/1.3 var(--font-display);
}

.route-dot {
  position: absolute;
  top: 4px;
  left: 3px;
  width: 18px;
  height: 18px;
  border: 3px solid #1a1d26;
  border-radius: 50%;
}

.route-node.you .route-dot {
  background: var(--aqua);
}

.route-node.arrive .route-dot {
  background: var(--light);
}

.route-node.server .route-dot {
  background: var(--brand);
  box-shadow: 0 0 10px 1px rgba(254, 45, 118, 0.55);
}

.ping-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  width: min(100%, 380px);
}

.ping-compare > div {
  display: grid;
  gap: 10px;
  padding: 22px;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  background: var(--glass-bg);
}

.ping-compare span {
  color: var(--gray);
  font-size: 14px;
  font-weight: 600;
}

.ping-compare strong {
  color: var(--light);
  font: 800 3rem/1 var(--font-display);
  letter-spacing: -0.02em;
}

.ping-compare small {
  margin-left: 3px;
  color: var(--gray);
  font-size: 0.9rem;
  text-transform: uppercase;
}

.ping-compare p {
  grid-column: 1 / -1;
  color: var(--gray);
  font-size: 14px;
  text-align: center;
}

/* The app's settings toggle. */
.toggle {
  position: relative;
  flex: none;
  width: 42px;
  height: 22px;
  margin-left: auto;
  border: 1.5px solid var(--light);
  border-radius: var(--radius-xs);
  background: #0f1219;
}

.toggle::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--disabled);
}

.toggle.on::after {
  left: auto;
  right: 3px;
  background: var(--brand);
}

@media (max-width: 960px) {
  /* The whole hero, headline and button included, fits the first screen; the globe sits behind it. */
  .hero {
    min-height: calc(100svh - var(--header-height));
    padding-bottom: 40px;
  }

  .route-card {
    display: none;
  }


  .faq-panel {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .faq-list {
    padding: 16px 24px;
  }

  .faq-visual {
    position: static;
    width: auto;
    margin-bottom: 24px;
    padding: 8px 0;
    opacity: 1;
  }
}

@media (max-width: 560px) {
  /* A long centred paragraph is hard to read on a phone. */
  .statement .container {
    justify-items: start;
    text-align: left;
  }

  .statement h2 {
    font-size: 1.5rem;
  }

  .statement p,
  .honesty-lead {
    font-size: var(--text-lead);
  }

  .honesty-body {
    justify-items: start;
    text-align: left;
  }

  .honesty-note {
    font-size: 1.0625rem;
  }

  .coverage-legend {
    justify-content: flex-start;
  }

  .honesty h2 {
    font-size: 1.75rem;
  }

  .faq-button {
    font-size: 1rem;
  }

  .hero-download p {
    font-size: 1rem;
  }

  .br-narrow {
    display: inline;
  }

  .highlight-tile {
    gap: 16px;
    height: 360px;
    padding: 28px 24px 24px;
  }

  .ping-value {
    font-size: 5.5rem;
  }
}
