/* Platform map, feature index, demo library, roadmap.
   Extends styles.css: same tokens, same rhythm, no new fonts or colours. */

.page-head { max-width: 900px; margin: 0 auto; padding: 60px var(--edge) 30px; text-align: center; }
.page-head h1 {
  font-family: var(--serif); font-weight: 400; font-size: clamp(31px, 7.2vw, 60px);
  line-height: 1.07; letter-spacing: -.01em; margin-bottom: 22px; text-wrap: balance;
}
.page-head h1 em { font-style: italic; color: var(--acc); }
.page-head .lede { margin-bottom: 0; }
.top nav a[aria-current="page"] { color: var(--txt); }

/* ------------------------------------------------------------------ map */
.mapwrap { max-width: 1180px; margin: 46px auto 0; padding: 0 var(--edge); }

.layerbar { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.lbtn {
  font-family: var(--sans); font-size: 14.5px; color: var(--dim);
  background: rgba(255,255,255,.02); border: 1px solid var(--line);
  border-radius: 10px; padding: 9px 18px; min-height: 42px; cursor: pointer;
  transition: color .18s, border-color .18s, background .18s;
}
.lbtn.active {
  color: var(--txt); border-color: #333e5e;
  background: linear-gradient(160deg, rgba(124,123,242,.16), rgba(124,123,242,.05));
}
@media (hover: hover) { .lbtn:hover { color: var(--txt); border-color: #2c3554; } }
.layerhint {
  font-family: var(--mono); font-size: 12px; color: var(--faint);
  letter-spacing: .04em; margin-left: auto;
}

.mapstage {
  border: 1px solid #222b44; border-radius: 14px; background: #090c15;
  box-shadow: 0 30px 90px rgba(0,0,0,.45), 0 0 0 1px rgba(124,123,242,.05);
  position: relative; overflow: hidden;
}
.mapscroll { overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; }
#mapsvg { display: block; width: 100%; min-width: 860px; height: auto; }
.scrollhint {
  display: none; font-family: var(--mono); font-size: 11px; color: var(--faint);
  text-align: right; padding: 0 14px 10px;
}

/* edges */
.edge {
  stroke: #263050; stroke-width: 1.4; fill: none;
  transition: stroke .2s, opacity .2s;
}
.edge.soft { stroke-dasharray: 4 5; stroke: #232c48; }
.edgelabel {
  font-family: var(--mono); font-size: 9.5px; fill: var(--faint);
  letter-spacing: .04em; transition: fill .2s, opacity .2s;
}
#mapsvg.dimmed .edge { opacity: .3; }
#mapsvg.dimmed .edge.near { opacity: 1; stroke: var(--acc2); stroke-width: 1.9; }
#mapsvg.dimmed .edgelabel { opacity: .25; }
#mapsvg.dimmed .edgelabel.near { opacity: 1; fill: var(--acc); }

/* nodes */
.node { cursor: pointer; outline: none; }
.nbox {
  fill: #10151f; stroke: #26304c; stroke-width: 1.2;
  transition: fill .2s, stroke .2s, filter .2s;
}
.nlabel {
  font-family: var(--sans); font-size: 14px; font-weight: 500; fill: var(--txt);
  text-anchor: middle; pointer-events: none; transition: fill .2s;
}
.nmeta {
  font-family: var(--mono); font-size: 8.8px; fill: var(--faint);
  text-anchor: middle; pointer-events: none; letter-spacing: .03em;
}
.ndot { fill: var(--ok); }

/* node kinds carry meaning, not decoration */
.k-entry .nbox { fill: #131a2e; stroke: #3a4470; }
.k-hub   .nbox { fill: #121828; stroke: #313c63; }
.k-core  .nbox { fill: #101726; stroke: #2f3a5e; }
.k-data  .nbox { fill: #0e1420; stroke: #27324f; }
.k-comms .nbox { fill: #0e1420; stroke: #27324f; }
.k-gate  .nbox { fill: #101a17; stroke: #2b5347; }
.k-gate  .nlabel { fill: #b9f0d8; }

@media (hover: hover) {
  .node:hover .nbox { fill: #18203a; stroke: var(--acc2); }
}
.node:focus-visible .nbox { stroke: var(--acc); stroke-width: 2; }
.node.sel .nbox {
  fill: #1b2340; stroke: var(--acc); stroke-width: 1.8;
  filter: drop-shadow(0 0 12px rgba(124,123,242,.4));
}
#mapsvg.dimmed .node { opacity: .38; }
#mapsvg.dimmed .node.near { opacity: 1; }

@keyframes nodein { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: none; } }
.reveal-on-scroll.in .node {
  animation: nodein .44s cubic-bezier(.2,.7,.2,1) backwards;
  animation-delay: calc(var(--i) * 26ms);
}
@media (prefers-reduced-motion: reduce) { .reveal-on-scroll.in .node { animation: none; } }

/* ------------------------------------------------------- detail panel */
.detail {
  margin-top: 18px; border: 1px solid var(--line); border-radius: 14px;
  background: linear-gradient(170deg, rgba(20,25,42,.55), rgba(10,13,22,.55));
  padding: 24px 26px;
}
.detail-empty { font-family: var(--mono); font-size: 13.5px; color: var(--faint); }
.detail-empty .k { color: var(--acc); margin-right: 8px; }
.detail-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.detail-kind {
  font-family: var(--mono); font-size: 11px; letter-spacing: .16em;
  color: var(--acc); margin-bottom: 6px;
}
.detail-head h3 { font-family: var(--serif); font-weight: 400; font-size: clamp(24px, 5.4vw, 31px); line-height: 1.15; }
.detail-close {
  background: none; border: 1px solid var(--line); color: var(--dim);
  border-radius: 9px; width: 36px; height: 36px; cursor: pointer; flex: none;
  font-size: 14px; transition: color .18s, border-color .18s;
}
@media (hover: hover) { .detail-close:hover { color: var(--txt); border-color: #333e5e; } }
.detail-blurb { color: var(--txt); font-size: 17px; margin: 12px 0 10px; }
.detail-detail { color: var(--dim); font-size: 15.5px; }
.detail-bullets { list-style: none; margin: 18px 0 0; display: flex; flex-direction: column; gap: 10px; }
.detail-bullets li { color: var(--dim); font-size: 15px; padding-left: 20px; position: relative; }
.detail-bullets li::before { content: "▸"; position: absolute; left: 0; color: var(--acc); }
.detail-demo { margin-top: 22px; max-width: 720px; }
.detail-links { margin-top: 18px; font-family: var(--mono); font-size: 13px; }
.detail-links a { color: var(--acc); text-decoration: none; }
@media (hover: hover) { .detail-links a:hover { text-decoration: underline; } }

/* -------------------------------------------------------- index cards */
.index { max-width: 1180px; margin: var(--sec) auto 0; padding: 0 var(--edge); }
.idx-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(330px, 100%), 1fr)); gap: 18px; }
.idx-card {
  border: 1px solid var(--line); border-radius: 14px; padding: 24px 24px 22px;
  background: linear-gradient(170deg, rgba(20,25,42,.55), rgba(10,13,22,.55));
  cursor: pointer; transition: transform .22s, border-color .22s;
}
@media (hover: hover) { .idx-card:hover { transform: translateY(-4px); border-color: #2c3554; } }
.idx-card h3 { font-size: 17.5px; font-weight: 600; margin-bottom: 9px; }
.idx-meta { font-family: var(--mono); font-size: 11px; color: var(--faint); font-weight: 400; letter-spacing: .04em; }
.idx-clip {
  font-family: var(--mono); font-size: 10px; letter-spacing: .1em; color: var(--ok);
  border: 1px solid #244a3c; border-radius: 5px; padding: 2px 6px; vertical-align: 2px;
  font-weight: 400;
}
.idx-blurb { color: var(--txt); font-size: 15.5px; margin-bottom: 8px; }
.idx-detail { color: var(--dim); font-size: 14.5px; }
.idx-card ul { list-style: none; margin-top: 14px; display: flex; flex-direction: column; gap: 7px; }
.idx-card li { color: var(--faint); font-size: 13.5px; padding-left: 17px; position: relative; }
.idx-card li::before { content: "·"; position: absolute; left: 4px; color: var(--acc); }

/* --------------------------------------------------------- demo grid */
.demos { max-width: 1180px; margin: var(--sec) auto 0; padding: 0 var(--edge); }
.demo-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr)); gap: 30px 26px; }
.demo-cell h3 {
  font-size: 16.5px; font-weight: 600; margin-bottom: 12px;
  display: flex; align-items: center; gap: 10px;
}
.demo-cell .dur {
  font-family: var(--mono); font-size: 11px; color: var(--faint); font-weight: 400;
  border: 1px solid var(--line); border-radius: 5px; padding: 2px 7px;
}
.demo-cell .dur.soon { color: var(--acc); border-color: #2c3160; }
.demo-cap { color: var(--dim); font-size: 14px; margin-top: 12px; }
.demo-slot {
  border: 1px dashed #232c48; border-radius: 14px; background: rgba(12,16,27,.5);
  aspect-ratio: 16 / 10; display: grid; place-items: center;
}
.demo-slot span { color: #2b3556; font-size: 32px; }
.demo-cell.queued h3 { color: var(--dim); }

/* ---------------------------------------------------------- roadmap */
.rm { max-width: 1180px; margin: 46px auto 0; padding: 0 var(--edge); }
.rm-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; align-items: start; }
.rm-col { border: 1px solid var(--line); border-radius: 14px; padding: 26px 24px 24px;
  background: linear-gradient(170deg, rgba(20,25,42,.5), rgba(10,13,22,.5)); }
.rm-col h2 {
  font-family: var(--mono); font-size: 12px; letter-spacing: .16em; font-weight: 500;
  margin-bottom: 10px; text-transform: uppercase;
}
.rm-col.shipped h2 { color: var(--ok); }
.rm-col.flight h2 { color: var(--acc); }
.rm-col.exploring h2 { color: var(--faint); }
.rm-note { color: var(--faint); font-size: 13.5px; margin-bottom: 22px; }
.rm-list { list-style: none; display: flex; flex-direction: column; gap: 18px; }
.rm-list li { padding-left: 20px; position: relative; }
.rm-list li::before { position: absolute; left: 0; top: 1px; font-size: 12px; }
.rm-col.shipped li::before { content: "✓"; color: var(--ok); }
.rm-col.flight li::before { content: "◐"; color: var(--acc); }
.rm-col.exploring li::before { content: "○"; color: var(--faint); }
.rm-list strong { display: block; font-size: 15.5px; font-weight: 600; margin-bottom: 3px; }
.rm-list span { color: var(--dim); font-size: 14px; }
.rm-foot {
  max-width: 760px; margin: 46px auto 0; padding: 0 var(--edge); text-align: center;
}
.rm-foot p { color: var(--faint); font-size: 14px; }

/* --------------------------------------------------- teaser on index */
.explore { max-width: 1180px; margin: var(--sec) auto 0; padding: 0 var(--edge); }
.explore-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.explore-card {
  border: 1px solid var(--line); border-radius: 14px; padding: 30px 28px 28px;
  background: linear-gradient(170deg, rgba(20,25,42,.6), rgba(10,13,22,.6));
  text-decoration: none; color: inherit; display: block;
  transition: transform .22s, border-color .22s;
}
@media (hover: hover) { .explore-card:hover { transform: translateY(-4px); border-color: #2c3554; } }
.explore-card .k { font-family: var(--mono); font-size: 11.5px; letter-spacing: .16em; color: var(--acc); }
.explore-card h3 { font-family: var(--serif); font-weight: 400; font-size: clamp(23px, 5vw, 29px); margin: 12px 0 10px; line-height: 1.15; }
.explore-card p { color: var(--dim); font-size: 15.5px; }
.explore-card .go { display: inline-block; margin-top: 16px; font-family: var(--mono); font-size: 13px; color: var(--acc); }

/* -------------------------------------------------------- responsive */
@media (max-width: 900px) {
  .rm-cols { grid-template-columns: 1fr; gap: 18px; }
  .explore-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .page-head { padding: 34px var(--edge) 22px; }
  .mapwrap { margin-top: 30px; }
  .layerhint { display: none; }
  .lbtn { flex: 1; padding: 9px 12px; font-size: 14px; }
  /* the map keeps its real width and scrolls: a squeezed graph is unreadable */
  .mapstage { margin-inline: calc(var(--edge) * -1); border-radius: 0; border-left: none; border-right: none; }
  .scrollhint { display: block; }
  .detail { padding: 20px 18px; }
  .demo-grid { gap: 26px 20px; }
  .idx-card { padding: 20px 18px 18px; }
}
