/* Page pieces on top of the design system. Colours come from tokens.css. */
@font-face { font-family: "Geist"; src: url(fonts/geist-latin.woff2) format("woff2"); font-weight: 100 900; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212; }
@font-face { font-family: "Geist"; src: url(fonts/geist-latin-ext.woff2) format("woff2"); font-weight: 100 900; font-display: swap; unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+2C60-2C7F, U+A720-A7FF; }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body { margin: 0; background: var(--card); color: var(--ink); font-family: var(--font-sans); font-variant-numeric: tabular-nums; line-height: 1.35; -webkit-font-smoothing: antialiased; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-weight: 700; text-wrap: balance; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.wrap { max-width: 1360px; margin: 0 auto; padding-inline: 24px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 10; padding: 12px 16px; background: var(--primary); color: var(--on-primary); border-radius: var(--radius-field); }
.suggest { display: flex; justify-content: center; background: var(--page); }
.lead { max-width: 520px; font-size: clamp(17px, 1.5vw, 19px); line-height: 1.5; color: var(--ink-muted); }

/* actions */
.ds-btn { transition: transform var(--duration-fast) var(--ease-out), background-color var(--duration-fast) var(--ease-out); }
.ds-btn:hover { transform: translateY(-1px); background: var(--inset); }
.ds-btn:active { transform: scale(.98); }
.ds-btn.pri:hover { background: var(--primary-hover); }
a.ds-btn.pri { color: var(--on-primary); }
.ds-lk:hover { text-decoration: underline; text-underline-offset: 4px; }

/* The menu stays put and the page scrolls under it. */
.topbar { position: sticky; top: 0; z-index: 5; background: var(--card); border-bottom: 1px solid var(--hairline); }
.nav { display: flex; align-items: center; gap: 12px; min-height: 76px; }
.brand { display: inline-flex; align-items: center; min-height: var(--size-touch); margin-right: auto; color: var(--ink); font-size: 20px; letter-spacing: -.03em; font-weight: 700; text-decoration: none; white-space: nowrap; }
.brand img { display: block; width: auto; height: 28px; }
.nav > .ds-lk { padding-inline: 10px; }
.nav .lang { min-width: var(--size-touch); justify-content: center; }

/* hero: the system on a computer, the app on a phone standing over its right edge */
.hero { display: grid; grid-template-columns: minmax(0, 4.6fr) minmax(0, 7fr); gap: 48px; align-items: center; padding-block: 32px 24px; }
.hero__text { display: flex; flex-direction: column; align-items: flex-start; gap: 24px; }
/* The headline is a full sentence: at this size it holds three or four lines in the narrow column. */
.hero h1 { font-size: clamp(40px, 4.2vw, 60px); line-height: 1.02; letter-spacing: -.045em; }
.cta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; }
.cta .cta__main { min-height: 56px; padding-inline: 24px; }
.art { position: relative; height: 540px; }
.window { position: absolute; left: 0; top: 16px; width: 840px; height: 560px; scale: .72; transform-origin: 0 0; overflow: hidden; border-radius: var(--radius-card); background: var(--card); font-size: 14px; box-shadow: 0 2px 6px var(--shadow-near), 0 28px 64px var(--shadow-window); animation: enter 500ms var(--ease-out) backwards; }
.window .ds-app { display: flex; flex-direction: row; height: 100%; border-radius: 0; }
.window .ds-sd { flex: 0 0 176px; }
.window .ds-flex { gap: 8px; }
.window .ds-nvd a.on { background: var(--card); }
.window .ds-av.sm { width: 22px; height: 22px; font-size: 10px; }
.window .ds-board { grid-template-columns: repeat(4, 160px); }
.window__title { font-size: 16px; font-weight: 600; }
.phone { position: absolute; right: 0; bottom: 0; width: 232px; overflow: hidden; border: 8px solid var(--ink); border-radius: 40px; background: var(--ink); box-shadow: 0 4px 12px var(--shadow-near), -2px 36px 72px var(--shadow-phone); animation: rise 700ms var(--ease-out) 250ms backwards; transition: transform 220ms var(--ease-out); }
.phone:hover { transform: translateY(-6px); }
.phone img { display: block; width: 100%; height: auto; border-radius: 32px; }
@keyframes enter { from { opacity: 0; transform: translateY(12px); } }
@keyframes rise { from { opacity: 0; transform: translateY(48px); } }

/* scrollytelling: the step and its screen are pinned side by side; scrolling changes both */
.sec { padding-block: 32px 48px; }
.headline { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 28px; }
.headline h2 { max-width: 640px; font-size: clamp(30px, 3.4vw, 44px); line-height: 1.05; letter-spacing: -.035em; }
.pin { display: flex; flex-direction: column; gap: 32px; }
.row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2.6fr); align-items: center; column-gap: 56px; }
.is-pinned .pin { position: sticky; }
.stage { grid-column: 2; grid-row: 1; display: flex; flex-direction: column; gap: 8px; }
.screen { position: relative; aspect-ratio: 1080 / 778; overflow: hidden; border-radius: 24px; background: var(--clip-ground); }
/* Wide screens: the screen takes the height left under the menu and the heading (300px with the controls),
   as far as the width allows, and the step keeps at least a readable column. */
@media (min-width: 821px) {
  .row { grid-template-columns: minmax(260px, 1fr) minmax(0, calc(max(280px, 100svh - 300px) * 1.388)); column-gap: 40px; }
}
.shot { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; opacity: 0; transform: translateY(24px) scale(.97); transition: opacity 280ms var(--ease-out), transform 280ms var(--ease-out); }
.shot[data-on="true"] { opacity: 1; transform: none; }
.controls { display: flex; align-items: center; gap: 16px; min-height: var(--size-touch); }
.progress { display: flex; flex: 1; gap: 6px; }
.progress span { flex: 1; height: 6px; border-radius: var(--radius-pill); background: var(--inset); transition: background-color var(--duration-fast) var(--ease-out); }
.progress span { overflow: hidden; }
.progress span[data-on="true"] { background: var(--data-muted); }
/* The active segment fills with the clip's own time, so pausing visibly stops something. */
.progress i { display: block; height: 100%; background: var(--ink); transform: scaleX(0); transform-origin: left; }
.progress span[data-on="true"] i { transform: scaleX(var(--played, 0)); transition: transform 280ms linear; }
.toggle { min-width: 148px; gap: 8px; }
.toggle__icon { width: 12px; height: 12px; border-inline: 4px solid currentColor; }
.toggle[data-paused="true"] .toggle__icon { border: 0; background: currentColor; clip-path: polygon(0 0, 100% 50%, 0 100%); }
.screen { cursor: pointer; }
.screen::before, .screen::after { content: ""; position: absolute; left: 50%; top: 50%; z-index: 1; translate: -50% -50%; opacity: 0; pointer-events: none; transition: opacity var(--duration-fast) var(--ease-out); }
.screen::before { width: 72px; height: 72px; border-radius: var(--radius-pill); background: var(--ink); }
.screen::after { width: 22px; height: 24px; margin-left: 3px; background: var(--on-primary); clip-path: polygon(0 0, 100% 50%, 0 100%); }
.story[data-paused="true"] .screen::before, .story[data-paused="true"] .screen::after { opacity: 1; }
.beats { grid-column: 1; grid-row: 1; display: grid; gap: 32px; margin: 0; padding: 0; list-style: none; }
.beat { display: flex; flex-direction: column; gap: 14px; }
.is-pinned .beat { grid-area: 1 / 1; align-self: center; opacity: 0; transform: translateY(24px); transition: opacity 140ms var(--ease-out), transform 140ms var(--ease-out); }
.is-pinned .beat[data-on="true"] { opacity: 1; transform: none; transition-delay: 140ms; }
.beat__n { font-size: 96px; line-height: .9; font-weight: 700; letter-spacing: -.06em; }
.beat h3 { font-size: clamp(28px, 3vw, 40px); line-height: 1.05; letter-spacing: -.035em; }

/* the two products, one card each, on the page tone */
.products { padding-block: 64px 80px; background: var(--page); }
.products h2 { margin-bottom: 32px; font-size: clamp(30px, 3.4vw, 44px); line-height: 1.05; letter-spacing: -.035em; }
.products__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.product { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; padding: 32px; border-radius: var(--radius-card); background: var(--card); }
.product h3 { font-size: 28px; line-height: 1.1; letter-spacing: -.025em; }
.product .ds-btn { margin-top: auto; padding-inline: 24px; }
.product__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; margin-top: auto; }
.product a.ds-btn:not(.pri) { background: var(--raised); }
.product a.ds-btn:not(.pri):hover { background: var(--inset); }

.foot { background: var(--ink); color: var(--on-primary); }
.foot :focus-visible { outline-color: var(--on-primary); }
.foot__row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px; padding-block: 32px; }
.foot .brand { color: var(--on-primary); }
.foot p { color: var(--on-ink-muted); user-select: all; }
.foot__links { display: flex; flex-wrap: wrap; gap: 0 24px; }
.foot a.ds-lk { color: var(--on-primary); }

/* Tall windows: side by side the screen is capped by its width and leaves most of the height empty, so it
   takes the full width and the step moves under it. */
@media (min-width: 821px) and (max-aspect-ratio: 6/5) {
  .row { grid-template-columns: minmax(0, 1fr); row-gap: 32px; }
  .stage, .beats { grid-column: 1; }
  .beats { grid-row: 2; }
  .stage { width: min(100%, calc((100svh - 480px) * 1.388)); min-width: min(100%, 560px); }
  .beat__n { font-size: 64px; }
}
@media (max-width: 1180px) {
  .window { scale: .56; }
  .phone { width: 200px; }
  .art { height: 460px; }
}
@media (max-width: 820px) {
  .wide-only { display: none; }
  .hero, .products__grid { grid-template-columns: minmax(0, 1fr); }
  .products { padding-block: 40px 48px; }
  .product { padding: 24px; }
  .hero { gap: 32px; padding-block: 16px 24px; }
  .hero h1 { font-size: clamp(40px, 7vw, 56px); }
  .art { width: 100%; max-width: 620px; margin-inline: auto; height: 440px; }
  .sec { padding-block: 24px 32px; }
  .pin { gap: 20px; }
  .headline { gap: 12px; }
  .headline .lead { font-size: 15px; }
  .row { grid-template-columns: minmax(0, 1fr); row-gap: 20px; }
  .stage, .beats { grid-column: 1; }
  .beats { grid-row: 2; }
  /* The cap leaves room for the step under the screen. */
  .screen { max-height: 45svh; border-radius: var(--radius-card); }
  .beat__n { font-size: 56px; }
}
@media (max-width: 560px) {
  .nav { gap: 4px; }
  .art { height: 360px; max-width: 400px; }
  .window { top: 0; scale: .36; }
  .phone { width: 150px; border-width: 6px; border-radius: 32px; }
  .phone img { border-radius: 26px; }
}
@media (max-width: 360px) {
  .wrap { padding-inline: 16px; }
  .nav .ds-btn { padding-inline: 10px; font-size: 14px; }
  /* The phone standing over the window's edge would otherwise make a 320px page scroll sideways. */
  .hero { overflow-x: clip; }
}
/* short landscape screens: side by side again, or the step would fall below the fold */
@media (max-height: 500px) and (orientation: landscape) {
  .row { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); column-gap: 24px; }
  .stage { grid-column: 2; }
  .beats { grid-column: 1; grid-row: 1; }
  .screen { max-height: 70svh; }
  .beat { gap: 8px; }
  .beat__n { font-size: 40px; }
  .beat h3 { font-size: 22px; }
  .beat .lead { font-size: 15px; }
}
/* A short landscape screen has no height to spare for a fixed menu. */
@media (max-height: 500px) {
  html { scroll-padding-top: 0; }
  .topbar { position: static; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .window, .phone { animation: none; }
  .ds-btn, .phone, .shot, .beat, .progress span, .progress i, .screen::before, .screen::after { transition: none; }
  .progress span[data-on="true"] i { transition: none; }
}
