/* Route's own pages (landing, no access, unavailable, legal): Legworthy's tokens and type from the design brief
   (legworthy .github/skills/legworthy-design, Direction B "Key tags"). Fonts are the hub's, self-hosted (OFL). */
@font-face {
  font-family: "Bricolage Grotesque";
  src: url("/_legworthy/fonts/BricolageGrotesque-Variable-latin.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}

@font-face {
  font-family: "Atkinson Hyperlegible Next";
  src: url("/_legworthy/fonts/AtkinsonHyperlegibleNext-Variable-latin.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}

:root {
  --color-primary: #c2410c;
  --color-pressed: #9a3412;
  --color-pool: #2ec4b6;
  --color-pool-tint: #d5f5f2;
  --color-pool-deep: #0f766e;
  --color-ink: #1c1917;
  --color-muted: #57534e;
  --color-base: #fffbf5;
  --color-surface: #ffffff;

  --font-display: "Bricolage Grotesque";
  --font-body: "Atkinson Hyperlegible Next";
  --text-sm: 0.875rem;
  --text-base: 1.0625rem;
  --text-lg: 1.3125rem;
  --text-xl: 1.75rem;
  --text-2xl: 2.25rem;
  --text-3xl: 3rem;
  --leading-body: 1.6;
  --leading-tight: 1.1;

  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 32px;
  --space-6: 48px;
  --space-8: 64px;

  --radius-tag: 16px;
  --radius-button: 999px;
  --radius-rail: 6px;
  --rail-height: 12px;
  --string-length: 40px;
  --tag-line: 3px solid var(--color-ink);
  --tag-hole: 18px;
  --stop: 32px;
  --flow-max: 640px;

  color-scheme: light;
}

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

body {
  margin: 0;
  background: var(--color-base);
  color: var(--color-ink);
  font-family: var(--font-body), sans-serif;
  font-size: var(--text-base);
  line-height: var(--leading-body);
}

h1,
h2 {
  font-family: var(--font-display), sans-serif;
  font-optical-sizing: auto;
  line-height: var(--leading-tight);
}

a {
  color: var(--color-primary);
  text-underline-offset: 3px;
}

a:hover,
a:active {
  color: var(--color-pressed);
}

:focus-visible {
  outline: 3px solid var(--color-pool-deep);
  outline-offset: 3px;
}

.flow {
  max-width: var(--flow-max);
  margin: 0 auto;
  padding: var(--space-4) var(--space-2) var(--space-8);
}

.wordmark {
  margin: 0 0 var(--space-4);
  font-family: var(--font-display), sans-serif;
  font-size: var(--text-xl);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
}

.wordmark a {
  display: inline-block;
  padding: var(--space-1) 0;
  color: var(--color-ink);
  text-decoration: none;
}

/* The title hangs on its own key tag, with its own rail at every width. Only the outline tilts. */
.tag {
  --tag-top: calc(var(--rail-height) + var(--string-length));
  --tag-tilt: -1.5deg;

  position: relative;
  isolation: isolate;
  max-width: 420px;
  margin-bottom: var(--space-6);
  padding: calc(var(--tag-top) + var(--space-6)) var(--space-3) var(--space-3);
}

.tag-rail {
  position: absolute;
  top: 0;
  left: calc(50% - 64px);
  width: 128px;
  height: var(--rail-height);
  border-radius: var(--radius-rail);
  background: var(--color-pool);
}

.tag-string {
  position: absolute;
  top: var(--rail-height);
  left: calc(50% - 1px);
  height: calc(var(--string-length) + var(--space-1) + var(--tag-hole) / 2);
  border-left: 2px solid var(--color-ink);
}

.tag::before {
  content: "";
  position: absolute;
  inset: var(--tag-top) 0 0;
  z-index: -1;
  border: var(--tag-line);
  border-radius: var(--radius-tag);
  background: var(--color-surface);
  transform: rotate(var(--tag-tilt));
  transform-origin: 50% calc(var(--space-1) + var(--tag-hole) / 2);
}

.tag::after {
  content: "";
  position: absolute;
  top: calc(var(--tag-top) + var(--space-1));
  left: calc(50% - var(--tag-hole) / 2);
  width: var(--tag-hole);
  height: var(--tag-hole);
  border: var(--tag-line);
  border-radius: 50%;
  background: var(--color-base);
}

.tag h1 {
  margin: 0;
  font-size: var(--text-2xl);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.tag p {
  margin: var(--space-1) 0 0;
  color: var(--color-muted);
}

/* The day's route: three real steps as stops on a pool line, the page's one memorable element. */
.stops {
  position: relative;
  margin: 0 0 var(--space-6);
  padding: 0;
  list-style: none;
  counter-reset: stop;
}

/* The line runs from each stop to the next and ends at the last one. */
.stops li:not(:last-child)::after {
  content: "";
  position: absolute;
  top: var(--stop);
  bottom: calc(-1 * var(--space-3));
  left: calc(var(--stop) / 2 - 3px);
  width: 6px;
  background: var(--color-pool);
}

.stops li {
  position: relative;
  padding-left: calc(var(--stop) + var(--space-2));
  counter-increment: stop;
}

.stops li + li {
  margin-top: var(--space-3);
}

.stops li::before {
  content: counter(stop);
  position: absolute;
  top: 0;
  left: 0;
  display: grid;
  place-items: center;
  width: var(--stop);
  height: var(--stop);
  border: var(--tag-line);
  border-radius: 50%;
  background: var(--color-surface);
  font-family: var(--font-display), sans-serif;
  font-weight: 800;
  line-height: 1;
}

.stops h2 {
  margin: 0;
  padding-top: 2px;
  font-size: var(--text-lg);
  font-weight: 700;
}

.stops p {
  margin: var(--space-1) 0 0;
  color: var(--color-muted);
}

.action p {
  margin: 0;
}

.button {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 10px var(--space-3);
  border-radius: var(--radius-button);
  background: var(--color-primary);
  color: var(--color-surface);
  font-weight: 700;
  text-decoration: none;
}

a.button:hover,
a.button:active {
  background: var(--color-pressed);
  color: var(--color-surface);
}

.action .note {
  margin-top: var(--space-2);
  color: var(--color-muted);
}

.message p {
  margin: 0 0 var(--space-3);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0 var(--space-3);
  margin-top: var(--space-8);
}

.footer-links a {
  display: inline-block;
  min-height: 44px;
  padding: 10px 0;
}

.legal h1 {
  margin: 0;
  font-size: var(--text-2xl);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.legal h2 {
  margin: var(--space-6) 0 0;
  font-size: var(--text-xl);
  font-weight: 700;
}

.legal p {
  margin: var(--space-2) 0 0;
  overflow-wrap: anywhere;
}

.legal-rail {
  display: block;
  width: 128px;
  height: var(--rail-height);
  margin-bottom: var(--space-3);
  border-radius: var(--radius-rail);
  background: var(--color-pool);
}

@media (min-width: 720px) {
  .flow {
    padding-top: var(--space-8);
  }

  .tag h1 {
    font-size: var(--text-3xl);
  }
}

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