/* openpublic.com: the station entrance. Transit Map world shared with shopping.openpublic.com (DESIGN.md). */
@font-face { font-family: "Red Hat Display"; src: url(fonts/red-hat-display-wght.woff2) format("woff2"); font-weight: 300 900; font-display: swap; }
@font-face { font-family: "Atkinson Hyperlegible"; src: url(fonts/atkinson-hyperlegible-400-normal.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Atkinson Hyperlegible"; src: url(fonts/atkinson-hyperlegible-700-normal.woff2) format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --mid: #0d1b3e; --mid2: #16295a; --mline: #2b4078; --por: #f2f2ec; --pdim: #c5cee6; --pmute: #9fb0d8;
  --scarlet: #e63329; --amber: #f2a900; --cobalt: #1f6fd1; --green: #2e9e5b;
  --bg: #f2f2ec; --surface: #fff; --text: #0d1b3e; --body: #2c3550; --muted: #4f5a74; --link: #1a5bb0;
  --display: "Red Hat Display", "Atkinson Hyperlegible", system-ui, sans-serif;
  --sans: "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #0a1228; --surface: #111c3a; --text: #eef0f6; --body: #d6dbe8; --muted: #a9b3cc; --link: #9cc0ff; }
}

* { box-sizing: border-box; }
html { scrollbar-color: var(--mline) var(--mid); }
body { margin: 0; background: var(--bg); color: var(--text); font: 1.0625rem/1.6 var(--sans); caret-color: var(--amber); }
::selection { background: var(--amber); color: var(--mid); }
a { color: var(--link); text-underline-offset: .18em; }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; }

.station { min-height: 100vh; display: grid; grid-template-columns: minmax(380px, 36%) 1fr; }

/* ---------- the totem ---------- */
.totem { position: relative; background: var(--mid); color: #fff; padding: 40px clamp(28px, 3.2vw, 48px) 56px;
  background-image: radial-gradient(circle, rgb(197 206 230 / .12) 1.3px, transparent 1.6px); background-size: 22px 22px;
  display: flex; flex-direction: column; }
.totem::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 8px;
  background: linear-gradient(90deg, var(--scarlet) 25%, var(--amber) 25% 50%, var(--cobalt) 50% 75%, var(--green) 75%); }
.brand { display: flex; align-items: center; gap: 16px; color: #fff; text-decoration: none; padding-bottom: 28px; border-bottom: 2px solid var(--mline); }
.brand .mark { width: 78px; height: 52px; flex: none; }
.brand span { font: 900 clamp(2rem, 3vw, 2.625rem)/1 var(--display); letter-spacing: -.022em; }

.plates { list-style: none; margin: 28px 0 0; padding: 0; display: grid; gap: 14px; }
.lead-plate { padding: 24px 22px 28px; grid-template-columns: 60px 1fr 30px; }
.lead-plate .badge { width: 60px; height: 60px; }
.lead-plate .pt b { font-size: 2rem; }
.lead-plate .pt span { color: #d6dbe8; }
.plate { position: relative; display: grid; grid-template-columns: 52px 1fr 28px; align-items: center; gap: 16px;
  padding: 18px 20px 20px; border-radius: 14px; background: var(--mid2); color: #fff; text-decoration: none; overflow: hidden;
  transition: opacity .3s cubic-bezier(.16, 1, .3, 1), background-color .3s cubic-bezier(.16, 1, .3, 1); }
/* the plate's line: a short stub of its colour along the foot that runs the full width on hover */
.plate::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 5px; background: var(--ln);
  transition: height .4s cubic-bezier(.16, 1, .3, 1); }
.badge { width: 52px; height: 52px; }
.badge rect { fill: var(--ln); }
.pt b { display: block; font: 900 1.625rem/1.1 var(--display); letter-spacing: -.012em; }
.pt span { display: block; margin-top: 4px; font-size: .9375rem; line-height: 1.4; color: var(--pdim); }
.arrow { width: 28px; height: 28px; fill: none; stroke: #fff; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round;
  transition: transform .45s cubic-bezier(.16, 1, .3, 1); }
a.plate:hover::after, a.plate:focus-visible::after { height: 10px; }
a.plate:hover .arrow, a.plate:focus-visible .arrow { transform: translateX(5px); }
a.plate:focus-visible { outline-offset: 2px; }
.plates:has(a.plate:hover, a.plate:focus-visible) li:not(:hover, :focus-within) .plate { opacity: .45; }

.plate.soon { background: none; box-shadow: inset 0 0 0 2px var(--mline); }
.plate.soon::after { left: 0; right: 0; background: repeating-linear-gradient(90deg, var(--ln) 0 18px, transparent 18px 30px);
  animation: build 1.6s linear infinite paused; }
.plate.soon:hover::after { animation-play-state: running; }
@keyframes build { to { background-position: 30px 0; } }
.plate.soon .badge rect { fill: none; stroke: var(--ln); stroke-width: 3; stroke-dasharray: 7 5; }
.plate.soon .pt b { color: var(--pdim); }
.tag { justify-self: end; grid-column: 3; font: 800 .6875rem/1.2 var(--display); letter-spacing: .08em; text-transform: uppercase;
  color: var(--pmute); writing-mode: vertical-rl; transform: rotate(180deg); }

/* "You are here": a round station; on desktop, once the lines are drawn, it becomes the logo's interchange capsule */
.here { margin-top: 30px; display: flex; align-items: center; gap: 14px; position: relative; z-index: 1; }
.cap { flex: none; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: inset 0 0 0 4px var(--mid), 0 0 0 4px var(--amber); }
.here p { margin: 0; font: 700 .9375rem var(--display); color: var(--pdim); }
.here p b { color: var(--amber); font-weight: 800; }
.rails { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.rails path { fill: none; stroke-width: 7; stroke-linecap: round; stroke-linejoin: round; }
.totem.railed .plates { margin-left: 46px; }
.totem.railed .here { margin-top: auto; }
.totem.railed .cap { width: 30px; height: 46px; border-radius: 15px; box-shadow: inset 0 0 0 4px var(--mid), 0 0 0 4px var(--amber); }
.totem > :not(.rails) { position: relative; z-index: 1; }

/* ---------- the operator's notice ---------- */
.notice { padding: clamp(48px, 7vh, 88px) clamp(28px, 5vw, 80px) 40px; display: flex; flex-direction: column; max-width: 980px; }
h1 { font: 900 clamp(2.5rem, 5.4vw, 4.75rem)/.98 var(--display); letter-spacing: -.028em; margin: 0 0 24px; max-width: 13ch; text-wrap: balance; }
h1 em { font-style: normal; background: linear-gradient(transparent 64%, var(--amber) 64% 90%, transparent 90%); }
@media (prefers-color-scheme: dark) { h1 em { background: none; color: var(--amber); } }
.lead { font-size: clamp(1.125rem, 1.6vw, 1.3125rem); line-height: 1.5; color: var(--body); max-width: 46ch; margin: 0 0 40px; }

.rules { border: 2px solid var(--text); border-radius: 14px; background: var(--surface); padding: 24px 28px 26px; max-width: 760px; }
.rules h2 { margin: 0 0 16px; font: 900 1.25rem/1.2 var(--display); letter-spacing: -.01em; }
.rules ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 18px 32px; position: relative; }
.rules li { display: flex; gap: 14px; align-items: flex-start; }
.rules p { margin: 0; font-size: .9375rem; line-height: 1.5; color: var(--body); }
.rules p b { display: block; font: 800 1.0625rem/1.3 var(--display); color: var(--text); margin-bottom: 2px; }
.st { flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--mid); color: #fff; display: grid; place-items: center;
  font: 900 .9375rem/1 var(--display); font-variant-numeric: tabular-nums; }
@media (prefers-color-scheme: dark) { .st { background: var(--por); color: var(--mid); } }

.op { margin-top: auto; padding-top: 40px; font-size: .9375rem; color: var(--muted); }
.op p { margin: 0 0 4px; }
.op b { font-family: var(--display); color: var(--text); }

/* ---------- phones: the totem becomes the top of the page ---------- */
@media (max-width: 860px) {
  .station { grid-template-columns: 1fr; }
  .totem { padding: 24px 16px 40px; }
  .brand { padding-bottom: 20px; }
  .brand .mark { width: 60px; height: 40px; }
  .plates { margin-top: 20px; gap: 12px; }
  .plate { grid-template-columns: 44px 1fr 24px; gap: 14px; padding: 16px 16px 18px; }
  .badge { width: 44px; height: 44px; }
  .pt b { font-size: 1.375rem; }
  .here { margin-top: 22px; }
  .lead-plate .pt b { font-size: 1.625rem; }
  .lead-plate .badge { width: 50px; height: 50px; }
  .lead-plate { grid-template-columns: 50px 1fr 24px; padding: 20px 16px 24px; }
  .notice { padding: 36px 16px 32px; }
  h1 { margin-bottom: 18px; }
  .lead { margin-bottom: 28px; }
  .rules { padding: 20px 18px; }
  .rules ul { grid-template-columns: 1fr; gap: 16px; }
}
@media (prefers-reduced-motion: reduce) { *, *::after { transition: none !important; animation: none !important; } }
/* dark: the four-ink rule also runs down the totem's edge, so sign and notice stay two objects */
@media (prefers-color-scheme: dark) and (min-width: 861px) {
  .totem::before { content: ""; position: absolute; top: 0; bottom: 0; right: -6px; width: 6px; z-index: 1;
    background: linear-gradient(180deg, var(--scarlet) 25%, var(--amber) 25% 50%, var(--cobalt) 50% 75%, var(--green) 75%); }
  .notice { padding-left: calc(clamp(28px, 5vw, 80px) + 6px); }
}
/* the gutter lines join the hover signature: lines of the plates not pointed at dim with their plates */
.rails path { transition: opacity .3s cubic-bezier(.16, 1, .3, 1); }
.totem:has(li:nth-child(1) a.plate:is(:hover, :focus-visible)) .rails path:not(:nth-child(1)),
.totem:has(li:nth-child(2) a.plate:is(:hover, :focus-visible)) .rails path:not(:nth-child(2)) { opacity: .35; }

/* ---------- plain text pages (privacy, terms) ---------- */
.doc { max-width: 72ch; margin: 0 auto; padding: 0 20px 64px; }
.doc-top { background: var(--mid); color: #fff; padding: 22px 0 0; margin-bottom: 36px; position: relative; }
.doc-top::after { content: ""; display: block; height: 6px; margin-top: 22px;
  background: linear-gradient(90deg, var(--scarlet) 25%, var(--amber) 25% 50%, var(--cobalt) 50% 75%, var(--green) 75%); }
.doc-top .brand { max-width: 72ch; margin: 0 auto; padding: 0 20px; border: 0; }
.doc-top .brand span { font-size: 1.75rem; }
.doc h1 { font: 900 clamp(2rem, 5vw, 2.75rem)/1.08 var(--display); letter-spacing: -.02em; margin: 0 0 6px; }
.doc .upd { color: var(--muted); margin: 0 0 28px; }
.doc h2 { font: 900 1.25rem/1.25 var(--display); margin: 32px 0 8px; }
.doc p, .doc li { color: var(--body); }
.doc ul { padding-left: 1.2em; }
.doc .back { margin-top: 40px; padding-top: 18px; border-top: 1px solid color-mix(in srgb, var(--text) 18%, transparent); }
