:root {
  --fog: #eef1f7;
  --paper: #ffffff;
  --ink: #161b33;
  --ink-2: #474d6b;
  --ink-3: #737996;
  --line: rgba(22, 27, 51, 0.1);
  --indigo: #4f46e5;
  --indigo-ink: #ffffff;
  --public: #1f8a4c;
  --private: #4f46e5;
  --secret: #c2410c;
  --sealed: #5f6472;
  --wall-a: #7466ff;
  --wall-b: #3a2fb8;
  --wall-c: #1d1a5c;
  --window: rgba(255, 255, 255, 0.94);
  --window-ink: #161b33;
  --card: #ffffff;
  --card-shadow: 0 22px 50px rgba(17, 12, 70, 0.42), 0 2px 6px rgba(17, 12, 70, 0.25);
  --display: "Bricolage Grotesque", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", sans-serif;
  --text: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Hiragino Sans GB", "Helvetica Neue", Arial, sans-serif;
  --code: ui-monospace, "SF Mono", Menlo, monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --fog: #11142a;
    --paper: #1b1f3b;
    --ink: #eef0fa;
    --ink-2: #b9bdd8;
    --ink-3: #8b90b0;
    --line: rgba(238, 240, 250, 0.12);
    --indigo: #8f88ff;
    --indigo-ink: #11142a;
    --public: #46c47b;
    --private: #a29cff;
    --secret: #ff9a5c;
    --sealed: #a3a7b8;
    --window: rgba(30, 33, 62, 0.94);
    --window-ink: #eef0fa;
    --card: #282c52;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --fog: #11142a;
  --paper: #1b1f3b;
  --ink: #eef0fa;
  --ink-2: #b9bdd8;
  --ink-3: #8b90b0;
  --line: rgba(238, 240, 250, 0.12);
  --indigo: #8f88ff;
  --indigo-ink: #11142a;
  --public: #46c47b;
  --private: #a29cff;
  --secret: #ff9a5c;
  --sealed: #a3a7b8;
  --window: rgba(30, 33, 62, 0.94);
  --window-ink: #eef0fa;
  --card: #282c52;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--fog);
  color: var(--ink);
  font: 17px/1.55 var(--text);
  -webkit-font-smoothing: antialiased;
}
img {
  display: block;
}
a {
  color: inherit;
}
:focus-visible {
  outline: 3px solid var(--indigo);
  outline-offset: 3px;
  border-radius: 6px;
}

h1,
h2,
h3 {
  font-family: var(--display);
  margin: 0;
  text-wrap: balance;
}
h2 {
  font-size: clamp(1.75rem, 3.4vw, 2.5rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
}
h3 {
  font-size: 1.15rem;
  font-weight: 650;
  letter-spacing: -0.01em;
}
p {
  margin: 0;
}
html[lang="zh-CN"] h1,
html[lang="zh-CN"] h2,
html[lang="zh-CN"] h3 {
  letter-spacing: 0;
}

/* ---------- layout ---------- */
.top,
main > section {
  width: min(1120px, 100% - 48px);
  margin-inline: auto;
}
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font: 700 1.2rem/1 var(--display);
  letter-spacing: -0.01em;
}
.brand img {
  width: 32px;
  height: 32px;
}
.lang {
  font: 500 0.9rem/1 var(--text);
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 14px;
  cursor: pointer;
}
.lang:hover {
  background: var(--paper);
}

main > section {
  padding-block: clamp(56px, 9vw, 112px);
}

/* ---------- hero ---------- */
main > .hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
  padding-top: clamp(24px, 5vw, 64px);
}
h1 {
  font-size: clamp(2.6rem, 6.2vw, 4.75rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.035em;
  font-variation-settings: "opsz" 96;
}
html[lang="zh-CN"] h1 {
  line-height: 1.15;
}
.lede {
  margin-top: 24px;
  max-width: 34em;
  font-size: 1.15rem;
  color: var(--ink-2);
}
.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 24px;
  margin-top: 32px;
}
.cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  border-radius: 12px;
  background: var(--ink);
  color: var(--fog);
  font-weight: 600;
}
.cta::before {
  content: "";
  width: 14px;
  height: 17px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 17'%3E%3Cpath d='M11.6 9c0-2 1.7-3 1.8-3.1-1-1.4-2.5-1.6-3-1.7-1.3-.1-2.5.8-3.1.8-.7 0-1.6-.8-2.7-.7C3.2 4.3 1.9 5.1 1.2 6.4c-1.5 2.6-.4 6.4 1.1 8.5.7 1 1.5 2.2 2.6 2.1 1 0 1.4-.7 2.7-.7 1.2 0 1.6.7 2.7.7 1.1 0 1.8-1 2.5-2 .8-1.2 1.1-2.3 1.1-2.4 0 0-2.3-.9-2.3-3.6zM9.6 3c.6-.7 1-1.7.9-2.6-.8 0-1.9.6-2.5 1.3-.5.6-1 1.6-.9 2.5.9.1 1.9-.5 2.5-1.2z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 17'%3E%3Cpath d='M11.6 9c0-2 1.7-3 1.8-3.1-1-1.4-2.5-1.6-3-1.7-1.3-.1-2.5.8-3.1.8-.7 0-1.6-.8-2.7-.7C3.2 4.3 1.9 5.1 1.2 6.4c-1.5 2.6-.4 6.4 1.1 8.5.7 1 1.5 2.2 2.6 2.1 1 0 1.4-.7 2.7-.7 1.2 0 1.6.7 2.7.7 1.1 0 1.8-1 2.5-2 .8-1.2 1.1-2.3 1.1-2.4 0 0-2.3-.9-2.3-3.6zM9.6 3c.6-.7 1-1.7.9-2.6-.8 0-1.9.6-2.5 1.3-.5.6-1 1.6-.9 2.5.9.1 1.9-.5 2.5-1.2z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.cta-link {
  font-weight: 600;
  color: var(--indigo);
  text-underline-offset: 4px;
}

/* ---------- the demo scene ---------- */
.scene {
  margin: 0;
}
.screen {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  background:
    radial-gradient(120% 90% at 85% 0%, var(--wall-a) 0%, transparent 60%),
    radial-gradient(90% 80% at 0% 100%, #2a8bd8 0%, transparent 55%),
    linear-gradient(160deg, var(--wall-b), var(--wall-c));
  box-shadow: 0 30px 80px rgba(29, 26, 92, 0.28);
}
.menubar {
  display: flex;
  align-items: center;
  gap: 14px;
  height: 28px;
  padding: 0 14px;
  background: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 600;
}
.mb-spacer {
  flex: 1;
}
.mb-tray {
  color: #fff;
}
.mb-time {
  font-weight: 500;
}
.desk {
  position: relative;
  height: 440px;
  padding: 28px 24px 24px;
}
.chat {
  width: min(380px, 78%);
  height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--window);
  color: var(--window-ink);
  border-radius: 12px;
  box-shadow: 0 14px 40px rgba(10, 8, 50, 0.35);
  overflow: hidden;
}
.chat-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink-3);
}
.chat-bar i {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #ff5f57;
}
.chat-bar i:nth-child(2) {
  background: #febc2e;
}
.chat-bar i:nth-child(3) {
  background: #28c840;
}
.chat-bar span {
  margin-left: 8px;
}
.msgs {
  flex: 1;
  justify-content: flex-end;
  list-style: none;
  margin: 0;
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 0.88rem;
  line-height: 1.45;
  overflow: hidden;
}
.msgs li {
  max-width: 88%;
  animation: msg-in 0.35s ease-out both;
}
.msgs .me {
  align-self: flex-end;
  background: var(--indigo);
  color: var(--indigo-ink);
  padding: 8px 12px;
  border-radius: 14px 14px 4px 14px;
}
.msgs .ai {
  align-self: flex-start;
}
.msgs .ai.muted {
  color: var(--ink-3);
}
.msgs .ai strong {
  font-weight: 600;
}
@keyframes msg-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}

/* approval card — mirrors the one in the app */
.card {
  position: absolute;
  top: 14px;
  right: 14px;
  width: min(330px, calc(100% - 28px));
  padding: 14px;
  border-radius: 14px;
  background: var(--card);
  color: var(--window-ink);
  box-shadow: var(--card-shadow);
  overflow: hidden;
  animation: card-in 0.5s cubic-bezier(0.2, 0.9, 0.25, 1.15) both;
}
.card[hidden] {
  display: none;
}
.card.leaving {
  animation: card-out 0.3s ease-in both;
}
@keyframes card-in {
  from {
    opacity: 0;
    transform: translateX(40px);
  }
}
@keyframes card-out {
  to {
    opacity: 0;
    transform: translateX(40px);
  }
}
.card-progress {
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: var(--indigo);
  transform-origin: left;
}
.card-head {
  display: flex;
  align-items: center;
  gap: 10px;
}
.card-head img {
  width: 28px;
  height: 28px;
  flex: none;
}
.card-head > div {
  flex: 1;
  min-width: 0;
}
.card-client {
  font-weight: 650;
  font-size: 0.9rem;
}
.card-sub {
  font-size: 0.78rem;
  color: var(--ink-3);
}
.card-timer {
  font-size: 0.75rem;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}
.card-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 12px 0;
  padding: 9px 10px;
  border-radius: 9px;
  background: color-mix(in srgb, var(--secret) 9%, transparent);
  font-size: 0.82rem;
}
.card-item svg {
  color: var(--secret);
}
.item-path {
  font-family: var(--code);
  font-size: 0.78rem;
  color: var(--ink-2);
}
.item-field {
  font-weight: 600;
}
.card-actions {
  display: flex;
  gap: 6px;
}
.btn {
  flex: 1 1 auto;
  padding: 7px 8px;
  border-radius: 8px;
  border: 1px solid var(--line);
  font: 600 0.78rem/1.2 var(--text);
  cursor: pointer;
  white-space: nowrap;
}
.btn-quiet {
  background: transparent;
  color: var(--window-ink);
}
.btn-quiet:hover {
  background: color-mix(in srgb, var(--window-ink) 7%, transparent);
}
.btn-main {
  background: var(--indigo);
  border-color: var(--indigo);
  color: var(--indigo-ink);
}
.btn-main:hover {
  filter: brightness(1.08);
}

.scene figcaption {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 16px;
  margin-top: 14px;
  font-size: 0.9rem;
  color: var(--ink-3);
}
.replay {
  font: 600 0.9rem/1 var(--text);
  color: var(--indigo);
  background: none;
  border: 0;
  padding: 4px 0;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.replay[hidden] {
  display: none;
}

/* ---------- levels ---------- */
.pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font: 600 0.72rem/1.5 var(--text);
  color: var(--lv);
  background: color-mix(in srgb, var(--lv) 13%, transparent);
  white-space: nowrap;
}
.pill-public {
  --lv: var(--public);
}
.pill-private {
  --lv: var(--private);
}
.pill-secret {
  --lv: var(--secret);
}
.pill-sealed {
  --lv: var(--sealed);
}

/* ---------- files ---------- */
main > .files {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 88px);
  align-items: center;
}
.files-text p {
  margin-top: 18px;
  color: var(--ink-2);
  max-width: 32em;
}
.levels {
  margin: 28px 0 0;
  display: grid;
  gap: 12px;
}
.levels > div {
  display: grid;
  grid-template-columns: 84px 1fr;
  align-items: baseline;
  gap: 12px;
}
.levels dt,
.levels dd {
  margin: 0;
}
.levels dd {
  color: var(--ink-2);
}
.note {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}
.note-bar {
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
  font: 500 0.82rem/1.4 var(--code);
  color: var(--ink-3);
}
.note-body {
  margin: 0;
  padding: 18px 20px 22px;
  font: 0.86rem/1.75 var(--code);
  color: var(--ink);
  overflow-x: auto;
}
.note-body .fm {
  color: var(--ink-3);
}
.note-body .row .pill {
  margin-left: 8px;
  vertical-align: 1px;
}

/* ---------- apps ---------- */
main > .apps {
  text-align: center;
}
.app-list {
  list-style: none;
  margin: 32px auto 28px;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 14px;
  max-width: 760px;
}
.app-list li {
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--paper);
  border: 1px solid var(--line);
  font: 600 1.05rem/1.2 var(--display);
}
.apps > p {
  max-width: 34em;
  margin-inline: auto;
  color: var(--ink-2);
}

/* ---------- promises ---------- */
.prom-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(24px, 4vw, 56px);
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}
.prom-grid p {
  margin-top: 10px;
  color: var(--ink-2);
}

/* ---------- steps ---------- */
.steps {
  list-style: none;
  counter-reset: step;
  margin: 40px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(24px, 4vw, 56px);
}
.steps li {
  counter-increment: step;
}
.steps li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-bottom: 16px;
  border-radius: 50%;
  background: var(--indigo);
  color: var(--indigo-ink);
  font: 700 1.1rem/1 var(--display);
}
.steps p {
  margin-top: 8px;
  color: var(--ink-2);
}

/* ---------- closing ---------- */
main > .closing {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  text-align: center;
}
.closing img {
  width: 72px;
  height: 72px;
}

/* ---------- small screens ---------- */
@media (max-width: 860px) {
  main > .hero,
  main > .files {
    grid-template-columns: minmax(0, 1fr);
  }
  .prom-grid,
  .steps {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 520px) {
  body {
    font-size: 16px;
  }
  .top,
  main > section {
    width: calc(100% - 32px);
  }
  .desk {
    height: 460px;
    padding: 16px 12px 12px;
  }
  .chat {
    width: 100%;
  }
  .card {
    top: 8px;
    right: 8px;
    width: calc(100% - 16px);
  }
  .btn {
    padding-inline: 6px;
  }
}

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