/* ==========================================================
   JOURNA :: THE HOME PAGE
   Orientation (the owner's "Journa Home Page Redesign", Phase 1, 2026-11-23): Explore and Build (Participate was removed by the owner's
   "Eliminate Participate", 2026-11-24). Each activity keeps one colour from the roles of prompt 01: Explore the Adventurer's blue, Build
   the Pilot's green.
   ========================================================== */

[data-verb="explore"] { --verb: var(--adventurer); }
[data-verb="build"] { --verb: var(--pilot); }

.home-hero { position: relative; isolation: isolate; text-align: center; padding: 3.2rem 0 5rem; }
/* The faint lines of a chart behind the knot, fading out toward the edges (the nautical touches, 2026-11-24). */
.home-hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: linear-gradient(var(--chart-line) 1px, transparent 1px), linear-gradient(90deg, var(--chart-line) 1px, transparent 1px);
  background-size: 56px 56px; background-position: center 1.6rem;
  -webkit-mask-image: radial-gradient(ellipse 62% 64% at 50% 40%, #000 30%, transparent 78%);
  mask-image: radial-gradient(ellipse 62% 64% at 50% 40%, #000 30%, transparent 78%);
}
/* A compass rose under the knot, centred on the rope rather than on the picture. Its ring may cross the World names (the owner,
   2026-11-24): the names carry a halo of the page's colour so they stay easy to read where it does. */
.home-ring .compass-rose {
  position: absolute; z-index: 0; pointer-events: none; width: calc(var(--knot) * 1.14); height: auto;
  left: calc(50% + var(--knot) * .01); top: 53.5%; transform: translate(-50%, -50%);
  color: var(--rope); opacity: .2;
}
/* The knot lies over the ropes that tie the Worlds to it; the pointer passes through the picture to the names beneath its margins. */
.home-ring > .ring { position: relative; z-index: 1; }
.home-ring > h1 { position: relative; z-index: 2; pointer-events: none; }
.home-hero h1 { font-size: clamp(2.1rem, 6.5vw, 3.4rem); line-height: 1.12; font-weight: 600; max-width: 16ch; margin: 0 auto 1.8rem; }
/* The knot stands for the words "Every journey begins somewhere." (the owner, 2026-11-24); they stay as its alt text. The seven Worlds
   sit around it as Wikipedia sets its languages around the globe: three on the left, right-aligned, four on the right, each following
   the curve of the knot (those nearest the top and bottom come closer). The picture has empty margins, so the names reach into them. */
.home-ring { --knot: min(300px, 44vw); position: relative; display: grid; grid-template-columns: 1fr var(--knot) 1fr; max-width: 48rem; margin: 0 auto calc(var(--knot) * .12 + .9rem); }
.home-ring > h1 { grid-column: 2; grid-row: 1; max-width: none; margin: 0; }
.home-knot { display: block; width: 100%; height: auto; }
.ring { grid-column: 1 / -1; grid-row: 1; display: grid; grid-template-columns: 1fr calc(var(--knot) * .74) 1fr; pointer-events: none; }
.ring-side {
  list-style: none; margin: 0; padding: calc(var(--knot) * .16) 0 calc(var(--knot) * .06); display: flex; flex-direction: column;
  justify-content: space-around; pointer-events: auto;
}
.ring-left { grid-column: 1; align-items: flex-end; text-align: right; }
.ring-right { grid-column: 3; align-items: flex-start; text-align: left; }
.ring a { display: grid; gap: .05rem; padding: .25rem .45rem; border-radius: var(--radius-sm); color: var(--world-ink, var(--ink)); text-decoration: none; text-shadow: 0 0 3px var(--page), 0 0 6px var(--page); }
.ring-name { font: 400 clamp(1.1rem, 3.6vw, 1.45rem)/1.15 var(--display); font-synthesis: none; }
.ring-count { font: clamp(.72rem, 2.3vw, .84rem)/1.3 var(--sans); color: var(--ink-soft); white-space: nowrap; }
@media (max-width: 380px) { .ring a { padding: .2rem .25rem; } }
.ring a:hover .ring-name, .ring a:focus-visible .ring-name { text-decoration: underline; text-underline-offset: 4px; }
/* People stays a little out: the rope's frayed end reaches toward it at the top left. */
.ring-left li:first-child { transform: translateX(calc(var(--knot) * .01)); }
.ring-left li:last-child { transform: translateX(calc(var(--knot) * .08)); }
/* Objects stays out, a little further than the others: the rope's loose end rises at the top right of the knot. */
.ring-right li:first-child { transform: translateX(calc(var(--knot) * .07)); }
.ring-right li:last-child { transform: translateX(calc(var(--knot) * -.1)); }
.ring-right li:nth-child(2), .ring-right li:nth-child(3) { transform: translateX(calc(var(--knot) * .02)); }
/* The rope from each World to the knot (measured by js/home.js): it starts beside the name and ends under the ball of rope. */
.ring li { position: relative; transition: translate .35s ease; }
.home-ring.is-roped .ring li::before {
  content: ""; position: absolute; left: var(--rope-x); top: var(--rope-y); width: var(--rope-length); height: 5px; margin-top: -2.5px;
  transform-origin: 0 50%; transform: rotate(var(--rope-angle)); z-index: -1; pointer-events: none;
  background: url("/img/rope.svg") repeat-x 0 50% / auto 5px; opacity: .55; transition: opacity .35s ease;
}
/* Pointed at, or reached with the keyboard, a World moves toward the knot along its rope. */
.ring li:hover, .ring li:focus-within { translate: var(--pull-x, 0) var(--pull-y, 0); }
.ring li:hover::before, .ring li:focus-within::before { opacity: .9; }
.home-ring.is-measuring .ring li { translate: none; transition: none; }
@media (prefers-reduced-motion: reduce) { .ring li, .ring li::before { transition: none; } }
/* A World with no Expedition yet says so; pointed at, it invites the first (a nudge, never a push). */
.ring-begin { display: none; color: var(--navigator-ink); font-weight: 600; }
.ring li[data-empty="true"]:hover .ring-n, .ring li[data-empty="true"]:focus-within .ring-n { display: none; }
.ring li[data-empty="true"]:hover .ring-begin, .ring li[data-empty="true"]:focus-within .ring-begin { display: inline; }
.home-verbs { position: relative; z-index: 1; list-style: none; margin: 0 auto; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem 1.6rem; }
.home-verbs a { display: grid; justify-items: center; gap: .15rem; padding: .45rem .7rem; border-radius: var(--radius-sm); color: var(--ink); text-decoration: none; }
.home-verbs .verb { font: 400 clamp(1.55rem, 4.8vw, 2.2rem)/1.2 var(--display); font-synthesis: none; }
.home-verbs .means { font: 600 .8rem var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--verb); }
.home-verbs a:hover .verb, .home-verbs a:focus-visible .verb { text-decoration: underline; text-decoration-color: var(--verb); text-underline-offset: 6px; }

/* Each activity begins below a length of rope instead of a plain line (img/rope.svg). */
.activity-section { padding: 0 0 2.2rem; scroll-margin-top: 8.5rem; }
.activity-section::before {
  content: ""; display: block; height: 8px; margin-bottom: 2.5rem; background: url("/img/rope.svg") repeat-x 0 50% / auto 8px; opacity: .85;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.activity-head { margin-bottom: 1.1rem; }
.activity-head .kicker { color: var(--verb); font-weight: 600; }
.activity-head h2 { font-size: clamp(1.7rem, 4.5vw, 2.3rem); }
.activity-questions { margin: .35rem 0 0; color: var(--ink-soft); font-size: 1.08rem; }

/* Gathering support, under Explore's front (it was the Participate section until 2026-11-24). */
.support-lines { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
@media (min-width: 860px) { .support-lines { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.support-lines li { display: grid; gap: .12rem; padding: .75rem 1rem; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--world, var(--line-strong)); border-radius: var(--radius-sm); }
.support-title { font: 600 1.06rem var(--serif); color: var(--ink); }
.support-act { justify-self: start; margin-top: .2rem; font: 600 .9rem var(--sans); color: var(--navigator-ink); }
.build-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin: .4rem 0 1rem; }
.build-tools { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.build-tools a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 .95rem; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 999px; font: .95rem var(--sans); color: var(--ink-soft); text-decoration: none; }
.build-tools a:hover { color: var(--ink); border-color: var(--pilot); }
.build-expeditions { margin-bottom: .6rem; }
.build-expeditions a { color: var(--ink); font-weight: 600; }
.build-chapters .chapter:first-child { text-align: center; border-top: 0; }

/* On a phone the subheadline reads as the owner wrote it, one activity a line, each with what it means beside it. */
@media (max-width: 559px) {
  .home-verbs { flex-direction: column; align-items: center; gap: .1rem; }
  .home-verbs a { grid-auto-flow: column; align-items: baseline; gap: .7rem; padding: .3rem .6rem; }
}

/* The waves under the knot as three strands of rope (2026-11-24): a strand in each role's colour, crossed by the marks of its twist. */
.home-hero .hero-strand { opacity: .7; }
.hero-strand .strand { fill: none; }
.hero-strand .strand-body { stroke-width: 4.5; stroke-linecap: round; }
.hero-strand .strand-twist { stroke: rgba(54, 38, 22, .34); stroke-width: 4.5; stroke-dasharray: 2 3.2; }

/* "The homepage is Explore" (the owner's Lifecycle Redesign, 2026-11-24): under the seven Worlds, what is new, as Wikipedia's main page
   sets it out. Published journeys and "Did you know" side by side on a wide screen, the journeys seeking a Founder below. The cards are
   css/charts.css. */
.explore-front { display: grid; gap: 1.8rem; margin-top: 2rem; }
@media (min-width: 980px) {
  .explore-front:has(#front-discovered) { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
  .explore-front:has(#front-discovered) > #front-seeking, .explore-front > #front-gathering, .explore-front > .front-more { grid-column: 1 / -1; }
}
.front-part h3 { font-size: 1.15rem; margin: 0 0 .25rem; }
.front-part > .faint { margin: 0 0 .8rem; }
.front-more { margin: .7rem 0 0; font: .95rem var(--sans); }
.did-you-know { list-style: none; margin: .55rem 0 0; padding: 0; display: grid; gap: .6rem; }
.did-you-know li { padding: .75rem 1rem; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--verb, var(--line-strong)); border-radius: var(--radius-sm); }
.did-you-know .said { color: var(--ink); }
.did-you-know a { display: block; margin-top: .3rem; font: 600 .88rem var(--sans); }
