/* Zero Social homepage (version F of design/landing-revamp): version E's world without the goal
   picker. Loads version C's design system and version E's styles first (/landing/c.css,
   /landing/e.css) and adds what a page built from the app's data needs: names that stream past,
   one community at a time ringed by its goals, the numbers behind loneliness and scams, and the
   line a link or the visitor's city can put in the hero. */

/* ── hero: the words arrive straight away, not after the film's intro ───── */
@media (prefers-reduced-motion: no-preference) {
  .js .ch.hero [data-split] .w { animation: arrive 0.7s var(--ease) both; animation-delay: calc(var(--i) * 26ms); }
  .js .ch.hero .fade { animation: arrive 0.7s var(--ease) both; animation-delay: calc(var(--d, 0.35s) * 0.45); }
}
@keyframes arrive { from { opacity: 0; filter: blur(8px); transform: translateY(0.25em); } to { opacity: 1; filter: none; transform: none; } }
.still .ch.hero [data-split] .w, .still .ch.hero .fade { animation: none; }

/* a line only when the page already knows why you came */
.tailor { display: flex; align-items: center; gap: 10px; width: fit-content; max-width: 100%; margin: 26px auto 0; padding: 6px 20px 6px 6px; border-radius: 9999px; background: rgba(22, 22, 27, 0.62); border: 1px solid var(--edge-strong); font: 600 15px/1.35 var(--sans); color: var(--ink); text-align: left; -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.tailor[hidden] { display: none; }
.tailor .mk { flex: none; width: 38px; height: 36px; object-fit: contain; }
.tailor .glyph { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, 0.1); font-size: 13px; font-weight: 700; }
.tailor + .ctas { margin-top: 22px; }

/* ── names that stream past: every community of a kind ──────────────────── */
.stream { position: relative; width: min(620px, 100%); margin: 16px auto 0; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent); mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent); }
.stream .lane { display: flex; width: max-content; animation: lane var(--s, 40s) linear infinite; }
.stream ul { display: flex; margin: 0; padding: 0; list-style: none; }
.stream li { display: flex; align-items: center; font: 500 15px/24px var(--sans); color: var(--muted); white-space: nowrap; }
.stream li::after { content: ''; width: 4px; height: 4px; margin: 0 14px; border-radius: 50%; background: var(--secondary); }
.stream:hover .lane { animation-play-state: paused; }
@keyframes lane { to { transform: translateX(-50%); } }

/* communities: each kind's step carries its stream; the link to all of them sits under it.
   The column is fixed so a stream's long lane can't widen it. */
#communities .copy.bottom { width: min(680px, 100%); }
#communities .steps { grid-template-columns: minmax(0, 1fr); }
#communities .steps > [data-k] { width: 100%; min-width: 0; }
.browse { display: inline-flex; align-items: center; gap: 8px; margin: 20px auto 0; padding: 5px 16px 5px 5px; border-radius: 9999px; border: 1px solid var(--edge-strong); background: rgba(22, 22, 27, 0.55); font: 600 14px/1 var(--sans); color: var(--ink); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); transition: border-color 0.2s; }
.browse:hover { border-color: rgba(255, 255, 255, 0.32); }
.browse img { width: 32px; height: 30px; object-fit: contain; }

/* ── goals: one community in the middle, its goals around it ───────────────
   main.js places each goal on an ellipse (--rx, --ry) and folds them in and out between
   communities (--dx, --dy point each one at the middle). The kind sets the colour (--c). */
#goals .copy.top .sub { margin-top: 14px; }
.orbit { position: relative; z-index: 2; align-self: stretch; justify-self: center; width: min(1180px, 100%); min-height: 300px; }
.orbit .path { position: absolute; left: 50%; top: 50%; width: calc(var(--rx, 300px) * 2); height: calc(var(--ry, 160px) * 2); transform: translate(-50%, -50%); border-radius: 50%; border: 1px solid color-mix(in srgb, var(--c, #fff) 38%, transparent); box-shadow: 0 0 40px color-mix(in srgb, var(--c, #fff) 14%, transparent), inset 0 0 40px color-mix(in srgb, var(--c, #fff) 10%, transparent); transition: border-color 0.6s, box-shadow 0.6s; pointer-events: none; }
.orbit .path[hidden] { display: none; }
.core { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: grid; justify-items: center; text-align: center; transition: opacity 0.45s var(--ease), transform 0.55s var(--ease); }
.core-glow { position: absolute; left: 50%; top: 42%; width: 280px; height: 280px; transform: translate(-50%, -50%); border-radius: 50%; background: radial-gradient(closest-side, color-mix(in srgb, var(--c, #fff) 26%, transparent), transparent); pointer-events: none; }
.core-mark { position: relative; width: 132px; height: 124px; object-fit: contain; filter: drop-shadow(0 26px 30px rgba(0, 0, 0, 0.55)); animation: bob 6s ease-in-out infinite alternate; }
.core-mark.glyph { width: 104px; height: 104px; border-radius: 50%; display: grid; place-items: center; background: var(--c); color: #121212; font: 700 32px/1 var(--sans); box-shadow: 0 0 40px color-mix(in srgb, var(--c) 60%, transparent); filter: none; }
.core-kind { position: relative; margin: 14px 0 0; font: 600 11.5px/16px var(--sans); letter-spacing: 0.16em; text-transform: uppercase; color: var(--tertiary); }
.core-kind .kdot { width: 8px; height: 8px; margin-right: 8px; vertical-align: 0.1em; }
.core-name { position: relative; margin: 4px 0 0; font: 300 clamp(30px, 3.2vw, 46px)/1.05 var(--sans); letter-spacing: -0.035em; color: var(--ink-bright); white-space: nowrap; }
.moons { margin: 0; padding: 0; list-style: none; }
.moon {
  position: absolute; display: flex; align-items: center; gap: 12px; transform: translate(-50%, -50%);
  transition: transform 0.75s cubic-bezier(0.34, 1.4, 0.64, 1), opacity 0.45s var(--ease); transition-delay: calc(var(--i) * 60ms);
}
.moon.l { flex-direction: row-reverse; text-align: right; }
.moon.c { flex-direction: column; text-align: center; gap: 8px; }
/* the name and detail hang off the goal's outer side, so the goal itself sits on the ring */
.moon.r { transform: translate(-36px, -50%); }
.moon.l { transform: translate(calc(-100% + 36px), -50%); }
.moon-mark { position: relative; flex: none; width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; background: rgba(24, 24, 30, 0.72); border: 1px solid var(--edge-strong); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); transition: transform 0.45s var(--ease), border-color 0.45s, box-shadow 0.45s; animation: bob 5s ease-in-out infinite alternate; animation-delay: calc(var(--i) * -0.8s); }
.mm { width: 52px; height: 50px; object-fit: contain; }
.mm.glyph { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, 0.08); color: var(--ink); font: 700 15px/1 var(--sans); }
.moon-text { display: grid; gap: 2px; max-width: 220px; }
.moon-text b { font: 600 16px/21px var(--sans); color: var(--ink-bright); white-space: nowrap; }
.moon-text small { font-size: 12.5px; line-height: 17px; color: var(--tertiary); }
/* each goal rings in the community's colour */
.moon-mark { border-color: color-mix(in srgb, var(--c, #fff) 45%, transparent); box-shadow: 0 0 22px color-mix(in srgb, var(--c, #fff) 22%, transparent); }
/* between communities: the goals fold into the middle and the community fades */
.orbit.out .moon, .orbit.pre .moon { opacity: 0; transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(0.2); transition-delay: 0s; }
.orbit.pre .moon { transition: none; }
.orbit.out .core { opacity: 0; transform: translate(-50%, -50%) scale(0.88); }
/* under the ring: the note on wide screens; on phones, where the goals are icons alone, their names */
.orbit-note { margin: 0 auto; }
.spot { display: none; margin: 0 auto; max-width: 40ch; font-size: 14.5px; line-height: 1.6; color: var(--muted); text-wrap: balance; }

/* words that should break as a pair, never apart */
.nw { white-space: nowrap; }

/* ── one to one, or small groups ────────────────────────────────────────── */
#connect .step-h { max-width: 22ch; margin-left: auto; margin-right: auto; }

/* ── why Zero: longer copy inside the logo drawn in dots ────────────────── */
.hole.wide { max-width: min(560px, 74vw); }
.hole.wide .step-h { font-size: clamp(24px, 2.3vw, 38px); }
.hole.wide .read { display: inline-block; margin-top: 10px; font-size: 14px; line-height: 1.5; color: var(--muted); border-bottom: 1px solid var(--edge-strong); }
.hole.wide .read:hover { color: var(--ink); }

/* ── why loneliness and scams: one number at a time, with its source ────── */
.problems { width: min(980px, 100%); }
.stat-deck { display: grid; margin: 30px auto 0; }
.stat {
  grid-area: 1 / 1; display: grid; justify-items: center; align-content: center; gap: 8px;
  opacity: 0; transform: translateY(16px); filter: blur(8px); pointer-events: none;
  transition: opacity 0.6s var(--ease), transform 0.7s var(--ease), filter 0.6s var(--ease);
}
.stat.is { opacity: 1; transform: none; filter: none; pointer-events: auto; }
.stat-k { margin: 0 0 4px; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px 14px; font: 600 12px/16px var(--sans); letter-spacing: 0.18em; text-transform: uppercase; color: var(--tertiary); }
.stat b { font: 300 clamp(56px, 8vw, 124px)/1 var(--sans); letter-spacing: -0.05em; color: var(--ink-bright); white-space: nowrap; }
.stat span { max-width: 36ch; font-size: clamp(16px, 1.45vw, 21px); line-height: 1.5; color: var(--muted); text-wrap: balance; }
.stat a { margin-top: 4px; font-size: 13px; line-height: 18px; color: var(--tertiary); border-bottom: 1px solid var(--edge-strong); }
.stat a:hover { color: var(--ink); }
.worse { display: inline-flex; align-items: center; gap: 7px; color: #f59a7a; }
.worse::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #f5826a; box-shadow: 0 0 10px #f5826a; }
.stat-dots { display: flex; justify-content: center; gap: 8px; margin-top: 30px; }
.stat-dots button { width: 22px; height: 4px; padding: 0; border: 0; border-radius: 4px; background: rgba(232, 232, 232, 0.22); cursor: pointer; transition: background 0.3s, width 0.35s var(--ease); }
.stat-dots button:hover { background: rgba(232, 232, 232, 0.5); }
.stat-dots button[aria-current="true"] { width: 38px; background: var(--ink); }
/* a bigger hit area than the bar itself */
.stat-dots button { position: relative; }
.stat-dots button::after { content: ''; position: absolute; inset: -12px -4px; }

@media (prefers-reduced-motion: reduce) {
  .stream .lane, .core-mark, .moon-mark { animation: none; }
  .moon, .core, .stat { transition: none; }
}

/* ── phone ──────────────────────────────────────────────────────────────── */
@media (max-width: 760px) {
  .tailor { margin-top: 18px; font-size: 14px; padding-right: 16px; }
  .tailor .mk { width: 32px; height: 30px; }
  .stream li { font-size: 14px; }
  .stream li::after { margin: 0 11px; }
  #communities .ticker { display: none; }
  .browse { margin-top: 14px; font-size: 13px; }
  /* the goals are icons alone on a phone, and named under the ring instead of the note */
  .moon-text { display: none; }
  .orbit-note { display: none; }
  .spot { display: block; }
  .moon.r, .moon.l { transform: translate(-50%, -50%); }
  .moon-mark { width: 54px; height: 54px; }
  .mm { width: 38px; height: 36px; }
  .mm.glyph { width: 34px; height: 34px; font-size: 12.5px; }
  .core-mark { width: 92px; height: 86px; }
  .core-mark.glyph { width: 76px; height: 76px; font-size: 24px; }
  .core-glow { width: 200px; height: 200px; }
  .core-name { font-size: 28px; }
  .hole.wide { max-width: 64vw; }
  .hole.wide .step-h { font-size: clamp(18px, 5.4vw, 23px); }
  .hole.wide .step-p { font-size: 13px; line-height: 18px; }
  .hole.wide .read { font-size: 12.5px; }
  .stat-deck { margin-top: 22px; }
  .stat b { font-size: clamp(40px, 11.5vw, 56px); }
  .stat span { font-size: 15.5px; }
  .stat-dots { margin-top: 22px; }
}
