:root {
  --bg: #ffffff;
  --ink: #111318;
  --ink-2: #4b5160;
  --muted: #8b909b;
  --line: #e5e7eb;
  --card: rgba(255, 255, 255, 0.94);
  --raise: #f2f4f7;
  --blue: #2563eb;
  --glow: #2563eb;
  --glow-soft: rgba(37, 99, 235, 0.08);
  --green: #16a34a;
  --serif: "Instrument Serif", "Times New Roman", serif;
  --sans: "Geist", ui-sans-serif, system-ui, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
html { background: var(--bg); color-scheme: light; }
body {
  background: var(--bg); color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
a { color: inherit; }
button { font: inherit; color: inherit; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
#track { width: 1px; }

/* ---------- Background ---------- */
.bg { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
/* main street in four layers, seen from the side. JS moves each layer at its own speed. */
.sky, .street, .front, .tools, .lane { position: absolute; left: 0; bottom: 0; transform-origin: 0 100%; will-change: transform; }
.street { height: 340px; }

/* layer 1: far buildings, pale so the shops read first */
.sky { height: 520px; width: 9000px; bottom: 60px; }
.sky i { position: absolute; bottom: 0; background: #f7f8fa; border: 1px solid #eef0f3; border-bottom: 0; }
.sky u { position: absolute; bottom: 100%; width: 26px; height: 30px; border: 1px solid #eef0f3; border-bottom: 0; border-radius: 12px 12px 0 0; background: #f7f8fa; }

/* layer 2: the sidewalk and the shops. The sidewalk is paved in slabs, with a joint every 64px. */
.walk {
  position: absolute; left: -3000px; right: -3000px; bottom: 56px; height: 22px;
  background:
    linear-gradient(#e2e5ea, #e2e5ea) top / 100% 1px no-repeat,
    repeating-linear-gradient(90deg, transparent 0 63px, #e3e6eb 63px 64px),
    linear-gradient(#f5f6f8, #eef0f3);
}
.shop { position: absolute; transition: opacity 0.8s ease; }
.shop .ph {
  position: absolute; inset: 0; background: center bottom / contain no-repeat;
  filter: saturate(0.92); transition: filter 1s ease, opacity 1s ease;
}
/* Offset the transparent canvas margins so each foundation meets the sidewalk. */
.shop .supplier-printing, .shop .supplier-foodservice { translate: 0 9.1%; }
.shop .supplier-packaging { translate: 0 8.2%; }
.shop .supplier-restaurant-supply { translate: 0 2.2%; }
.shop .supplier-warehouse { translate: 0 4.2%; }
.cl {
  position: absolute; z-index: 2; right: 14%; top: 8px; width: 24px; height: 22px; display: grid; place-items: center; border-radius: 6px;
  background: #fff; color: var(--blue); border: 1px solid rgba(37, 99, 235, 0.4);
  box-shadow: 0 4px 12px -2px rgba(37, 99, 235, 0.35);
  transition: background 0.4s, box-shadow 0.4s, color 0.4s, opacity 0.4s;
}
.cl svg { width: 12px; height: 12px; fill: currentColor; stroke: none; }
.cl.ping { animation: ping 1.2s ease; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.6); background: var(--blue); color: #fff; } 100% { box-shadow: 0 0 0 16px rgba(37, 99, 235, 0); } }
.board {
  position: absolute; bottom: 50px; z-index: 3; width: 58px; padding: 5px 0; border: 1px solid #cfd4dc; border-radius: 4px 4px 2px 2px; background: #fff;
  font: 10px/1.25 var(--mono); color: var(--ink-2); display: flex; flex-direction: column; align-items: center; white-space: nowrap;
  box-shadow: 0 2px 6px rgba(17, 19, 24, 0.08);
}
.board::before, .board::after { content: ""; position: absolute; bottom: -6px; width: 1px; height: 7px; background: #b8bec8; }
.board::before { left: 8px; } .board::after { right: 8px; }
.board s { text-decoration: none; }
.parcel {
  position: absolute; bottom: 48px; z-index: 3; display: flex; flex-direction: column; align-items: center; gap: 2px;
  font: 10px var(--mono); color: var(--blue); opacity: 0; transform: translateY(-30px);
}
.parcel img { display: block; width: 50px; height: 42px; filter: drop-shadow(0 3px 2px rgba(17, 19, 24, 0.18)); }
.parcel span { padding: 1px 5px; border-radius: 4px; background: #fff; border: 1px solid rgba(37, 99, 235, 0.35); }
.street.delivered .parcel { opacity: 1; transform: none; transition: opacity 0.3s ease 1s, transform 0.5s cubic-bezier(0.3, 1.6, 0.5, 1) 1s; }

/* after hours: the shops go quiet and gray, the concierge light stays on */
.bg.night .shop .ph { filter: grayscale(0.9); opacity: 0.55; }
.bg.night .cl { animation: breathe 2.8s ease-in-out infinite; }
.bg.night .cl.ping { animation: ping 1.2s ease; }
.shop.maya.waiting .cl { box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15), 0 4px 14px rgba(37, 99, 235, 0.45); }
/* forget: nobody answers */
.bg.dim .shop .ph { filter: grayscale(1); opacity: 0.5; }
.bg.dim .cl { background: #f4f5f7; color: #b4b9c2; border-color: #e3e6eb; box-shadow: none; }
/* focus on Maya's shop */
.street.focus .shop:not(.maya) { opacity: 0.35; }
/* the last page: the street steps back so the form reads first */
.bg.soft .shop, .bg.soft .prop, .bg.soft .van, .bg.soft .board, .bg.soft .delivered .parcel { opacity: 0.32; }

/* layer 3: real photos of things on the sidewalk, along the curb */
.front { height: 300px; width: 9000px; pointer-events: none; }
.prop { position: absolute; bottom: 59px; display: block; transition: filter 1s ease, opacity 1s ease; }

/* layer 4: the road, closest to the reader. Curb on top, then the asphalt with a dashed center line. */
.lane { height: 120px; pointer-events: none; }
.road {
  position: absolute; left: -2000px; bottom: 0; height: 56px; width: 20000px;
  background:
    linear-gradient(#edf0f3, #edf0f3) 0 0 / 100% 2px no-repeat,
    linear-gradient(#c9ced6, #d3d7de) 0 2px / 100% 6px no-repeat,
    linear-gradient(rgba(17, 19, 24, 0.07), transparent) 0 8px / 100% 8px no-repeat,
    repeating-linear-gradient(90deg, #fff 0 36px, transparent 36px 72px) 0 31px / 100% 3px no-repeat,
    linear-gradient(#dadde3, #e3e6ea);
}
.bg.night .prop, .bg.dim .prop { filter: grayscale(0.9); opacity: 0.6; }

/* the street builds one layer at a time when the page opens */
@keyframes rise { from { transform: translateY(70px); opacity: 0; } }
@keyframes fadeIn { from { opacity: 0; } }
.bg.ready .road, .bg.ready .walk { animation: fadeIn 0.6s ease backwards; }
.bg.ready .sky i { animation: rise 1s cubic-bezier(0.2, 0.8, 0.2, 1) backwards 0.2s; }
.bg.ready .shop { animation: rise 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) backwards; animation-delay: calc(0.5s + var(--i) * 0.07s); }
.bg.ready .prop { animation: rise 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) backwards; animation-delay: calc(1.2s + var(--i) * 0.05s); }
.bg.ready .board { animation: rise 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) backwards 0.9s; }
.bg.ready .shop .cl { animation: fadeIn 0.5s ease backwards; animation-delay: calc(1.7s + var(--i) * 0.06s); }
.bg:not(.ready) .street, .bg:not(.ready) .sky, .bg:not(.ready) .front, .bg:not(.ready) .tools, .bg:not(.ready) .van { visibility: hidden; }

/* the owner's tools, wired into the shop */
.infra { position: absolute; z-index: 3; display: flex; flex-direction: column-reverse; gap: 8px; opacity: 0; transform: translateX(-10px); transition: opacity 0.6s, transform 0.6s; }
.tools { height: 340px; pointer-events: none; }
.tools.show-infra .infra { opacity: 1; transform: none; }
.infra .wire { position: absolute; left: -18px; top: 16px; bottom: 18px; border-left: 1px dashed #b8bec8; }
.dev {
  position: relative; display: flex; align-items: center; gap: 8px; width: 168px;
  padding: 8px 10px; border: 1px solid var(--line); border-radius: 9px; background: #fff;
  font-size: 12.5px; color: #a3a8b1; transition: color 0.4s, border-color 0.4s, box-shadow 0.4s;
  box-shadow: 0 2px 8px rgba(17, 19, 24, 0.05);
}
.dev::before { content: ""; position: absolute; left: -18px; top: 50%; width: 18px; border-top: 1px dashed #b8bec8; }
.dev svg { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.dev.on { color: var(--ink); border-color: #d5d9e0; }
.dev.on svg { color: var(--blue); }
.dev.now { border-color: rgba(37, 99, 235, 0.55); box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1), 0 6px 18px -6px rgba(37, 99, 235, 0.4); }

.van { position: absolute; left: 0; bottom: 10px; z-index: 4; width: 154px; height: 72px; background: url(img/truck.webp) center / contain no-repeat; transition: filter 1s ease; }
.bg.night .van { filter: grayscale(0.9) opacity(0.6); }

/* speech above the shops */
.bubs { position: absolute; inset: 0; pointer-events: none; }
.bub {
  position: absolute; transform: translate(-50%, 6px) scale(0.92); opacity: 0;
  padding: 6px 11px; border-radius: 12px; white-space: nowrap;
  font-size: 13.5px; line-height: 1.2; color: var(--ink); background: #fff; border: 1px solid var(--line);
  box-shadow: 0 6px 16px -8px rgba(17, 19, 24, 0.25);
  transition: opacity 0.35s ease, transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.bub.in { opacity: 1; transform: translate(-50%, 0) scale(1); }
.bub.out { opacity: 0; transform: translate(-50%, -8px); }
.bub.q { border-bottom-left-radius: 4px; }
.bub.a { color: #fff; background: var(--blue); border-color: var(--blue); border-bottom-right-radius: 4px; }
.bub.lost.in { animation: lost 3.2s ease forwards; }
@keyframes lost { 0%, 55% { color: var(--ink-2); } 100% { color: #b4b9c2; border-color: #eef0f3; } }
.bub.ev { display: inline-flex; align-items: center; gap: 6px; font: 11.5px var(--mono); color: var(--blue); border-color: rgba(37, 99, 235, 0.35); }
.bub.ev svg { width: 13px; height: 13px; fill: none; stroke: var(--blue); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.bg-wash {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.94), rgba(255, 255, 255, 0.6) 45%, rgba(255, 255, 255, 0) 68%);
}

/* ---------- Top bar ---------- */
.hud {
  position: fixed; top: 0; left: 0; right: 0; z-index: 20;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: 18px 28px;
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.04em;
}
.logo { justify-self: start; text-decoration: none; color: var(--ink); }
/* Wordmark: a script "always" runs into a tall, narrow "on". Drawn as one SVG path (logo.svg). */
.wm { display: block; height: 46px; width: auto; color: var(--ink); overflow: visible; }
.ruler-ticks { display: flex; gap: 5px; height: 10px; align-items: flex-end; }
.ruler-ticks i { width: 1px; height: 5px; background: #d5d9e0; transition: background 0.2s; }
.ruler-ticks i.major { height: 10px; }
.ruler-ticks i.on { background: var(--ink); }
.hud-right { display: flex; justify-content: flex-end; align-items: center; gap: 18px; }
.snd { display: flex; align-items: center; gap: 2.5px; height: 34px; padding: 0 8px; border: 0; background: none; cursor: pointer; }
.snd i { width: 2px; height: 14px; border-radius: 2px; background: var(--ink); animation: eq 1.1s ease-in-out infinite; }
.snd i:nth-child(2) { animation-delay: -0.3s; } .snd i:nth-child(3) { animation-delay: -0.7s; } .snd i:nth-child(4) { animation-delay: -0.5s; }
.snd[aria-pressed="false"] i { animation: none; transform: scaleY(0.15); background: var(--muted); }
@keyframes eq { 0%, 100% { transform: scaleY(0.3); } 50% { transform: scaleY(1); } }
.pill {
  border: 0; cursor: pointer; background: var(--blue); color: #fff; text-decoration: none;
  padding: 10px 16px; border-radius: 999px;
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.02em;
  transition: transform 0.2s ease, background 0.2s ease;
}
.pill:hover { transform: translateY(-1px); background: #1d4ed8; }
.nav { color: var(--ink-2); text-decoration: none; font-size: 12px; }
.nav:hover { color: var(--ink); }

.scroll-hint {
  position: fixed; left: 50%; bottom: 26px; z-index: 20; transform: translateX(-50%); pointer-events: none;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.14em; color: var(--muted);
  transition: opacity 0.4s ease;
}
.scroll-hint i { width: 1px; height: 34px; background: linear-gradient(var(--muted), transparent); animation: drip 1.8s ease-in-out infinite; transform-origin: top; }
@keyframes drip { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }

/* ---------- Stage ---------- */
.stage { position: fixed; inset: 0; z-index: 10; }
.scene { position: absolute; inset: 0; visibility: hidden; pointer-events: none; }
.scene.active { visibility: visible; }
.line {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; justify-content: safe center;
  /* more room at the bottom than the top, so the story sits a little above the street */
  text-align: center; padding: 96px 24px calc(96px + 18vh);
  opacity: 0; will-change: opacity, transform, filter;
}
.line.on { pointer-events: auto; }
.w { display: inline-block; }
.line .w {
  opacity: 0; transform: translateY(0.4em); filter: blur(8px);
  transition: opacity 0.5s ease var(--d, 0s), transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) var(--d, 0s), filter 0.5s ease var(--d, 0s);
}
.line > :not(.display) {
  opacity: 0; transform: translateY(18px);
  transition: opacity 0.6s ease 0.2s, transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) 0.2s;
}
.line.show .w, .line.show > :not(.display) { opacity: 1; transform: none; filter: none; }
.reduce .line > .display { opacity: 0; transition: opacity 0.4s ease; }
.reduce .line.show > .display { opacity: 1; }

.display {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(48px, 8.2vw, 124px); line-height: 0.96; letter-spacing: -0.025em;
  margin: 0; max-width: 15ch; text-wrap: balance;
}
.display.sm { font-size: clamp(36px, 5.2vw, 74px); max-width: 18ch; line-height: 1.02; }
.display.sm.wide { max-width: 24ch; }
.display em { font-style: italic; color: var(--blue); }
.hero-context { margin: 26px 0 0; font: 500 clamp(16px, 1.45vw, 20px)/1.4 "Instrument Sans", var(--sans); letter-spacing: -0.005em; color: var(--ink-2); }

/* reveal helper used by JS for pieces inside a line */
.rv { opacity: 0; transform: translateY(14px); transition: opacity 0.45s ease, transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1); }
.rv.in { opacity: 1; transform: none; }

/* ---------- Cards ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--line); border-radius: 22px;
  box-shadow: 0 24px 60px -28px rgba(17, 19, 24, 0.28);
  text-align: left;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.card-h { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.card-h b { font-weight: 500; font-size: 15px; }
.av {
  width: 30px; height: 30px; flex: none; border-radius: 50%;
  display: grid; place-items: center;
  background: #e8efff; color: #2563eb; font: 500 13px/1 var(--sans);
}
.av.you { width: auto; padding: 0 10px; border-radius: 999px; background: var(--ink); color: var(--bg); font-size: 12px; }
.since { margin-left: auto; font-size: 12px; color: var(--muted); }

/* memory card */
.who-row { display: flex; gap: 16px; justify-content: center; align-items: flex-start; width: 100%; max-width: 1240px; margin-top: 34px; }
.who-card { flex: 1 1 0; max-width: 292px; min-width: 0; }
.who-card.feature { border-color: rgba(37, 99, 235, 0.35); box-shadow: 0 0 0 5px rgba(37, 99, 235, 0.06), 0 24px 60px -28px rgba(17, 19, 24, 0.28); }
.who-card .card-h { padding: 14px 16px; }
.pf.sm { width: 30px; height: 30px; }
.pf { width: 40px; height: 40px; flex: none; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 1px rgba(17, 19, 24, 0.08); }
.who { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.who b { font-weight: 500; font-size: 15px; line-height: 1.1; }
.who span { font-size: 12px; line-height: 1.2; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who-card .since { font-size: 11.5px; white-space: nowrap; }
.who-card .mem { padding: 6px 16px 12px; }
.who-card .mem li { font-size: 14px; line-height: 1.3; padding: 10px 0; align-items: flex-start; }
.who-card .mem li::before { margin-top: 4px; }
@media (max-width: 1099px) and (min-width: 900px) {
  .who-card .since { display: none; }
  .who-card .mem li { font-size: 13px; }
}
@media (max-width: 899px) {
  .who-row { justify-content: flex-start; overflow-x: auto; padding: 8px 24px 20px; margin-inline: -24px; width: calc(100% + 48px); scroll-snap-type: x mandatory; scrollbar-width: none; }
  .who-row::-webkit-scrollbar { display: none; }
  .who-card { flex: 0 0 min(284px, 78vw); max-width: none; scroll-snap-align: center; }
}
.mem { list-style: none; margin: 0; padding: 8px 16px 14px; }
.mem li {
  display: flex; align-items: center; gap: 10px; padding: 9px 0; font-size: 15px; color: var(--ink-2);
  border-bottom: 1px dashed var(--line);
}
.mem li:last-child { border-bottom: 0; }
.mem li::before { content: ""; width: 6px; height: 8px; border-radius: 1px; background: #d5d9e0; flex: none; }
.mem li.open { color: var(--ink); }
.mem li.open::before { background: var(--glow); box-shadow: 0 0 10px 2px rgba(37, 99, 235, 0.6); }

.erp-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; width: min(560px, 90vw); margin-top: 32px; }
.erp-row span { display: grid; place-items: center; height: 74px; padding: 0 18px; border: 1px solid var(--line); border-radius: 16px; background: #fff; box-shadow: 0 10px 28px -20px rgba(17, 19, 24, 0.3); }
.erp-row img { display: block; max-width: 100%; height: auto; }
.erp-note { max-width: 44ch; margin: 24px 0 0; font-size: 16px; line-height: 1.5; color: var(--ink-2); text-wrap: balance; }
.erp-fine { max-width: 64ch; margin: 10px 0 0; font-size: 12px; line-height: 1.5; color: var(--muted); }
@media (min-width: 900px) { .erp-row { grid-template-columns: repeat(6, auto); width: auto; max-width: 1000px; } .erp-row span { min-width: 138px; } }
.chips { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 32px; max-width: 640px; }
.chips span {
  padding: 9px 14px; border-radius: 999px; background: #fff;
  border: 1px solid var(--line); font-size: 14px; color: var(--ink-2);
}

/* ---------- Follow-through: one conversation, shown as iMessage on a phone or as email on a laptop ---------- */
.line.follow { justify-content: flex-start; padding-top: max(104px, 14vh); padding-bottom: 0; padding-inline: clamp(24px, 4vw, 64px); }
.heads { position: relative; display: grid; width: 100%; justify-items: center; }
.heads .hd { grid-area: 1 / 1; opacity: 0; transform: translateY(10px); filter: blur(6px); transition: opacity 0.5s ease, transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1), filter 0.5s ease; }
.heads .hd.on { opacity: 1; transform: none; filter: none; }
.state { margin-left: auto; display: inline-flex; align-items: center; gap: 7px; font-size: 12px; color: var(--ink-2); }
.state i { width: 8px; height: 8px; border-radius: 50%; background: var(--glow); box-shadow: 0 0 10px 2px rgba(37, 99, 235, 0.6); transition: background 0.4s, box-shadow 0.4s; }
.asleep .state i { background: #c3c8d0; box-shadow: none; animation: breathe 2.6s ease-in-out infinite; }
@keyframes breathe { 50% { opacity: 0.35; } }

/* the stage for the two devices. JS sets --dh (height), --dt (top gap) and each device's --s (scale) */
.demo { position: relative; flex: none; width: 100%; height: var(--dh, 540px); margin-top: 20px; --dt: 0px; }
.device { position: absolute; left: 50%; top: var(--dt); transform: translateX(-50%) scale(var(--s, 1)); transform-origin: 50% 0; transition: opacity 0.5s ease, transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1); }
.demo[data-channel="phone"] .laptop, .demo[data-channel="mail"] .phone { opacity: 0; pointer-events: none; transform: translateX(-50%) translateY(18px) scale(calc(var(--s, 1) * 0.97)); }

/* the channel toggle sits at the right end of the section */
.channel {
  position: absolute; z-index: 3; right: 0; top: 50%; margin-top: -92px;
  display: flex; flex-direction: column; gap: 6px; padding: 6px;
  background: var(--card); border: 1px solid var(--line); border-radius: 20px;
  box-shadow: 0 16px 40px -22px rgba(17, 19, 24, 0.35);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.channel .lbl { padding: 5px 0 2px; text-align: center; font: 10px/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.channel button {
  display: flex; flex-direction: column; align-items: center; gap: 7px; width: 86px; padding: 12px 6px 10px;
  border: 1px solid transparent; border-radius: 14px; background: none; cursor: pointer;
  font: 500 12.5px/1 var(--sans); color: var(--ink-2);
  transition: background 0.25s, border-color 0.25s, color 0.25s;
}
.channel button svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.channel button:hover { background: var(--raise); color: var(--ink); }
.channel button[aria-pressed="true"] { background: var(--glow-soft); border-color: rgba(37, 99, 235, 0.45); color: var(--ink); }
.channel button[aria-pressed="true"] svg { color: var(--blue); }
.channel button:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

/* ----- iPhone ----- */
.phone {
  width: 300px; height: 610px; padding: 10px; border-radius: 52px;
  background: linear-gradient(145deg, #2d3037, #0f1114 55%, #1e2127);
  box-shadow: 0 0 0 1.5px #3b3f48 inset, 0 0 0 1px #0a0b0d, 0 44px 80px -34px rgba(17, 19, 24, 0.6), 0 16px 30px -18px rgba(17, 19, 24, 0.45);
  transition: opacity 0.5s ease, transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.6s ease;
}
.phone::before, .phone::after { content: ""; position: absolute; width: 3px; border-radius: 2px; background: #2a2d34; }
.phone::before { right: -3px; top: 150px; height: 74px; }
.phone::after { left: -3px; top: 118px; height: 46px; box-shadow: 0 62px 0 #2a2d34; }
.phone.woke { box-shadow: 0 0 0 1.5px #3b3f48 inset, 0 0 0 1px #0a0b0d, 0 0 0 7px rgba(37, 99, 235, 0.1), 0 0 70px -6px rgba(37, 99, 235, 0.4), 0 44px 80px -34px rgba(17, 19, 24, 0.6); }
.ph-screen { position: relative; display: flex; flex-direction: column; height: 100%; overflow: hidden; border-radius: 42px; background: #fff; }
.ph-island { position: absolute; z-index: 3; top: 11px; left: 50%; width: 92px; height: 27px; margin-left: -46px; border-radius: 20px; background: #000; }
.ph-status { flex: none; display: flex; align-items: center; justify-content: space-between; height: 48px; padding: 6px 26px 0 32px; font: 600 14.5px/1 -apple-system, BlinkMacSystemFont, "SF Pro Text", var(--sans); color: #000; }
.ph-icons { display: flex; align-items: center; gap: 5px; }
.ph-icons svg { height: 11px; width: auto; fill: currentColor; }
.ph-home { flex: none; width: 108px; height: 4.5px; margin: 7px auto 8px; border-radius: 3px; background: #0b0b0d; }

/* iMessage inside the phone */
.imsg { --im-blue: #0a84ff; --im-gray: #e9e9eb; flex: 1; min-height: 0; display: flex; flex-direction: column; background: #fff; text-align: left; font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", var(--sans); }
.im-top { flex: none; display: flex; align-items: flex-start; justify-content: space-between; padding: 2px 14px 8px; background: rgba(249, 249, 249, 0.94); border-bottom: 1px solid #e6e6e8; }
.im-ic { width: 22px; height: 22px; margin-top: 9px; fill: none; stroke: var(--im-blue); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.im-who { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.im-av { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; color: #fff; font: 600 13.5px/1 -apple-system, var(--sans); letter-spacing: 0.02em; background: linear-gradient(180deg, #a5abb8, #858b98); }
.im-who b { display: inline-flex; align-items: center; gap: 1px; font-weight: 500; font-size: 11.5px; color: #111; }
.im-who b svg { width: 10px; height: 10px; fill: none; stroke: #9a9aa0; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.imsg .state { margin: 0; gap: 5px; font-size: 10px; color: #8a8a8e; }
.imsg .state i { width: 6px; height: 6px; }
.imsg .msgs { flex: 1; min-height: 0; display: flex; flex-direction: column; justify-content: flex-end; overflow: hidden; padding: 4px 14px 8px; }
.imsg .msgs > * { margin: 6px 0 0; }
.imsg .when { text-align: center; font-size: 10.5px; color: #8a8a8e; padding: 4px 0 0; }
.imsg .when b { font-weight: 600; }
.imsg .msg { position: relative; z-index: 0; max-width: 76%; padding: 7px 12px; border-radius: 18px; font-size: 14px; line-height: 1.28; letter-spacing: -0.01em; }
.imsg .msg.me { align-self: flex-end; background: var(--im-blue); color: #fff; }
.imsg .msg.ai { align-self: flex-start; background: var(--im-gray); color: #000; }
/* bubble tails */
.imsg .msg::before, .imsg .msg::after { content: ""; position: absolute; bottom: 0; height: 20px; z-index: -1; }
.imsg .msg.me::before { right: -7px; width: 20px; background: var(--im-blue); border-bottom-left-radius: 16px 14px; }
.imsg .msg.me::after { right: -26px; width: 26px; background: #fff; border-bottom-left-radius: 10px; }
.imsg .msg.ai::before { left: -7px; width: 20px; background: var(--im-gray); border-bottom-right-radius: 16px 14px; }
.imsg .msg.ai::after { left: -26px; width: 26px; background: #fff; border-bottom-right-radius: 10px; }
.imsg .msgs > .msg.rv.in { overflow: visible; }
.imsg #m4.in { margin-top: 22px; }
.tap {
  position: absolute; top: -22px; right: -18px; z-index: 2;
  width: 30px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  background: var(--im-blue); border: 2px solid #fff; font-size: 13px; line-height: 1;
  opacity: 0; transform: scale(0.2); transform-origin: 30% 90%;
  transition: opacity 0.2s ease, transform 0.45s cubic-bezier(0.3, 1.6, 0.5, 1);
}
.tap::before, .tap::after { content: ""; position: absolute; border-radius: 50%; background: var(--im-blue); border: 2px solid #fff; }
.tap::before { width: 8px; height: 8px; left: 0; bottom: -5px; }
.tap::after { width: 5px; height: 5px; left: -5px; bottom: -10px; }
.tap.on { opacity: 1; transform: none; }
.receipt { align-self: flex-end; font-size: 10.5px; color: #8a8a8e; margin-top: 3px !important; }
.imsg .ticket, .mticket { display: flex; align-items: center; gap: 7px; }
.imsg .ticket { align-self: center; padding: 3px 0; font-size: 11px; color: #8a8a8e; }
.imsg .ticket.done { color: var(--ink-2); }
.ticket i, .mticket i { width: 6px; height: 9px; border-radius: 1.5px; background: #cfd3da; flex: none; transition: background 0.3s, box-shadow 0.3s; }
.ticket .t-done, .mticket .t-done { display: none; }
.ticket.done i, .mticket.done i { background: var(--glow); box-shadow: 0 0 9px 2px rgba(37, 99, 235, 0.55); }
.ticket.done .t-open, .mticket.done .t-open { display: none; }
.ticket.done .t-done, .mticket.done .t-done { display: inline; }
.im-bar { flex: none; display: flex; align-items: center; gap: 8px; padding: 6px 12px 4px; }
.im-plus { width: 30px; height: 30px; flex: none; border-radius: 50%; display: grid; place-items: center; background: #ececee; }
.im-plus svg { width: 17px; height: 17px; fill: none; stroke: #7c7c80; stroke-width: 2; stroke-linecap: round; }
.im-field { flex: 1; display: flex; align-items: center; justify-content: space-between; height: 32px; padding: 0 9px 0 14px; border: 1px solid #dcdce0; border-radius: 18px; font-size: 14px; color: #b8b8bd; }
.im-field svg { width: 18px; height: 18px; fill: none; stroke: #9a9aa0; stroke-width: 1.7; stroke-linecap: round; }
/* messages take no space until they arrive */
.rv.msg, .msgs > .rv, .thread > .rv { transition: opacity 0.45s ease, transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1), max-height 0.5s ease, margin 0.5s ease, padding 0.5s ease; }
.msgs > .rv { max-height: 160px; }
.msgs > .rv:not(.in) { max-height: 0; margin-top: 0; padding-top: 0; padding-bottom: 0; border-width: 0; overflow: hidden; }
.chat.asleep .msg.in, .chat.asleep .when.in { opacity: 0.4; }

/* ----- Laptop with a mail app ----- */
.laptop { width: 860px; height: 492px; }
.lp-lid {
  position: relative; width: 760px; height: 476px; margin: 0 auto; padding: 12px 12px 14px;
  border-radius: 20px 20px 4px 4px; background: linear-gradient(#2c2f36, #14161a);
  box-shadow: 0 0 0 1px #0a0b0d, 0 0 0 1.5px #3b3f48 inset, 0 40px 70px -34px rgba(17, 19, 24, 0.55);
  transition: box-shadow 0.6s ease;
}
.lp-lid::before { content: ""; position: absolute; top: 4px; left: 50%; width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%; background: #3a3e46; }
.lp-lid.woke { box-shadow: 0 0 0 1px #0a0b0d, 0 0 0 1.5px #3b3f48 inset, 0 0 0 7px rgba(37, 99, 235, 0.1), 0 0 70px -6px rgba(37, 99, 235, 0.4); }
.lp-screen { height: 100%; overflow: hidden; border-radius: 8px; background: #fff; }
.lp-base { position: relative; width: 860px; height: 16px; margin-top: -1px; border-radius: 0 0 20px 20px; background: linear-gradient(#dfe2e7, #b7bcc4); box-shadow: 0 18px 30px -16px rgba(17, 19, 24, 0.4); }
.lp-base::after { content: ""; position: absolute; top: 0; left: 50%; width: 120px; height: 5px; margin-left: -60px; border-radius: 0 0 8px 8px; background: #a9aeb7; }

.mail { display: flex; flex-direction: column; height: 100%; text-align: left; font: 13px/1.4 -apple-system, BlinkMacSystemFont, "SF Pro Text", var(--sans); color: #1d1d1f; }
.mail-bar { flex: none; display: flex; align-items: center; gap: 12px; height: 44px; padding: 0 14px; background: #f6f6f7; border-bottom: 1px solid #e3e3e6; }
.mail-bar b { font-size: 14px; font-weight: 600; }
.mail-count { font-size: 11.5px; color: #8a8a8e; }
.lights { display: flex; gap: 7px; margin-right: 8px; }
.lights i { width: 11px; height: 11px; border-radius: 50%; background: #ff5f57; }
.lights i:nth-child(2) { background: #febc2e; }
.lights i:nth-child(3) { background: #28c840; }
.mail-bar .state { font-size: 11.5px; color: #6b7280; }
.mail-bar .state i { width: 7px; height: 7px; }
.mail-search { display: flex; align-items: center; gap: 6px; width: 150px; height: 26px; padding: 0 9px; border-radius: 8px; background: #e9e9ec; font-size: 12px; color: #8a8a8e; }
.mail-search svg { width: 13px; height: 13px; fill: none; stroke: #8a8a8e; stroke-width: 2; stroke-linecap: round; }
.mail-body { flex: 1; min-height: 0; display: grid; grid-template-columns: 136px 196px 1fr; }
.mail-side { padding: 12px 8px; background: #f1f1f3; border-right: 1px solid #e3e3e6; font-size: 12.5px; }
.mail-side p { margin: 0 0 6px 8px; font-size: 10.5px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: #8a8a8e; }
.mail-side span { display: flex; align-items: center; justify-content: space-between; padding: 6px 8px; border-radius: 7px; color: #3a3a3f; }
.mail-side span.sel { background: #dcdce0; font-weight: 500; }
.mail-side em { font-style: normal; font-size: 11px; color: #8a8a8e; }
.mail-list { overflow: hidden; border-right: 1px solid #e3e3e6; }
.mail-list .row { display: grid; grid-template-columns: 1fr auto; gap: 1px 8px; padding: 10px 12px; border-bottom: 1px solid #ececef; }
.mail-list .row b { font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mail-list time { font-size: 11px; color: #8a8a8e; }
.mail-list .subj { grid-column: 1 / -1; font-size: 12.5px; }
.mail-list .prev { grid-column: 1 / -1; font-size: 11.5px; color: #8a8a8e; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mail-list .row.sel { background: #dbe9ff; }
.mail-read { display: flex; flex-direction: column; min-width: 0; padding: 12px 18px 6px; overflow: hidden; }
.mail-read header h4 { margin: 0; font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }
.mail-read header p { margin: 2px 0 8px; font-size: 12px; color: #8a8a8e; }
.thread { flex: 1; min-height: 0; overflow: hidden; display: flex; flex-direction: column; }
.thread > .rv { max-height: 260px; }
.thread > .rv:not(.in) { max-height: 0; padding-top: 0; padding-bottom: 0; border-width: 0; overflow: hidden; }
.em { padding: 7px 0; border-top: 1px solid #e8e8eb; }
.em-head { display: flex; align-items: center; gap: 8px; }
.em-head .av { width: 26px; height: 26px; font-size: 11px; }
.em-head .av.ai { background: #e9e9eb; color: #3a4150; font-size: 10px; }
.em-head b { font-size: 13px; font-weight: 600; }
.em-head .addr { font-size: 11.5px; color: #8a8a8e; }
.em-head time { margin-left: auto; font-size: 11.5px; color: #8a8a8e; }
.em-body { max-height: 140px; overflow: hidden; transition: max-height 0.5s ease, opacity 0.4s ease, margin 0.5s ease; margin-top: 6px; padding-left: 34px; }
.em-body p { margin: 0 0 6px; font-size: 13.5px; line-height: 1.45; }
.em-sum { display: none; margin: 2px 0 0; padding-left: 34px; font-size: 12.5px; color: #8a8a8e; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.em.old .em-body { max-height: 0; opacity: 0; margin-top: 0; }
.em.old .em-sum { display: block; }
.mticket { padding: 7px 10px; margin: 3px 0; border: 1px dashed #d5d9e0; border-radius: 9px; background: #f8f9fb; font-size: 12px; color: var(--ink-2); }
.mticket.done { border-style: solid; border-color: rgba(37, 99, 235, 0.45); background: var(--glow-soft); color: var(--ink); }
.mstatus { display: flex; align-items: center; gap: 6px; margin: 4px 0 0; font-size: 12px; color: #15803d; }
.mstatus svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.mail.asleep .em.in { opacity: 0.5; }

/* narrow laptop: the reading pane only */
.laptop.narrow { width: 568px; height: 420px; }
.laptop.narrow .lp-lid { width: 500px; height: 404px; }
.laptop.narrow .lp-base { width: 568px; }
.laptop.narrow .mail-side, .laptop.narrow .mail-list, .laptop.narrow .mail-search, .laptop.narrow .mail-count { display: none; }
.laptop.narrow .mail-body { grid-template-columns: 1fr; }

@media (max-width: 899px) {
  .demo { --dt: 52px; }
  .channel { top: 0; right: auto; left: 50%; margin: 0 0 0 0; transform: translateX(-50%); flex-direction: row; align-items: center; gap: 4px; padding: 4px; border-radius: 999px; }
  .channel .lbl { display: none; }
  .channel button { flex-direction: row; width: auto; gap: 7px; padding: 9px 16px; border-radius: 999px; font-size: 13px; }
  .channel button svg { width: 17px; height: 17px; }
}

/* ---------- Merchant ---------- */
.term {
  margin-top: 34px; min-width: min(560px, 88vw); text-align: left;
  background: #f6f7f9; color: var(--ink); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px;
  font: 14.5px/1.5 var(--mono);
}
.term .dim { color: var(--muted); }
.term .cursor { display: inline-block; width: 8px; height: 1.1em; vertical-align: -3px; margin-left: 2px; background: var(--ink); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.built { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 18px; max-width: 600px; }
.built span {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 13px; border-radius: 999px; border: 1px solid var(--line); background: #fff;
  font-size: 13.5px; color: var(--ink);
  opacity: 0.3; transform: scale(0.96); transition: opacity 0.35s ease, transform 0.35s ease, border-color 0.35s, box-shadow 0.35s;
}
.built span::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #d5d9e0; transition: background 0.3s, box-shadow 0.3s; }
.built span.on { opacity: 1; transform: none; }
.built span.on::before { background: var(--green); }
.built span.now { border-color: rgba(37, 99, 235, 0.6); box-shadow: 0 0 22px rgba(37, 99, 235, 0.3); }

/* ---------- Exceptions ---------- */
.steps { display: flex; flex-direction: column; gap: 10px; width: min(420px, 90vw); margin-top: 34px; }
.step {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px;
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  text-align: left; font-size: 15px;
}
.step p { margin: 0; }
.step.wait i { width: 30px; height: 30px; flex: none; border-radius: 50%; border: 2px solid #dbe5fb; border-top-color: var(--glow); animation: spin 1s linear infinite; }
.step.wait.done i { animation: none; border-color: var(--green); background: var(--green); box-shadow: inset 0 0 0 7px #fff; }
@keyframes spin { to { transform: rotate(360deg); } }
.step.ask { flex-direction: column; align-items: stretch; gap: 10px; border-color: rgba(37, 99, 235, 0.5); box-shadow: 0 0 0 5px rgba(37, 99, 235, 0.07); }
.choice { display: flex; gap: 8px; }
.choice span { flex: 1; text-align: center; padding: 9px; border-radius: 10px; border: 1px solid var(--line); font-size: 14px; color: var(--ink-2); }
.choice .pick { background: var(--blue); color: #fff; border-color: var(--blue); transition: background 0.3s; }


/* ---------- Pilot focus ---------- */
.join {
  margin-top: 34px; display: flex; gap: 6px; width: min(460px, 90vw);
  padding: 6px; border-radius: 999px; background: var(--card); border: 1px solid #d5d9e0;
}
.join:focus-within { border-color: rgba(37, 99, 235, 0.55); box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1); }
.join input { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; padding: 0 18px; font: 16px var(--sans); color: var(--ink); }
.join input::placeholder { color: var(--muted); }
.join button { border: 0; border-radius: 999px; background: var(--blue); color: #fff; padding: 14px 20px; font: 13px var(--mono); white-space: nowrap; cursor: pointer; }
.join button:hover { background: #1d4ed8; }
.join button:disabled { opacity: 0.6; cursor: default; }
.join button:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.join-msg { margin: 14px 0 0; font-size: 14px; color: var(--ink-2); }
.join-msg.bad { color: #b42318; }
.pilot-note { margin: 22px 0 0; max-width: 52ch; font-size: 16px; line-height: 1.55; color: var(--ink-2); text-wrap: balance; }
.more { margin-top: 26px; color: var(--ink-2); font-size: 14px; text-decoration: none; border-bottom: 1px solid #d5d9e0; padding-bottom: 2px; }
.hud .nav, .hud .pill { white-space: nowrap; }
.links { display: flex; gap: 22px; justify-content: center; margin-top: 26px; }
.links .more { margin-top: 0; }
.more:hover { color: var(--ink); border-color: var(--ink-2); }

/* ---------- Small screens ---------- */
@media (max-width: 720px) {
  .hud { padding: 14px 16px; grid-template-columns: 1fr auto; }
  .ruler { display: none; }
  .wm { height: 40px; }
  .hud-right { gap: 8px; }
  .hud .nav { display: none; }
  .line { padding: 84px 18px calc(40px + 12vh); }
  .display { font-size: clamp(44px, 12.5vw, 64px); }
  .display.sm { font-size: clamp(32px, 9vw, 44px); }
  .steps { margin-top: 26px; }
  .term { font-size: 13px; padding: 14px 16px; }
}
@media (max-height: 760px) and (min-width: 721px) {
  .display { font-size: clamp(48px, 13vh, 104px); }
  .line { padding: 80px 24px calc(20px + 8vh); }
  .display.sm { font-size: clamp(32px, 4.4vw, 58px); }
  .line.follow { padding-top: 84px; }
  .follow .display.sm { font-size: clamp(32px, 6.4vh, 48px); }
}
@media (prefers-reduced-motion: reduce) {
  .snd i, .scroll-hint i, .cursor, .step.wait i { animation: none !important; }
}

@media (max-height: 700px) and (max-width: 720px) {
  .line.follow { padding-top: 76px; }
  .follow .display.sm { font-size: 30px; }
}
