/*
 * footfill.com — the app's Atlas world on the web (DESIGN.md): paper and ink,
 * Alegreya Sans for places and titles, Archivo for everything said, the walked
 * blue, night by the system's setting. Fonts are the app's own (SIL OFL),
 * subset and served from here, so the site asks nothing of anyone else.
 */
@font-face { font-family: 'Alegreya Sans'; font-weight: 500; font-display: swap; src: url(fonts/alegreya-sans-500.woff) format('woff'); }
@font-face { font-family: 'Archivo'; font-weight: 400; font-display: swap; src: url(fonts/archivo-400.woff) format('woff'); }
@font-face { font-family: 'Archivo'; font-weight: 500; font-display: swap; src: url(fonts/archivo-500.woff) format('woff'); }
@font-face { font-family: 'Archivo'; font-weight: 600; font-display: swap; src: url(fonts/archivo-600.woff) format('woff'); }
@font-face { font-family: 'Archivo Narrow'; font-weight: 600; font-display: swap; src: url(fonts/archivo-narrow-600.woff) format('woff'); }

:root {
  color-scheme: light dark;
  --paper: #f3f0e9;
  --surface: #fcfbf8;
  --rule: #e0dbcf;
  --ink: #1d1c19;
  --ink-soft: #67625a;
  --walked: #1e40af;
  --street: #7a746b;
  --signal: #ffd100;
  --casing: #1d1c19;
  --place: 'Alegreya Sans', 'Archivo', sans-serif;
  --say: 'Archivo', system-ui, sans-serif;
  --small: 'Archivo Narrow', 'Archivo', sans-serif;
  --gutter: clamp(20px, 5vw, 64px);
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #12151b;
    --surface: #1b1f27;
    --rule: #2c323d;
    --ink: #efebe3;
    --ink-soft: #a39e94;
    --walked: #8fb0ff;
    --street: #8c8a86;
    --casing: #12151b;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.6 var(--say);
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--walked); color: var(--paper); }
a { color: var(--walked); text-decoration-thickness: 1px; text-underline-offset: 0.22em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--walked); outline-offset: 3px; border-radius: 4px; }

/* ---------------------------------------------------------------- home */

.home { min-height: 100svh; display: grid; grid-template-rows: 1fr auto; grid-template-columns: minmax(0, 1fr); position: relative; overflow: hidden; isolation: isolate; }
.map { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: -2; }
.map .streets { fill: none; stroke: var(--street); stroke-width: 1.1; stroke-linecap: round; stroke-linejoin: round; opacity: 0.55; }
.map .walk {
  fill: none; stroke: var(--walked); stroke-width: 7; stroke-linecap: round; stroke-linejoin: round;
  --len: 1; stroke-dasharray: var(--len); stroke-dashoffset: 0;
  animation: walk 3.2s cubic-bezier(0.65, 0, 0.35, 1) 0.4s backwards;
}
.map .walker { fill: var(--signal); stroke: var(--casing); stroke-width: 4; animation: arrive 0.3s ease-out 3.6s backwards; }
@keyframes walk { from { stroke-dashoffset: var(--len); } }
@keyframes arrive { from { opacity: 0; } }
/* The words sit on clear paper; the city shows through beyond them. */
.home::before {
  content: ''; position: absolute; inset: 0; pointer-events: none; z-index: -1;
  background: linear-gradient(90deg, var(--paper) 0%, var(--paper) 30%, color-mix(in srgb, var(--paper) 0%, transparent) 62%);
}
.lead { position: relative; align-self: center; padding: 96px var(--gutter) 48px; max-width: 46rem; }
.wordmark { font: 500 clamp(64px, 11vw, 132px)/0.95 var(--place); letter-spacing: -0.025em; margin: 0; }
.line { font: 400 clamp(20px, 2.2vw, 26px)/1.35 var(--say); color: var(--ink-soft); margin: 18px 0 40px; text-wrap: balance; }
.what { margin: 0; padding: 0; list-style: none; display: grid; gap: 14px; max-width: 30rem; }
.what li { display: grid; grid-template-columns: 22px 1fr; gap: 14px; align-items: baseline; }
.what svg { width: 22px; height: 12px; overflow: visible; translate: 0 -2px; }
.what svg path { fill: none; stroke: var(--walked); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.soon { margin: 40px 0 0; font: 600 12px/1.4 var(--small); letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-soft); }

.foot {
  position: relative; display: flex; flex-wrap: wrap; gap: 8px 28px; align-items: baseline;
  padding: 24px var(--gutter) 28px; font-size: 15px; color: var(--ink-soft);
}
.foot a { color: var(--ink); }
.foot .credit { margin-left: auto; font: 600 11px/1.4 var(--small); letter-spacing: 0.1em; text-transform: uppercase; }
.foot .credit a { color: inherit; text-decoration: none; }

@media (max-width: 760px) {
  .home::before { background: linear-gradient(180deg, var(--paper) 0%, var(--paper) 48%, color-mix(in srgb, var(--paper) 0%, transparent) 64%); }
  .map { top: auto; height: 62%; bottom: 0; }
  .lead { align-self: start; padding-top: 72px; }
  .foot .credit { margin-left: 0; }
}

/* ---------------------------------------------------------------- reading */

.page { max-width: 44rem; margin: 0 auto; padding: 40px var(--gutter) 80px; }
.back { font: 500 28px/1 var(--place); color: var(--ink); text-decoration: none; letter-spacing: -0.01em; }
.page h1 { font: 500 clamp(36px, 6vw, 48px)/1.1 var(--place); letter-spacing: -0.015em; margin: 56px 0 8px; text-wrap: balance; }
.page .updated { color: var(--ink-soft); font-size: 15px; margin: 0 0 40px; }
.page h2 { font: 500 25px/1.25 var(--place); margin: 48px 0 10px; text-wrap: balance; }
.page p, .page li { max-width: 68ch; }
.page ul, .page ol { padding-left: 1.2em; }
.page li { margin: 6px 0; }
.page li::marker { color: var(--ink-soft); }
.page strong { font-weight: 600; }
.short {
  background: var(--surface); border-radius: 14px; padding: 20px 24px; margin: 0 0 8px;
  box-shadow: 0 1px 2px color-mix(in srgb, var(--ink) 6%, transparent), 0 6px 20px color-mix(in srgb, var(--ink) 6%, transparent);
}
.short p { margin: 0; }
.short p + p { margin-top: 10px; }
.steps { counter-reset: step; list-style: none; padding: 0; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 2rem 1fr; }
.steps li::before { content: counter(step); font: 600 17px/1.6 var(--say); color: var(--walked); font-variant-numeric: tabular-nums; }
.services { width: 100%; border-collapse: collapse; margin: 12px 0 8px; font-size: 16px; }
.services th, .services td { text-align: left; vertical-align: top; padding: 12px 16px 12px 0; border-bottom: 1px solid var(--rule); }
.services th { font: 600 11px/1.4 var(--small); letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-soft); }
.services td:first-child { font-weight: 500; width: 38%; overflow-wrap: anywhere; }
@media (max-width: 560px) {
  .services thead { display: none; }
  .services tr { display: block; padding: 12px 0; border-bottom: 1px solid var(--rule); }
  .services td { display: block; border: 0; padding: 2px 0; white-space: normal; }
  .services td:first-child { width: auto; }
}
.page footer { margin-top: 64px; padding-top: 20px; border-top: 1px solid var(--rule); color: var(--ink-soft); font-size: 15px; display: flex; flex-wrap: wrap; gap: 8px 24px; }
.page footer a { color: var(--ink); }

@media (prefers-reduced-motion: reduce) {
  .map .walk, .map .walker { animation: none; }
}
