/* The public roadmap (pages/roadmap.js), in the home page's space look. */

.roadmap .landing__nav,
.founders .landing__nav {
  position: sticky;
}

.roadmap__intro {
  padding-top: 48px;
  padding-bottom: 0;
}

.roadmap__empty {
  margin-top: -6px;
  color: var(--e-ink-soft);
  font-size: 0.9rem;
}

/* One roadmap item's card, with the team's edit buttons when signed in as staff. */
.roadmap-card {
  display: grid;
  gap: 6px;
  padding: 16px 18px;
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.roadmap-card__title {
  font-size: 1.05rem;
}

.roadmap-card__text {
  color: var(--e-ink-soft);
  font-size: 0.92rem;
  line-height: 1.5;
}

.roadmap-card__space {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  justify-self: start;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--e-moss);
  font-size: 0.78rem;
  font-weight: 600;
}

.roadmap-card__controls {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
  margin-top: 6px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.roadmap-card__controls .input {
  width: auto;
  max-width: 116px;
  height: 32px;
  padding: 0 8px;
  font-size: 0.85rem;
}

.roadmap-card__edit {
  margin-top: 8px;
}

.roadmap__add {
  margin-bottom: 20px;
  padding: 16px 20px;
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.roadmap__add summary {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  font-weight: 600;
  cursor: pointer;
}

.roadmap__new {
  margin-top: 16px;
}

/* The badge on the home page's space cards. */
.space-card {
  position: relative;
}

.space-card__soon {
  position: absolute;
  top: 16px;
  right: 16px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--e-moss);
  font-size: 0.75rem;
  font-weight: 700;
}

/* ---------- Founders page (pages/founders.js) ---------- */

.founders__intro {
  padding-top: 56px;
}

.founders__mark {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 20px;
  background: rgb(255 178 122 / 0.14);
  color: var(--e-sun);
}

.founders__count {
  color: var(--e-moss);
  font-weight: 700;
}

.founders__you {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  justify-self: start;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgb(255 178 122 / 0.14);
  color: var(--e-sun);
  font-weight: 600;
}

.founders__rules ul {
  display: grid;
  gap: 10px;
  max-width: 680px;
  padding-left: 20px;
  color: var(--e-ink-soft);
  line-height: 1.55;
}

.final__founders {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  justify-content: center;
  color: var(--e-ink-soft);
}

.final__founders .icon {
  color: var(--e-sun);
}

/* ---------- The roadmap on the home page (pages/landing.js) ---------- */

/* Centred on desktop and phone: the heading block, then the timeline as one centred column. */
#roadmap {
  justify-items: center;
  text-align: center;
}

#roadmap > .btn {
  justify-self: center;
  margin-top: 8px;
}

#roadmap .timeline {
  width: 100%;
  margin-inline: auto;
  text-align: left;
}

.roadmap__more {
  color: var(--e-moss);
  font-size: 0.9rem;
  font-weight: 600;
}

/* ---------- The timeline (components/roadmap-timeline.js) ---------- */

.timeline {
  --line-x: 19px;
  position: relative;
  display: grid;
  gap: 12px;
  max-width: 760px;
  padding: 0;
  list-style: none;
}

/* The line everything hangs on: solid through what's shipped, fading out into the future. */
.timeline::before {
  content: "";
  position: absolute;
  top: 12px;
  bottom: 12px;
  left: var(--line-x);
  width: 2px;
  background: linear-gradient(180deg, var(--e-moss), var(--e-sky) 35%, rgb(124 198 255 / 0.15));
  translate: -50% 0;
}

.timeline__stage,
.timeline__item {
  position: relative;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: start;
  gap: 14px;
}

.timeline__stage {
  margin-top: 18px;
}

.timeline__stage:first-child {
  margin-top: 0;
}

.timeline__stage-dot {
  justify-self: center;
  width: 18px;
  height: 18px;
  margin-top: 6px;
  border: 3px solid var(--e-paper);
  border-radius: 50%;
  background: var(--e-ink-faint);
  box-shadow: 0 0 0 2px var(--e-ink-faint);
}

.timeline__stage--done .timeline__stage-dot {
  background: var(--e-moss);
  box-shadow: 0 0 0 2px var(--e-moss);
}

.timeline__stage--now .timeline__stage-dot {
  background: var(--e-sky);
  box-shadow: 0 0 0 2px var(--e-sky), 0 0 18px var(--e-sky);
}

.timeline__stage-title {
  font-family: var(--font-serif);
  font-size: 1.35rem;
}

.timeline__stage-text {
  color: var(--e-ink-soft);
  font-size: 0.9rem;
}

/* Each item's marker: a tick for launched, its place in line for everything ahead. */
.timeline__dot {
  display: grid;
  place-items: center;
  justify-self: center;
  width: 28px;
  height: 28px;
  margin-top: 14px;
  border: 1px solid var(--e-glass-edge);
  border-radius: 50%;
  background: var(--timeline-dot, #0d1430);
  color: var(--e-ink-soft);
  font-size: 0.8rem;
  font-weight: 700;
}

.timeline__item--done .timeline__dot {
  border-color: transparent;
  background: var(--accent-soft);
  color: var(--e-moss);
}

.timeline__item--now .timeline__dot {
  border-color: var(--e-sky);
  color: var(--e-ink);
  box-shadow: 0 0 14px rgb(124 198 255 / 0.45);
}

.timeline__item--empty .timeline__dot,
.timeline__item--more .timeline__dot {
  width: 10px;
  height: 10px;
  margin-top: 6px;
}

.timeline__item--done .roadmap-card {
  opacity: 0.8;
}

.timeline__item--now .roadmap-card {
  border-color: rgb(124 198 255 / 0.4);
}

/* "We're here", sitting on the line between what's shipped and what's being built. */
.timeline__here {
  position: relative;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 14px;
  margin: 10px 0 -4px;
}

.timeline__here span {
  grid-column: 1 / -1;
  justify-self: start;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  background: var(--e-sky);
  color: #04122b;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  box-shadow: 0 0 0 6px rgb(124 198 255 / 0.15);
  animation: here 2.4s ease-in-out infinite;
}

@keyframes here {
  50% {
    box-shadow: 0 0 0 10px rgb(124 198 255 / 0.06);
  }
}

@media (prefers-reduced-motion: reduce) {
  .timeline__here span {
    animation: none;
  }
}

#roadmap .timeline {
  margin-top: 16px;
}

/* ---------- Inside the app (signed in) ---------- */

/* The roadmap and founders pages borrow the space colours above; inside the
   app they follow the person's own theme (light, grey or dark) instead. */
.roadmap-app,
.founders-app {
  --e-ink: var(--ink);
  --e-ink-soft: var(--ink-soft);
  --e-ink-faint: var(--ink-faint);
  --e-paper: var(--bg);
  --e-glass: var(--surface);
  --e-glass-edge: var(--line);
  --e-moss: var(--success);
  --e-sky: var(--accent-text);
  --e-sun: #c9784f;
  --timeline-dot: var(--surface);
}

.roadmap-app .roadmap-card {
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.roadmap-app .timeline__stage-title {
  font-size: 1.15rem;
}

.roadmap-app .timeline__here span {
  background: var(--accent);
  color: var(--accent-ink);
}

.founders-app .founders__count {
  color: var(--success);
}
