/* OpenCuria landing page. The rules behind every value here are in DESIGN.md ("Höhenluft"). */

/* ---------- Fonts (self-hosted, SIL Open Font License, see assets/fonts/OFL-*.txt) ---------- */
@font-face {
  font-family: "Schibsted Grotesk";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("fonts/SchibstedGrotesk-normal-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Schibsted Grotesk";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("fonts/SchibstedGrotesk-normal-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Fragment Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/FragmentMono-normal-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Fragment Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/FragmentMono-normal-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------- Tokens ---------- */
:root {
  /* colour */
  --snow: #f5f7f9;
  --ink: #0f1b33;
  --granite: #556079;
  --glacier: #dde3eb;
  --sky: #154689;
  --signal: #ffd100;
  --signal-hover: #f2c400;
  --white: #ffffff;

  /* type */
  --sans: "Schibsted Grotesk", ui-sans-serif, system-ui, sans-serif;
  --mono: "Fragment Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --ios: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Schibsted Grotesk", system-ui, sans-serif;

  /* layout */
  --wrap: 1360px;
  --pad: clamp(20px, 5vw, 96px);
  --gutter: 24px;
  --section: clamp(112px, 12vw, 176px);
  --nav: 72px;

  /* motion */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav) + 24px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--snow);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.55;
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, svg, video { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, p, dl, dd, ol, ul, figure { margin: 0; }
ol, ul { padding: 0; list-style: none; }
::selection { background: var(--signal); color: var(--ink); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 2px; }
.hero :focus-visible, .finale :focus-visible, .term :focus-visible, .code :focus-visible,
.nav:not(.is-solid) :focus-visible { outline-color: var(--white); }

.wrap { width: 100%; max-width: calc(var(--wrap) + 2 * var(--pad)); margin-inline: auto; padding-inline: var(--pad); }
.nowrap { white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--white); color: var(--ink); padding: 10px 14px; font-weight: 600; font-size: 16px; text-decoration: none; }
.skip:focus { top: 12px; }

/* ---------- Type ---------- */
.h2 {
  font-size: clamp(36px, 4.2vw, 60px);
  line-height: 1;
  letter-spacing: -0.03em;
  font-weight: 800;
  max-width: 13em;
  text-wrap: balance;
}
.lede {
  font-size: clamp(18px, 1.5vw, 21px);
  line-height: 1.5;
  max-width: 34em;
  margin-top: 28px;
  text-wrap: pretty;
}
.caption {
  font-size: 14px;
  line-height: 1.45;
  color: var(--granite);
  margin-top: 14px;
}
.caption a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; text-decoration-color: rgba(85, 96, 121, 0.45); }
.caption a:hover { text-decoration-color: currentColor; }

/* ---------- Actions ---------- */
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 32px; margin-top: 40px; }

/* Primary action: a Swiss hiking sign. */
.sign {
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  height: 52px;
  padding: 0 46px 0 22px;
  font-size: 16px;
  font-weight: 650;
  line-height: 1;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}
.sign::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--signal);
  border-radius: 3px 0 0 3px;
  clip-path: polygon(0 0, calc(100% - 22px) 0, 100% 50%, calc(100% - 22px) 100%, 0 100%);
  transition: background-color 0.15s var(--ease);
}
.sign:hover::before { background: var(--signal-hover); }
.sign--small { height: 40px; padding: 0 34px 0 16px; transition: opacity 0.2s var(--ease), visibility 0.2s; }
.nav.is-quiet .sign--small { opacity: 0; visibility: hidden; }
.sign--small::before { clip-path: polygon(0 0, calc(100% - 17px) 0, 100% 50%, calc(100% - 17px) 100%, 0 100%); }

/* Secondary action. */
.link {
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 5px;
  transition: text-decoration-thickness 0.15s var(--ease);
}
.link:hover { text-decoration-thickness: 2.5px; }
.link--light { color: var(--white); }

/* ---------- Navigation ---------- */
.nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  height: var(--nav);
  color: var(--white);
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.nav.is-solid { background: var(--snow); color: var(--ink); box-shadow: 0 1px 0 var(--glacier); }
.nav__inner { height: 100%; display: flex; align-items: center; gap: 40px; padding-inline: var(--pad); }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand__mark { width: 26px; height: 30px; }
.brand__word { font-size: 18px; font-weight: 700; letter-spacing: -0.02em; }
.brand__word span { font-weight: 400; color: #534ab7; }
.nav .brand__word span { color: #a195ff; }
.nav.is-solid .brand__word span { color: #534ab7; }
.nav .brand__mark--light, .nav.is-solid .brand__mark--dark { display: none; }
.nav.is-solid .brand__mark--light { display: block; }
.nav__links { display: flex; gap: 28px; font-size: 16px; font-weight: 500; }
.nav__links a, .nav__github { text-decoration: none; text-underline-offset: 6px; text-decoration-thickness: 1.5px; }
.nav__links a:hover, .nav__github:hover span { text-decoration: underline; }
.nav__actions { margin-left: auto; display: flex; align-items: center; gap: 28px; }
.nav__github { display: inline-flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 500; }
.nav__github svg { width: 18px; height: 18px; }

/* ---------- Hero ---------- */
.hero__stage {
  position: relative;
  height: 100vh;
  height: 100svh;
  min-height: 640px;
  max-height: 1120px;
  overflow: hidden;
  background: var(--sky);
  color: var(--white);
}
/* The photo and its stars share one box, so every composition below moves and masks them together. */
.hero__photo { position: absolute; inset: 0; isolation: isolate; }
.hero__photo picture, .hero__img, .hero__stars { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero__photo picture { display: block; }
.hero__img { object-fit: cover; object-position: 0% 6%; }
/* The stars were painted out of the photo and are drawn here again. Screen blending adds their
   light to the sky the way the camera recorded it. */
.hero__stars { mix-blend-mode: screen; pointer-events: none; opacity: 0; transition: opacity 0.6s var(--ease); }
.hero__stars.is-on { opacity: 1; }
.hero__copy {
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: calc(var(--nav) + 24px) var(--pad) 64px;
}
.hero__title {
  font-size: clamp(48px, 5.9vw, 100px);
  line-height: 0.95;
  letter-spacing: -0.035em;
  font-weight: 800;
  max-width: 7.6em;
  text-wrap: balance;
}
.hero__lede {
  font-size: clamp(18px, 1.5vw, 21px);
  line-height: 1.5;
  max-width: min(23em, 34vw);
  margin-top: 30px;
  color: rgba(255, 255, 255, 0.9);
  text-wrap: pretty;
}
.hero .caption { margin-top: 14px; }

/* ---------- Sections ---------- */
.section { padding-top: var(--section); }

/* ---------- How it works ---------- */
.how__title { max-width: 12em; }
.story {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  grid-template-rows: 1fr 1fr;
  column-gap: clamp(40px, 6vw, 112px);
  margin-top: clamp(56px, 6vw, 96px);
}
.steps { display: contents; }
.step:nth-child(1) { grid-column: 1; grid-row: 1; align-self: end; }
.step:nth-child(2) { grid-column: 1; grid-row: 2; align-self: start; }
.step:nth-child(3) { grid-column: 3; grid-row: 1; align-self: end; }
.step:nth-child(4) { grid-column: 3; grid-row: 2; align-self: start; }
.phone--story { grid-column: 2; grid-row: 1 / span 2; }
.step button {
  width: 100%;
  max-width: 340px;
  display: grid;
  grid-template-columns: 36px 1fr;
  row-gap: 6px;
  padding: 20px 0;
  text-align: left;
}
.step__n { grid-row: 1 / span 2; font-size: 21px; font-weight: 700; line-height: 1.3; font-variant-numeric: tabular-nums; color: var(--granite); transition: color 0.25s var(--ease); }
.step__t { font-size: 21px; font-weight: 700; line-height: 1.3; letter-spacing: -0.01em; color: var(--granite); transition: color 0.25s var(--ease); }
.step__d { grid-column: 2; font-size: 16px; line-height: 1.45; color: var(--granite); text-wrap: pretty; }
.step__bar { grid-column: 2; height: 4px; margin-top: 14px; background: var(--glacier); overflow: hidden; }
.step__bar i { display: block; width: 0; height: 100%; background: var(--signal); }
.step button:hover .step__t { color: var(--ink); }
.step.is-active .step__n, .step.is-active .step__t { color: var(--ink); }
.step.is-active .step__bar i { animation: fill var(--dur, 4s) linear forwards; }
@keyframes fill { to { width: 100%; } }

/* ---------- Phones (shared) ---------- */
.phone { --pw: 306px; position: relative; width: var(--pw); }
.phone__frame {
  width: var(--pw);
  height: calc(var(--pw) * 2.1);
  padding: 10px;
  border-radius: 52px;
  background: #1b1d22;
  box-shadow:
    inset 0 0 0 1.5px #3b3e46,
    0 60px 80px -48px rgba(15, 27, 51, 0.55),
    0 24px 32px -24px rgba(15, 27, 51, 0.35);
}
.phone__screen {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 42px;
  overflow: hidden;
  background: #000;
  color: #fafafa;
  font-family: var(--ios);
  font-size: 13px;
  line-height: 1.4;
}
.sb { position: absolute; z-index: 20; inset: 0 0 auto; height: 44px; display: flex; align-items: center; justify-content: space-between; padding: 4px 28px 0; font-size: 14px; font-weight: 600; letter-spacing: -0.01em; pointer-events: none; transition: color 0.4s var(--ease); }
.sb__island { position: absolute; left: 50%; top: 11px; width: 88px; height: 26px; margin-left: -44px; border-radius: 20px; background: #000; }
.sb__icons { display: flex; gap: 5px; align-items: center; }
.sb__sig { width: 16px; height: 10px; background: linear-gradient(90deg, currentColor 0 18%, transparent 18% 27%, currentColor 27% 45%, transparent 45% 54%, currentColor 54% 72%, transparent 72% 81%, currentColor 81%); clip-path: polygon(0 100%, 100% 0, 100% 100%); }
.sb__bat { position: relative; width: 23px; height: 11px; border-radius: 3.5px; border: 1.5px solid currentColor; }
.sb__bat::after { content: ""; position: absolute; inset: 1.5px 5px 1.5px 1.5px; background: currentColor; border-radius: 1.5px; }
[data-scene="app"] .sb { color: #1d1f1c; }
.home-indicator { position: absolute; z-index: 20; bottom: 8px; left: 50%; width: 116px; height: 4px; margin-left: -58px; border-radius: 4px; background: rgba(255, 255, 255, 0.85); transition: background-color 0.4s var(--ease); }
[data-scene="app"] .home-indicator { background: rgba(0, 0, 0, 0.75); }

/* scenes of the story phone */
.scene { position: absolute; inset: 0; opacity: 0; pointer-events: none; transition: opacity 0.5s var(--ease), transform 0.6s var(--ease); }
[data-scene="chat"] .scene--chat,
[data-scene="home"] .scene--home,
[data-scene="app"] .scene--app { opacity: 1; transform: none; }
.scene--home { transform: scale(1.05); }
.scene--app { transform: scale(0.2); border-radius: 42px; transition: opacity 0.35s var(--ease), transform 0.55s var(--ease); }
[data-scene="app"] .scene--home { opacity: 0; transform: scale(0.96); }

/* chat (dark theme: background #000, raised #303030, surfaceMuted #262626, userBubble #2C2C2E) */
.scene--chat { display: flex; flex-direction: column; padding-top: 46px; }
.chat-head { display: flex; align-items: center; gap: 10px; padding: 6px 12px 10px; }
.round-btn { width: 36px; height: 36px; border-radius: 50%; background: #262626; display: grid; place-items: center; flex: none; }
.round-btn svg { width: 16px; height: 16px; }
.burger { position: relative; width: 14px; height: 10px; border-top: 2px solid #eee; border-bottom: 2px solid #eee; }
.burger::after { content: ""; position: absolute; left: 0; right: 4px; top: 2px; border-top: 2px solid #eee; }
.round-btn--dots { display: flex; gap: 3px; justify-content: center; }
.round-btn--dots i { width: 3.5px; height: 3.5px; border-radius: 50%; background: #eee; }
.chat-head__title { flex: 1; display: grid; line-height: 1.25; }
.chat-head__title b { font-size: 15px; font-weight: 650; }
.chat-head__title span { display: flex; align-items: center; gap: 5px; font-size: 11px; color: #a0a0a0; }
.live-dot { width: 6px; height: 6px; border-radius: 50%; background: #34c759; }
.chev { width: 5px; height: 5px; margin-left: 2px; border-right: 1.3px solid #a0a0a0; border-bottom: 1.3px solid #a0a0a0; transform: rotate(45deg) translateY(-2px); }
.chat-body { position: relative; flex: 1; overflow: hidden; padding: 6px 14px; display: flex; flex-direction: column; gap: 12px; }
.chat-empty { position: absolute; inset: 46% 0 auto; text-align: center; font-size: 17px; color: #f2f2f2; transition: opacity 0.3s var(--ease); }
.is-sent .chat-empty { opacity: 0; }
.bubble { align-self: flex-end; max-width: 82%; padding: 9px 13px; border-radius: 20px; background: #2c2c2e; font-size: 13px; opacity: 0; transform: translateY(10px); transition: opacity 0.35s var(--ease), transform 0.45s var(--ease); }
.is-sent .bubble { opacity: 1; transform: none; }
.tool-rows { display: grid; gap: 7px; }
.tool-rows li { display: flex; align-items: center; gap: 7px; font-size: 11.5px; color: #8e8e93; white-space: nowrap; opacity: 0; transform: translateY(6px); transition: opacity 0.3s var(--ease), transform 0.35s var(--ease); }
.tool-rows li.is-in { opacity: 1; transform: none; }
.tr-ico { flex: none; width: 13px; height: 13px; border-radius: 50%; border: 1.6px solid #5a5a60; border-top-color: #c9c5f5; animation: spin 0.8s linear infinite; }
.tool-rows li.is-done .tr-ico { animation: none; border-color: transparent; background: #30d158 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m6 12.5 4 4 8-9' fill='none' stroke='%23000' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 9px no-repeat; }
.tr-k { color: #d4d4d8; font-weight: 600; }
.tr-v { font-family: var(--mono); font-size: 10.5px; overflow: hidden; text-overflow: ellipsis; }
.tr-diff { font-family: var(--mono); font-size: 10.5px; color: #30d158; }
@keyframes spin { to { transform: rotate(360deg); } }
.assistant { margin-top: 2px; font-size: 13px; color: #f2f2f2; opacity: 0; transform: translateY(6px); transition: opacity 0.4s var(--ease), transform 0.4s var(--ease); }
.assistant.is-in { opacity: 1; transform: none; }
.app-card { position: relative; display: flex; align-items: center; gap: 11px; padding: 11px 12px; border-radius: 16px; background: #262626; border: 1px solid #333; overflow: hidden; opacity: 0; transform: translateY(8px); transition: opacity 0.4s var(--ease), transform 0.45s var(--ease); }
.app-card.is-in { opacity: 1; transform: none; }
.app-card__tile { flex: none; width: 40px; height: 40px; border-radius: 10px; background: var(--tile); display: grid; place-items: center; color: #fff; }
.app-card__tile svg { width: 22px; height: 22px; }
.app-card__text { flex: 1; min-width: 0; display: grid; line-height: 1.25; }
.app-card__text b { font-size: 14px; }
.app-card__text span { font-size: 11.5px; color: #a0a0a0; }
.app-card__btn { padding: 6px 14px; border-radius: 999px; background: #fff; color: #000; font-size: 13px; font-weight: 650; transition: transform 0.15s var(--ease), background-color 0.3s; }
.app-card__btn.is-press { transform: scale(0.9); background: #d4d4d8; }
.app-card__progress { position: absolute; inset: auto 0 0; height: 2px; }
.app-card__progress i { display: block; width: 0; height: 100%; background: #8b85e8; transition: width 0.12s linear; }
.composer { margin: 8px 10px 24px; padding: 10px 12px 8px; border-radius: 24px; background: #303030; }
.composer__field { position: relative; min-height: 38px; font-size: 13px; color: #f2f2f2; }
.composer__ph { position: absolute; color: #8e8e93; }
.composer.has-text .composer__ph { display: none; }
.caret { display: inline-block; width: 1.5px; height: 15px; margin-left: 1px; vertical-align: -3px; background: #8b85e8; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.composer__row { display: flex; align-items: center; justify-content: space-between; }
.composer__plus { font-size: 22px; line-height: 1; font-weight: 300; color: #e4e4e7; }
.composer__send { width: 30px; height: 30px; border-radius: 50%; background: #4a4a4e; color: #1c1c1e; display: grid; place-items: center; transition: background-color 0.25s var(--ease), transform 0.15s var(--ease); }
.composer__send svg { width: 16px; height: 16px; }
.composer.has-text .composer__send { background: #fff; color: #000; }
.composer__send.is-press { transform: scale(0.85); }

/* home screen, wallpaper: the night photo */
.home {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 58px 14px 0;
  background: #05245c url("photos/wallpaper-dusk.webp") 50% 0 / cover no-repeat;
}
.home__label { margin-top: 6px; text-align: center; font-size: 11px; font-weight: 500; color: rgba(255, 255, 255, 0.92); }
.tap { position: absolute; z-index: 30; width: 44px; height: 44px; margin: -22px 0 0 -22px; border-radius: 50%; background: rgba(255, 255, 255, 0.5); opacity: 0; pointer-events: none; }
.tap--dark { background: rgba(0, 0, 0, 0.18); }
.tap.is-on { animation: tap 0.6s var(--ease); }
@keyframes tap { 0% { opacity: 0; transform: scale(0.4); } 30% { opacity: 1; transform: scale(0.8); } 100% { opacity: 0; transform: scale(1.6); } }

/* Apps widget (AppsWidget.tsx: 2×2 small, 4×2 medium, 4×4 large; icons ≈ 60 pt, corner 22.4 %) */
.widget {
  --cols: 4;
  display: grid;
  grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
  gap: 9px 0;
  padding: 12px 6px 11px;
  border-radius: 22px;
  background: #1c1c1e;
}
.widget[data-size="small"] { --cols: 2; width: 47%; }
.w-app { display: grid; justify-items: center; gap: 4px; min-width: 0; }
.w-icon { width: 46px; height: 46px; border-radius: 22.4%; display: grid; place-items: center; color: #fff; background: var(--tile); box-shadow: inset 0 0 0 0.5px rgba(255, 255, 255, 0.12); }
.w-icon svg { width: 54%; height: 54%; }
.w-name { display: flex; align-items: center; gap: 3px; max-width: 100%; font-size: 10px; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.w-name i { display: none; flex: none; width: 5px; height: 5px; border-radius: 50%; background: #0a84ff; }
.is-new .w-name i { display: block; }
.w-folder { grid-template-columns: 1fr 1fr; gap: 4px; padding: 8px; place-items: stretch; background: rgba(118, 118, 128, 0.24); }
.w-folder i { border-radius: 3px; background: var(--tile); }
.scene--home.is-fresh [data-target-app] .w-icon { animation: pop 0.7s var(--ease); }
@keyframes pop { 0% { transform: scale(0.4); opacity: 0; } 70% { transform: scale(1.08); opacity: 1; } 100% { transform: scale(1); } }

/* the app the agent built */
.scene--app { background: #f7f6f2; color: #1d1f1c; }
.gp { display: grid; gap: 10px; padding: 52px 14px 0; }
.gp__head { display: grid; margin: 4px 4px 6px; }
.gp__head small { font-size: 10px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: #6b6f68; }
.gp__head b { font-size: 25px; font-weight: 700; letter-spacing: -0.02em; }
.gp__head span { font-size: 12px; color: #6b6f68; }
.gp__head em { font-style: normal; font-weight: 600; }
.gp__head em.due { color: #c2621a; }
.gp__head em.ok { color: #2f7d4f; }
.gp__card { display: flex; align-items: center; gap: 8px; padding: 11px 10px; border-radius: 16px; background: #fff; border: 1px solid #e6e3da; }
.gp__leaf { flex: none; width: 36px; height: 36px; border-radius: 50%; background: #e3efe6; color: #2f7d4f; display: grid; place-items: center; }
.gp__leaf svg { width: 19px; height: 19px; }
.gp__txt { flex: 1; min-width: 0; display: grid; line-height: 1.25; }
.gp__txt b { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gp__txt span { font-size: 11px; color: #6b6f68; }
.gp__pill { padding: 3px 8px; border-radius: 999px; background: #efede6; color: #6b6f68; font-size: 10.5px; font-weight: 600; white-space: nowrap; transition: background-color 0.3s, color 0.3s; }
.gp__pill--due { background: #fbebdd; color: #c2621a; }
.gp__drop { position: relative; flex: none; width: 34px; height: 34px; border-radius: 50%; border: 1.5px solid #d9e7dd; color: #2f7d4f; display: grid; place-items: center; transition: background-color 0.3s var(--ease), border-color 0.3s, color 0.3s; }
.gp__drop svg { grid-area: 1 / 1; width: 17px; height: 17px; transition: opacity 0.25s, transform 0.3s var(--ease); }
.gp__drop .c { opacity: 0; transform: scale(0.4); }
.gp__drop.is-done { background: #2f7d4f; border-color: #2f7d4f; color: #fff; }
.gp__drop.is-done .d { opacity: 0; transform: scale(0.4); }
.gp__drop.is-done .c { opacity: 1; transform: none; }
.gp__add { margin-top: 4px; padding: 10px; border: 1.5px solid #bcd6c4; border-radius: 14px; text-align: center; font-size: 13px; font-weight: 600; color: #2f7d4f; }

/* ---------- Facts ---------- */
.facts { display: grid; gap: 24px; margin-top: 44px; max-width: 36em; }
.facts > div { display: grid; gap: 4px; }
.facts dt { font-size: 18px; font-weight: 700; letter-spacing: -0.005em; }
.facts dd { font-size: 18px; color: var(--granite); text-wrap: pretty; }

/* ---------- Apps ---------- */
.apps__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); align-items: center; }
.apps__copy { grid-column: 1 / span 6; }
.apps__demo { grid-column: 8 / span 5; display: flex; flex-direction: column; align-items: center; gap: 28px; }
.phone--home .home { padding-top: 60px; }
.phone--home .widget .w-app { animation: wIn 0.2s var(--ease) both; }
@keyframes wIn { from { opacity: 0; } }
.seg { display: inline-flex; padding: 4px; border-radius: 10px; background: var(--white); border: 1px solid var(--glacier); }
.seg button { padding: 8px 16px; border-radius: 7px; font-size: 16px; font-weight: 500; color: var(--granite); transition: background-color 0.15s var(--ease), color 0.15s var(--ease); }
.seg button:hover { color: var(--ink); }
.seg button[aria-checked="true"] { background: var(--ink); color: var(--white); }

/* ---------- Workspaces ---------- */
.ws__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); align-items: center; }
.term { grid-column: 1 / span 6; border-radius: 12px; background: var(--ink); color: #d9dee8; overflow: hidden; }
.ws__copy { grid-column: 8 / span 5; }
.term__bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 20px; border-bottom: 1px solid rgba(255, 255, 255, 0.09); font-size: 14px; }
.term__title { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: #aeb8cc; }
.term__state { flex: none; font-weight: 600; color: #a3b6ff; transition: color 0.3s var(--ease); }
.term.is-done .term__state { color: #86d6a4; }
.term__body {
  height: 440px;
  margin: 0;
  padding: 20px 22px 24px;
  overflow: hidden;
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
}
.term__body .p { color: #8fa8d8; }
.term__body .dim { color: #8a94a8; }
.term__body .ok { color: #86d6a4; }
.term__body .cmt { color: #8a94a8; }
.term__cursor { display: inline-block; width: 8px; height: 16px; vertical-align: -3px; background: #d9dee8; animation: blink 1s steps(1) infinite; }


/* ---------- Away from the desk ---------- */
.away__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); align-items: start; }
.away__copy { grid-column: 1 / span 5; }
.timeline { grid-column: 7 / span 6; display: grid; gap: 16px; }
.timeline li { display: grid; grid-template-columns: 64px minmax(0, 400px); column-gap: 16px; align-items: start; }
.timeline time { padding-top: 15px; font-size: 14px; color: var(--granite); }
.la { display: grid; gap: 8px; padding: 16px; border-radius: 22px; background: #151517; color: #fff; font-family: var(--ios); }
.la__status { display: flex; align-items: center; gap: 8px; }
.la__glyph { width: 18px; height: 18px; flex: none; color: var(--c); }
.la__status b { font-size: 14px; font-weight: 600; }
.la__status span { margin-left: auto; font-size: 11px; font-weight: 600; color: #a3a3ad; }
.la__row { display: flex; align-items: baseline; gap: 8px; }
.la__row b { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 13px; font-weight: 500; color: #f4f4f6; }
.la__row span { margin-left: auto; font-size: 11px; color: #a3a3ad; white-space: nowrap; }

/* ---------- Desktop ---------- */
.desktop__head { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); align-items: end; }
.desktop__head .h2 { grid-column: 1 / span 6; max-width: 11em; }
.desktop__head .lede { grid-column: 8 / span 5; margin-top: 0; }
.desk { margin-top: clamp(48px, 5vw, 72px); }
.desk__bar { display: flex; align-items: center; gap: 16px; min-height: 52px; padding: 8px 10px 8px 18px; border: 1px solid var(--glacier); border-bottom: 0; border-radius: 12px 12px 0 0; background: var(--white); font-size: 14px; }
.desk__title { display: flex; align-items: baseline; gap: 10px; font-weight: 650; }
.desk__title span { font-weight: 400; color: var(--granite); }
.desk__status { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; color: #b45309; font-weight: 500; }
.desk__status i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.desk[data-mode="user"] .desk__status { color: #15803d; }
.desk__btn { height: 34px; padding: 0 14px; border-radius: 8px; border: 1px solid #d8d8dc; background: var(--white); font-size: 14px; font-weight: 600; transition: background-color 0.15s var(--ease), border-color 0.15s var(--ease); }
.desk__btn:hover { background: #f4f4f5; border-color: #c4c4ca; }
.desk[data-mode="user"] .desk__btn { visibility: hidden; }
.desk__screen { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 0 0 12px 12px; background: #e9e7e3; }
.desk__screen video { width: 100%; height: 100%; object-fit: cover; }
.desk__handoff {
  position: absolute;
  left: 24px;
  bottom: 24px;
  display: grid;
  justify-items: start;
  gap: 6px;
  width: min(420px, calc(100% - 48px));
  padding: 18px 20px;
  border-radius: 10px;
  background: var(--white);
  color: var(--ink);
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
}
.desk__handoff b { font-size: 18px; }
.desk__handoff span { font-size: 16px; line-height: 1.45; color: var(--granite); }
.desk__handoff .link { margin-top: 6px; font-size: 16px; }
.desk[data-mode="user"] .desk__handoff { opacity: 1; transform: none; pointer-events: auto; }
.desk .caption { margin-top: 14px; }
.facts--row { grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gutter); max-width: none; margin-top: 56px; }
.facts--row > div { grid-column: span 5; }
.facts--row > div + div { grid-column: 7 / span 5; }
.facts--row dd { max-width: 26em; }

/* ---------- More ---------- */
.more__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); align-items: start; }
.more__title { grid-column: 1 / span 4; position: sticky; top: calc(var(--nav) + 40px); max-width: 6em; }
.index { grid-column: 5 / span 8; border-bottom: 1px solid var(--glacier); }
.index__item { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 40px; align-items: start; padding: 40px 0; border-top: 1px solid var(--glacier); }
.index__text h3 { font-size: 21px; line-height: 1.3; font-weight: 700; letter-spacing: -0.01em; max-width: 18em; text-wrap: balance; }
.index__text p { margin-top: 10px; font-size: 18px; color: var(--granite); text-wrap: pretty; }

/* light product fragments (webapp tokens: card #fff, border #e4e4e7, primary #534AB7, accent #EBE9FA) */
.ui { border-radius: 10px; background: var(--white); border: 1px solid var(--glacier); padding: 16px; font-size: 14px; line-height: 1.4; color: #18181b; }
.ui__label { font-size: 13px; font-weight: 600; color: #6f6f78; margin-bottom: 8px; }
.ui--engines { display: grid; gap: 6px; }
.engine { display: grid; grid-template-columns: 18px 1fr; column-gap: 10px; align-items: center; padding: 10px 12px; border-radius: 8px; text-align: left; transition: background-color 0.15s var(--ease); }
.engine:hover { background: #f4f4f5; }
.engine b { font-size: 14px; font-weight: 600; }
.engine > span:last-child { grid-column: 2; font-size: 13px; color: #6f6f78; }
.engine__radio { grid-row: 1 / span 2; width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid #c4c4ca; transition: border-color 0.15s, box-shadow 0.15s; }
.engine.is-on { background: #ebe9fa; }
.engine.is-on .engine__radio { border-color: #534ab7; box-shadow: inset 0 0 0 3.5px #fff, inset 0 0 0 10px #534ab7; }

.ui--schedule { display: grid; gap: 12px; }
.sched__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.sched__head b { font-size: 15px; font-weight: 600; }
.sched__head span { font-size: 13px; color: #6f6f78; }
.sched__days { display: flex; flex-wrap: wrap; gap: 6px; }
.sched__days span { padding: 5px 9px; border-radius: 6px; background: #f0efed; color: #6f6f78; font-size: 13px; font-weight: 500; }
.sched__days span.on { background: #ebe9fa; color: #433a93; }
.sched__row { display: flex; justify-content: space-between; padding-top: 10px; border-top: 1px solid #f0efed; font-size: 14px; color: #6f6f78; }
.sched__row b { font-weight: 600; color: #18181b; }
.sched__next { font-size: 13px; color: #6f6f78; }

.ui--plugins { display: grid; gap: 0; padding-block: 6px; }
.plug { display: flex; align-items: center; gap: 12px; padding: 10px 0; }
.plug + .plug { border-top: 1px solid #f0efed; }
.plug__text { flex: 1; min-width: 0; display: grid; line-height: 1.3; }
.plug__text b { font-size: 14px; font-weight: 600; }
.plug__text span { font-size: 13px; color: #6f6f78; }
.plug__note { font-size: 13px; color: #15803d; font-weight: 500; }
.tog { position: relative; flex: none; width: 34px; height: 20px; border-radius: 999px; background: #d8d8dc; }
.tog::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2); }
.tog.is-on { background: #534ab7; }
.tog.is-on::after { transform: translateX(14px); }

.ui--code { margin: 0; font-family: var(--mono); font-size: 13px; line-height: 1.75; white-space: pre; overflow-x: auto; color: #3f3f46; }
.ui--code .k { color: #433a93; }
.ui--code .s { color: #15803d; }

.ui--web { display: grid; grid-template-columns: 0.8fr 1.5fr 0.9fr; padding: 0; overflow: hidden; font-size: 12px; min-height: 196px; }
.web__side, .web__git { display: grid; align-content: start; gap: 6px; padding: 12px; background: #f4f4f5; }
.web__git { background: var(--white); border-left: 1px solid #e4e4e7; }
.web__side b, .web__git b { font-size: 12px; font-weight: 600; color: #6f6f78; margin-bottom: 2px; }
.web__side span { padding: 4px 6px; border-radius: 5px; color: #3f3f46; }
.web__side span.on { background: #e6e3f9; color: #433a93; font-weight: 600; }
.web__chat { display: grid; align-content: start; gap: 8px; padding: 12px; border-left: 1px solid #e4e4e7; }
.web__bubble { justify-self: end; max-width: 90%; padding: 6px 9px; border-radius: 10px; background: #e8e8eb; color: #18181b; }
.web__tool { display: flex; align-items: center; gap: 6px; color: #6f6f78; }
.web__tool i { width: 10px; height: 10px; border-radius: 50%; background: #15803d; }
.web__tool em { font-style: normal; font-family: var(--mono); font-size: 11px; color: #3f3f46; }
.web__line { height: 6px; width: 92%; border-radius: 3px; background: #ececee; }
.web__line--short { width: 64%; }
.web__git span { display: flex; gap: 6px; font-family: var(--mono); font-size: 11px; color: #3f3f46; white-space: nowrap; }
.web__git em { font-style: normal; font-weight: 600; }
.web__git em.m { color: #b45309; }
.web__git em.a { color: #15803d; }

/* ---------- Install ---------- */
.install__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); align-items: start; }
.install__copy { grid-column: 1 / span 5; }
.code { grid-column: 7 / span 6; border-radius: 12px; background: var(--ink); color: #e3e8f1; overflow: hidden; }
.arch { margin-top: 44px; display: grid; }
.arch li { position: relative; display: grid; gap: 2px; padding: 0 0 24px 30px; }
.arch li::before { content: ""; position: absolute; left: 0; top: 7px; width: 11px; height: 11px; border-radius: 50%; border: 2px solid var(--ink); background: var(--snow); z-index: 1; }
.arch li::after { content: ""; position: absolute; left: 5px; top: 18px; bottom: -7px; width: 1px; background: var(--glacier); }
.arch li:last-child { padding-bottom: 0; }
.arch li:last-child::before { background: var(--ink); }
.arch li:last-child::after { display: none; }
.arch b { font-size: 18px; font-weight: 700; }
.arch span { font-size: 16px; color: var(--granite); }
.code__bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 12px; padding: 8px 10px; border-bottom: 1px solid rgba(255, 255, 255, 0.1); }
.code__tabs { display: flex; gap: 2px; }
.code__tabs button, .code__copy { white-space: nowrap; padding: 7px 12px; border-radius: 7px; font-size: 14px; font-weight: 500; color: #aeb8cc; transition: background-color 0.15s var(--ease), color 0.15s var(--ease); }
.code__tabs button:hover, .code__copy:hover { color: var(--white); }
.code__tabs button[aria-selected="true"] { background: rgba(255, 255, 255, 0.1); color: var(--white); }
.code__body { margin: 0; min-height: 268px; padding: 22px 24px; font-family: var(--mono); font-size: 14px; line-height: 1.7; white-space: pre-wrap; word-break: break-word; }
.code__body .p { color: #8a94a8; user-select: none; }
.code__body .c { color: #8a94a8; }
.code__foot { padding: 0 24px 22px; font-size: 14px; color: #aeb8cc; }
.code__foot .link { color: var(--white); text-decoration-thickness: 1px; }

/* ---------- Finale: the closing words and the footer on one photograph ----------
   The photo darkens toward the bottom. All text sits in its dark lower part, so the finale is
   tall enough that the text never reaches the hazy middle (verified for 320px to 2560px).
   At the top it has no edge: the photo reaches up behind the end of the install section, to the
   line "Workspaces" (--reach, measured by main.js), and the paper fades into the golden sky from
   there. The photo is never narrower than the screen, so the whole sky is there and the fade
   (--fade) ends just above the gold over the ridges: the sky is the top 30 % of both crops. */
.finale {
  --fade: 26%;
  --reach: 0px;
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: max(100vh, 1080px, 64.4vw);
  min-height: max(100svh, 1080px, 64.4vw);
  margin-top: calc(var(--section) * 0.5);
  color: var(--white);
}
/* The text of the install section stays above the photo that reaches up behind it. */
.install { position: relative; z-index: 1; }
/* Ink stands in for the photo while it loads, under the same mask. The mask follows an
   ease-in-out curve, so neither end of the fade shows as a line. */
.finale picture {
  position: absolute;
  inset: calc(-1 * var(--reach)) 0 0;
  z-index: -1;
  background: var(--ink);
  -webkit-mask-image: linear-gradient(to bottom,
    rgba(0, 0, 0, 0) 0,
    rgba(0, 0, 0, 0.025) calc(var(--fade) * 0.1),
    rgba(0, 0, 0, 0.095) calc(var(--fade) * 0.2),
    rgba(0, 0, 0, 0.206) calc(var(--fade) * 0.3),
    rgba(0, 0, 0, 0.345) calc(var(--fade) * 0.4),
    rgba(0, 0, 0, 0.5) calc(var(--fade) * 0.5),
    rgba(0, 0, 0, 0.655) calc(var(--fade) * 0.6),
    rgba(0, 0, 0, 0.794) calc(var(--fade) * 0.7),
    rgba(0, 0, 0, 0.905) calc(var(--fade) * 0.8),
    rgba(0, 0, 0, 0.976) calc(var(--fade) * 0.9),
    #000 var(--fade));
  mask-image: linear-gradient(to bottom,
    rgba(0, 0, 0, 0) 0,
    rgba(0, 0, 0, 0.025) calc(var(--fade) * 0.1),
    rgba(0, 0, 0, 0.095) calc(var(--fade) * 0.2),
    rgba(0, 0, 0, 0.206) calc(var(--fade) * 0.3),
    rgba(0, 0, 0, 0.345) calc(var(--fade) * 0.4),
    rgba(0, 0, 0, 0.5) calc(var(--fade) * 0.5),
    rgba(0, 0, 0, 0.655) calc(var(--fade) * 0.6),
    rgba(0, 0, 0, 0.794) calc(var(--fade) * 0.7),
    rgba(0, 0, 0, 0.905) calc(var(--fade) * 0.8),
    rgba(0, 0, 0, 0.976) calc(var(--fade) * 0.9),
    #000 var(--fade));
}
.finale__img { width: 100%; height: 100%; object-fit: cover; object-position: 25% 100%; }
.finale__title { font-size: clamp(36px, 4.2vw, 60px); line-height: 1; letter-spacing: -0.03em; font-weight: 800; max-width: 12.5em; text-wrap: balance; }
.finale__lede { margin-top: 22px; max-width: 26em; font-size: clamp(18px, 1.5vw, 21px); line-height: 1.5; color: rgba(255, 255, 255, 0.9); text-wrap: pretty; }
.finale .actions { margin-top: 32px; }
.finale__base { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 32px; padding-top: clamp(64px, 6.5vw, 96px); padding-bottom: 40px; }
.finale .brand__word span { color: #a195ff; }
.finale__meta { font-size: 14px; color: rgba(255, 255, 255, 0.78); }
.finale__links { margin-left: auto; display: flex; gap: 28px; font-size: 16px; font-weight: 500; }
.finale__links a { text-decoration: none; text-underline-offset: 5px; text-decoration-thickness: 1.5px; }
.finale__links a:hover { text-decoration: underline; }
.finale__credit { flex-basis: 100%; max-width: 62em; font-size: 14px; line-height: 1.45; color: rgba(255, 255, 255, 0.62); text-wrap: pretty; }
.finale__credit a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; text-decoration-color: rgba(255, 255, 255, 0.4); }
.finale__credit a:hover { text-decoration-color: currentColor; }
/* Imprint and privacy policy: legally required, so reachable from every page, but set like the
   credits and kept out of search engines (noindex). */
.finale__legal { flex-basis: 100%; display: flex; gap: 20px; font-size: 14px; line-height: 1.45; color: rgba(255, 255, 255, 0.62); }
.finale__legal a { text-decoration: none; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.finale__legal a:hover { text-decoration: underline; }

/* ---------- Legal pages (imprint.html, privacy.html) ---------- */
/* Paper only: no photo, no navigation bar, the type scale of the page. */
.legal__top { height: var(--nav); display: flex; align-items: center; }
.legal__main { padding-top: clamp(48px, 7vw, 112px); padding-bottom: clamp(64px, 8vw, 128px); }
.legal__section { max-width: 34em; margin-top: 48px; }
.legal__section h2 { margin-bottom: 12px; font-size: 21px; font-weight: 700; line-height: 1.3; letter-spacing: -0.01em; }
.legal__section > * + * { margin-top: 16px; }
.legal__section h2 + * { margin-top: 0; }
.legal__section ul { list-style: disc; padding-left: 1.2em; }
.legal address { font-style: normal; }
.legal__main a, .legal__foot a { text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 5px; }
.legal__main a:hover, .legal__foot a:hover { text-decoration-thickness: 2.5px; }
.legal__date { margin-top: 48px; font-size: 14px; line-height: 1.45; color: var(--granite); }
.legal__foot { padding-bottom: 40px; font-size: 14px; line-height: 1.45; color: var(--granite); }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .nav__links { display: none; }
  .story { column-gap: 40px; }
  .step button { max-width: 280px; }
  .term { grid-column: 1 / span 7; }
  .ws__copy { grid-column: 8 / span 5; }
  .more__title { grid-column: 1 / -1; position: static; max-width: none; margin-bottom: 40px; }
  .index { grid-column: 1 / -1; }
}

@media (max-width: 980px) {
  .story { grid-template-columns: auto minmax(0, 1fr); grid-template-rows: repeat(4, auto); column-gap: 48px; align-items: center; }
  .phone--story { grid-column: 1; grid-row: 1 / span 4; }
  .step:nth-child(n) { grid-column: 2; align-self: center; }
  .step:nth-child(1) { grid-row: 1; }
  .step:nth-child(2) { grid-row: 2; }
  .step:nth-child(3) { grid-row: 3; }
  .step:nth-child(4) { grid-row: 4; }
  .apps__copy, .ws__copy, .install__copy, .away__copy { grid-column: 1 / -1; }
  .apps__demo { grid-column: 1 / -1; margin-top: 64px; }
  .term { grid-column: 1 / -1; order: 2; margin-top: 56px; }
  .timeline { grid-column: 1 / -1; margin-top: 48px; }
  .code { grid-column: 1 / -1; margin-top: 56px; }
  .desktop__head .h2, .desktop__head .lede { grid-column: 1 / -1; }
  .desktop__head .lede { margin-top: 28px; }
  .index__item { grid-template-columns: 1fr; row-gap: 24px; }
  .index__item .ui { max-width: 460px; }
}

/* Type sits on a photo only where the photo is calm, so the hero changes composition with the
   viewport instead of shrinking until the headline collides with the mountain. */
@media (min-width: 861px) and (max-width: 1279px) and (min-aspect-ratio: 11/10) {
  /* Photo on the right; its sky runs into the Sky colour behind the text. */
  .hero__photo { left: auto; width: 64%; -webkit-mask-image: linear-gradient(to right, transparent 0, #000 30%); mask-image: linear-gradient(to right, transparent 0, #000 30%); }
  .hero__img { object-position: 46% 20%; }
  .hero__lede { max-width: 21em; }
}

@media (max-width: 860px), (max-aspect-ratio: 11/10) {
  /* The text moves onto a block of the photo's own sky; the photo follows below it. */
  .hero__stage { height: auto; min-height: 0; max-height: none; display: flex; flex-direction: column-reverse; }
  .hero__photo { position: relative; inset: auto; aspect-ratio: 4 / 5; max-height: 92vh; -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 22%); mask-image: linear-gradient(to bottom, transparent 0, #000 22%); margin-top: -18%; }
  .hero__img { object-position: 47% 30%; }
  .hero__copy { height: auto; padding: calc(var(--nav) + 40px) var(--pad) 0; }
  .hero__title { max-width: 8em; }
  .hero__lede { max-width: 30em; }
}
@media (min-width: 861px) and (max-aspect-ratio: 11/10) {
  .hero__photo { aspect-ratio: 3 / 2; margin-top: -10%; }
}

@media (max-width: 860px), (max-aspect-ratio: 11/10) {
  /* Narrow and portrait screens get the tall crop (the left half of the photo, full height). Its
     dark part starts at about half its height, so the text block gets room above it. */
  .finale { min-height: 0; justify-content: flex-start; }
  .finale__img { object-position: 20% 100%; }
  .finale__cta { padding-top: var(--finale-sky, 420px); }
}

@media (max-width: 860px) {
  .facts--row { grid-template-columns: 1fr; gap: 24px; }
  .facts--row > div, .facts--row > div + div { grid-column: auto; }
}

@media (max-width: 640px) {
  :root { --gutter: 16px; }
  .nav__github span { display: none; }
  .nav__actions { gap: 20px; }
  .story { grid-template-columns: 1fr; grid-template-rows: none; justify-items: center; }
  .phone--story { grid-column: 1; grid-row: 1; }
  .steps { display: grid; width: 100%; margin-top: 40px; }
  .step:nth-child(n) { grid-column: auto; grid-row: auto; }
  .step button { max-width: none; padding: 14px 0; }
  .phone { --pw: 286px; }
  .term__body { height: 380px; font-size: 13px; }
  .timeline li { grid-template-columns: 1fr; row-gap: 6px; }
  .timeline time { padding-top: 0; }
  .desk__title span { display: none; }
  .desk__status span { display: none; }
  .desk__handoff { left: 12px; bottom: 12px; width: calc(100% - 24px); padding: 14px 16px; }
  .desk__handoff span { display: none; }
  .ui--web { grid-template-columns: 1fr 1.4fr; }
  .web__git { display: none; }
  .finale__links { margin-left: 0; width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}
