/* Ported from site-design/mockup 3a: base.css, r2/look-2.css (.v-c), r2/hero-c.css, r3/r3.css, in that order. */

@font-face {
  font-family: "Noto Sans SC";
  src: url(fonts/noto-sans-sc.woff2) format("woff2");
  font-weight: 400 900;
  font-display: swap;
}
@font-face {
  font-family: "Big Shoulders Display";
  src: url(fonts/big-shoulders-display.woff2) format("woff2");
  font-weight: 800;
  font-display: swap;
}

:root {
  --fold: 844px;
  /* 3a's 24 px at 390; from 480 px up to the desktop layout, 5% of the width, as 3a's design references use. */
  --pad: max(24px, 5vw);
  --dark: oklch(0.16 0.003 260);
  --disp: "Noto Sans SC", "PingFang SC", sans-serif;
  --num: "Big Shoulders Display", "Noto Sans SC", sans-serif;
  --bg: oklch(0.175 0.003 260);
  --bg2: oklch(0.235 0.003 260);
  --ink: oklch(0.96 0.008 95);
  --mut: oklch(0.76 0.006 95);
  --line: oklch(0.36 0.003 260);
  --acc: oklch(0.88 0.17 97);
  --on-acc: oklch(0.175 0.003 260);
  --bl: var(--acc);
  --gl: rgb(255 255 255 / 0.045);
  background: var(--bg);
}

/* base.css */
*,
*::before,
*::after {
  box-sizing: border-box;
}
body {
  margin: 0;
}
.pg {
  position: relative;
  overflow: hidden;
  font-size: 16px;
  line-height: 1.65;
  text-wrap: pretty;
  -webkit-font-smoothing: antialiased;
  background: var(--bg);
  color: var(--ink);
  font-family: "Noto Sans SC", "PingFang SC", sans-serif;
}
h1,
h2,
h3,
h4,
p,
ul,
ol,
figure {
  margin: 0;
  padding: 0;
}
ul,
ol {
  list-style: none;
}
picture {
  display: contents;
}
img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
i,
em {
  font-style: normal;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  font: inherit;
  color: inherit;
  cursor: pointer;
  border: 0;
  background: none;
  padding: 0;
}
.shot {
  overflow: hidden;
}
.bar {
  width: max(calc(var(--v) / 1015 * 100%), 7.5em);
}

/* r2/look-2.css */
.top {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 8;
  height: 68px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 var(--hero-x);
}
.brand {
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.brand b {
  font: 900 20px / 1 var(--disp);
}
.brand span {
  font-size: 13px;
  opacity: 0.82;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 700;
  white-space: nowrap;
  /* A phone browser's tap flash is a square box around the round button; the jump or the tick answers the tap. */
  -webkit-tap-highlight-color: transparent;
}
.btn-s {
  min-height: 44px;
  padding: 0 16px;
  font-size: 15px;
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.75);
}
.btn-l {
  min-height: 56px;
  padding: 0 8px 0 28px;
  gap: 16px;
  font-size: 20px;
  background: oklch(0.985 0 0);
  color: var(--dark);
}
.arr {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--dark);
  display: grid;
  place-items: center;
}
.arr::before {
  content: "";
  width: 9px;
  height: 9px;
  border-top: 2px solid #fff;
  border-right: 2px solid #fff;
  transform: translateX(-2px) rotate(45deg);
}

.hero {
  position: relative;
  isolation: isolate;
  height: var(--fold);
  overflow: visible;
}
h1 {
  font: 900 74px / 1.04 var(--disp);
  letter-spacing: -0.01em;
}
h1 span {
  display: block;
}
.lede {
  font-size: 15px;
  line-height: 1.65;
}
.hero .btn-l {
  margin-top: 20px;
}
.hint {
  font-size: 13px;
  margin-top: 8px;
  color: var(--mut);
}

.sec {
  padding: 64px var(--pad) 56px;
  position: relative;
}
.sec::before {
  content: "";
  position: absolute;
  top: 0;
  left: var(--pad);
  right: var(--pad);
  height: 3px;
  background: linear-gradient(90deg, var(--line) 28px, transparent 0) 0 0 / 44px 100% repeat-x;
}
.sec h2 {
  font: 900 44px / 1.12 var(--disp);
  letter-spacing: -0.01em;
}
.sec-lede,
:is(.year, .note) p {
  color: var(--mut);
  font-size: 15px;
}
.sec-lede {
  margin-top: 8px;
}

.nums {
  padding-top: 44px;
}
.nums::before {
  display: none;
}
.nums h2 {
  font: 700 13px / 1 var(--disp);
  color: var(--mut);
  letter-spacing: 0.3em;
}
.numrow {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-top: 16px;
  border-top: 1px solid var(--line);
}
.numrow li {
  padding: 16px 0 20px;
  border-bottom: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.numrow li:nth-child(odd) {
  padding-right: 16px;
  border-right: 1px solid var(--line);
}
.numrow li:nth-child(even) {
  padding-left: 16px;
}
.numrow b {
  font: 800 96px / 0.84 var(--num);
  display: flex;
  align-items: baseline;
  gap: 4px;
}
.numrow b i {
  font: 700 20px / 1 var(--disp);
}
.numrow li:nth-child(3) b {
  color: var(--acc);
}
.numrow span {
  font-size: 13px;
  line-height: 1.5;
  color: var(--mut);
}

.pair {
  margin-top: 44px;
}
.pair header {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.pair h3 {
  font: 900 26px / 1.15 var(--disp);
}
.pair header p {
  font-size: 13px;
  color: var(--mut);
}
.vs {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0 24px;
  position: relative;
}
.vs::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 3px;
  margin-left: -1.5px;
  background: linear-gradient(var(--acc) 22px, transparent 0) 0 0 / 100% 36px repeat-y;
}
.vs .shot {
  aspect-ratio: 1 / 1.05;
}
figcaption {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 8px;
}
figcaption em {
  align-self: flex-start;
  font: 700 13px / 1 var(--disp);
  padding: 4px 8px;
  border-radius: 3px;
}
.with em {
  background: var(--ink);
  color: var(--dark);
}
.without em {
  box-shadow: inset 0 0 0 1px var(--mut);
  color: var(--mut);
}
figcaption b {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
  margin-top: 4px;
}
figcaption span {
  font-size: 13px;
  line-height: 1.5;
  color: var(--mut);
}

.uselist {
  margin-top: 24px;
  display: grid;
  gap: 32px;
  counter-reset: u;
}
.uselist li {
  counter-increment: u;
  position: relative;
}
.uselist .shot {
  aspect-ratio: 16 / 9;
  position: relative;
}
/* A shade in the corner under the number, so it reads at 4.5 to 1 on a bright photo (sky, concrete). */
.uselist .shot::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 0 0, #0008, #0000 45%);
}
.uselist li::before {
  content: "0" counter(u);
  position: absolute;
  z-index: 1;
  left: 12px;
  top: 6px;
  font: 800 54px / 1 var(--num);
  color: #fff;
  text-shadow: 0 1px 14px #000a;
}
.use-txt {
  margin-top: 12px;
}
.use-txt h3 {
  font: 900 26px / 1.15 var(--disp);
}
.use-txt p {
  font-size: 15px;
  color: var(--mut);
  margin-top: 8px;
}

/* 发展历程, laid out as Spyker's heritage page (measured, .scratch/r3/spyker/measures.md), in 3a's colours and fonts.
   Phone: one column, 80 px between blocks; a year block is its title, its body, then the year fitted to the column. */
.years {
  margin-top: 80px;
  display: grid;
  gap: 80px;
}
.years li {
  display: grid;
  gap: 80px;
}
.year {
  display: flex;
  flex-direction: column;
}
.year time {
  order: 1;
  margin-top: 120px;
  /* The widest year, 2004, is 1.88 of the font size wide. */
  font: 800 calc((100vw - 2 * var(--pad)) / 1.9) / 0.86 var(--num);
  text-align: center;
}
:is(.year h3, .note h4) {
  font: 900 34px / 43px var(--disp);
  margin-bottom: 40px;
}
.note {
  padding-top: 40px;
}
/* （故事待定） wraps whole, so its brackets never part at a line's end. */
.tbd {
  display: inline-block;
}
/* Spyker's photo kinds (measures.md 1f): each frame's shape (--ar) and how much larger than the frame its picture is
   along the drift (--layer), so the picture can drift 10 % either way (motion.js). Full and tall photos run edge to
   edge on a phone. */
.pic {
  position: relative;
  overflow: hidden;
  aspect-ratio: var(--ar);
}
.portrait {
  --ar: 480 / 674;
  --layer: 120%;
}
.four5 {
  --ar: 4 / 5;
  --layer: 125%;
}
.landscape {
  --ar: 1150 / 674;
  --layer: 125%;
}
.full,
.tall {
  --ar: 4 / 3;
  --layer: 120%;
  margin-inline: calc(-1 * var(--pad));
}
.pic picture {
  display: block;
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: var(--bg2);
  transform-origin: 0 100%;
}
.pic img {
  position: absolute;
  inset: calc((100% - var(--layer)) / 2) 0;
  height: var(--layer);
}

/* 成本测算, a calculator: the slider (the browser's own) sets the tons; site.js writes each total and difference.
   Until it has run (data-tons), the slider is hidden and the page shows the figures for 10,000 t. */
.tons {
  margin-top: 24px;
  display: grid;
  gap: 4px;
  font-size: 15px;
}
.tons output {
  font-weight: 700;
}
.cost:not([data-tons]) .tons input,
.cost:not([data-tons]) .drag-hint {
  display: none;
}
/* The thumb's touch area is 44 px square; it draws a 24 px dot. A finger moving up or down scrolls the page. */
.tons input {
  appearance: none;
  width: 100%;
  height: 44px;
  margin: 0;
  background: none;
  touch-action: pan-y;
  cursor: pointer;
}
.tons input::-webkit-slider-runnable-track {
  height: 4px;
  background: var(--line);
}
.tons input::-moz-range-track {
  height: 4px;
  background: var(--line);
}
.tons input::-webkit-slider-thumb {
  appearance: none;
  width: 44px;
  height: 44px;
  margin-top: -20px;
  border: 10px solid transparent;
  border-radius: 50%;
  background: var(--ink) padding-box;
}
.tons input::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border: 10px solid transparent;
  border-radius: 50%;
  background: var(--ink) padding-box;
}
.tons input:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.bars {
  margin-top: 28px;
  display: grid;
  gap: 24px;
}
/* Each bar is as long as its 元 a ton (--v), in two parts: asphalt (--a 元) and SFC聚陶, each with its colour. */
.bars li {
  --asphalt: var(--bg2);
  --sfc: color-mix(in oklab, var(--ink) 22%, var(--bg2));
  display: grid;
  gap: 8px;
  font-size: 15px;
}
.bars li > p:first-child {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  column-gap: 12px;
}
.bars small {
  margin-left: auto;
  font-size: inherit;
  color: var(--mut);
  white-space: nowrap;
}
.bar {
  --split: calc(var(--a, var(--v)) / var(--v) * 100%);
  height: 54px;
  background: linear-gradient(90deg, var(--asphalt) var(--split), var(--sfc) 0);
  box-shadow: inset 0 0 0 1px var(--line);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0 12px;
}
.bars b {
  font: 800 42px / 1 var(--num);
  font-variant-numeric: tabular-nums;
  display: flex;
  align-items: baseline;
  gap: 4px;
}
.bars b i {
  font: 700 15px / 1 var(--disp);
}
.parts {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  color: var(--mut);
  font-size: 13px;
}
.parts span::before {
  content: "";
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 8px;
  background: var(--asphalt);
  box-shadow: inset 0 0 0 1px var(--line);
}
.parts span + span::before {
  background: var(--sfc);
}
.bars em {
  font-size: 13px;
  color: var(--mut);
}
.base .bar,
.base .parts span::before {
  background: repeating-linear-gradient(135deg, #ffffff21 0 6px, transparent 6px 12px);
}
.bars .best {
  --asphalt: var(--ink);
  --sfc: color-mix(in oklab, var(--ink) 72%, var(--bg));
}
.best .bar {
  color: var(--dark);
  box-shadow: none;
}
.best em {
  color: var(--ink);
}
.cost-ref {
  margin-top: 24px;
  font-size: 13px;
  color: var(--mut);
}

.apply {
  background: var(--acc);
  color: var(--on-acc);
  padding-top: 56px;
}
.apply::before {
  display: none;
}
.apply .sec-lede {
  color: inherit;
  font-size: 16px;
  font-weight: 500;
}
.foot {
  padding: 28px var(--pad) 36px;
  font-size: 13px;
  color: var(--mut);
  display: grid;
  gap: 4px;
}
.foot b {
  color: var(--ink);
  font-weight: 500;
}

@media (min-width: 900px) {
  :root {
    --fold: 900px;
    --pad: 72px;
    --gl: rgb(255 255 255 / 0.04);
  }
  .top {
    height: 84px;
    padding: 0 48px;
  }
  .brand b {
    font-size: 26px;
  }
  .brand span {
    font-size: 15px;
  }
  .btn-s {
    padding: 0 24px;
    min-height: 46px;
  }
  .btn-l {
    min-height: 60px;
    font-size: 20px;
    padding: 0 8px 0 32px;
  }
  .arr {
    width: 44px;
    height: 44px;
  }
  .lede {
    font-size: 17px;
  }
  .hero .btn-l {
    margin-top: 26px;
  }
  .hint {
    font-size: 15px;
    margin-top: 14px;
  }
  .sec {
    padding: 120px var(--pad) 112px;
  }
  .sec h2 {
    font-size: 88px;
  }
  .sec-lede,
  :is(.year, .note) p {
    font-size: 18px;
  }
  .sec-lede {
    margin-top: 16px;
  }
  .nums {
    padding-top: 72px;
  }
  .nums h2 {
    font-size: 15px;
  }
  .numrow {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-top: 24px;
  }
  .numrow li,
  .numrow li:nth-child(odd),
  .numrow li:nth-child(even) {
    padding: 32px 28px 36px;
    border-right: 1px solid var(--line);
    gap: 16px;
  }
  .numrow li:first-child {
    padding-left: 0;
  }
  .numrow li:last-child {
    border-right: 0;
  }
  /* 3a's sizes at 1440. Below that the figures shrink with their column, so 672% never runs past the column line. */
  .numrow b {
    font-size: min(176px, calc(16.42vw - 60.42px));
  }
  .numrow b i {
    font-size: min(34px, calc(3.172vw - 11.67px));
  }
  .numrow span {
    font-size: 15px;
  }
  .pair {
    margin-top: 88px;
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 56px;
  }
  .pair header {
    flex-direction: column;
    gap: 8px;
    margin: 0;
  }
  .pair h3 {
    font-size: 40px;
  }
  .pair header p {
    font-size: 15px;
  }
  .vs {
    gap: 0 56px;
  }
  .vs .shot {
    aspect-ratio: 16 / 10;
  }
  figcaption {
    margin-top: 16px;
    gap: 4px;
  }
  figcaption em {
    font-size: 15px;
    padding: 8px 12px;
  }
  figcaption b {
    font-size: 20px;
    margin-top: 8px;
  }
  figcaption span {
    font-size: 15px;
  }
  .uselist {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 28px;
    margin-top: 56px;
  }
  .uselist .shot {
    aspect-ratio: 3 / 4;
  }
  .uselist li::before {
    font-size: 84px;
    left: 16px;
    top: 10px;
  }
  .use-txt h3 {
    font-size: 26px;
  }
  .use-txt p {
    font-size: 15px;
  }
  /* 发展历程 as a column on a wide screen, as Spyker's column at 1000 to 1440 px (.scratch/r3fix/spyker-column.json):
     fixed sizes, left-aligned photos 480 px wide (a wide one up to 1160), never taller than 80% of the screen; the year
     never larger than the sideways run's, centred in at most 1160 px. */
  .year time {
    font-size: min((100vw - 2 * var(--pad)) / 1.9, 415px);
    max-width: 1160px;
  }
  .pic {
    width: min(480px, 80vh * var(--ar));
  }
  .landscape {
    width: min(100%, 1160px, 80vh * var(--ar));
  }
  .tall {
    --ar: 797 / 900;
    margin-inline: 0;
  }
  .full {
    width: auto;
    aspect-ratio: auto;
    height: min(100vh, 75vw);
  }
  .cost {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
    column-gap: 72px;
    align-content: start;
  }
  .cost h2,
  .cost .sec-lede,
  .tons {
    grid-column: 1;
  }
  .tons {
    margin-top: 40px;
    font-size: 18px;
  }
  .cost-ref {
    grid-column: 2;
    font-size: 15px;
  }
  .bars {
    grid-column: 2;
    grid-row: 1 / span 6;
    margin-top: 16px;
    gap: 24px;
  }
  .bars li {
    font-size: 18px;
  }
  .parts {
    font-size: 15px;
  }
  .bar {
    height: 72px;
    padding: 0 16px;
  }
  .bars b {
    font-size: 58px;
  }
  .bars b i {
    font-size: 20px;
  }
  .bars em {
    font-size: 15px;
  }
  .apply {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 480px);
    column-gap: 72px;
    align-content: start;
    padding-top: 112px;
  }
  .apply h2 {
    grid-column: 1;
  }
  .apply .sec-lede {
    grid-column: 1;
    font-size: 20px;
    max-width: 24em;
  }
  .foot {
    padding: 36px var(--pad) 48px;
    font-size: 15px;
  }
}

/* 发展历程 sideways, after Spyker's landscape desktop, with Spyker's own switch (MOTION.years.sideways in site.js), and
   only while the motion waits or plays (data-motion, set before the first paint): scripts off, reduce motion and a page
   that stopped its motion show the column. The run is one screen tall, 160 px between blocks; motion.js moves it with
   the scroll, the heading above the band with it. The band runs from 128 px below its top to 96 px above its bottom;
   a year block is the year at the top and its title and body at the bottom; a text block is 420 px wide, its title
   at the top. Full and tall photos fill the screen's height. */
@media (min-width: 1024px) and (orientation: landscape) {
  [data-motion] .run {
    position: relative;
    margin: 0 calc(-1 * var(--pad));
    height: 100vh;
    overflow: clip;
  }
  /* Chrome counts a clipped box that turns fixed as a layout shift of the whole screen. */
  [data-motion] .run[data-pinned] {
    overflow: visible;
  }
  [data-motion] .run h2 {
    position: absolute;
    top: 14px;
    left: var(--pad);
    white-space: nowrap;
  }
  [data-motion] .years {
    margin: 0;
    display: flex;
    gap: 160px;
    width: max-content;
    height: 100%;
    padding: 128px var(--pad) 96px;
  }
  [data-motion] .years li {
    display: flex;
    gap: 160px;
  }
  /* As wide as its year, and on a short screen, where the year is small, never narrower than a text block. */
  [data-motion] .year {
    width: min-content;
    min-width: 420px;
  }
  [data-motion] .year time {
    order: 0;
    margin: 0 0 auto;
    padding-bottom: 40px;
    /* Spyker's clamp(400px, 65vh, 500px) at the height its year draws, and never so tall the title and two lines of
       body no longer fit below it. */
    font-size: min(415px, 54vh, (100vh - 460px) / 0.86);
    max-width: none;
    text-align: left;
  }
  [data-motion] :is(.year h3, .year p) {
    min-width: 100%;
  }
  [data-motion] .note {
    width: 420px;
    padding: 0;
  }
  [data-motion] .pic {
    height: 100%;
    width: auto;
  }
  [data-motion] .tall {
    --ar: 797 / 900;
  }
  [data-motion] .full {
    --ar: auto;
    width: max(100vw, 1024px);
  }
  [data-motion] :is(.full, .tall) {
    height: 100vh;
    margin: -128px 0 -96px;
  }
  [data-motion] .pic img {
    inset: 0 calc((100% - var(--layer)) / 2);
    width: var(--layer);
    height: 100%;
  }
}

/* r2/hero-c.css */
/* Below 900 px the first screen is 3a's 390 px frame grown with the width (--u is one of its px), so the machines sit
   around the same characters at every width. The frame is cut from the top when it is taller than the screen, down
   to a height that still shows the headline under the top bar. */
.pg {
  --u: max(1px, 100vw / 390);
  --hero-x: calc(20 * var(--u));
}
.hero {
  overflow: hidden;
  --full: calc(636 * var(--u) + 208px);
  --h: max(var(--fold), min(100vh, var(--full)), calc(290 * var(--u) + 308px));
  --lift: calc(var(--h) - var(--full));
  height: var(--h);
}
.road {
  position: absolute;
  z-index: 0;
  /* Where 3a puts the 930 x 1920 photo at 390 px: 408.8 x 844 px, from -9.4 px. */
  top: var(--lift);
  height: calc(844 * var(--u));
  left: calc(-9.4 * var(--u));
  width: calc(408.8 * var(--u));
}
/* The machines cross in front of the headline: the 3D pop-out Jun asked for first. Each picture's place below was
   measured so a machine hides at most 30% of any character (npm test), because a machine through a whole character
   made it unreadable. */
.road.over {
  z-index: 3;
}
@media (max-width: 899.98px) {
  .scene[data-scene="roller"] .road {
    width: calc(408.8 * 1.045 * var(--u));
    height: calc(844 * 1.045 * var(--u));
  }
  /* Left-aligned and slightly larger, the roller's drum covers only the right edge of 度 and 性. */
  .scene[data-scene="roller"] .road img {
    object-position: 0% 50%;
  }
  /* The phone picture's jet sits wholly above and right of the headline; mirrored and lowered, its wingtip reaches 强. */
  .scene[data-scene="jet"] .road {
    top: calc(var(--lift) + 12 * var(--u));
  }
  .scene[data-scene="jet"] .road img {
    transform: scaleX(-1);
  }
}
.road.over img {
  filter: drop-shadow(0 1px 2px rgb(0 0 0 / 0.35)) drop-shadow(0 8px 16px rgb(0 0 0 / 0.3));
}
.fade {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, transparent 58%, oklch(0.175 0.003 260 / 0.55) 84%, oklch(0.175 0.003 260) 100%);
}
.navshade {
  position: absolute;
  inset: 0 0 auto 0;
  height: 130px;
  z-index: 4;
  /* Held dark behind the top bar's words, which sit on a paver's yellow hopper in the first picture on a phone (round 4). */
  background: linear-gradient(180deg, rgb(8 8 9 / 0.82) 35%, transparent);
}
.paint {
  position: absolute;
  z-index: 2;
  left: var(--hero-x);
  top: calc(346 * var(--u) + var(--lift));
  font-size: calc(66 * var(--u));
  line-height: 1.07;
  color: transparent;
}
/* The paint goes on each character: a text clip drawn by the whole headline does not follow a character turned in 3D
   (round 4, the entrance at the end of this file). */
.paint i {
  display: inline-block;
  font-style: normal;
  background:
    linear-gradient(rgb(247 244 234 / 0.9), rgb(247 244 234 / 0.9)),
    url(img/texture.webp) 0 0 / calc(240 * var(--u));
  -webkit-background-clip: text;
  background-clip: text;
}
.hero-txt {
  position: absolute;
  z-index: 5;
  left: var(--hero-x);
  right: calc(24 * var(--u));
  top: calc(582 * var(--u) + var(--lift));
}
.lede {
  color: oklch(0.93 0.006 95);
}
/* On a desktop the pictures are 16:9 and never narrower than the window nor shorter than the 900 px first screen: --pw,
   the picture box's width, is 1600 px or more. Up to 1600 px the headline's left edge (0.15), top (112 px) and size
   (168 px) are shares of the box, so the machines cross its right end the same way at every width. Wider, the headline
   keeps its size so it, the paragraph and the button still fit the 900 px first screen, and the headline and picture
   move instead (--head-x, .road top) to keep the machines near the same characters. */
@media (min-width: 900px) {
  .hero {
    height: var(--fold);
    container-type: inline-size;
    --pw: max(100cqw, 1600px);
    /* Past 1600 px: moved right by the headline's width as a share of 1600 px (0.312) times the growth, its right end
       keeps its place on the picture. */
    --head-x: calc(0.15 * var(--pw) + 0.312 * (var(--pw) - 1600px));
  }
  .road {
    /* Past 1600 px the taller picture rises by its growth at the headline's middle line (390 px down). The top and bottom
       lines still drift: at 2560 px the pavers hide 39% of 度 (measured). */
    top: calc(390px - 390px * var(--pw) / 1600px);
    left: 0;
    width: var(--pw);
    height: auto;
    aspect-ratio: 16 / 9;
  }
  /* Shares measured so each machine crosses one or two characters' edges: the pavers a little right, the jet larger and
     left so its nose reaches 久, the roller a little left so it reaches 性 and 久. */
  .scene[data-scene="pavers"] .road {
    width: calc(1.06 * var(--pw));
  }
  .scene[data-scene="jet"] .road {
    left: calc(-0.37 * var(--pw));
    width: calc(1.37 * var(--pw));
  }
  .scene[data-scene="roller"] .road {
    left: calc(-0.04 * var(--pw));
    width: calc(1.04 * var(--pw));
  }
  /* The cut-outs sit above .fade; this darkens them below the headline so a machine reaching the bottom fades out with
     its photo instead of ending in a bright cut. */
  .hero::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 4;
    pointer-events: none;
    background: linear-gradient(180deg, transparent 76%, oklch(0.175 0.003 260) 100%);
  }
  .fade {
    /* Dark behind the paragraph and button, which sit on the roller's yellow road line. */
    background: linear-gradient(180deg, transparent 60%, oklch(0.175 0.003 260 / 0.8) 78%, oklch(0.175 0.003 260) 100%);
  }
  .paint {
    left: var(--head-x);
    top: 112px;
    font-size: 168px;
    line-height: 1.1;
  }
  .paint i {
    background-size: auto, 420px;
  }
  .hero-txt {
    left: calc(var(--head-x) + 8px);
    right: auto;
    top: 696px;
    width: min(480px, 100% - var(--head-x) - 48px);
  }
  .lede {
    font-size: 16px;
  }
  .hero .btn-l {
    margin-top: 20px;
  }
  .hint {
    display: inline-block;
    margin: 0 0 0 16px;
    vertical-align: middle;
  }
}

/* r3/r3.css */
.mech {
  overflow-x: clip;
  display: flex;
  flex-direction: column;
}
/* The grid lies above the reveal's covers (motion.js), so it runs on through a dimmed line; the figure lies above it. */
.mech::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background:
    linear-gradient(var(--gl) 1px, transparent 1px) 0 0 / 36px 36px,
    linear-gradient(90deg, var(--gl) 1px, transparent 1px) 0 0 / 36px 36px;
}
.mech-fig {
  position: relative;
  margin: -96px -50px 76px 6px;
  z-index: 4;
}
.mech-fig img {
  display: block;
  width: 100%;
  height: auto;
  filter: contrast(1.14) saturate(0.55) drop-shadow(0 2px 4px rgb(0 0 0 / 0.35)) drop-shadow(0 20px 32px rgb(0 0 0 / 0.3));
}
.bp {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.bp path,
.bp circle {
  fill: none;
  stroke: var(--bl);
  stroke-width: 1.5;
  vector-effect: non-scaling-stroke;
}
.bp .ax path {
  stroke-dasharray: 14 5 2 5;
  opacity: 0.75;
}
.bp .pt circle {
  fill: rgb(0 0 0 / 0.35);
}
.bp .mk path {
  opacity: 0.6;
}
.lb {
  position: absolute;
  transform: translateY(-100%);
  padding-bottom: 4px;
  font: 700 13px / 1 var(--disp);
  color: var(--bl);
  white-space: nowrap;
  display: flex;
  align-items: baseline;
  gap: 4px;
}
.lb i {
  font: 800 20px / 1 var(--num);
}
.l1 {
  left: -1.3%;
  top: 17.8%;
}
.l2 {
  left: 57%;
  top: -1%;
}
.l3 {
  right: 13%;
  top: 14%;
}
.fig-cap {
  position: absolute;
  left: 4%;
  top: 100%;
  font-size: 13px;
  color: var(--mut);
  margin-top: 24px;
}
.mech-list {
  margin-top: 24px;
  display: grid;
  counter-reset: m;
}
.mech-list li {
  counter-increment: m;
  display: grid;
  grid-template-columns: 46px 1fr;
  padding: 16px 0;
  border-top: 1px solid var(--line);
}
.mech-list li::before {
  content: "0" counter(m);
  font: 800 34px / 1 var(--num);
  color: var(--bl);
  grid-row: 1 / span 2;
}
.mech-list b {
  font: 900 20px / 1.2 var(--disp);
}
.mech-list p {
  font-size: 15px;
  line-height: 1.6;
  color: var(--mut);
  margin-top: 4px;
}

.wxcard {
  margin-top: 24px;
  display: grid;
  gap: 20px;
  justify-items: start;
}
.qr {
  width: 210px;
  aspect-ratio: 1;
  background: #fff;
  border-radius: 3px;
  padding: 16px;
}
.wx-how {
  font-size: 20px;
  font-weight: 700;
}
.wide {
  display: none;
}

@media (min-width: 900px) {
  .mech {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
    column-gap: 88px;
    align-items: start;
  }
  .mech::after {
    background-size: 48px 48px;
  }
  .mech-txt {
    grid-column: 1;
    grid-row: 1;
  }
  .mech-fig {
    grid-column: 2;
    grid-row: 1;
    margin: -150px -98px 0 0;
  }
  .lb {
    font-size: 18px;
    padding-bottom: 8px;
    gap: 8px;
  }
  .lb i {
    font-size: 26px;
  }
  .fig-cap {
    font-size: 15px;
    margin-top: 32px;
  }
  .mech-list {
    margin-top: 44px;
  }
  .mech-list li {
    grid-template-columns: 72px 1fr;
    padding: 24px 0;
  }
  .mech-list li::before {
    font-size: 52px;
  }
  .mech-list b {
    font-size: 26px;
  }
  .mech-list p {
    font-size: 18px;
  }
  .apply.wx {
    grid-template-columns: minmax(0, 1fr) minmax(0, 600px);
  }
  .wxcard {
    grid-column: 2;
    grid-row: 1 / span 6;
    grid-template-columns: 240px minmax(0, 1fr);
    align-items: center;
    gap: 32px;
    margin-top: 16px;
  }
  .qr {
    width: 240px;
  }
  .wide {
    display: block;
  }
  .narrow {
    display: none;
  }
}

/* Load order on the first screen: text, then the photo, then the cut-out. */
.js .hero[data-pictures="none"] .road img,
.js .hero[data-pictures="photo"] .road.over img {
  opacity: 0;
}
.js .road img {
  transition: opacity 0.3s ease-out;
}

@media (prefers-reduced-motion: reduce) {
  .js .road img {
    transition: none;
  }
}

/* Scroll motion (site.js). These apply only while a part is moving, so scripts off and reduce motion show 3a. */
/* Each part's first state, until motion.js takes over in the same frame (data-motion="playing"): lines dimmed as by the
   reveal's covers (motion.js), the diagram undrawn, each year below its line, each bar empty. */
[data-motion="waiting"]
  :is(
    .sec h2,
    .sec-lede,
    .numrow li > span,
    .mech-list b,
    .mech-list p,
    .pair h3,
    .pair header p,
    figcaption b,
    figcaption span,
    .shot,
    .use-txt h3,
    .use-txt p
  ),
[data-motion="waiting"] .mech-list li::before {
  opacity: 0.1;
}
[data-motion="waiting"] :is(.bp .ax, .bp .ld, .bp .mk, .bp .pt, .l2, .l3) {
  opacity: 0;
}
[data-motion="waiting"] :is(.year, .note) > * {
  opacity: 0;
}
[data-motion="waiting"] .pic:not(.full) picture {
  clip-path: inset(40% 40% 0 0);
  scale: 0.8;
}
[data-motion="waiting"] .bar {
  clip-path: inset(0 100% 0 0);
}
.covered {
  position: relative;
}
.cover {
  position: absolute;
  z-index: 2;
  pointer-events: none;
  transform-origin: right;
}
.numrow b span {
  font: inherit;
  color: inherit;
}
.slot {
  display: inline-block;
  position: relative;
  clip-path: inset(-1px 0 0);
  -webkit-text-fill-color: transparent;
}
.strip {
  position: absolute;
  top: 0;
  left: -1em;
  right: -1em;
  text-align: center;
  white-space: pre;
  -webkit-text-fill-color: currentcolor;
}
.rising {
  clip-path: inset(-1em -1em 0);
}
/* Separate boxes per digit may break a line between them; one word of text may not. */
.digits,
.rising {
  white-space: nowrap;
}
.rising span {
  display: inline-block;
}
.counting {
  position: relative;
  visibility: hidden;
}
.count {
  position: absolute;
  inset: 0;
  justify-content: flex-end;
  visibility: visible;
}
.ln {
  display: block;
  clip-path: inset(-1em -1em 0);
}
.ln > span {
  display: inline-block;
}

/* Round 4, the first screen's entrance, candidate 2 (requirements-round4.md A; Jun picked it): each character stands up
   from lying flat on the road, turning about its bottom edge, once, from the first paint, as plain CSS. Timing from
   Spyker's year digits (.scratch/r3/spyker/measures.md): 0.8 s each, cubic-bezier(0.625, 0.05, 0, 1), 0.05 s apart.
   The perspective, 600 px, has no source: Jun picked it by eye over 1200 px. Scripts off and reduce motion show the
   headline standing. */
@media (prefers-reduced-motion: no-preference) {
  .js .paint {
    perspective: 600px;
  }
  .js .paint > span {
    transform-style: preserve-3d;
  }
  .js .paint i {
    transform-origin: bottom;
    animation: hero-stand 0.8s cubic-bezier(0.625, 0.05, 0, 1) calc(var(--i) * 0.05s) both;
  }
}
@keyframes hero-stand {
  from {
    transform: rotateX(90deg);
  }
}
