/*
  The public site: Route Night only (docs/design/DESIGN.md, Colour tokens).
  Fonts are named, never downloaded: a visitor who has them sees set A, everyone
  else sees the system fallbacks.
*/

/* The Route Night colours and the motion curves come from the design tokens (@tolden/dls in the app
   repository). Do not edit the block: change the tokens and run `npm run tokens:pull` (site/README.md). */
/* tokens:pull begin: site-variables.css from @tolden/dls, copied by `npm run tokens:pull` */
/* Generated by `yarn dls:generate` from @tolden/dls src/tokens: Route Night's colour roles and the motion curves under the public site's names (site/styles.css). Do not edit. */
/* No token is named for these, so not generated: --draw-ms (the site's line drawing), --radius (a theme's card corner). Left to the site on purpose: --name, --serif, --sans, --mono, --gutter, --max. */
:root {
  --page: #10151b; /* bg */
  --surface: #172029; /* bgCard */
  --raised: #1f2a35; /* bgSecondary */
  --hairline: #2b3946; /* borderFaint */
  --text: #ece7dc; /* fg */
  --muted: #a9b1b8; /* fgMuted */
  --link: #8fc3d9; /* accent */
  --route: #6e7a85; /* route */
  --primary: #e3a44a; /* primary */
  --on-primary: #1a1206; /* fgOnPrimary */
  --scrim: 16, 21, 27; /* bg, as r, g, b for the scrim's alpha */
  --settle: cubic-bezier(0.33, 1, 0.68, 1); /* easings.settle */
  --journey: cubic-bezier(0.65, 0, 0.35, 1); /* easings.journey */
  --settle-ms: 320ms; /* motion.settle.maxMs */
}
/* tokens:pull end */

:root {
  /* NAME: the product's name, the only place it is written. Every page's
     wordmark and copyright line show it (see site/README.md). */
  --name: "Tolden";

  --serif: "EB Garamond", Garamond, "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --radius: 6px;
  --gutter: 16px;
  --max: 1088px;

  /* Motion (DESIGN.md, The numbers): the line drawing has no token, so it stays here. */
  --draw-ms: 1200ms;

  color-scheme: dark;
}

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

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

body {
  margin: 0;
  background: var(--page);
  color: var(--text);
  font: 400 15px/22px var(--sans);
  overflow-x: hidden;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: var(--link);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  z-index: 10;
  padding: 10px 16px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
}

.skip:focus {
  top: 12px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.wrap {
  width: 100%;
  max-width: calc(var(--max) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.meta {
  margin: 0;
  font: 500 12px/16px var(--sans);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.mono {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}

/* Top bar */

.topbar {
  padding: 24px 0 20px;
}

.topbar .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
}

/* The name, from --name above; generated content is read by screen readers
   as the link's name. */
.wordmark::before {
  content: var(--name);
}

.wordmark {
  font: 400 19px/26px var(--serif);
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--text);
  text-decoration: none;
}

.topbar nav ul {
  display: flex;
  gap: 4px 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.topbar nav a,
.footer a {
  display: inline-block;
  padding: 11px 0;
  color: var(--muted);
  text-decoration: none;
}

.topbar nav a:hover,
.footer a:hover,
.topbar nav a[aria-current="page"],
.footer a[aria-current="page"] {
  color: var(--text);
}

@media (max-width: 639px) {
  .topbar .wrap {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Buttons and badges */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 24px;
  border-radius: 999px;
  font: 600 15px/20px var(--sans);
  text-decoration: none;
}

/* The one amber element on the landing page. Nowhere else. */
.button--primary {
  background: var(--primary);
  color: var(--on-primary);
}

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Store badges: outlined placeholders until the listings exist. They carry no
   Apple or Google artwork; at launch the official badges replace them. */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 22px;
  border: 1px solid var(--muted);
  border-radius: 999px;
  color: var(--text);
  font: 500 15px/20px var(--sans);
}

.badge svg {
  flex: none;
}

/* Landing: hero */

.hero {
  position: relative;
  overflow: hidden;
  background: var(--page);
}

.hero__picture {
  position: absolute;
  inset: 0 0 0 auto;
  width: 62%;
  height: 100%;
}

.hero__picture img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 45%;
}

/* The scrim: 0.9 or more under the words (the text column reaches at most
   340px into the picture from 900px up), clearing toward the right. */
.hero__picture::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(var(--scrim), 1) 0,
    rgba(var(--scrim), 0.9) 340px,
    rgba(var(--scrim), 0.4) 540px,
    rgba(var(--scrim), 0) 80%
  );
}

.hero__body {
  position: relative;
  padding-top: 104px;
  padding-bottom: 104px;
}

.hero__body > * {
  max-width: 640px;
}

.hero h1 {
  margin: 0;
  font: 400 72px/76px var(--serif);
  letter-spacing: -0.01em;
}

.hero__lead {
  margin: 28px 0 32px;
  font-size: 18px;
  line-height: 30px;
}

.hero .badges {
  margin-top: 16px;
}

@media (max-width: 899px) {
  .hero__picture {
    inset: 0 0 auto 0;
    width: 100%;
    height: 300px;
  }

  .hero__picture::before {
    background: linear-gradient(
      180deg,
      rgba(var(--scrim), 0) 0%,
      rgba(var(--scrim), 0.2) 40%,
      rgba(var(--scrim), 0.88) 78%,
      rgba(var(--scrim), 1) 100%
    );
  }

  .hero__body {
    padding-top: 236px;
    padding-bottom: 56px;
  }

  .hero h1 {
    font-size: 40px;
    line-height: 46px;
  }

  .hero__lead {
    margin: 24px 0 28px;
  }

  .hero .badges {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Landing: sections */

.section {
  padding: 72px 0;
}

.section h2 {
  margin: 0 0 40px;
  font: 400 40px/46px var(--serif);
}

.section h2.meta {
  margin: 0;
  font: 500 12px/16px var(--sans);
}

.section .meta + .doors {
  margin-top: 32px;
}

@media (max-width: 639px) {
  .section {
    padding: 56px 0;
  }

  .section h2 {
    font-size: 32px;
    line-height: 38px;
    margin-bottom: 32px;
  }
}

/* The four doors */

.doors {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 40px 32px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.door__arch {
  padding: 64px 22px 22px;
  border: 1px solid var(--hairline);
  border-radius: 999px 999px var(--radius) var(--radius);
  background: var(--surface);
}

.phone {
  margin: 0 auto;
  max-width: 236px;
  padding: 7px;
  border: 1px solid var(--hairline);
  border-radius: 30px;
  background: var(--raised);
}

.phone img {
  width: 100%;
  aspect-ratio: 390 / 844;
  border-radius: 23px;
  background: var(--page);
}

.door h3 {
  margin: 24px 0 8px;
  font: 400 28px/34px var(--serif);
}

.door p {
  margin: 0;
  color: var(--muted);
  max-width: 34ch;
}

@media (max-width: 639px) {
  .door {
    padding: 0 29px;
  }
}

/* How we check: one route line */

.checks {
  position: relative;
}

.checks__list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: check;
}

.check {
  position: relative;
  z-index: 1;
  max-width: 30ch;
  font-size: 16px;
  line-height: 26px;
}

.station {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  margin-bottom: 16px;
  border: 1.5px solid var(--route);
  border-radius: 50%;
  background: var(--page);
  color: var(--muted);
  font: 400 12px/1 var(--mono);
}

/* The last station, where the check ends, carries the 2px ring in the text colour. */
.check:last-child .station {
  border: 2px solid var(--text);
  color: var(--text);
}

.route {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.route line {
  stroke: var(--route);
  stroke-width: 1.5;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
}

@media (max-width: 899px) {
  .checks__list {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .check {
    display: grid;
    grid-template-columns: 24px 1fr;
    gap: 16px;
    max-width: none;
  }

  .station {
    margin: 1px 0 0;
  }
}

/* Six stories */

.stories {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 32px 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.story img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--radius);
  background: var(--surface);
}

.story h3 {
  margin: 12px 0 2px;
  font: 400 20px/26px var(--serif);
}

.story p {
  margin: 0;
  color: var(--muted);
  font: 400 13px/18px var(--mono);
}

.more {
  margin: 32px 0 0;
  color: var(--muted);
}

@media (max-width: 639px) {
  .stories {
    grid-template-columns: 1fr 1fr;
    gap: 24px 16px;
  }

  .story h3 {
    font-size: 17px;
    line-height: 22px;
  }

  .story p {
    font-size: 12px;
    line-height: 16px;
  }
}

/* Kept on your phone */

.kept {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 28px 40px;
  padding: 48px 56px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  background: var(--surface);
}

.kept h2 {
  margin: 0 0 12px;
}

.kept p {
  margin: 0;
  max-width: 44ch;
  color: var(--muted);
  font-size: 16px;
  line-height: 26px;
}

.kept .badges {
  scroll-margin-top: 40vh;
}

@media (max-width: 639px) {
  .kept {
    padding: 32px 24px;
  }

  .kept .badges {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Footer */

.footer {
  margin-top: 40px;
  padding: 32px 0 40px;
  border-top: 1px solid var(--hairline);
  color: var(--muted);
  font-size: 13px;
  line-height: 18px;
}

.footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px 40px;
}

.footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer p {
  margin: 0 0 6px;
}

.footer__notes {
  padding-top: 11px;
}

/* The name, from --name above, in capitals as the wordmark shows it. */
.copyright::after {
  content: var(--name);
  text-transform: uppercase;
}

/* Legal pages: the contents on a route line at the left */

.legal {
  display: grid;
  grid-template-columns: 240px minmax(0, 720px);
  grid-template-areas:
    "toc head"
    "toc body";
  align-content: start;
  gap: 0 112px;
  padding-top: 48px;
  padding-bottom: 72px;
}

.legal__head {
  grid-area: head;
}

.legal__body {
  grid-area: body;
}

.toc {
  grid-area: toc;
  position: sticky;
  top: 32px;
  align-self: start;
}

.toc ol {
  position: relative;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

/* The route line behind the stations, drawn once on arrival. */
.toc ol::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 19px;
  bottom: 19px;
  width: 1.5px;
  background: var(--route);
  transform-origin: top;
}

.toc a {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 9px 0;
  line-height: 20px;
  color: var(--muted);
  text-decoration: none;
}

.toc a::before {
  content: "";
  flex: none;
  width: 13px;
  height: 13px;
  margin-top: 3.5px;
  border: 1.5px solid var(--route);
  border-radius: 50%;
  background: var(--page);
}

.toc a:hover,
.toc a[aria-current="true"] {
  color: var(--text);
}

.toc a[aria-current="true"]::before {
  border: 2px solid var(--text);
}

.legal h1 {
  margin: 0;
  font: 400 52px/58px var(--serif);
}

.updated {
  margin: 8px 0 28px;
  color: var(--muted);
  font: 400 13px/18px var(--mono);
}

.draft {
  margin: 0 0 24px;
  padding: 14px 20px;
  border: 1px dashed var(--muted);
  border-radius: var(--radius);
  font-weight: 500;
}

.inshort {
  margin: 0 0 48px;
  padding: 24px 28px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  background: var(--surface);
}

.inshort p:last-child {
  margin: 8px 0 0;
  font-size: 18px;
  line-height: 30px;
}

.legal section {
  margin: 0 0 40px;
  scroll-margin-top: 24px;
}

.legal h2 {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  margin: 0 0 10px;
  font: 400 28px/34px var(--serif);
}

.legal section p,
.legal section li {
  max-width: 68ch;
  font-size: 16px;
  line-height: 26px;
}

.legal section p {
  margin: 0 0 12px;
}

.legal section ul {
  margin: 0 0 12px;
  padding-left: 20px;
}

.legal h3 {
  margin: 28px 0 6px;
  font: 600 16px/24px var(--sans);
}

/* Licences: one source's licence, credit and source as label and value. */
.credit {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 6px 16px;
  max-width: 68ch;
  margin: 0 0 12px;
  font-size: 16px;
  line-height: 26px;
}

.credit dt {
  color: var(--muted);
  font: 500 12px/26px var(--sans);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.credit dd {
  margin: 0;
}

/* A line the owner or counsel must settle before launch. */
.confirm {
  display: inline-block;
  padding: 2px 10px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  color: var(--muted);
  font: 400 12px/18px var(--mono);
  vertical-align: middle;
}

@media (max-width: 899px) {
  .legal {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "head"
      "toc"
      "body";
    padding-top: 24px;
  }

  .toc {
    position: static;
    margin-bottom: 32px;
  }

  .legal h1 {
    font-size: 40px;
    line-height: 46px;
  }

  .legal h2 {
    font-size: 24px;
    line-height: 30px;
  }

  .credit {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }

  .credit dd + dt {
    margin-top: 8px;
  }
}

/* Motion. Only transform, opacity and stroke-dashoffset change. Without
   JavaScript, or with Reduce Motion, everything shows in its final state. */

@media (prefers-reduced-motion: no-preference) {
  .js .door {
    opacity: 0;
    transform: translateY(16px);
    transition:
      opacity var(--settle-ms) var(--settle),
      transform var(--settle-ms) var(--settle);
    transition-delay: calc(var(--i, 0) * 80ms);
  }

  .js .door.is-in {
    opacity: 1;
    transform: none;
  }

  .js .route line {
    stroke-dashoffset: 1;
    transition: stroke-dashoffset var(--draw-ms) var(--journey);
  }

  .js .checks.is-in .route line {
    stroke-dashoffset: 0;
  }

  /* Each station arrives as the line reaches it. */
  .js .check {
    opacity: 0;
    transition: opacity var(--settle-ms) var(--settle);
    transition-delay: calc(var(--i, 0) * var(--draw-ms) / 3);
  }

  .js .checks.is-in .check {
    opacity: 1;
  }

  .js .toc ol::before {
    transform: scaleY(0);
    transition: transform var(--draw-ms) var(--journey);
  }

  .js .toc.is-in ol::before {
    transform: none;
  }
}
