/* wrongway.ca
   Built from the wrongway.ca brand kit: a calm forest at night, the name set
   plainly, and one thin green line that follows it.
   Night is the default; Day follows a light system preference.
   All CSS lives here: the Content-Security-Policy allows no inline styles. */

/* ---------- Font: Manrope, self-hosted (SIL OFL 1.1, /fonts/OFL.txt) ---------- */
@font-face {
  font-family: "Manrope";
  src: url("/fonts/Manrope-latin-ext.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
  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";
  src: url("/fonts/Manrope-latin.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
  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;
}

/* ---------- Tokens (brand kit) ---------- */
:root {
  /* palette */
  --void: #031B14;
  --forest: #0D281F;
  --basalt: #252C28;
  --stone: #3B403C;
  --mist: #A49F93;
  --fog: #F1EFE9;
  --fog-deep: #E6E3DB;
  --emerald: #19F267;
  --emerald-ink: #17683C;

  /* Night (default) */
  --ground: var(--void);
  --surface: var(--forest);
  --ink: var(--fog);
  --ink-muted: var(--mist);
  --line: var(--emerald);
  --link: var(--emerald);
  --on-line: var(--void);
  --edge: var(--mist);
  --hairline: rgba(241, 239, 233, 0.14);
  --focus: var(--emerald);
  color-scheme: dark;

  /* type */
  --font-display: "Manrope", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-text: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  /* space and shape */
  --space-4: 4px;
  --space-8: 8px;
  --space-12: 12px;
  --space-16: 16px;
  --space-24: 24px;
  --space-32: 32px;
  --space-48: 48px;
  --space-64: 64px;
  --space-96: 96px;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-tile: 22.37%;
  --gutter: max(16px, min(5vw, 64px));
  --measure: 62ch;

  /* the route */
  --route-weight: 0.035em;
  --route-gap: 0.2em;
  --route-rise: 0.16em;
  --route-bend-width: 0.56em;
  --route-bend-height: 0.3em;
  --route-short: 1.4em;
  --station-line: 3px;
}

@media (prefers-color-scheme: light) {
  :root {
    --ground: var(--fog);
    --surface: var(--fog-deep);
    --ink: var(--void);
    --ink-muted: var(--stone);
    --line: var(--emerald-ink);
    --link: var(--emerald-ink);
    --on-line: var(--fog);
    --edge: var(--stone);
    --hairline: rgba(3, 27, 20, 0.14);
    --focus: var(--emerald-ink);
    color-scheme: light;
  }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: 17px;
  line-height: 27px;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }
h1, h2, h3 { text-wrap: balance; }
p { margin: 0; }
a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 0.22em; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}
::selection { background: var(--line); color: var(--on-line); }

.container {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.skip {
  position: absolute;
  left: var(--space-16);
  top: -100px;
  z-index: 10;
  padding: var(--space-12) var(--space-16);
  border-radius: var(--radius-sm);
  background: var(--ink);
  color: var(--ground);
  font-weight: 600;
}
.skip:focus { top: var(--space-16); }

/* ---------- The name and its line ---------- */
.lockup {
  --w: max(1.5px, var(--route-weight));
  display: flex;
  align-items: baseline;
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1;
  color: var(--ink);
}
.wordmark {
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.route {
  flex: 1 1 auto;
  min-width: var(--route-short);
  display: inline-flex;
  align-items: flex-end;
  align-self: baseline;
  height: calc(var(--route-bend-height) + var(--w));
  margin-left: var(--route-gap);
  position: relative;
  top: calc(var(--w) / 2 - var(--route-rise));
  color: var(--line);
}
.route-run {
  flex: 1 1 auto;
  height: var(--w);
  background: currentColor;
  border-radius: 999px;
}
.route-bend {
  flex: none;
  width: var(--route-bend-width);
  height: var(--route-bend-height);
  margin-left: calc(var(--w) / -2);
  margin-bottom: calc(var(--w) / 2);
  overflow: visible;
}
.route-bend path {
  fill: none;
  stroke: currentColor;
  stroke-width: var(--w);
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}

/* ---------- Header ---------- */
.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-16) var(--space-24);
  padding-block: var(--space-24);
}
.home {
  font-family: var(--font-display);
  font-size: 22px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: -0.005em;
  color: var(--ink);
  text-decoration: none;
}
.header-rule {
  flex: 1 1 48px;
  height: 1px;
  background: var(--hairline);
}
.nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-8) var(--space-24);
  margin: 0;
  padding: 0;
  list-style: none;
}
.nav a {
  display: inline-block;
  padding-block: var(--space-8);
  color: var(--ink);
  font-size: 15px;
  line-height: 18px;
  font-weight: 600;
  text-decoration: none;
}
.nav a:hover { text-decoration: underline; text-decoration-thickness: 1px; }

/* ---------- Hero ---------- */
.top {
  position: relative;
  overflow: hidden;
  background: var(--ground);
}
.top-media {
  position: absolute;
  inset: 0;
  background-color: var(--void);
  background-image: url("/img/forest-mist-basalt.webp");
  background-size: cover;
  background-position: 70% 42%;
  background-repeat: no-repeat;
}
.hero {
  position: relative;
  display: grid;
  align-content: center;
  gap: var(--space-24);
  min-height: min(48vw, 680px);
  padding-block: clamp(56px, 7vw, 112px);
  /* text starts on the same edge as the 1200px column; the line runs on past it */
  padding-left: max(var(--gutter), calc((100% - 1200px) / 2 + var(--gutter)));
  padding-right: var(--gutter);
}
.hero .lockup {
  font-size: clamp(44px, 9.2vw, 136px);
  padding-right: 6vw;
}
.hero-copy { display: grid; gap: var(--space-16); max-width: 34rem; }
.byline,
.lede {
  font-family: var(--font-display);
  font-weight: 500;
  color: var(--ink);
}
.byline { font-size: 20px; line-height: 28px; }
.lede { font-size: 24px; line-height: 34px; }

/* Mid-size screens: the forest starts further right and fades into the
   ground, so the text always sits on plain dark ground */
@media (min-width: 721px) and (max-width: 1180px) {
  .top-media {
    left: 30%;
    -webkit-mask-image: linear-gradient(to right, transparent, #000 35%);
    mask-image: linear-gradient(to right, transparent, #000 35%);
  }
}

/* Day: the forest becomes a window beside the text */
@media (prefers-color-scheme: light) and (min-width: 721px) {
  .top-media {
    left: auto;
    -webkit-mask-image: none;
    mask-image: none;
    inset: var(--space-16) var(--gutter) var(--space-48) auto;
    width: 38%;
    border-radius: var(--radius-lg);
    background-position: 82% 60%;
  }
  .hero .lockup {
    font-size: clamp(40px, 6.4vw, 96px);
    padding-right: 0;
    max-width: 58%;
  }
  .hero-copy { max-width: min(34rem, 56%); }
}

/* Phones: the forest is a band above the text, in both themes */
@media (max-width: 720px) {
  .top { display: grid; }
  .top-media {
    position: relative;
    inset: auto;
    height: 58vw;
    background-position: 78% 45%;
  }
  .hero {
    min-height: 0;
    padding-block: var(--space-32) var(--space-48);
  }
  .hero .lockup { font-size: clamp(36px, 10.5vw, 64px); padding-right: 0; }
  .byline { font-size: 17px; line-height: 24px; }
  .lede { font-size: 20px; line-height: 29px; }
}
@media (max-width: 720px) and (prefers-color-scheme: light) {
  .top-media {
    margin-inline: var(--gutter);
    border-radius: var(--radius-md);
  }
}

/* ---------- Sections ---------- */
.section { padding-block: clamp(64px, 8vw, 112px); }
.section + .section { padding-top: 0; }
.section-head {
  display: flex;
  align-items: center;
  gap: var(--space-24);
  margin: 0 0 var(--space-48);
  font-family: var(--font-display);
  font-size: clamp(28px, 1.6rem + 1vw, 40px);
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.section-head::after {
  content: "";
  flex: 1 1 48px;
  height: 1px;
  background: var(--hairline);
}

/* ---------- Stations: apps as stops on one line ---------- */
.line {
  --stop: 20px;
  --stop-y: 48px;
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--space-48);
}
.station {
  container-type: inline-size;
  position: relative;
  display: grid;
  grid-template-columns: var(--stop) minmax(0, 1fr);
  column-gap: var(--space-24);
  align-items: start;
}
.station:not(:last-child)::after {
  content: "";
  position: absolute;
  left: calc(var(--stop) / 2 - var(--station-line) / 2);
  top: var(--stop-y);
  height: calc(100% + var(--space-48));
  width: var(--station-line);
  background: var(--line);
}
/* The stretch toward stops that haven't opened yet is dashed, and the
   line runs on past the last one, fading out: more further down. */
.station:has(+ .station--soon)::after {
  background: none;
  border-left: var(--station-line) dashed var(--edge);
}
.station--soon:last-child::after {
  content: "";
  position: absolute;
  left: calc(var(--stop) / 2 - var(--station-line) / 2);
  top: var(--stop-y);
  height: calc(var(--stop-y) + var(--space-32));
  border-left: var(--station-line) dashed var(--edge);
  -webkit-mask-image: linear-gradient(#000 30%, transparent);
  mask-image: linear-gradient(#000 30%, transparent);
}
.stop {
  position: relative;
  z-index: 1;
  width: var(--stop);
  height: var(--stop);
  margin-top: calc(var(--stop-y) - var(--stop) / 2);
  border: var(--station-line) solid var(--line);
  border-radius: 50%;
  background: var(--ground);
}
.stop--unlit { border-color: var(--edge); }
.stop--terminus { background: var(--line); }

.panel {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: var(--space-32);
  padding: var(--space-32);
  border-radius: var(--radius-md);
  background: var(--surface);
}
.panel--rift { grid-template-columns: 112px minmax(0, 1fr) 200px; }
.plate {
  width: 112px;
  aspect-ratio: 1;
  border-radius: var(--radius-md);
  background: var(--void);
  overflow: hidden;
}
.plate img { display: block; width: 100%; height: 100%; object-fit: cover; }
.station-body { display: grid; gap: var(--space-12); align-content: start; min-width: 0; }
.status {
  font-size: 14px;
  line-height: 18px;
  font-weight: 600;
  color: var(--ink-muted);
}
.station-name {
  margin: 0;
  font-family: var(--font-display);
  font-size: 36px;
  line-height: 42px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.station-line {
  font-family: var(--font-display);
  font-size: 22px;
  line-height: 30px;
  font-weight: 500;
  color: var(--ink);
}
.station-desc { max-width: var(--measure); }
.features {
  margin: 0;
  padding-left: 1.2em;
  max-width: var(--measure);
  font-size: 15px;
  line-height: 22px;
}
.features li + li { margin-top: var(--space-4); }
.actions { display: flex; flex-wrap: wrap; gap: var(--space-12); margin-top: var(--space-8); }
.notice {
  margin-top: var(--space-8);
  max-width: var(--measure);
  font-size: 13px;
  line-height: 18px;
  color: var(--ink-muted);
}
/* Stops ahead: no panel, a small plate, a name and one sentence.
   Quieter than a shipped app on purpose. */
.soon {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: var(--space-24);
  align-items: start;
  padding-top: calc(var(--stop-y) - 36px);
}
.soon .plate { width: 72px; }
.soon-body { display: grid; gap: var(--space-8); min-width: 0; }
.soon-name {
  margin: 0;
  font-family: var(--font-display);
  font-size: 24px;
  line-height: 30px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.soon-line {
  max-width: var(--measure);
  font-family: var(--font-display);
  font-size: 18px;
  line-height: 26px;
  font-weight: 500;
  color: var(--ink);
}
.soon-desc {
  max-width: var(--measure);
  font-size: 16px;
  line-height: 25px;
  color: var(--ink-muted);
}
.shot { margin: 0; align-self: start; }
.shot img {
  display: block;
  width: 100%;
  border-radius: var(--radius-md);
  background: var(--void);
}
@container (max-width: 804px) {
  .panel--rift { grid-template-columns: 112px minmax(0, 1fr); }
  .panel--rift .shot { grid-column: 2; max-width: 220px; }
}
@container (max-width: 564px) {
  .panel, .panel--rift { grid-template-columns: minmax(0, 1fr); gap: var(--space-24); padding: var(--space-24); }
  .panel--rift .shot { grid-column: auto; max-width: 220px; }
  .panel .plate { width: 80px; }
  .soon { grid-template-columns: 56px minmax(0, 1fr); gap: var(--space-16); padding-top: calc(var(--stop-y) - 28px); }
  .soon .plate { width: 56px; }
  .station-name { font-size: 30px; line-height: 36px; }
  .station-line { font-size: 19px; line-height: 26px; }
}

/* ---------- Buttons ---------- */
.button {
  display: inline-flex;
  align-items: center;
  gap: var(--space-8);
  min-height: 44px;
  padding: var(--space-8) var(--space-16);
  border: 2px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--line);
  color: var(--on-line);
  font-family: var(--font-display);
  font-size: 15px;
  line-height: 1.2;
  font-weight: 700;
  text-decoration: none;
}
.button:hover { background: var(--ink); border-color: var(--ink); color: var(--ground); }
.button .detail { font-weight: 500; }

/* ---------- How I work ---------- */
.principles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-32) var(--space-48);
  margin: 0;
  padding: 0;
  list-style: none;
}
.principles h3 {
  margin: 0 0 var(--space-12);
  font-family: var(--font-display);
  font-size: 24px;
  line-height: 30px;
  font-weight: 700;
  color: var(--ink);
}
.principles p { max-width: 40ch; }
.rules {
  margin-top: var(--space-48);
  padding-top: var(--space-24);
  border-top: 1px solid var(--hairline);
  max-width: var(--measure);
  font-size: 15px;
  line-height: 22px;
  color: var(--ink-muted);
}

/* ---------- Write to me (the terminus) ---------- */
.terminus-body { display: grid; gap: var(--space-16); padding-top: calc(var(--stop-y) - 21px); }
.terminus-body > p { max-width: var(--measure); }
.terminus-body .section-head { margin: 0; }
.email {
  font-family: var(--font-display);
  font-size: clamp(26px, 1.2rem + 2vw, 44px);
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.01em;
  overflow-wrap: anywhere;
}
.email a { text-decoration-thickness: 2px; text-underline-offset: 0.18em; }
.email a:hover { text-decoration-thickness: 3px; }
.help { color: var(--ink-muted); }

/* ---------- Footer ---------- */
.site-footer {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-8) var(--space-24);
  justify-content: space-between;
  padding-block: var(--space-24) var(--space-48);
  border-top: 1px solid var(--hairline);
  font-size: 13px;
  line-height: 18px;
  color: var(--ink-muted);
}
.site-footer a { color: var(--ink); }

/* ---------- Not found ---------- */
.lost {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-64);
  padding-block: clamp(64px, 10vw, 144px);
}
.lost section { display: grid; gap: var(--space-24); align-content: start; }
.lost .lockup { font-size: clamp(36px, 4.6vw, 64px); }
.lost .wordmark { white-space: normal; }
.lost p { max-width: 40ch; }

/* Nothing moves. Hover changes are instant, so there is nothing to reduce. */
