/* GroundSketch — the site is printed like the app's prints: paper, red ink,
   a blue second plate slightly off register, a sparse dot grid. Fonts come
   from this site only: Apple's built-in SF Mono where the browser offers it
   (Safari), otherwise JetBrains Mono (SIL Open Font License, latin subset,
   assets/fonts), so the site loads nothing from anyone else. */

@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
  src: url("/assets/fonts/jetbrains-mono-latin-wght.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 {
  --paper: #f6f1e5;
  --ink: #1e1a16;
  --ink-soft: rgba(30, 26, 22, 0.72);
  --red: #f23a1f;
  --red-text: #c42a12;
  --blue-plate: rgba(46, 88, 216, 0.5);
  --dot: rgba(30, 26, 22, 0.16);
  --mono: ui-monospace, "SF Mono", SFMono-Regular, "JetBrains Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --measure: 34rem;
  --gutter: clamp(20px, 5vw, 56px);
  color-scheme: light;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--sans);
  /* Long words, like German law names, wrap instead of widening the page. */
  overflow-wrap: break-word;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

/* Paper grain over everything, like riso stock. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 10;
  opacity: 0.32;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.12 0 0 0 0 0.1 0 0 0 0 0.08 0 0 0 0.35 0'/></filter><rect width='240' height='240' filter='url(%23n)'/></svg>");
}

a { color: inherit; text-decoration-thickness: 1.5px; text-underline-offset: 0.18em; }
a:hover { color: var(--red-text); }

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

/* Only the sides: sections and pages set their own top and bottom space. */
.wrap { max-width: 1180px; margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }

/* Header */
.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 28px;
  padding-bottom: 28px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  font: 700 1rem/1 var(--mono);
  letter-spacing: 0.02em;
}
.brand img { width: 40px; height: 40px; border-radius: 9px; }
.masthead p { margin: 0; font-size: 0.9375rem; color: var(--ink-soft); }

/* Hero: the print stays pinned while scrolling draws its route. */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(32px, 6vw, 88px);
  align-items: start;
  padding-top: clamp(16px, 4vw, 48px);
  padding-bottom: clamp(56px, 9vw, 120px);
}
.hero-text { position: sticky; top: 18vh; }
/* The scroll distance the ride takes; the print sticks inside it. */
.print-track { height: 230vh; }
.print {
  position: sticky;
  top: 6vh;
  /* Keep the print and its caption within one screen height. */
  max-width: min(100%, calc(94vh - 150px));
  margin-left: auto;
}

h1 {
  margin: 0 0 28px;
  font: 800 clamp(2.75rem, 6.4vw, 5.25rem)/0.98 var(--mono);
  letter-spacing: -0.045em;
  /* A monospace space is a full letter wide; this makes it read as one. */
  word-spacing: -0.25em;
  color: var(--red);
  /* The second plate, printed a hair off register. */
  text-shadow: 0.045em 0.035em 0 var(--blue-plate);
}

.lede { margin: 0 0 18px; max-width: var(--measure); font-size: 1.25rem; line-height: 1.5; }
.activities { margin: 0 0 32px; max-width: var(--measure); color: var(--ink-soft); }

.invite-note { margin: 12px 0 0; font-size: 0.875rem; color: var(--ink-soft); }
/* Apple's badge, unchanged; clear space at least a quarter of its height. */
.store-badge { display: inline-block; margin: 12px 0; line-height: 0; }
.store-badge img { height: 48px; width: auto; }
.badge-row { margin: 14px 0 0; }
.badge-row img { display: block; height: 40px; width: auto; }

/* The print */
.print { margin-top: 0; margin-bottom: 0; margin-right: 0; }
.print svg {
  display: block;
  width: 100%;
  height: auto;
  background: var(--paper);
  border: 1.5px solid var(--ink);
}
.plate-red, .plate-blue { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.plate-red { stroke: var(--red); stroke-width: 14; }
.plate-blue { stroke: var(--blue-plate); stroke-width: 11; }
.endpoint { opacity: 0; }
.endpoint circle:first-child { fill: var(--red); }
.endpoint circle:last-child { fill: none; stroke: var(--red); stroke-opacity: 0.5; stroke-width: 4; }
.km circle { fill: var(--ink); }
.km text { fill: var(--paper); font: 700 21px var(--mono); text-anchor: middle; }
.km { opacity: 0; transition: opacity 0.2s; }
.km.shown { opacity: 1; }
.north path { fill: none; stroke: rgba(30, 26, 22, 0.6); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.north text, .speedup { fill: var(--ink-soft); font: 600 26px var(--mono); }
.speedup { text-anchor: end; }

.print figcaption {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 16px;
  padding: 16px 2px 0;
  font: 600 0.9375rem/1.4 var(--mono);
}
.print figcaption .title { font-size: 1.125rem; letter-spacing: 0.06em; }
.print figcaption .quiet { color: var(--ink-soft); font-weight: 500; }
.print figcaption .right { text-align: right; }

.scroll-hint {
  margin: 14px 0 0;
  font: 600 0.875rem/1 var(--mono);
  color: var(--ink-soft);
  transition: opacity 0.3s;
}
.scroll-hint.gone { opacity: 0; }

/* Sections */
section { padding-top: clamp(56px, 8vw, 104px); padding-bottom: clamp(56px, 8vw, 104px); }
section + section { border-top: 1.5px solid var(--ink); }

h2 {
  margin: 0 0 clamp(32px, 5vw, 56px);
  max-width: 20ch;
  font: 800 clamp(2rem, 4.2vw, 3.25rem)/1.02 var(--mono);
  letter-spacing: -0.035em;
  word-spacing: -0.25em;
}

/* Steps: a real sequence, so they are numbered. */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(24px, 4vw, 56px);
  counter-reset: step;
}
.steps li { counter-increment: step; }
.steps img {
  display: block;
  width: 100%;
  max-width: 300px;
  height: auto;
  /* A plain print-card edge, not a drawn phone: Apple allows only its own
     device bezels around app screens. */
  border: 1.5px solid var(--ink);
  border-radius: 4px;
  background: var(--paper);
}
.steps h3 {
  margin: 24px 0 8px;
  font: 800 1.375rem/1.2 var(--mono);
  letter-spacing: -0.02em;
}
.steps h3::before {
  content: counter(step);
  margin-right: 12px;
  color: var(--red);
  text-shadow: 0.06em 0.045em 0 var(--blue-plate);
}
.steps p { margin: 0; max-width: 30ch; color: var(--ink-soft); }

/* iPhone Duo: the same print-card edge as the steps. */
.duo {
  display: grid;
  grid-template-columns: minmax(0, 330px) minmax(0, 550px);
  gap: clamp(24px, 4vw, 56px);
  align-items: end;
}
.duo figure { margin: 0; }
.duo img {
  display: block;
  width: 100%;
  height: auto;
  border: 1.5px solid var(--ink);
  border-radius: 4px;
  background: var(--paper);
}
.duo figcaption { margin-top: 16px; max-width: 34ch; color: var(--ink-soft); }
.duo figcaption strong {
  display: block;
  margin-bottom: 4px;
  font: 800 1.125rem/1.3 var(--mono);
  color: var(--ink);
}

/* Details */
.details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 36px clamp(32px, 6vw, 88px);
  margin: 0;
}
.details div { max-width: var(--measure); }
.details dt { font: 800 1.125rem/1.3 var(--mono); letter-spacing: -0.01em; margin-bottom: 6px; }
.details dd { margin: 0; color: var(--ink-soft); }

/* Privacy statement */
.promise .big {
  margin: 0 0 28px;
  max-width: 18ch;
  font: 800 clamp(2.25rem, 5.4vw, 4.25rem)/1 var(--mono);
  letter-spacing: -0.04em;
  word-spacing: -0.25em;
}
.promise ul { margin: 0 0 28px; padding-left: 1.2em; max-width: var(--measure); }
.promise li { margin-bottom: 8px; }
.promise li::marker { color: var(--red); }

/* Footer */
.colophon {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  justify-content: space-between;
  padding-top: 32px;
  padding-bottom: 48px;
  border-top: 1.5px solid var(--ink);
  font-size: 0.9375rem;
  color: var(--ink-soft);
}
.colophon nav { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.colophon p { margin: 0; }
.colophon .legal { flex-basis: 100%; font-size: 0.8125rem; }

/* Text pages: privacy, support, impressum */
.page { padding-top: clamp(24px, 5vw, 64px); padding-bottom: clamp(56px, 8vw, 104px); }
/* Below about 370 px the floor shrinks too, so "Accessibility" fits on one line. */
.page h1 { font-size: clamp(min(2.5rem, 10.8vw), 6vw, 4rem); margin-bottom: 20px; }
.page .updated { margin: 0 0 40px; color: var(--ink-soft); font-size: 0.9375rem; }
.page h2 { font-size: 1.375rem; margin: 40px 0 10px; max-width: none; letter-spacing: -0.02em; }
.page h3 { font: 800 1.125rem/1.3 var(--mono); margin: 32px 0 8px; letter-spacing: -0.01em; }
.page .howto { padding-left: 1.4em; }
.page .howto li { margin-bottom: 10px; }
.page p, .page ul, .page ol { max-width: 40rem; }
.page li { margin-bottom: 6px; }
.todo { background: #ffe25a; padding: 0 4px; }
[lang="de"] { hyphens: auto; }

/* Read by screen readers, not shown. */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 860px) {
  .hero { grid-template-columns: minmax(0, 1fr); }
  .hero-text { position: static; }
  .print-track { height: 200vh; }
  .print { top: 12px; margin-left: 0; }
  .steps { grid-template-columns: minmax(0, 1fr); gap: 56px; }
  .steps img { max-width: 260px; }
  .details { grid-template-columns: minmax(0, 1fr); }
  .duo { grid-template-columns: minmax(0, 1fr); }
  .duo figure:first-child img { max-width: 260px; }
}

@media (max-width: 520px) {
  .masthead p { display: none; }
  .lede { font-size: 1.125rem; }
  .print figcaption { font-size: 0.8125rem; }
}

@media (prefers-reduced-motion: reduce) {
  .km, .scroll-hint { transition: none; }
  /* No pinning: the finished print simply sits next to the text. */
  .hero-text, .print { position: static; }
  .print-track { height: auto; }
  .scroll-hint { display: none; }
}
