/* Home page (index.html) styles shared by its sections: live dot, quotes,
   avatars, ticker, section heads, final box. Page-specific layout is in the
   page's own <style>. */


[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--sodium); outline-offset: 2px; }
.btn-sm { padding: 8px 14px; font-size: .86rem; }

.samp {
  display: inline-block; font: 500 .6rem/1.5 var(--mono); letter-spacing: .1em; text-transform: uppercase;
  color: var(--gravel); border: 1px dashed var(--line-3); border-radius: 4px; padding: 0 5px; vertical-align: 2px;
}

/* Live dot. */
.live { position: relative; isolation: isolate; display: inline-flex; align-items: center; gap: 7px; font: 500 .72rem var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--signal); }
.live::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--signal); }
/* The pulse is a disc that grows and fades behind the dot: transform and
   opacity run on the compositor, where an animated box-shadow repaints. */
.live::after {
  content: ""; position: absolute; z-index: -1; left: 0; top: 50%; width: 8px; height: 8px; margin-top: -4px;
  border-radius: 50%; background: rgba(99,212,113,.6); opacity: 0; animation: pulse 1.8s infinite;
}
@keyframes pulse { 0% { transform: scale(1); opacity: 1; } 70%, 100% { transform: scale(3.25); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .live::after { animation: none; } }

/* Video / still tiles: hover (or tap) plays a muted clip. */
.vtile {
  position: relative; display: block; overflow: hidden; border-radius: var(--radius);
  background: var(--basalt-2); border: 1px solid var(--contour); color: var(--chalk);
  isolation: isolate;
}
.vtile:hover { text-decoration: none; border-color: var(--line-2); }
.vtile video, .vtile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.vtile::after {
  content: ""; position: absolute; inset: 45% 0 0; z-index: 1;
  background: linear-gradient(transparent, rgb(var(--glass-rgb) / .92));
}
.vtile .cap { position: absolute; left: 12px; right: 12px; bottom: 10px; z-index: 2; display: grid; gap: 2px; }
.vtile .cap b { font: 600 .92rem var(--body); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vtile .cap span { font: 500 .72rem var(--mono); color: #b8bdc6; letter-spacing: .02em; }
.vtile .play {
  position: absolute; top: 10px; right: 10px; z-index: 2; width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center; background: rgb(var(--glass-rgb) / .6); backdrop-filter: blur(6px);
  transition: opacity .2s;
}
.vtile .play svg { width: 12px; height: 12px; fill: var(--chalk); margin-left: 2px; }
.vtile.playing .play { opacity: 0; }
.vtile.add {
  display: grid; place-items: center; text-align: center; padding: 20px; border-style: dashed;
  background: repeating-linear-gradient(135deg, var(--raise) 0 10px, var(--basalt) 10px 20px);
}
.vtile.add::after { display: none; }
.vtile.add b { font: 700 1.05rem var(--display); display: block; margin: 8px 0 4px; }
.vtile.add span { color: var(--gravel); font-size: .84rem; }
.vtile.add .plus { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--sodium-dim); color: var(--sodium); display: grid; place-items: center; margin: 0 auto; font-size: 1.5rem; }

/* Server join box. */
.server {
  background: var(--well); border: 1px solid var(--contour); border-radius: var(--radius); padding: 16px;
  display: grid; gap: 12px;
}
.server .row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.server .row .grow { flex: 1; }
.server .meta { font: 500 .78rem var(--mono); color: var(--gravel); }
.server .meta b { color: var(--chalk); font-weight: 500; }
.pw {
  display: inline-flex; align-items: center; gap: 8px; font: 500 .84rem var(--mono);
  background: var(--basalt); border: 1px solid var(--contour); border-radius: 8px; padding: 6px 6px 6px 12px;
}
.pw button { border: 0; background: var(--basalt-2); color: var(--chalk); font: 600 .74rem var(--body); border-radius: 6px; padding: 5px 9px; cursor: pointer; }
.pw button:hover { background: var(--raise-2); }
.drivers { display: flex; align-items: center; }
.drivers i {
  width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--well); margin-left: -7px;
  display: grid; place-items: center; font: 600 .62rem var(--mono); font-style: normal; color: var(--on-sodium);
}
.drivers i:first-child { margin-left: 0; }

/* Quote cards (real public comments). */
.quote {
  background: var(--basalt); border: 1px solid var(--contour); border-radius: var(--radius);
  padding: 18px 18px 16px; display: grid; gap: 12px; align-content: start;
}
.quote p { font-size: 1rem; line-height: 1.5; color: var(--chalk); }
.quote p::before { content: "\201C"; color: var(--sodium); font: 700 1.6rem/0 var(--display); vertical-align: -.35em; margin-right: 3px; }
.quote .by { display: flex; align-items: center; gap: 10px; font-size: .82rem; color: var(--gravel); }
.quote .by .av {
  width: 30px; height: 30px; border-radius: 50%; flex: none; display: grid; place-items: center;
  font: 600 .7rem var(--mono); color: var(--on-sodium);
}
.quote .by b { color: var(--chalk); font-weight: 600; display: block; line-height: 1.3; }
.quote .by a { color: var(--gravel); }
.quote .by a:hover { color: var(--sodium); }

/* Forum / suggestion rows. */
.list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--contour); border-radius: var(--radius); background: var(--basalt); overflow: hidden; }
.list li + li { border-top: 1px solid var(--contour); }
.list a.item { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 12px; padding: 13px 16px; color: var(--chalk); align-items: center; }
.list a.item:hover { background: rgb(var(--tint-rgb) / .025); text-decoration: none; }
.list .t { font-weight: 600; font-size: .95rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.list .s { font: 500 .74rem var(--mono); color: var(--gravel); }
.list .n { font: 500 .78rem var(--mono); color: var(--gravel); text-align: right; white-space: nowrap; }
.list .n b { color: var(--chalk); font-weight: 500; display: block; font-size: .92rem; }
.vote-pill {
  display: grid; justify-items: center; min-width: 46px; padding: 5px 0; border: 1px solid var(--contour);
  border-radius: 8px; background: var(--well); font: 600 .86rem var(--mono); color: var(--chalk); line-height: 1.1;
}
.vote-pill svg { width: 12px; height: 12px; fill: var(--sodium); }
.tag {
  display: inline-block; font: 500 .66rem/1.6 var(--mono); letter-spacing: .06em; text-transform: uppercase;
  color: var(--sodium); background: rgba(255,164,59,.08); border: 1px solid var(--sodium-dim); border-radius: 4px; padding: 0 6px; margin-right: 6px;
}
.tag.g { color: var(--signal); background: rgba(99,212,113,.07); border-color: var(--signal-line); }
.tag.b { color: var(--info); background: rgba(120,160,255,.07); border-color: var(--info-line); }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; z-index: 70;
  background: var(--chalk); color: var(--asphalt); font: 600 .86rem var(--body); padding: 9px 16px; border-radius: 8px;
  transition: .2s; pointer-events: none;
}
.toast.on { opacity: 1; transform: translate(-50%, 0); }

/* Avatar palette for the masked handles. */
.c1 { background: var(--sodium-fill); } .c2 { background: #63D471; } .c3 { background: var(--info); }
.c4 { background: #f58bc0; } .c5 { background: var(--chalk); } .c6 { background: #c6a1ff; }
/* --info and --chalk turn dark in the light theme: --on-sodium would sit on them at 1.06 to 3:1. */
.quote .by .av.c3, .quote .by .av.c5 { color: var(--asphalt); }


.nav .links a[aria-current="page"] { color: var(--chalk); }
img.flg { width: auto; border-radius: 2px; vertical-align: -2px; display: inline-block; }
em.hl { font-style: normal; color: var(--sodium); }
.sec { padding: 72px 0 0; }
.sec-head { display: flex; align-items: end; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.sec-head .grow { flex: 1 1 320px; }
.sec-head h2 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); letter-spacing: -.02em; }
.sec-head p { color: var(--gravel); margin-top: 6px; max-width: 60ch; }
.kicker { font: 500 .72rem var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--sodium); }

/* Recent-builds ticker: a marquee of real roads finished this week. */
.ticker { position: relative; overflow: hidden; border-block: 1px solid var(--contour); background: var(--well); }
/* min-height holds the row open before home.js fills it (no layout shift). */
.ticker .track { display: flex; gap: 34px; width: max-content; min-height: 50px; padding: 12px 0; animation: tick 70s linear infinite; }
.ticker:hover .track, .ticker.off .track { animation-play-state: paused; }
.ticker .it { display: inline-flex; align-items: center; gap: 9px; font: 500 .82rem var(--mono); color: var(--gravel); white-space: nowrap; }
.ticker .it b { color: var(--chalk); font: 600 .9rem var(--body); }
.ticker .it .cc { font: 600 .66rem var(--mono); color: var(--on-sodium); background: var(--sodium-fill); border-radius: 3px; padding: 1px 4px; }
.ticker .it svg { width: 26px; height: 26px; flex: none; }
.ticker .it svg path { fill: none; stroke: var(--sodium); stroke-width: 6; stroke-linecap: round; stroke-linejoin: round; }
.ticker .lead { position: absolute; left: 0; top: 0; bottom: 0; z-index: 2; display: flex; align-items: center; padding: 0 18px 0 16px;
  background: linear-gradient(90deg, var(--well) 78%, transparent); }
@keyframes tick { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .ticker .track { animation: none; } }

/* Squiggle cards: a real road's shape, drawn on hover. */
.squig { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
.sq-card { background: var(--basalt); border: 1px solid var(--contour); border-radius: var(--radius); overflow: hidden; color: var(--chalk);
  display: grid; transition: transform .18s, border-color .18s, box-shadow .18s; }
.sq-card:hover { text-decoration: none; transform: translateY(-3px) rotate(-.6deg); border-color: var(--sodium-dim); box-shadow: 0 18px 40px -22px rgba(255,164,59,.45); }
.sq-card .plot { aspect-ratio: 1; position: relative; background:
  radial-gradient(circle at 50% 50%, rgba(255,164,59,.06), transparent 70%),
  repeating-linear-gradient(0deg, transparent 0 19px, rgb(var(--tint-rgb) / .025) 19px 20px),
  repeating-linear-gradient(90deg, transparent 0 19px, rgb(var(--tint-rgb) / .025) 19px 20px), var(--well); }
.sq-card svg { width: 100%; height: 100%; display: block; }
.sq-card path { fill: none; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.sq-card .glow { stroke: rgba(255,164,59,.16); stroke-width: 10; }
.sq-card .line { stroke: var(--sodium); stroke-width: 2.4; stroke-dasharray: var(--len, 1000); stroke-dashoffset: 0; }
.sq-card:hover .line { animation: draw 1.4s cubic-bezier(.6,.1,.3,1); }
@keyframes draw { from { stroke-dashoffset: var(--len, 1000); } }
.sq-card .km { position: absolute; left: 8px; top: 8px; font: 500 .68rem var(--mono); background: rgb(var(--asphalt-rgb) / .85); border: 1px solid var(--contour); border-radius: 5px; padding: 1px 6px; }
.sq-card .new { position: absolute; right: 8px; top: 8px; font: 700 .6rem var(--mono); letter-spacing: .1em; color: var(--on-sodium); background: var(--signal); border-radius: 4px; padding: 2px 5px; }
.sq-card .info { padding: 10px 12px 12px; display: grid; gap: 3px; }
.sq-card .info b { font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sq-card .info span { font: 500 .7rem var(--mono); color: var(--gravel); }

/* Big numbers band. */
.numbers { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--contour); border-radius: 16px; overflow: hidden; background: var(--basalt); }
.numbers > div { padding: 22px 22px 20px; }
.numbers > div + div { border-left: 1px solid var(--contour); }
.numbers b { display: block; font: 700 clamp(2rem, 4.4vw, 3rem)/1 var(--display); letter-spacing: -.03em; }
.numbers span { font: 500 .72rem var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--gravel); }

/* Quote masonry. */
.love { columns: 3 260px; column-gap: 14px; }
.love .quote { break-inside: avoid; margin: 0 0 14px; }
.love .quote.big p { font: 700 1.45rem/1.25 var(--display); letter-spacing: -.01em; }

/* Final CTA with a mock two-pin box. */
.final { margin: 84px 0 0; border-radius: 22px; padding: 46px 40px; text-align: center; position: relative; overflow: hidden;
  background: radial-gradient(90% 120% at 50% 0%, rgba(255,164,59,.22), transparent 60%), var(--basalt); border: 1px solid var(--sodium-dim); }
.final h2 { font-size: clamp(2rem, 5vw, 3.2rem); letter-spacing: -.03em; }
.final p { color: var(--gravel); margin: 10px auto 22px; max-width: 52ch; }
.pins { display: flex; gap: 8px; max-width: 640px; margin: 0 auto; flex-wrap: wrap; justify-content: center; }
.pins label { flex: 1 1 200px; display: flex; align-items: center; gap: 8px; background: var(--well); border: 1px solid var(--contour); border-radius: 10px; padding: 0 12px; }
.pins label i { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.pins input { flex: 1; min-width: 0; background: none; border: 0; color: var(--chalk); font: 500 .95rem var(--body); padding: 13px 0; outline: none; }
.final .small { font: 500 .74rem var(--mono); color: var(--gravel); margin-top: 14px; }

.btn-lg { padding: 15px 26px; font-size: 1.02rem; }
.foot { margin-top: 80px; }

@media (max-width: 1000px) { .squig { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 760px) {
  .numbers { grid-template-columns: 1fr 1fr; }
  .numbers > div:nth-child(3) { border-left: 0; }
  .numbers > div:nth-child(n+3) { border-top: 1px solid var(--contour); }
  .squig { grid-template-columns: repeat(2, 1fr); }
  .final { padding: 34px 18px; }
  .sec { padding-top: 56px; }
}
