/* The builds are planets. They are first seen from far off, set out in a row like balls,
   all the same size. Explore (or any planet) flies in to one. From there the
   planets stand one behind another in depth, and going to the next is a flight: the one
   you are at swells and passes, stars streak from the point ahead, and the next grows from
   a small world in the distance. The script places everything from two numbers: how far
   in from the row the camera is, and how far along the line of planets.
   Without the script the planets are simply listed down the page. */
main > section.hop-section { position:relative; max-width:none; margin:0; padding:clamp(30px,6vw,70px) 0 clamp(50px,7vw,90px); color-scheme:dark; }
.hop-section .section-title { max-width:1040px; margin:0 auto clamp(4px,1.4vw,16px); padding:0 clamp(22px,5vw,60px); box-sizing:border-box; }
.hop { position:relative; outline:0; }
/* Live, the stage is the whole window: nothing a planet does on its way past is cut short by
   an edge you can see. The heading lies over the top of it and belongs to the far-off view. */
main > section.hop-section.is-live { padding:0; }
.hop-section.is-live .section-title { position:absolute; left:0; right:0; top:clamp(84px,11vh,120px); z-index:700; margin:0 auto; pointer-events:none; }
.hop:focus-visible { box-shadow:inset 0 0 0 2px rgba(165,191,255,.5); }
.hop-warp { display:none; position:absolute; inset:0; width:100%; height:100%; pointer-events:none; }
.hop-stops { margin:0; padding:0; list-style:none; }
.hop-stop { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); align-items:center; gap:clamp(24px,5vw,80px); padding:clamp(20px,4vw,50px) max(clamp(22px,5vw,60px), calc(50vw - 520px)); }
.hop.is-live { overflow:hidden; touch-action:pan-y; -webkit-user-select:none; user-select:none; cursor:grab; }
.hop.is-live.is-held { cursor:grabbing; }
.hop.is-live .hop-warp { display:block; }
.hop.is-live .hop-stops { position:relative; height:100vh; height:100svh; min-height:560px; }
.hop.is-live .hop-stop { display:contents; }
.hop.is-live .planet { position:absolute; left:50%; top:50%; margin:calc(var(--d) / -2) 0 0 calc(var(--d) / -2); visibility:hidden; transform-origin:50% 50%; }
.hop.is-map .planet { cursor:pointer; }
.hop.is-live .hop-text { position:absolute; left:57%; top:50%; width:min(38%,30em); transform:translate3d(0,-50%,0); opacity:0; visibility:hidden; cursor:auto; }
.hop.is-live .hop-text a { -webkit-user-select:none; user-select:none; }
/* The planet: a lit globe whose surface turns, with whatever orbits it. */
.planet { --d:min(34vw,50vh,400px); --tint:150,180,255; position:relative; justify-self:center; width:var(--d); height:var(--d); font-size:var(--d); }
/* Only the planets being flown between are kept ready to move, and only the one arrived at turns:
   a phone should not hold nine globes in memory at once. */
.hop .planet.is-near { will-change:transform, opacity; }
.planet-globe { position:absolute; inset:0; border-radius:50%; overflow:hidden; background:rgb(var(--tint)); box-shadow:0 0 .16em rgba(var(--tint),.28), 0 0 .5em rgba(var(--tint),.12); transform:rotate(var(--tilt,-12deg)); }
.planet-surface { position:absolute; inset:0 auto 0 0; width:200%; background-repeat:repeat-x; background-size:50% 100%; }
.hop-stop.is-here .planet-surface { animation:planet-turn var(--day,90s) linear infinite; }
@keyframes planet-turn { to { transform:translate3d(-50%,0,0); } }
/* Day and night: light from the upper left, and a thin rim of atmosphere. */
.planet-globe::after { content:""; position:absolute; inset:0; border-radius:50%; transform:rotate(calc(var(--tilt,-12deg) * -1));
  background:radial-gradient(circle at 30% 28%, rgba(255,255,255,.2), rgba(255,255,255,0) 34%), radial-gradient(circle at 34% 32%, rgba(0,0,0,0) 46%, rgba(0,0,0,.62) 74%, rgba(0,0,0,.92) 100%);
  box-shadow:inset .012em .012em .03em rgba(255,255,255,.35); }
.planet-ring, .planet-moon { display:none; position:absolute; }
/* Local Legislation: pale blue marble under white cloud. */
.planet-legislation { --tint:132,170,236; --day:110s; }
.planet-legislation .planet-surface { background-color:#3f6fc4; background-image:radial-gradient(ellipse 22% 9% at 24% 30%, #eef4ff 0 60%, transparent 62%), radial-gradient(ellipse 30% 7% at 70% 44%, #dfe9ff 0 60%, transparent 62%), radial-gradient(ellipse 18% 6% at 40% 66%, #eef4ff 0 60%, transparent 62%), radial-gradient(ellipse 26% 8% at 84% 78%, #c9daff 0 60%, transparent 62%), linear-gradient(#5d8be0, #2c56a8); }
/* 27GOLF: fairway green, with the red ball for a moon. */
.planet-golf { --tint:86,190,120; --day:80s; --tilt:-18deg; }
.planet-golf .planet-surface { background-color:#1f7a45; background-image:radial-gradient(ellipse 16% 14% at 30% 38%, #5fd08a 0 60%, transparent 62%), radial-gradient(ellipse 12% 9% at 62% 62%, #e9dfb0 0 60%, transparent 62%), radial-gradient(ellipse 20% 12% at 78% 30%, #49b877 0 60%, transparent 62%), repeating-linear-gradient(0deg, #1d6f40 0 5%, #23844b 5% 10%); }
.planet-golf .planet-moon { display:block; top:6%; right:-4%; width:.11em; height:.11em; border-radius:50%; background:radial-gradient(circle at 34% 30%, #ff8a82, #e5322d 45%, #6e0f0c); box-shadow:0 0 .05em rgba(229,50,45,.5); }
/* Local Golf Sim: a course world, fairway and rough, a bunker and a pond, with the pin in. */
.planet-sim { --tint:120,200,110; --day:100s; --tilt:-6deg; }
.planet-sim .planet-surface { background-color:#2f7d3a; background-image:radial-gradient(ellipse 9% 7% at 22% 36%, #e9dcae 0 60%, transparent 63%), radial-gradient(ellipse 12% 9% at 64% 70%, #3d8fd6 0 60%, transparent 63%), radial-gradient(ellipse 30% 12% at 40% 52%, #7fd06c 0 62%, transparent 64%), radial-gradient(ellipse 26% 10% at 84% 30%, #6cc25c 0 62%, transparent 64%), radial-gradient(ellipse 8% 6% at 78% 56%, #e9dcae 0 60%, transparent 63%), linear-gradient(#358a40, #24652d); }
.planet-sim .planet-moon { display:block; left:56%; top:-15%; width:.012em; height:.2em; background:#f4f4f6; transform:rotate(10deg); transform-origin:50% 100%; }
.planet-sim .planet-moon::after { content:""; position:absolute; left:100%; top:0; border-left:.075em solid #ffd24a; border-top:.026em solid transparent; border-bottom:.026em solid transparent; }
/* Bricks by Ralc: a world built course on course. */
.planet-bricks { --tint:236,120,74; --day:100s; --tilt:0deg; }
.planet-bricks .planet-surface { background-color:#c2472a; background-size:12.5% 12.5%; background-repeat:repeat; background-image:radial-gradient(circle at 25% 50%, #f08a5c 0 12%, transparent 13%), radial-gradient(circle at 75% 50%, #f08a5c 0 12%, transparent 13%), linear-gradient(90deg, rgba(0,0,0,.28) 0 2%, transparent 2%), linear-gradient(rgba(0,0,0,.3) 0 5%, transparent 5%); }
/* Match Capital: violet, banded. */
.planet-match { --tint:150,120,255; --day:70s; --tilt:-24deg; }
.planet-match .planet-surface { background-image:linear-gradient(#2b1f6e 0 12%, #5a44c9 12% 24%, #8d77f0 24% 31%, #4a37ad 31% 48%, #b7a6ff 48% 53%, #6a52d6 53% 70%, #3a2a8f 70% 84%, #221857 84%); }
/* GrantExec: the big one, deep blue, ringed. */
.planet-grant { --tint:96,150,255; --day:120s; --tilt:-16deg; }
.planet-grant .planet-surface { background-image:radial-gradient(ellipse 14% 6% at 36% 58%, #cfe0ff 0 60%, transparent 62%), linear-gradient(#0d2a66 0 14%, #1b4fb4 14% 30%, #3f7cf0 30% 38%, #17409a 38% 55%, #5d93ff 55% 60%, #1d4aa8 60% 78%, #0c2458 78%); }
.planet-grant .planet-ring { display:block; inset:35% -24%; border-radius:50%; border:.035em solid rgba(190,212,255,.5); box-shadow:0 0 0 .02em rgba(190,212,255,.16), inset 0 0 0 .02em rgba(190,212,255,.2); transform:rotate(-16deg); }
.planet-grant .planet-ring.is-back { clip-path:inset(0 0 50% 0); }
.planet-grant .planet-ring.is-front { clip-path:inset(50% 0 0 0); }
/* Federal and State Tax Receipt: cream, with a red band and a blue one. */
.planet-tax { --tint:236,222,190; --day:95s; --tilt:-8deg; }
.planet-tax .planet-surface { background-image:linear-gradient(#e9dcc0 0 18%, #b9352f 18% 27%, #f2e8d2 27% 44%, #d9c8a4 44% 52%, #2f4f9e 52% 62%, #efe3c8 62% 80%, #c9b78f 80%); }
/* Terra Venture: land and sea, still forming. */
.planet-terra { --tint:110,190,170; --day:85s; --tilt:-20deg; }
.planet-terra .planet-surface { background-color:#1c5f86; background-image:radial-gradient(ellipse 20% 22% at 26% 40%, #5aa35c 0 55%, #8a7a4a 56% 62%, transparent 64%), radial-gradient(ellipse 14% 16% at 60% 66%, #6fb26a 0 55%, #8a7a4a 56% 62%, transparent 64%), radial-gradient(ellipse 18% 12% at 80% 28%, #4c8f52 0 55%, #8a7a4a 56% 62%, transparent 64%), linear-gradient(#2a7aa6, #134a6b); }
.planet-terra .planet-ring.is-back { display:block; inset:-9%; border-radius:50%; border:1px dashed rgba(255,255,255,.28); }
/* Deconstructed Prints: a world in facets. */
.planet-art { --tint:236,236,240; --day:60s; --tilt:0deg; }
.planet-art .planet-surface { background-color:#d8d8dc; background-size:25% 50%; background-repeat:repeat; background-image:conic-gradient(from 20deg at 30% 40%, #f4f4f6 0 70deg, #17181c 70deg 150deg, #e94f37 150deg 190deg, #8a8a93 190deg 280deg, #f4f4f6 280deg); }
/* The last stop is a star. */
.planet-contact { --tint:255,236,190; }
.planet-contact .planet-globe { background:radial-gradient(circle, #fff 0 30%, #ffe9b0 55%, #ffb35c 100%); box-shadow:0 0 .3em rgba(255,214,140,.7), 0 0 1em rgba(255,190,110,.35); }
.planet-contact .planet-globe::after, .planet-contact .planet-surface { display:none; }
/* What is written beside it. */
.hop-text { max-width:30em; }
/* Seen from far off: each planet's name under it, and the way in at the middle. */
.hop-name { display:none; }
.hop.is-live .hop-name { display:block; position:absolute; left:50%; top:50%; z-index:400; width:max-content; max-width:9.5em; margin:0; padding:6px 0; border:0; background:none; color:#d8d8e0; font:500 clamp(11.5px,1vw,13.5px)/1.25 'Inter',sans-serif; text-align:center; text-wrap:balance; text-shadow:0 0 5px #05060a, 0 0 5px #05060a, 0 0 9px #05060a; cursor:pointer; visibility:hidden; }
.hop-name:hover, .hop-name:focus-visible { color:#fff; }
.hop-name:focus-visible { outline:2px solid #a5bfff; outline-offset:2px; border-radius:6px; }
.hop-explore { display:none; }
.hop.is-live .hop-explore { display:block; position:absolute; left:50%; top:50%; z-index:500; transform:translate(-50%,-50%) scale(.92); padding:15px 30px; border:0; border-radius:999px; background:#f4f4f6; color:#05060a;
  font:700 16px/1 'Archivo',sans-serif; letter-spacing:.01em; cursor:pointer; opacity:0; visibility:hidden; transition:opacity .35s ease, transform .35s ease, visibility 0s .35s; box-shadow:0 0 0 8px rgba(244,244,246,.08), 0 0 40px rgba(207,224,255,.25); }
.hop.is-map .hop-explore { opacity:1; visibility:visible; transform:translate(-50%,-50%); transition:opacity .35s ease, transform .35s ease; }
.hop-explore:hover, .hop-explore:focus-visible { background:#fff; box-shadow:0 0 0 10px rgba(244,244,246,.14), 0 0 50px rgba(207,224,255,.4); outline:0; }
/* Business or personal project: a quiet label under the name. */
.hop-tag { display:inline-flex; align-items:center; gap:7px; margin:0 0 16px; padding:5px 12px 5px 10px; border:1px solid rgba(255,255,255,.2); border-radius:999px; color:#d8d8e0; font:500 13px/1.2 'Inter',sans-serif; }
.hop-tag::before { content:""; width:6px; height:6px; border-radius:50%; background:#d8d8e0; }
.hop-tag.is-business { border-color:rgba(165,191,255,.45); background:rgba(165,191,255,.1); color:#cfdcff; }
.hop-tag.is-business::before { background:#a5bfff; }
.hop-text h3 { margin:0 0 12px; font-family:'Archivo',sans-serif; font-weight:800; font-size:clamp(30px,4.4vw,56px); line-height:1.02; letter-spacing:-.035em; text-wrap:balance; }
.hop-text p { margin:0 0 12px; color:#c4c4cd; font-size:clamp(15px,1.25vw,17px); line-height:1.6; }
.hop-text p.hop-quiet { color:var(--quiet,#9d9da8); }
.hop-go { display:inline-block; margin-top:10px; padding:12px 20px; border-radius:999px; background:#f4f4f6; color:#05060a; font-weight:650; font-size:15px; text-decoration:none; }
.hop-go:hover, .hop-go:focus-visible { background:#fff; }
/* At a planet: the way to the next, and the way back out to all of them. */
.hop-nav { position:absolute; left:0; right:0; bottom:max(20px, env(safe-area-inset-bottom, 0px)); z-index:600; display:flex; align-items:center; justify-content:center; gap:10px; padding:0 16px; }
.hop:not(.is-live) .hop-nav { display:none; }
.hop.is-live .hop-nav { opacity:0; visibility:hidden; transition:opacity .3s ease, visibility 0s .3s; }
.hop.is-out .hop-nav { opacity:1; visibility:visible; transition:opacity .3s ease; }
.hop-arrow, .hop-home { flex:none; display:inline-flex; align-items:center; justify-content:center; gap:8px; height:44px; padding:0; border:1px solid rgba(255,255,255,.2); border-radius:999px; background:rgba(5,6,10,.5); color:#f4f4f6; font:600 14px/1 'Inter',sans-serif; cursor:pointer; }
.hop-arrow { width:44px; }
.hop-home { padding:0 18px 0 14px; }
.hop-arrow svg, .hop-home svg { width:20px; height:20px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.hop-home svg circle { fill:currentColor; stroke:none; }
.hop-arrow:hover, .hop-arrow:focus-visible, .hop-home:hover, .hop-home:focus-visible { background:rgba(255,255,255,.12); }
.hop-arrow:disabled { opacity:.3; cursor:default; }
@media (max-width:820px) {
  .hop-stop { grid-template-columns:minmax(0,1fr); justify-items:center; gap:22px; padding:18px 24px 26px; text-align:center; }
  .planet { --d:min(54vw,30vh,260px); }
  .hop-section.is-live .section-title { top:104px; }
  /* On a phone what is written sits under the planet, and is kept short enough to fit above the way on. */
  .hop.is-live .hop-name { max-width:6.6em; }
  .hop.is-live .hop-explore { padding:15px 24px; font-size:15px; }
  .hop.is-live .hop-text { left:24px; right:24px; top:49%; width:auto; max-width:none; transform:none; text-align:center; }
  .hop.is-live .hop-text h3 { font-size:clamp(26px,7.4vw,32px); margin-bottom:10px; }
  .hop.is-live .hop-tag { margin-bottom:12px; }
  .hop.is-live .hop-brief { font-size:15px; line-height:1.5; }
  .hop.is-live .hop-go { margin-top:6px; }
}
@media (prefers-reduced-motion:reduce) {
  .hop-stop.is-here .planet-surface { animation:none; }
}
