:root {
  color-scheme: light;
  font-family: system-ui, "Segoe UI", sans-serif;
  --ink: #132321;
  --muted: #455c58;
  --accent: #07554f;
  --paper: #f3f9f6;
  --surface: #e8f3ef;
  --rule: #ccdcd6;
  --button-text: #fff;
}

* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--paper); }
a { color: inherit; }
button { font: inherit; cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 5px; }
h1:focus { outline: none; }

.werk {
  --ink: #131f2f;
  --muted: #445369;
  --accent: #1454ad;
  --paper: #f0f3f8;
  --surface: #e6edf7;
  --rule: #cbd6e5;
}

.demo-header {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px clamp(16px, 5vw, 78px);
  font-size: .875rem;
}
.demo-back {
  display: inline-flex;
  align-items: center;
  gap: .4em;
  min-height: 44px;
  color: var(--accent);
  text-underline-offset: .2em;
}
.stage {
  min-height: calc(100svh - 134px);
  display: grid;
  place-content: center;
  justify-items: center;
  text-align: center;
  padding: clamp(48px, 9vh, 106px) 20px clamp(42px, 7vh, 74px);
}

.demo-maker {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: .875rem;
}
.demo-maker a {
  color: var(--accent);
  font-weight: 650;
  text-underline-offset: .2em;
}

.brand { position: relative; margin-bottom: clamp(29px, 5vh, 55px); }
.invoice-brand { display: flex; align-items: center; justify-content: center; }
.ribbon { width: clamp(69px, 14vw, 139px); aspect-ratio: 1; position: relative; flex: none; }
.ribbon img { width: 100%; height: 100%; position: absolute; inset: 0; }
.ribbon-upper { clip-path: inset(0 0 43% 0); }
.ribbon-lower { clip-path: inset(57% 0 0 0); }
.wordmark {
  margin-left: -.27em;
  margin-top: .46em;
  font-size: clamp(2.15rem, 7vw, 5.25rem);
  font-weight: 750;
  letter-spacing: -.064em;
  color: #104c51;
  line-height: 1;
}

.car-brand { width: min(68vw, 524px); aspect-ratio: 1000 / 286; }
.car-brand img, .contour { position: absolute; inset: 0; width: 100%; height: 100%; }
.car-shadow, .contour { opacity: 0; }
.contour { stroke: #2474d8; stroke-width: 5; stroke-linecap: round; stroke-dasharray: 1; }

.copy { max-width: 790px; }
h1 {
  margin: 0;
  font-size: clamp(2.08rem, 6.2vw, 4.15rem);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -.058em;
  text-wrap: balance;
}
.copy p {
  max-width: 52ch;
  margin: 21px auto 30px;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.18rem);
  line-height: 1.65;
  text-wrap: pretty;
}
.primary {
  display: inline-flex;
  min-height: 50px;
  align-items: center;
  gap: 22px;
  padding: 12px 20px;
  border-radius: 6px;
  background: var(--accent);
  color: var(--button-text);
  font-weight: 700;
  text-decoration: none;
}
.primary:hover { box-shadow: inset 0 0 0 2px currentColor; }
.primary span { font-size: 1.15em; }

.skip {
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid var(--rule);
  border-radius: 5px;
  color: var(--ink);
  background: var(--paper);
}

footer {
  display: grid;
  place-items: center;
  min-height: 70px;
  border-top: 1px solid var(--rule);
}
.replay {
  padding: 10px 13px;
  border: 0;
  color: var(--muted);
  background: none;
  text-underline-offset: 4px;
  text-decoration: underline;
}

.playing .brand { animation: settle 2s both; }
.playing .copy { animation: show-copy 2s both; }
.playing .ribbon-upper { animation: upper-ribbon .72s .08s both; }
.playing .ribbon-lower { animation: lower-ribbon .66s .4s both; }
.playing .wordmark { animation: wordmark .53s .83s both; }
.playing .contour { animation: contour-fade 1.53s both; }
.playing .contour > * { animation: draw .96s both; }
.playing .car-shadow { animation: car-shadow 1.24s .42s both; }
.playing .car-color { animation: car-color .47s 1.01s both; }

@keyframes settle {
  0%, 62% { transform: translateY(clamp(55px, 11vh, 100px)) scale(1.08); }
  94%, 100% { transform: translateY(0) scale(1); }
}
@keyframes show-copy {
  0%, 74% { opacity: 0; transform: translateY(10px); }
  100% { opacity: 1; transform: translateY(0); }
}
@keyframes upper-ribbon {
  from { clip-path: inset(0 100% 43% 0); }
  to { clip-path: inset(0 0 43% 0); }
}
@keyframes lower-ribbon {
  from { clip-path: inset(57% 100% 0 0); }
  to { clip-path: inset(57% 0 0 0); }
}
@keyframes wordmark {
  from { clip-path: inset(0 100% 0 0); opacity: 0; }
  to { clip-path: inset(0 0 0 0); opacity: 1; }
}
@keyframes draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes contour-fade { 0%, 63% { opacity: 1; } 100% { opacity: 0; } }
@keyframes car-shadow {
  0% { opacity: 0; clip-path: inset(0 100% 0 0); filter: grayscale(1); }
  48% { opacity: 1; clip-path: inset(0 0 0 0); filter: grayscale(1); }
  100% { opacity: 0; clip-path: inset(0 0 0 0); filter: grayscale(1); }
}
@keyframes car-color { from { opacity: 0; } to { opacity: 1; } }

@media (max-width: 420px) {
  .car-brand { width: 80vw; }
}

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