/* Outwalked: shared tokens and the calm pages. Colours, type and plates come from the app (app/src/theme.ts). */

@font-face {
  font-family: 'Big Shoulders';
  src: url('/fonts/big-shoulders-display-900.woff2') format('woff2');
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Big Shoulders';
  src: url('/fonts/big-shoulders-display-800.woff2') format('woff2');
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Night: the app's dark ground. */
  --tarmac: #0D0E0C;
  --raised: #171915;
  --sunk: #090A08;
  --night-ink: #F3F1EA;
  --night-soft: #B5B3A8;
  --night-muted: #8A897F;
  --night-line: #2A2C26;
  /* Day: chalk. */
  --chalk: #F3F1EA;
  --paper: #FFFFFF;
  --chalk-sunk: #E9E6DC;
  --ink: #11120F;
  --ink-soft: #4B4C45;
  --ink-muted: #6B6C63;
  --chalk-line: #D9D5C8;
  /* Live: the line, the action, the flag. */
  --volt: #D4FF3A;
  --volt-deep: #B4DB24;
  --stop: #E8472B;
  /* The race's plates and the light and dark edges of their league frames (app/src/theme.ts). */
  --tomato: #FF5A3C;
  --amber: #FFB000;
  --sky: #4CB8FF;
  --pink: #FF6FB5;
  --cobalt: #3D69FF;
  --gold-hi: #FFE07A;
  --gold-lo: #C48A12;
  --diamond-hi: #F2FBFF;
  --diamond-lo: #5EB2E6;
  --platinum-hi: #C4F4E8;
  --platinum-lo: #3A9C86;

  --display: 'Big Shoulders', 'Arial Narrow', 'Roboto Condensed', Impact, sans-serif;
  --text: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;

  /* Five sizes. */
  --s1: 15px;
  --s2: 18px;
  --s3: clamp(21px, 1.9vw, 28px);
  --s4: clamp(46px, 6.4vw, 104px);
  --s5: clamp(84px, 15vw, 236px);

  --m: clamp(16px, 1.6vw, 24px);
  --in: cubic-bezier(0.2, 0.8, 0.2, 1);
  --out: cubic-bezier(0.4, 0, 1, 1);
  --fast: 140ms;
  --base: 220ms;
  --slow: 380ms;
}

@media (max-width: 640px) {
  :root { --s1: 14px; --s2: 17px; }
}

*, *::before, *::after { box-sizing: border-box; }

html {
  background: var(--volt);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--volt);
  color: var(--ink);
  font-family: var(--text);
  font-size: var(--s2);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration-thickness: 2px; text-underline-offset: 0.18em; }
h1, h2, h3, h4, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button, input { font: inherit; color: inherit; }

/* iPhone Safari paints a band under its bars from a wide fixed element at an edge's centre; two narrow markers
   leave it nothing to find, so the page runs under the bars. */
.sill {
  position: fixed;
  left: 50%;
  width: 40px;
  height: 48px;
  margin-left: -20px;
  z-index: 2147483647;
  pointer-events: none;
  background: transparent;
}
.sill-top { top: 0; }
.sill-bottom { bottom: 0; }
.sill i { display: block; width: 1px; height: 1px; } /* taste-skill-ignore: an invisible marker Safari reads for its edge colour, not a rule */

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: absolute;
  left: var(--m);
  top: -200px;
  z-index: 50;
  padding: 14px 20px;
  background: var(--ink);
  color: var(--volt);
  font-family: var(--display);
  font-weight: 900;
  font-size: 20px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-decoration: none;
}
.skip:focus { top: 56px; }

:focus-visible {
  outline: 3px solid var(--focus, var(--ink));
  outline-offset: 3px;
}

::selection { background: var(--ink); color: var(--volt); }

/* The lockup: the streak as tall as the capitals, a gap of 0.3em, the word in 900 tracked 0.04em. */
.lockup {
  display: inline-flex;
  align-items: center;
  gap: 0.3em;
  font-family: var(--display);
  font-weight: 900;
  font-size: 26px;
  line-height: 1;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  min-height: 44px;
}
.lockup .streak { flex: none; height: 0.81em; width: auto; aspect-ratio: 730 / 220; fill: currentColor; }
.lockup .word { display: block; padding-top: 0.06em; }

/* The calm pages: privacy, terms, support, legal notice, 404. */
.page {
  background: var(--chalk);
  --focus: var(--ink);
}
.page .masthead {
  background: var(--volt);
  color: var(--ink);
  padding: 0 var(--m) clamp(28px, 4vw, 56px);
}
.page .bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
}
.page .bar .streak { fill: var(--ink); }
.page .bar .lockup { flex: none; }
.page .bar nav ul { display: flex; flex-wrap: wrap; gap: 4px 18px; justify-content: flex-end; }
/* A phone: the lockup on its own row, the links in one row under it, from the left margin. */
@media (max-width: 559px) {
  .page .bar { flex-wrap: wrap; row-gap: 0; }
  .page .bar nav { flex-basis: 100%; }
  .page .bar nav ul { justify-content: flex-start; }
}
.page .bar nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-family: var(--display);
  font-weight: 800;
  font-size: 19px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-decoration: none;
}
.page .bar nav a:hover, .page .bar nav a[aria-current] { text-decoration: underline; text-decoration-thickness: 3px; }
.page .title {
  margin-top: clamp(28px, 7vw, 96px);
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(64px, 12vw, 176px);
  line-height: 0.86;
  text-transform: uppercase;
  letter-spacing: 0.005em;
}
.page .title .w { display: inline-block; white-space: nowrap; }
.page .title .ch {
  display: inline-block;
  animation: rise 640ms var(--in) both;
  animation-delay: calc(var(--i, 0) * 32ms);
}
.page .sub {
  margin-top: 20px;
  max-width: 44ch;
  font-size: var(--s3);
  line-height: 1.35;
  font-weight: 600;
}

/* Reading progress: a lane that fills as you read, driven by the scroll itself. */
.page .lane {
  position: sticky;
  top: 0;
  z-index: 5;
  height: 8px;
  background: var(--ink);
}
.page .lane i {
  display: block;
  height: 100%;
  background: var(--volt);
  transform-origin: 0 50%;
  transform: scaleX(var(--read, 0));
}
@supports (animation-timeline: scroll()) {
  .page .lane i {
    animation: lanefill linear both;
    animation-timeline: scroll(root);
  }
}
@keyframes lanefill { from { transform: scaleX(0); } to { transform: scaleX(1); } }

.doc {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 46rem) minmax(0, 1fr);
  padding: clamp(36px, 6vw, 80px) var(--m) clamp(56px, 8vw, 120px);
  color: var(--ink);
}
.doc > * { grid-column: 2; }
.doc .updated {
  font-family: var(--display);
  font-weight: 800;
  font-size: 19px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.doc h2 {
  margin: 76px 0 14px;
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(34px, 4vw, 52px);
  line-height: 0.95;
  text-transform: uppercase;
}
.doc h3 {
  margin: 32px 0 8px;
  font-family: var(--display);
  font-weight: 800;
  font-size: 25px;
  line-height: 1.05;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.doc p, .doc li { font-size: var(--s2); line-height: 1.6; max-width: 68ch; text-wrap: pretty; }
.doc p + p { margin-top: 14px; }
.doc ul { margin: 14px 0; display: grid; gap: 10px; }
.doc ul li { position: relative; padding-left: 26px; }
.doc ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 14px;
  height: 6px;
  background: var(--ink);
  clip-path: polygon(0 50%, 100% 0, 90% 100%);
}
.doc a { font-weight: 600; }
.doc .short {
  margin-top: 28px;
  padding: clamp(20px, 3vw, 32px);
  background: var(--ink);
  color: var(--chalk);
}
.doc .short h2 { margin-top: 0; color: var(--volt); }
.doc .short p, .doc .short li { color: var(--chalk); }
.doc .short ul li::before { background: var(--volt); }
.doc .short a { color: var(--volt); }
.doc dl { margin: 16px 0 0; display: grid; grid-template-columns: minmax(0, 15rem) minmax(0, 1fr); }
.doc dt, .doc dd { margin: 0; padding: 12px 0; font-size: var(--s2); line-height: 1.5; }
.doc dt { font-weight: 700; padding-right: 20px; }
@media (max-width: 640px) {
  .doc dl { grid-template-columns: 1fr; }
  .doc dt { padding-bottom: 0; }
  .doc dd { padding-top: 2px; }
  .doc dd + dt { padding-top: 18px; }
}
.doc .lang { margin-top: 14px; font-size: var(--s1); }

/* Questions and answers: a rule above each, the question in the display face, a plus that turns to a minus. */
.doc .qa { margin-top: 10px; border-top: 3px solid var(--ink); }
.doc .qa details { border-bottom: 2px solid var(--chalk-line); }
.doc .qa summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 60px;
  padding: 14px 0;
  cursor: pointer;
  list-style: none;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(22px, 2.2vw, 27px);
  line-height: 1.08;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.doc .qa summary::-webkit-details-marker { display: none; }
.doc .qa summary span { transition: transform var(--base) var(--in); }
.doc .qa summary:hover span { transform: translateX(6px); }
.doc .qa summary i { position: relative; flex: none; width: 20px; height: 20px; }
.doc .qa summary i::before,
.doc .qa summary i::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 4px;
  margin-top: -2px;
  background: var(--ink);
  transition: transform var(--base) var(--in);
}
.doc .qa summary i::after { transform: rotate(90deg); }
.doc .qa details[open] summary i::after { transform: rotate(0deg); }
.doc .qa details[open] summary { color: var(--ink); }
.doc .qa .a { padding: 0 0 22px; }
.doc .qa .a p + p { margin-top: 10px; }

/* The contact card on the support page: volt, the address as large as a headline. */
.doc .reach {
  margin: 8px 0 12px;
  padding: clamp(22px, 3.4vw, 40px);
  background: var(--volt);
  color: var(--ink);
}
.doc .reach p { max-width: 52ch; }
.doc .reach .mail {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin: 6px 0 10px;
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(30px, 5.4vw, 60px);
  line-height: 1;
  letter-spacing: 0.01em;
  text-decoration: underline;
  text-decoration-thickness: 4px;
  text-underline-offset: 0.12em;
  overflow-wrap: anywhere;
}

/* The 404: a plate that ran off the course, still bobbing as the walkers do at the start. */
.lost {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: clamp(22px, 4vw, 56px);
  align-items: center;
}
.doc .lost-plate {
  display: grid;
  place-items: center;
  width: clamp(150px, 24vw, 230px);
  max-width: none;
  aspect-ratio: 4 / 3;
  border-radius: 18% / 24%;
  border: clamp(7px, 1.1vw, 12px) solid;
  border-color: var(--gold-hi) var(--gold-lo) var(--gold-lo) var(--gold-hi);
  background: var(--tomato);
  color: var(--ink);
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(54px, 9.6vw, 92px);
  line-height: 1;
  letter-spacing: 0.01em;
  transform: rotate(-8deg);
  animation: lost 2400ms ease-in-out infinite;
}
@keyframes lost {
  0%, 100% { transform: rotate(-8deg) translateY(0); }
  50% { transform: rotate(-3deg) translateY(-10px); }
}
.lost p { max-width: 34ch; }
.doc .back {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  min-height: 64px;
  margin-top: 22px;
  padding: 10px 22px 12px;
  background: var(--ink);
  color: var(--volt);
  font-family: var(--display);
  font-weight: 900;
  font-size: 28px;
  line-height: 1;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  text-decoration: none;
  transition: transform var(--fast) var(--in);
}
.doc .back:hover { transform: translateY(-3px); }
.doc .back:active { transform: translateY(1px) scale(0.98); }
@media (max-width: 520px) {
  .lost { grid-template-columns: 1fr; }
}

.page .endnote {
  background: var(--ink);
  color: var(--chalk);
  padding: clamp(28px, 5vw, 64px) var(--m);
  --focus: var(--volt);
}
.page .endnote .lockup { color: var(--chalk); }
.page .endnote .lockup .streak { fill: var(--volt); }
.page .endnote ul { display: flex; flex-wrap: wrap; gap: 6px 22px; margin-top: 20px; }
.page .endnote a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 600;
}
.page .endnote .fine { margin-top: 18px; color: var(--night-soft); font-size: var(--s1); }

@keyframes rise {
  from { transform: translateY(0.5em) skewY(6deg); opacity: 0; }
  to { transform: none; opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .page .lane i { transform: scaleX(var(--read, 0)); }
}
