:root {
  color-scheme: dark;
  --paper: #0e1821;
  --surface: #15222e;
  --ink: #e7edf3;
  --muted: #9aabbb;
  --line: #273746;
  --road: #4a90e2;
  --button: #2563b0;
  --button-hover: #1d5294;
  --asphalt: #2b3a48;
  --band: #10335a;
  --brand: #d4202c;
  --break: #4fb387;
  --rest: #34475a;

  --sans: "Fira Sans", system-ui, sans-serif;
  --condensed: "Fira Sans Condensed", "Fira Sans", system-ui, sans-serif;
  --wrap: 72rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--road); }
a:focus-visible, summary:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; border-radius: 2px; }

h1, h2, h3 { font-family: var(--condensed); font-weight: 700; line-height: 1.05; margin: 0; letter-spacing: -0.01em; }
h2 { font-size: clamp(1.9rem, 4vw, 2.75rem); max-width: 22ch; }
h3 { font-size: 1.3rem; }
p { margin: 0; }

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

/* Header */

.site-header {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 1.25rem var(--gutter);
  display: flex;
  align-items: center;
  gap: 2rem;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  color: var(--ink);
  text-decoration: none;
  font: 700 1.6rem/1 var(--condensed);
  letter-spacing: -0.02em;
}

.main-nav { display: flex; gap: 1.5rem; margin-left: auto; }
.main-nav a { color: var(--muted); text-decoration: none; font-weight: 500; }
.main-nav a:hover { color: var(--ink); }

.login-link {
  padding: .35rem .9rem;
  border-radius: 6px;
  background: var(--button);
  color: #fff;
  font-weight: 500;
  text-decoration: none;
}
.login-link:hover { background: var(--button-hover); }

.lang { position: relative; }
.lang summary {
  list-style: none;
  cursor: pointer;
  padding: .3rem .7rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  font-weight: 500;
  text-transform: uppercase;
}
.lang summary::-webkit-details-marker { display: none; }
.lang summary::after { content: ""; display: inline-block; margin-left: .45rem; border: 4px solid transparent; border-top-color: currentColor; vertical-align: -1px; }
.lang ul {
  position: absolute;
  right: 0;
  top: calc(100% + .4rem);
  z-index: 10;
  min-width: 11rem;
  margin: 0;
  padding: .35rem;
  list-style: none;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 16px 36px -12px rgba(0, 0, 0, .6);
}
.lang a { display: block; padding: .4rem .65rem; border-radius: 5px; color: var(--ink); text-decoration: none; }
.lang a:hover { background: var(--paper); }
.lang a[aria-current] { color: var(--road); font-weight: 500; }

/* Hero */

.hero {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: clamp(2rem, 6vw, 5rem) var(--gutter) clamp(3rem, 7vw, 6rem);
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
.hero--single { grid-template-columns: minmax(0, 1fr); min-height: 50vh; }

.hero h1 { font-size: clamp(2.6rem, 6.2vw, 4.9rem); line-height: .98; max-width: 14ch; }
.lede { margin-top: 1.4rem; font-size: 1.2rem; color: var(--muted); max-width: 36rem; }
.code { font: 700 1.1rem/1 var(--condensed); color: var(--road); margin-bottom: .75rem; }

.actions { margin-top: 2rem; display: flex; flex-wrap: wrap; gap: .75rem; }
.button {
  display: inline-block;
  padding: .8rem 1.3rem;
  border-radius: 6px;
  border: 1.5px solid var(--ink);
  color: var(--ink);
  font-weight: 500;
  text-decoration: none;
}
.button:hover { background: var(--surface); }
.button--primary { background: var(--button); border-color: var(--button); color: #fff; }
.button--primary:hover { background: var(--button-hover); border-color: var(--button-hover); }

/* Tachograph disc */

.disc { margin: 0; justify-self: center; width: 100%; max-width: 30rem; }
.disc svg { display: block; width: 100%; height: auto; overflow: visible; }
.disc-face { fill: var(--surface); stroke: var(--line); }
.disc-rest { fill: none; stroke: var(--rest); stroke-width: 4; }
.disc-hub { fill: var(--paper); stroke: var(--line); }
.tick { stroke: var(--line); stroke-width: 1.5; }
.tick--major { stroke: var(--muted); stroke-width: 2; }
.hour { font: 500 12px var(--sans); fill: var(--muted); text-anchor: middle; dominant-baseline: central; }
.disc-time { font: 700 30px var(--condensed); fill: var(--ink); text-anchor: middle; }
.disc-stops { font: 400 15px var(--sans); fill: var(--muted); text-anchor: middle; }

.seg { fill: none; stroke-linecap: butt; stroke-dasharray: 1; stroke-dashoffset: 0; }
.seg--drive { stroke: var(--road); stroke-width: 34; }
.seg--work { stroke: var(--brand); stroke-width: 22; }
.seg--break { stroke: var(--break); stroke-width: 10; }

@media (prefers-reduced-motion: no-preference) {
  .seg { animation: trace .45s ease-out both; animation-delay: calc(var(--i) * 110ms + 250ms); }
  @keyframes trace { from { stroke-dashoffset: 1; } }
}

.disc figcaption { margin-top: 1.25rem; color: var(--muted); font-size: .95rem; text-align: center; }
.legend { list-style: none; padding: 0; margin: .75rem 0 0; display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem 1.1rem; }
.legend li { display: inline-flex; align-items: center; gap: .45rem; color: var(--ink); }
.legend li::before { content: ""; width: 1.1rem; border-radius: 1px; }
.legend--drive::before { height: 10px; background: var(--road); }
.legend--work::before { height: 7px; background: var(--brand); }
.legend--break::before { height: 4px; background: var(--break); }
.legend--rest::before { height: 2px; background: var(--rest); }

/* Sections */

.block {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: clamp(3rem, 7vw, 5.5rem) var(--gutter);
  border-top: 1px solid var(--line);
}
.block-lede { margin-top: 1rem; color: var(--muted); font-size: 1.125rem; max-width: 40rem; }

.role-grid {
  margin-top: 2.75rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2.5rem;
}
.role h3 { padding-top: 1rem; border-top: 4px solid var(--road); }
.role ul { list-style: none; padding: 0; margin: 1rem 0 0; }
.role li { position: relative; padding-left: 1.2rem; margin-top: .55rem; }
.role li::before { content: ""; position: absolute; left: 0; top: .62em; width: 7px; height: 7px; background: var(--brand); }

/* A shift is a real sequence: stops on a road */
.route {
  --dot: 2.5rem;
  list-style: none;
  padding: 0;
  margin: 3rem 0 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1.75rem;
  position: relative;
}
.route::before {
  content: "";
  position: absolute;
  left: calc(var(--dot) / 2);
  right: 0;
  top: calc(var(--dot) / 2 - 3px);
  height: 6px;
  background: var(--asphalt);
  border-radius: 3px;
  background-image: repeating-linear-gradient(90deg, transparent 0 10px, rgba(255, 255, 255, .85) 10px 22px, transparent 22px 32px);
  background-size: 100% 2px;
  background-repeat: no-repeat;
  background-position: 0 50%;
}
.route li { position: relative; }
.route-stop {
  position: relative;
  display: grid;
  place-items: center;
  width: var(--dot);
  height: var(--dot);
  border-radius: 50%;
  background: var(--surface);
  border: 3px solid var(--road);
  font: 700 1.1rem/1 var(--condensed);
  color: var(--road);
}
.route h3 { margin-top: 1.1rem; font-size: 1.2rem; }
.route p { margin-top: .5rem; color: var(--muted); font-size: 1rem; }

.feature-list {
  margin: 2.75rem 0 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2.25rem 2.5rem;
}
.feature-list div { border-top: 1px solid var(--muted); padding-top: 1rem; }
.feature-list dt { font: 700 1.25rem/1.2 var(--condensed); }
.feature-list dd { margin: .5rem 0 0; color: var(--muted); }

.app-list { list-style: none; padding: 0; margin: 2.5rem 0 0; border-top: 1px solid var(--line); }
.app-list li {
  display: grid;
  grid-template-columns: 10rem minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--line);
}
.app-platform { font: 700 1.25rem/1.2 var(--condensed); }
.app-store { color: var(--muted); }
.app-status {
  padding: .2rem .7rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: .9rem;
  color: var(--muted);
  background: var(--surface);
}

.outro {
  background: var(--band);
  color: #fff;
  /* lane marking just inside the top edge */
  background-image: repeating-linear-gradient(90deg, rgba(255, 255, 255, .55) 0 36px, transparent 36px 64px);
  background-size: 100% 4px;
  background-position: 0 1.25rem;
  background-repeat: no-repeat;
}
.outro > div { max-width: var(--wrap); margin: 0 auto; padding: clamp(3rem, 7vw, 5rem) var(--gutter); }
.outro p { margin-top: 1rem; font-size: 1.15rem; max-width: 40rem; color: rgba(255, 255, 255, .85); }

.site-footer {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 2rem var(--gutter) 2.5rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .5rem 2rem;
  color: var(--muted);
  font-size: .95rem;
}
.site-footer strong { font: 700 1.15rem/1 var(--condensed); color: var(--ink); margin-right: .4rem; }

/* Narrow screens */

@media (max-width: 960px) {
  .route { grid-template-columns: minmax(0, 1fr); gap: 1.75rem; }
  .route::before {
    left: calc(var(--dot) / 2 - 3px);
    right: auto;
    top: 0;
    bottom: 0;
    width: 6px;
    height: auto;
    background-image: repeating-linear-gradient(180deg, transparent 0 10px, rgba(255, 255, 255, .85) 10px 22px, transparent 22px 32px);
    background-size: 2px 100%;
    background-position: 50% 0;
  }
  .route li { padding-left: calc(var(--dot) + 1.1rem); }
  .route-stop { position: absolute; left: 0; top: 0; }
  .route h3 { margin-top: .45rem; }
  .feature-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
  .hero { grid-template-columns: minmax(0, 1fr); }
  .disc { max-width: 24rem; }
  .role-grid { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
  .main-nav { display: none; }
  .login-link { margin-left: auto; }
}

@media (max-width: 560px) {
  .feature-list { grid-template-columns: minmax(0, 1fr); }
  .app-list li { grid-template-columns: minmax(0, 1fr) auto; }
  .app-store { grid-column: 1; grid-row: 2; margin-top: -.6rem; }
  .app-status { grid-column: 2; grid-row: 1 / span 2; }
}
