/* ============================================================
   EastCoast ~ PvP ~ site.css
   One document, four panels side by side: Server, Plugins,
   Changelog, Range. Horizontal moves between panels, vertical
   reads within one. With JavaScript off the panels stack.

   Deliberately absent:
     - gradients of any kind
     - backdrop-filter / glass
     - bordered pills and chips
     - entrance animation on list items
     - uppercase tracked labels as a house style
   ============================================================ */

/* ---------------------------------------------------------------
   0. VIEW TRANSITIONS (editor.html and range.html opt in too)
   --------------------------------------------------------------- */
@view-transition { navigation: auto; }

/* ---------------------------------------------------------------
   1. RESET + BASE
   --------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; height: 100%; }
body {
  height: 100%;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--face-text);
  font-size: var(--t-body);
  line-height: var(--lh-body);
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;            /* the deck scrolls, not the page */
}
html.no-js body { overflow: auto; height: auto; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration-color: color-mix(in srgb, currentColor 40%, transparent); text-underline-offset: 0.18em; }
a:hover { text-decoration-color: currentColor; }
.prose a, .lede a, .dim a { color: var(--sky); }
.paper .prose a, .paper .lede a, .paper .dim a { color: var(--sky-p); }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--rust); outline-offset: 3px; }
::selection { background: var(--rust); color: var(--ground); }

.skip {
  position: absolute; left: var(--s2); top: -4rem; z-index: 50;
  background: var(--paper); color: var(--ink-p); padding: var(--s1) var(--s2);
  font-family: var(--face-mono); font-size: var(--t-data);
}
.skip:focus { top: var(--s2); }

/* ---------------------------------------------------------------
   2. TYPE
   --------------------------------------------------------------- */
.display, .hero, .title, .head {
  font-family: var(--face-display);
  font-weight: 500;
  font-variation-settings: "opsz" 96, "wdth" 92;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.hero    { font-size: var(--t-hero);    line-height: var(--lh-hero);    font-weight: 600; letter-spacing: -0.02em; }
.display { font-size: var(--t-display); line-height: var(--lh-display); }
.title   { font-size: var(--t-title);   line-height: var(--lh-title); }
.head    { font-size: var(--t-head);    line-height: 1.2; font-variation-settings: "opsz" 24, "wdth" 96; }
.lede    { font-size: var(--t-lede); line-height: 1.4; max-width: var(--measure-lede); text-wrap: pretty; }
.prose   { max-width: var(--measure); text-wrap: pretty; }
.prose p + p { margin-top: var(--s2); }
.kicker  { font-family: var(--face-display); font-size: var(--t-small); font-weight: 500; color: var(--dim); }
.paper .kicker { color: var(--dim-p); }
.data    { font-family: var(--face-mono); font-size: var(--t-data); font-variation-settings: "wdth" 90; }
.dim     { color: var(--dim); }
.paper .dim { color: var(--dim-p); }
.hl      { color: var(--rust); }
.paper .hl { color: var(--rust-p); }

/* ---------------------------------------------------------------
   3. THE RAIL (persistent top chrome)
   --------------------------------------------------------------- */
.rail {
  position: fixed; inset: 0 0 auto 0; z-index: 40;
  display: grid; grid-template-columns: auto 1fr auto; align-items: center;
  gap: var(--s3); padding: var(--s2) var(--gutter);
  color: var(--ink);
  pointer-events: none;
}
.rail > * { pointer-events: auto; }
.rail-mark { font-family: var(--face-display); font-weight: 600; font-size: 1.05rem; letter-spacing: -0.01em; text-decoration: none; }
.rail-mark img { display: inline-block; width: 26px; height: 26px; vertical-align: -7px; margin-right: 0.5rem; }
.rail-tabs { display: flex; justify-content: center; gap: var(--s1); }
.rail-tab {
  font-family: var(--face-display); font-weight: 500; font-size: var(--t-small);
  padding: 0.35rem 0.7rem; color: var(--dim); text-decoration: none;
  position: relative;
}
.rail-tab::after {
  content: ""; position: absolute; left: 0.7rem; right: 0.7rem; bottom: 0.1rem; height: 2px;
  background: var(--rust); transform: scaleX(0); transform-origin: left;
  transition: transform var(--t-base) var(--ease);
}
.rail-tab[aria-current="true"] { color: var(--ink); }
.rail-tab[aria-current="true"]::after { transform: scaleX(1); }
.rail-tab:hover { color: var(--ink); }
.rail-side { display: flex; align-items: center; gap: var(--s2); }
.rail-side a { font-family: var(--face-mono); font-size: var(--t-data); text-decoration: none; color: var(--dim); }
.rail-side a:hover { color: var(--ink); }
.rail-hint { font-family: var(--face-mono); font-size: var(--t-data); color: var(--dim); }
html.no-js .rail { position: static; }

/* ---------------------------------------------------------------
   4. THE DECK (horizontal panel switcher)
   --------------------------------------------------------------- */
.deck {
  display: flex;
  height: 100dvh;
  overflow-x: auto; overflow-y: hidden;
  scroll-snap-type: x mandatory;
  overscroll-behavior: contain;
  scrollbar-width: none;
}
.deck::-webkit-scrollbar { display: none; }
.panel {
  flex: 0 0 100vw; width: 100vw; height: 100dvh;
  overflow-y: auto; overflow-x: hidden;
  scroll-snap-align: start; scroll-snap-stop: always;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: var(--dim) transparent;
}
html.no-js .deck { display: block; height: auto; overflow: visible; }
html.no-js .panel { width: auto; height: auto; overflow: visible; }

/* ---------------------------------------------------------------
   5. LAYOUT PRIMITIVES
   --------------------------------------------------------------- */
.grid {
  display: grid; grid-template-columns: repeat(12, var(--col));
  column-gap: var(--gutter); width: min(100%, 1440px); margin-inline: auto;
  padding-inline: var(--gutter);
}
.c-1-6  { grid-column: 1 / 7; }
.c-1-8  { grid-column: 1 / 9; }
.c-1-13 { grid-column: 1 / -1; }
.c-2-7  { grid-column: 2 / 8; }
.c-2-12 { grid-column: 2 / 12; }
.c-3-11 { grid-column: 3 / 11; }
.c-5-13 { grid-column: 5 / -1; }
.c-7-13 { grid-column: 7 / -1; }
.c-8-13 { grid-column: 8 / -1; }
@media (max-width: 900px) { .grid > [class^="c-"] { grid-column: 1 / -1; } }

.block { padding-block: var(--s6); }
.block-tight { padding-block: var(--s4); }
.paper { background-color: var(--paper); background-image: var(--grain); color: var(--ink-p); }
.paper a { color: inherit; }
.ground-2 { background: var(--ground-2); }
.rule { height: 1px; background: var(--rule); border: 0; }
.paper .rule { background: var(--rule-p); }

/* ---------------------------------------------------------------
   6. HERO (server panel): the plate is the room
   --------------------------------------------------------------- */
.scene {
  position: relative; min-height: 100dvh; display: grid; align-items: end;
  overflow: hidden; isolation: isolate;
}
.scene-plate {
  position: absolute; inset: -12% 0 0 0; z-index: -1;
  width: 100%; height: 112%; object-fit: cover; object-position: 50% 40%;
}
.scene-scrim {
  position: absolute; inset: 0; z-index: -1;
  background: var(--scrim); mix-blend-mode: multiply;
}
.scene-body { padding-block: var(--s5) var(--s4); }
.hero .thin { display: block; font-family: var(--face-text); font-weight: 400; font-size: var(--t-lede); line-height: 1.4; letter-spacing: 0; max-width: var(--measure-lede); margin-top: var(--s3); color: var(--ink); text-wrap: pretty; }

/* scroll-driven parallax where supported; the plate eases up as the
   panel scrolls. One timeline, one property, no library. */
@supports (animation-timeline: scroll()) {
  .scene-plate { animation: plate-drift linear both; animation-timeline: scroll(nearest); animation-range: 0 60vh; transition: transform var(--t-slow) var(--ease); }
  @keyframes plate-drift { to { transform: translateY(-9%); } }
}

/* connect box: mono because it is data */
.connect {
  display: inline-grid; grid-template-columns: auto auto; align-items: center; gap: var(--s2);
  padding: var(--s2) var(--s3); background: var(--ground); color: var(--ink);
  font-family: var(--face-mono); font-size: var(--t-small);
}
.connect-label { color: var(--dim); }
.connect .btn { margin-left: var(--s2); }

/* ---------------------------------------------------------------
   7. BUTTONS, FEED, FACTS
   --------------------------------------------------------------- */
.btn {
  display: inline-block; font-family: var(--face-display); font-weight: 600; font-size: var(--t-small);
  padding: 0.6rem 1.1rem; text-decoration: none; transition: background var(--t-fast), color var(--t-fast);
}
.btn-primary { background: var(--rust); color: var(--ground); }
.btn-primary:hover { background: var(--ink); }
.btn-ghost { color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--ground); }
.paper .btn-ghost { color: var(--ink-p); box-shadow: inset 0 0 0 1.5px var(--ink-p); }
.paper .btn-ghost:hover { background: var(--ink-p); color: var(--paper); }
.btn-quiet { padding-inline: 0; color: var(--dim); }
.btn-quiet:hover { color: var(--rust); }
.btn.is-done { background: var(--tier-hard); color: var(--ground); }
.actions { display: flex; gap: var(--s3); align-items: center; flex-wrap: wrap; }

.facts { display: flex; flex-wrap: wrap; gap: 0 var(--s4); font-family: var(--face-display); }
.fact { display: flex; align-items: baseline; gap: 0.5rem; padding-block: var(--s2); }
.fact-key { font-size: var(--t-small); color: var(--dim); font-weight: 500; }
.fact-val { font-size: var(--t-title); font-weight: 600; letter-spacing: -0.02em; }

.feed { list-style: none; font-family: var(--face-mono); font-size: var(--t-data); }
.feed li { padding: 0.45rem 0; border-top: 1px solid var(--rule); color: var(--dim); }
.feed li:last-child { border-bottom: 1px solid var(--rule); }

/* ---------------------------------------------------------------
   8. SHOTS (photographs, never boxed)
   --------------------------------------------------------------- */
.shot { margin: 0; }
.shot img { width: 100%; }
.shot figcaption { margin-top: var(--s1); font-size: var(--t-small); color: var(--dim); max-width: var(--measure-lede); text-wrap: pretty; }
.paper .shot figcaption { color: var(--dim-p); }
.shot-bleed { margin: 0; }
.shot-bleed img { width: 100%; aspect-ratio: 21 / 9; object-fit: cover; }
.shot-bleed figcaption { padding: var(--s2) var(--gutter); font-size: var(--t-small); color: var(--dim); }

/* annotation: a drawn mark on top of a screenshot */
.mark { position: relative; }
.mark svg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.mark svg * { fill: none; stroke: var(--rust); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }

/* ---------------------------------------------------------------
   9. TIERS: one large, three small
   --------------------------------------------------------------- */
.tiers { display: grid; grid-template-columns: 7fr 5fr; gap: var(--s3); align-items: stretch; }
.tiers .lead img { height: 100%; object-fit: cover; }
.tiers .rest { display: grid; gap: var(--s3); }
.tier-tag { display: flex; gap: 0.6rem; align-items: baseline; margin-top: var(--s1); font-family: var(--face-display); font-weight: 500; }
.tier-tag .n { font-family: var(--face-mono); font-size: var(--t-data); color: var(--dim-p); }
.tier-tag .swatch { width: 0.7em; height: 0.7em; border-radius: 50%; align-self: center; }
@media (max-width: 900px) { .tiers { grid-template-columns: 1fr; } }

.cols-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s4); }
@media (max-width: 720px) { .cols-2 { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------
   10. CATALOG (plugins panel)
   --------------------------------------------------------------- */
.filters { display: flex; flex-wrap: wrap; gap: 0 var(--s3); }
.filter { font-family: var(--face-display); font-weight: 500; color: var(--dim); padding: 0.3rem 0; border-bottom: 2px solid transparent; }
.filter:hover { color: var(--ink); }
.filter[aria-pressed="true"] { color: var(--ink); border-bottom-color: var(--rust); }
.count { margin-top: var(--s2); }

.entry-big { padding-block: var(--s4); border-top: 1px solid var(--rule); display: grid; grid-template-columns: 5fr 7fr; gap: var(--s4); }
@media (max-width: 900px) { .entry-big { grid-template-columns: 1fr; } }
.entry-big .price { font-family: var(--face-mono); font-size: var(--t-data); color: var(--dim); margin-top: var(--s1); }
.entry-big ul { margin: var(--s3) 0 0 1.1em; }
.entry-big li { margin-bottom: 0.4rem; color: var(--dim); }
.entry-big li::marker { color: var(--rust); }
.entry-big .configurable { margin-top: var(--s3); font-size: var(--t-small); color: var(--dim); }
.entry-big .meta { margin-top: var(--s2); font-family: var(--face-mono); font-size: var(--t-data); color: var(--dim); }

.list { border-top: 1px solid var(--rule); }
.list details { border-bottom: 1px solid var(--rule); }
.list summary {
  display: grid; grid-template-columns: 1.4fr 3fr auto; gap: var(--s3); align-items: baseline;
  padding: var(--s2) 0; cursor: pointer; list-style: none;
}
.list summary::-webkit-details-marker { display: none; }
.list summary .name { font-family: var(--face-display); font-weight: 600; }
.list summary .sum { color: var(--dim); }
.list summary .price { font-family: var(--face-mono); font-size: var(--t-data); color: var(--dim); white-space: nowrap; }
.list details[open] summary .name { color: var(--rust); }
.list .body { padding: 0 0 var(--s3); display: grid; grid-template-columns: 1.4fr 3fr; gap: var(--s3); }
.list .body ul { margin-left: 1.1em; color: var(--dim); }
.list .body li { margin-bottom: 0.3rem; }
.list .body .meta { font-family: var(--face-mono); font-size: var(--t-data); color: var(--dim); }
@media (max-width: 720px) { .list summary, .list .body { grid-template-columns: 1fr; gap: var(--s1); } }

.bundles { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: var(--s4); }
.bundle { padding-top: var(--s3); border-top: 2px solid var(--ink-p); }
.bundle .price { font-family: var(--face-mono); font-size: var(--t-data); margin-top: var(--s1); }
.bundle .price b { font-family: var(--face-display); font-size: var(--t-head); font-weight: 600; margin-right: 0.5rem; }
.bundle .members { margin-top: var(--s2); font-family: var(--face-display); font-weight: 500; }
.bundle .desc { margin-top: var(--s2); color: var(--dim-p); font-size: var(--t-small); }
.bundle .includes { margin-top: var(--s2); font-family: var(--face-mono); font-size: var(--t-data); color: var(--dim-p); }
@media (max-width: 900px) { .bundles { grid-template-columns: 1fr; } }

.empty-state { color: var(--dim); }

/* ---------------------------------------------------------------
   11. CHANGELOG
   --------------------------------------------------------------- */
.log { display: grid; grid-template-columns: 9rem 1fr; gap: var(--s4); }
@media (max-width: 720px) { .log { grid-template-columns: 1fr; gap: var(--s1); } }
.log-when { font-family: var(--face-mono); font-size: var(--t-data); color: var(--dim-p); padding-top: 0.35rem; }
.entry + .entry { margin-top: var(--s5); }
.entry .head { margin-bottom: var(--s2); }
.entry ul { margin: var(--s2) 0 0 1.1em; }
.entry li { margin-bottom: 0.35rem; color: var(--dim-p); }
.entry li::marker { color: var(--rust-p); }
.entry .feed { color: var(--dim-p); }
.entry .feed li { border-color: var(--rule-p); color: var(--dim-p); }
.callout { padding: var(--s3); background: var(--paper-2); }
.callout.correction { border-left: 3px solid var(--rust-p); }
.panel-accent { padding: var(--s3); background: var(--ground-2); }
.paper .panel-accent { background: var(--paper-2); }
.subhead { font-family: var(--face-display); font-weight: 600; }

/* ---------------------------------------------------------------
   12. RANGE PANEL
   --------------------------------------------------------------- */
.range-frame { width: 100%; height: calc(100dvh - 4.5rem); border: 0; display: block; background: var(--ground); }
.range-note { padding: var(--s2) var(--gutter); font-family: var(--face-mono); font-size: var(--t-data); color: var(--dim); }

/* ---------------------------------------------------------------
   13. FOOTER (inside each panel)
   --------------------------------------------------------------- */
.foot { padding: var(--s4) var(--gutter); display: flex; justify-content: space-between; gap: var(--s3); flex-wrap: wrap; font-family: var(--face-mono); font-size: var(--t-data); color: var(--dim); }
.paper .foot { color: var(--dim-p); }
.foot a { text-decoration: none; }
.foot a:hover { color: var(--rust); }

/* ---------------------------------------------------------------
   14. MOTION PREFERENCES
   --------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
