/* CommentMetro website. Midnight look: near black, white, one purple. */

@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 500 800;
  font-display: swap;
  src: url('/fonts/manrope-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
    U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 500 800;
  font-display: swap;
  src: url('/fonts/manrope-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #000000;
  --card: #0e0e12;
  --line: #26262e;
  --field: #1a1a21;
  --field-line: #32323d;
  --text: #f4f4f5;
  --soft: #d4d4d8;
  --muted: #a1a1aa;
  --accent: #a78bfa;
  --accent-bright: #c4b5fd;
  --accent-ink: #0e0e12;
  --danger: #fca5a5;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { background: var(--bg); }

/*
 * The metro map. It is a drawing made by tools/make-metro-map.mjs, fixed
 * behind every page and scaled to cover the window. It fades a little at the
 * top and bottom so the header and footer links stay easy to read.
 */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background: #000 url('/metro-map-still.svg') center / cover no-repeat;
  opacity: 0.92;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.4) 0, #000 150px, #000 calc(100% - 130px), rgba(0, 0, 0, 0.4) 100%);
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.4) 0, #000 150px, #000 calc(100% - 130px), rgba(0, 0, 0, 0.4) 100%);
}
/* On larger screens, and only for people who have not asked for less motion,
   the lines draw themselves in once and two small trains glide along. */
@media (prefers-reduced-motion: no-preference) and (min-width: 900px) {
  body::before { background-image: url('/metro-map.svg'); }
}

/*
 * The station names on the map: well-known places on the web. They are not
 * part of the drawing. map.js sets each one at its station and shows it only
 * while it is clear of the page's own words, so a name never sits behind
 * something there to be read. This layer covers the window exactly as the
 * drawing does, and fades at the top and bottom with it.
 */
.map-names {
  position: fixed;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  opacity: 0.92;
  pointer-events: none;
  -webkit-user-select: none;
  user-select: none;
  font-family: 'Manrope', system-ui, 'Segoe UI', sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.2px;
  fill: #7c7c88;
  -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.4) 0, #000 150px, #000 calc(100% - 130px), rgba(0, 0, 0, 0.4) 100%);
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.4) 0, #000 150px, #000 calc(100% - 130px), rgba(0, 0, 0, 0.4) 100%);
}
.map-names text { transition: opacity 240ms ease; }
.map-names .strong { fill: #a1a1aa; font-weight: 800; }
.map-names .off { opacity: 0; }
/* The names come in after the page has settled, and on larger screens with
   the stations, once the lines have drawn themselves. */
@media (prefers-reduced-motion: no-preference) {
  .map-names { animation: names-in 900ms ease 800ms both; }
}
@media (prefers-reduced-motion: no-preference) and (min-width: 900px) {
  .map-names { animation-delay: 1300ms; }
}
@keyframes names-in {
  from { opacity: 0; }
  to { opacity: 0.92; }
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: var(--text);
  font-family: 'Manrope', system-ui, 'Segoe UI', sans-serif;
  font-weight: 500;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-bright); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.wrap {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}

/* ---- top bar ---- */
.top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 24px;
  padding-bottom: 24px;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; }
.brand:hover { color: var(--text); }
.brand-mark {
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 10px;
  background: var(--accent);
  color: var(--accent-ink);
}
/* The windshield, destination strip and headlights show the tile through the cab. */
.brand-mark .cut { fill: var(--accent); }
.brand-name { font-size: 18px; font-weight: 800; letter-spacing: -0.01em; }
.top-note { font-size: 14px; color: var(--muted); }
.top-note a { font-weight: 700; }

/* ---- main area ---- */
.main {
  flex: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 56px;
  padding-top: 32px;
  padding-bottom: 56px;
}
.pitch { position: relative; z-index: 0; flex: 1 1 420px; min-width: 0; }
/* A soft pool of black behind the words, so map lines never cut through them. */
.pitch::before {
  content: '';
  position: absolute;
  inset: 12px;
  z-index: -1;
  border-radius: 48px;
  background: rgba(0, 0, 0, 0.88);
  /* A blurred shadow makes the soft edge. Unlike a bigger box, a shadow
     never makes the page wider than the window. */
  box-shadow: 0 0 52px 44px rgba(0, 0, 0, 0.88);
  pointer-events: none;
}
.pitch h1 {
  margin: 0;
  font-size: clamp(34px, 4.4vw, 54px);
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -0.03em;
}
.pitch p { margin: 20px 0 0; max-width: 460px; font-size: 17px; line-height: 1.55; color: var(--muted); }

/* ---- the small sample thread ---- */
.sample {
  max-width: 420px;
  margin-top: 36px;
  padding: 18px;
  border-radius: 20px;
  background: var(--card);
  border: 1px solid var(--line);
}
.sample-address {
  height: 30px;
  display: flex; align-items: center;
  padding: 0 12px;
  border-radius: 15px;
  background: var(--field);
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap; overflow: hidden;
}
.sample-row { display: flex; gap: 12px; margin-top: 16px; }
.sample-rail { position: relative; width: 36px; flex: none; }
.sample-rail::after {
  content: '';
  position: absolute; left: 17px; top: 42px; bottom: 0;
  width: 2px; border-radius: 1px;
  background: var(--accent);
}
.avatar {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 18px;
  background: #6d28d9;
  color: #fff;
  font-size: 14px; font-weight: 800;
}
.sample-body { flex: 1; min-width: 0; }
.sample-handle { font-size: 13px; font-weight: 700; color: var(--muted); }
.sample-text { margin-top: 3px; font-size: 15px; line-height: 1.45; }
.sample-reply { position: relative; display: flex; gap: 10px; margin-top: 14px; }
.sample-reply::before {
  content: '';
  position: absolute; left: -31px; top: 12px;
  width: 31px; height: 2px;
  background: var(--accent);
}
.sample-reply::after {
  content: '';
  position: absolute; left: -34px; top: 14px; bottom: 0;
  width: 8px;
  background: var(--card);
}
.avatar-ring {
  position: relative;
  width: 26px; height: 26px; flex: none;
  display: flex; align-items: center; justify-content: center;
  border-radius: 13px;
  background: var(--card);
  border: 2px solid var(--accent);
  color: #fff;
  font-size: 10px; font-weight: 800;
}
.sample-reply .sample-text { font-size: 14px; }

/* ---- card + form ---- */
.card {
  flex: 1 1 380px;
  max-width: 440px;
  min-width: 0;
  padding: 32px;
  border-radius: 24px;
  background: var(--card);
  border: 1px solid var(--line);
}
.card-center { margin: 0 auto; flex: none; width: 100%; }
.card h2 { margin: 0; font-size: 22px; font-weight: 800; letter-spacing: -0.01em; }
.card .lead { margin: 10px 0 0; font-size: 15px; line-height: 1.5; color: var(--muted); }

.field { margin-top: 20px; }
.field:first-of-type { margin-top: 24px; }
.field label { display: block; font-size: 13px; font-weight: 700; color: var(--soft); }
.input, .handle-box {
  display: flex; align-items: center;
  width: 100%; height: 48px;
  margin-top: 8px;
  padding: 0 16px;
  border-radius: 14px;
  background: var(--field);
  border: 1px solid var(--field-line);
  color: var(--text);
  font: inherit; font-size: 16px; font-weight: 600;
}
.input::placeholder, .handle-box input::placeholder { color: #8e8e99; opacity: 1; }
.input:focus-visible { outline-offset: 0; }
.handle-box:focus-within { outline: 2px solid var(--accent); }
.handle-box .at { font-size: 16px; font-weight: 700; color: var(--accent); }
.handle-box input {
  flex: 1; min-width: 0; height: 40px;
  margin-left: 4px; padding: 0;
  border: 0; outline: 0;
  background: transparent;
  color: var(--text);
  font: inherit; font-size: 16px; font-weight: 600;
}
/* The sign-in field takes a handle or an email. Its @ is a ghost: faint while
   the field is empty, lit once a handle is typed, gone for an email address.
   It keeps its place either way, so the words never jump sideways. */
.handle-box.ghost .at { color: var(--muted); opacity: 0.5; transition: opacity 160ms ease, color 160ms ease; }
.handle-box.ghost.has-handle .at { color: var(--accent); opacity: 1; }
.handle-box.ghost.is-email .at { opacity: 0; }
.hint { margin-top: 8px; font-size: 13px; line-height: 1.45; color: var(--muted); }
.error { margin-top: 8px; font-size: 13px; line-height: 1.45; font-weight: 600; color: var(--danger); }
.error:empty { display: none; }
.field.bad .input, .field.bad .handle-box { border-color: var(--danger); }

.check { display: flex; align-items: flex-start; gap: 12px; margin-top: 22px; }
.check input { width: 20px; height: 20px; flex: none; margin: 1px 0 0; accent-color: var(--accent); }
.check label { font-size: 14px; line-height: 1.45; color: var(--soft); }

.button {
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 50px;
  margin-top: 22px;
  border: 0; border-radius: 25px;
  background: var(--accent);
  color: var(--accent-ink);
  font: inherit; font-size: 16px; font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  transition: background 160ms ease, transform 120ms ease;
}
.button:hover { background: var(--accent-bright); color: var(--accent-ink); }
.button:active { transform: scale(0.985); }
.button[disabled] { opacity: 0.6; cursor: default; }
.button.quiet { background: var(--field); color: var(--text); border: 1px solid var(--field-line); }
.button.quiet:hover { background: #22222b; color: var(--text); }

.fine { margin-top: 14px; text-align: center; font-size: 13px; color: var(--muted); }
.form-error { margin-top: 16px; }

.notice {
  margin-top: 20px;
  padding: 14px 16px;
  border-radius: 14px;
  background: #14111e;
  border: 1px solid rgba(167, 139, 250, 0.35);
  font-size: 14px; line-height: 1.5;
  color: var(--soft);
  overflow-wrap: anywhere;
}
.notice strong { color: var(--text); }

.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.actions .button { width: auto; min-width: 180px; margin-top: 0; padding: 0 24px; }
.card .button + .button { margin-top: 12px; }

.pitch p.aside { margin-top: 16px; font-size: 14px; }

/* Something to type, such as an address. */
.code {
  padding: 2px 8px;
  border-radius: 8px;
  background: var(--field);
  border: 1px solid var(--field-line);
  color: var(--text);
  font-family: ui-monospace, 'Cascadia Mono', Consolas, Menlo, monospace;
  font-size: 13px;
  white-space: nowrap;
}

/* ---- steps, drawn as stops on a line ---- */
.route {
  flex: 1 1 100%;
  min-width: 0;
  padding: 28px 32px 30px;
  border-radius: 24px;
  background: var(--card);
  border: 1px solid var(--line);
}
.route h2 { margin: 0 0 22px; font-size: 18px; font-weight: 800; letter-spacing: -0.01em; }

.stops { list-style: none; margin: 0; padding: 0; counter-reset: stop; }
.card .stops { margin-top: 24px; }
.stops li { position: relative; padding: 0 0 24px 46px; counter-increment: stop; }
.stops li:last-child { padding-bottom: 0; }
/* the stop: a ringed station with its number */
.stops li::before {
  content: counter(stop);
  position: absolute; left: 0; top: 0;
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 15px;
  background: var(--card);
  border: 2px solid var(--accent);
  color: var(--text);
  font-size: 13px; font-weight: 800;
}
/* the line on to the next stop */
.stops li::after {
  content: '';
  position: absolute; left: 14px; top: 36px; bottom: 6px;
  width: 2px; border-radius: 1px;
  background: var(--accent);
}
.stops li:last-child::after { display: none; }
.stops h3 { margin: 0; font-size: 16px; font-weight: 800; line-height: 30px; letter-spacing: -0.01em; }
.stops p { margin: 2px 0 0; font-size: 14px; line-height: 1.55; color: var(--muted); }
.stops a { font-weight: 700; white-space: nowrap; }

/* On a wide screen the three stops run left to right. */
@media (min-width: 761px) {
  .stops.across { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
  .stops.across li { padding: 42px 0 0; }
  .stops.across li::after { left: 38px; right: -20px; top: 14px; bottom: auto; width: auto; height: 2px; }
}

/* ---- footer ---- */
.foot {
  display: flex; flex-wrap: wrap; gap: 24px;
  padding-top: 20px; padding-bottom: 28px;
  border-top: 1px solid var(--field);
  font-size: 13px;
}
.foot a, .foot span { color: var(--muted); }

[hidden] { display: none !important; }

/* ---- arriving on a page: the words and the card rise into place, once ---- */
@media (prefers-reduced-motion: no-preference) {
  .pitch > *, .card, .route {
    animation: arrive 620ms cubic-bezier(0.22, 1, 0.36, 1) both;
  }
  .pitch > :nth-child(2) { animation-delay: 70ms; }
  .pitch > :nth-child(n + 3) { animation-delay: 140ms; }
  .card { animation-delay: 110ms; }
  .route { animation-delay: 200ms; }
}
@keyframes arrive {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
