/*
 * spurt.run, after the owner's design (`docs/design/landing-offline.html`) in the graphic profile
 * Sändningen: the studio ground, Exo 2 and Pixelify Sans, plates leaning 14° with upright text, no rounded corners
 * (the phone is a device, not a plate). Colours are the profile's tokens, the same hex as the app's
 * `apps/mobile/src/theme/colors.ts`.
 */

/* Self-hosted fonts (SIL Open Font License, see /fonts/OFL-*.txt): the Latin subsets Google Fonts serves, which
   cover English and Swedish. Exo 2 is one variable file per style. */
@font-face {
  font-family: "Exo 2";
  font-style: italic;
  font-weight: 700 900;
  font-display: swap;
  src: url("/fonts/exo2-italic-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Exo 2";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("/fonts/exo2-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Pixelify Sans";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("/fonts/pixelify-sans-latin.woff2") format("woff2");
}

:root {
  --studio: #1f2420;
  --machine: #111410;
  --bezel: #0c0e0b;
  --slate: #313830;
  --rim: #414a3f;
  --teal: #3f6e70;
  --cream: #efe8d6;
  --muted: #b3b5a5;
  --dawn: #ea8a3e;
  --sun: #e9b44c;
  --moss: #6fb38a;
  --sky: #7fb2c9;
  --room: #7e4a3b;
  --gutter: clamp(20px, 4vw, 48px);
  color-scheme: dark;
}

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

body {
  margin: 0;
  background: var(--studio);
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--sun);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}
a:hover {
  color: var(--dawn);
}
a:focus-visible {
  outline: 2px solid var(--sun);
  outline-offset: 4px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* The design's columns are 1200px of content plus the gutter on each side (content-box, as the design renders). */
.top,
.hero,
.pace,
.band-inner,
.foot,
.lost-wrap,
.doc {
  box-sizing: content-box;
}

.page {
  position: relative;
  min-height: 100vh;
  background: var(--studio);
  color: var(--cream);
  font-family: "Exo 2", system-ui, sans-serif;
  overflow-x: hidden;
}

/* Plates: the box leans, the text stands upright. */
.mark-s,
.mark-word,
.lang,
.soon,
.card-when,
.card-session,
.quote-plate {
  transform: skewX(-14deg);
}
.mark-s > span,
.mark-word > span,
.lang > span,
.soon > span,
.card-when > span,
.card-session > span,
.quote-plate > span {
  display: block;
  transform: skewX(14deg);
}

/* The SPURT mark */
.mark {
  display: flex;
  padding-left: 6px;
}
.mark-s {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 36px;
  background: var(--dawn);
}
.mark-s > span {
  font:
    italic 900 22px/1 "Exo 2",
    sans-serif;
  color: var(--studio);
}
.mark-word {
  display: flex;
  align-items: center;
  height: 36px;
  padding: 0 14px;
  background: var(--teal);
}
.mark-word > span {
  white-space: nowrap;
  font:
    italic 900 18px/1 "Exo 2",
    sans-serif;
  color: var(--cream);
}
.mark-foot .mark-s {
  width: 30px;
  height: 28px;
}
.mark-foot .mark-s > span {
  font-size: 16px;
}
.mark-foot .mark-word {
  height: 28px;
  padding: 0 11px;
}
.mark-foot .mark-word > span {
  font-size: 14px;
}

/* Top bar: the mark, and the language switcher on the right */
.top {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px var(--gutter) 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.top > a {
  text-decoration: none;
}
.langs {
  display: flex;
  gap: 6px;
  padding-right: 4px;
}
.lang {
  display: flex;
  align-items: center;
  height: 28px;
  padding: 0 11px;
  color: var(--muted);
  text-decoration: none;
  box-shadow: inset 0 0 0 2px var(--rim);
}
.lang > span {
  font:
    italic 900 13px/1 "Exo 2",
    sans-serif;
  letter-spacing: 0.06em;
}
.lang:hover {
  color: var(--cream);
}
.lang-on,
.lang-on:hover {
  background: var(--teal);
  color: var(--cream);
  box-shadow: none;
}

/* Hero */
.hero {
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(40px, 6vw, 72px) var(--gutter) clamp(64px, 9vw, 112px);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr));
  gap: clamp(48px, 6vw, 80px);
  align-items: center;
}
.logo {
  display: flex;
  align-items: center;
  gap: clamp(12px, 2vw, 20px);
}
.speed-lines {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.sl {
  display: block;
  height: 12px;
  transform: skewX(-24deg);
}
.sl-1 {
  width: clamp(40px, 5vw, 64px);
  background: var(--dawn);
}
.sl-2 {
  width: clamp(30px, 3.8vw, 48px);
  margin-left: 10px;
  background: var(--sun);
}
.sl-3 {
  width: clamp(20px, 2.5vw, 32px);
  margin-left: 20px;
  background: var(--teal);
}
.wordmark {
  font:
    italic 900 clamp(84px, 12vw, 156px) / 0.86 "Exo 2",
    sans-serif;
  letter-spacing: -0.02em;
  text-shadow: 6px 6px 0 var(--teal);
}
.hero h1 {
  margin: clamp(28px, 4vw, 40px) 0 0;
  font:
    800 clamp(36px, 4.6vw, 60px) / 1.04 "Exo 2",
    sans-serif;
  letter-spacing: -0.015em;
  text-wrap: balance;
}
.accent {
  color: var(--dawn);
}
.lede {
  max-width: 520px;
  margin: 22px 0 0;
  font-size: clamp(17px, 1.5vw, 19px);
  line-height: 1.55;
  color: var(--muted);
  text-wrap: pretty;
}

/* COMING SOON */
.soon-row {
  display: flex;
  margin-top: 36px;
  padding-left: 6px;
}
.soon {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 48px;
  padding: 0 20px;
  color: var(--cream);
  text-decoration: none;
}
.soon > span {
  white-space: nowrap;
  font:
    italic 900 18px/1 "Exo 2",
    sans-serif;
  letter-spacing: 0.04em;
}
.soon-hero {
  background: var(--machine);
  box-shadow: inset 6px 0 0 var(--dawn);
}
.soon-band {
  background: var(--studio);
  box-shadow: inset 6px 0 0 var(--sun);
}
a.soon:hover {
  color: var(--sun);
}

/* The phone */
.phone-stage {
  position: relative;
  display: flex;
  justify-content: center;
  padding: 24px 0;
}
.phone-slab {
  position: absolute;
  left: 10%;
  right: 10%;
  top: 14%;
  bottom: 4%;
  background: var(--teal);
  transform: skewX(-14deg);
}
.phone {
  position: relative;
  width: min(300px, 100%);
  aspect-ratio: 300 / 650;
  padding: 9px;
  border-radius: 42px;
  background: var(--bezel);
  box-shadow:
    0 0 0 2px var(--rim),
    14px 14px 0 var(--machine);
}
.phone-screen {
  position: relative;
  height: 100%;
  border-radius: 33px;
  overflow: hidden;
  background: var(--room);
}
.phone-room {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}
.phone-notch {
  position: absolute;
  left: 50%;
  top: 9px;
  width: 84px;
  height: 24px;
  margin-left: -42px;
  border-radius: 12px;
  background: var(--bezel);
}
.card {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 18px 14px 22px;
  background: rgba(31, 36, 32, 0.86);
}
.card-head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.card-when {
  display: flex;
  align-items: center;
  height: 18px;
  padding: 0 8px;
  margin-left: 6px;
  background: var(--sun);
}
.card-when > span {
  white-space: nowrap;
  font:
    italic 800 10px/1 "Exo 2",
    sans-serif;
  letter-spacing: 0.1em;
  color: var(--studio);
}
.card-session {
  display: flex;
  align-items: center;
  height: 34px;
  padding: 0 14px;
  background: var(--teal);
}
.card-session > span {
  white-space: nowrap;
  font:
    italic 900 21px/1 "Exo 2",
    sans-serif;
}
.card-total-row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  margin-top: 16px;
}
.card-total {
  min-width: 104px;
  font:
    italic 900 68px/0.82 "Exo 2",
    sans-serif;
  letter-spacing: -0.03em;
  color: var(--sun);
  font-variant-numeric: tabular-nums;
}
.card-points {
  font:
    italic 900 12px/1 "Exo 2",
    sans-serif;
  letter-spacing: 0.06em;
  padding-bottom: 5px;
}
.bars {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 16px;
}
.bar-row {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr) 30px;
  align-items: center;
  gap: 8px;
}
.bar-label {
  font-size: 11px;
  font-weight: 600;
}
.bar-track {
  position: relative;
  height: 10px;
  background: repeating-linear-gradient(90deg, var(--slate) 0 7px, transparent 7px 9px);
}
.bar-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
}
/* Final widths: points / 50, as the design computes them (page.test.mjs keeps them equal to POINTS). */
.bar-uth {
  width: 40%;
  background: repeating-linear-gradient(90deg, var(--moss) 0 7px, transparent 7px 9px);
}
.bar-fart {
  width: 96%;
  background: repeating-linear-gradient(90deg, var(--sun) 0 7px, transparent 7px 9px);
}
.bar-sty {
  width: 14%;
  background: repeating-linear-gradient(90deg, var(--sky) 0 7px, transparent 7px 9px);
}
.bar-pts {
  text-align: right;
  font:
    500 13px/1 "Pixelify Sans",
    sans-serif;
}
.quote {
  display: flex;
  align-items: center;
  margin-top: 18px;
}
.quote-face {
  display: block;
  flex: none;
  width: 34px;
  height: 34px;
  background: url("/img/josh.webp") center 30% / cover;
  outline: 2px solid var(--cream);
}
.quote-plate {
  display: flex;
  align-items: center;
  min-height: 34px;
  padding: 5px 12px 5px 14px;
  margin-left: -3px;
  background: var(--cream);
}
.quote-plate > span {
  font:
    500 11px/1.3 "Exo 2",
    sans-serif;
  color: var(--studio);
}

/* With the script, the counter waits for site.js to zero it, so the final numbers never flash first. */
.js .readout {
  visibility: hidden;
}
.js.ready .readout {
  visibility: visible;
}

/* 7:30 or 3:30 */
.pace {
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(96px, 13vw, 168px) var(--gutter);
  text-align: center;
}
.pace h2 {
  margin: 0;
  font:
    800 clamp(52px, 8vw, 116px) / 0.98 "Exo 2",
    sans-serif;
  letter-spacing: -0.02em;
}
/* "eller" and "Samma poäng." run longer than the English: a step smaller on a phone keeps the design's two lines. */
.pace h2:lang(sv) {
  font-size: clamp(44px, 8vw, 116px);
}
.pix {
  font-family: "Pixelify Sans", sans-serif;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--sun);
}
.pace p {
  max-width: 520px;
  margin: 28px auto 0;
  font-size: clamp(18px, 1.7vw, 21px);
  line-height: 1.45;
  color: var(--muted);
  text-wrap: balance;
}

/* The closing band */
.band {
  position: relative;
  background: var(--dawn);
  color: var(--studio);
  overflow: hidden;
}
.band-stripes {
  position: absolute;
  right: -40px;
  top: 50%;
  display: flex;
  flex-direction: column;
  gap: 22px;
  margin-top: -110px;
}
.bs {
  display: block;
  height: 44px;
  transform: skewX(-24deg);
}
.bs-1 {
  width: min(42vw, 520px);
  background: var(--studio);
}
.bs-2 {
  width: min(32vw, 400px);
  margin-left: min(10vw, 120px);
  background: var(--sun);
}
.bs-3 {
  width: min(22vw, 280px);
  margin-left: min(20vw, 240px);
  background: var(--teal);
}
.band-inner {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(72px, 10vw, 128px) var(--gutter);
}
.band h2 {
  max-width: 12ch;
  margin: 0;
  font:
    800 clamp(44px, 6.6vw, 92px) / 0.98 "Exo 2",
    sans-serif;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
/* On a phone the dark stripe crosses the first line's end: the Swedish line breaks before it, as "Lace up for" does. */
@media (max-width: 600px) {
  .band h2:lang(sv) {
    max-width: 9ch;
  }
}
/* Narrower than the design's 390px the stripes would touch "Lace up for": they step out a little further right. */
@media (max-width: 380px) {
  .band-stripes {
    right: -64px;
  }
}

/* Footer */
.foot {
  max-width: 1200px;
  margin: 0 auto;
  padding: 28px var(--gutter) 36px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}
.copy {
  font-size: 14px;
  color: var(--muted);
}

/* 404 */
.lost-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(72px, 10vw, 128px) var(--gutter);
  display: grid;
  gap: 72px;
}
.lost h1 {
  margin: 0;
  font:
    800 clamp(44px, 6.6vw, 92px) / 0.98 "Exo 2",
    sans-serif;
  letter-spacing: -0.02em;
}
.lost p {
  margin: 20px 0 0;
  font-size: clamp(17px, 1.5vw, 19px);
  line-height: 1.55;
  color: var(--muted);
}

/* Footer links: the privacy policy (task 486) beside the copyright line. */
.foot-end {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 24px;
}
.foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}
.foot-links a,
.foot-here {
  font-size: 14px;
  font-weight: 600;
}
/* The footer's item for the page you are on: read, not followed. */
.foot-here {
  color: var(--cream);
}

/* Text pages: the privacy policy and the account deletion (task 486). One reading column under the top bar's mark,
   the profile's headings (Exo 2 800 for the title, black italic capitals for the sections) over upright Exo 2. */
.doc {
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(48px, 7vw, 88px) var(--gutter) clamp(72px, 10vw, 120px);
}
.doc > * {
  max-width: 720px;
}
.doc h1 {
  margin: 0;
  font:
    800 clamp(40px, 5.6vw, 72px) / 1 "Exo 2",
    sans-serif;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.doc-draft {
  margin: 16px 0 0;
  font-size: 14px;
  color: var(--muted);
}
.doc-lede {
  margin: 24px 0 0;
  font-size: clamp(17px, 1.5vw, 19px);
  line-height: 1.55;
  color: var(--cream);
  text-wrap: pretty;
}
.doc-sec {
  margin-top: clamp(40px, 5vw, 56px);
}
.doc-sec h2 {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  font:
    italic 900 clamp(18px, 1.8vw, 21px) / 1.15 "Exo 2",
    sans-serif;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
/* The section mark: a short dawn stripe leaning like the speed lines. */
.doc-sec h2::before {
  content: "";
  flex: none;
  width: 22px;
  height: 8px;
  background: var(--dawn);
  transform: skewX(-24deg);
}
.doc-sec p,
.doc-sec ul > li {
  font-size: 16px;
  line-height: 1.6;
  color: var(--muted);
  text-wrap: pretty;
}
.doc-sec p {
  margin: 14px 0 0;
}
.doc-sec ul {
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}
.doc-sec ul > li {
  position: relative;
  padding-left: 20px;
}
.doc-sec ul > li + li {
  margin-top: 8px;
}
/* The app's list mark: a small square. */
.doc-sec ul > li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.65em;
  width: 6px;
  height: 6px;
  background: var(--rim);
}
.doc a {
  overflow-wrap: anywhere;
}

/* The way to the deletion, after the rights: the 404's plate, its words in capitals and free to wrap on a phone. */
.doc-act {
  margin-top: 28px;
}
.doc-act .soon {
  height: auto;
  min-height: 48px;
  padding: 12px 20px;
}
.doc-act .soon > span {
  white-space: normal;
  font-size: 16px;
  line-height: 1.2;
  text-transform: uppercase;
}

/* The way in the app: one line of text in the app's words, the steps in cream. Plain text, not plates, so it never
   reads as a button (plates with the dawn edge are only for links). */
.doc-sec .doc-path {
  margin-top: 16px;
  font-size: 17px;
  line-height: 1.6;
}
.doc-path b {
  font-weight: 700;
  color: var(--cream);
}
