/* Web Demo pages. Same visual system as the Service OS app (Native Calm)
   and the Owner Portal: warm neutrals, forest green, Reddit Sans. */
@font-face {
  font-family: "Reddit Sans";
  src: url("/demo/fonts/RedditSans-Variable.ttf") format("truetype");
  font-weight: 200 900;
  font-display: swap;
}

:root {
  color-scheme: light;
  --paper: #f7f8f8;
  --paper-2: #f0f0ee;
  --surface: #ffffff;
  --ink: #111111;
  --ink-2: #555560;
  --muted: #8a8a92;
  --rule: #e8e9e4;
  --rule-strong: #d2d5d1;
  --brand: #153929;
  --brand-hover: #1e4a36;
  --brand-soft: #eaf4ef;
  --focus: #2d503f;
  --success: #2d6448;
  --danger: #b42318;
  --shadow-card: 0 1px 2px rgb(17 17 17 / 4%), 0 12px 32px -16px rgb(17 17 17 / 18%);
  --radius: 16px;
  --font: "Reddit Sans", "Avenir Next", "SF Pro Text", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
html[lang="zh"] body { font-family: "Reddit Sans", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

/* Top bar */
.topbar { position: sticky; top: 0; z-index: 10; background: rgb(247 248 248 / 88%); backdrop-filter: blur(12px); border-bottom: 1px solid var(--rule); }
.topbar-inner { max-width: 72rem; margin: 0 auto; padding: 0.75rem 1rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.product { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; min-width: 0; }
.product-mark { display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 9px; background: var(--brand); color: #ffffff; flex: none; }
.product-name { font-weight: 700; font-size: 1.05rem; letter-spacing: -0.01em; }
.product-by { color: var(--muted); font-size: 0.85rem; white-space: nowrap; }
.topbar-actions { display: flex; align-items: center; gap: 0.75rem; }
.live-pill { display: inline-flex; align-items: center; gap: 0.45rem; padding: 0.3rem 0.75rem; border-radius: 999px; background: var(--brand-soft); color: var(--brand); font-size: 0.8rem; font-weight: 600; white-space: nowrap; }
.live-dot { width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 3px rgb(45 100 72 / 18%); }
.lang { display: inline-flex; padding: 3px; border: 1px solid var(--rule); border-radius: 999px; background: var(--surface); }
.lang button { border: 0; background: transparent; padding: 0.25rem 0.65rem; border-radius: 999px; font: inherit; font-size: 0.8rem; font-weight: 600; color: var(--ink-2); cursor: pointer; }
.lang button[aria-pressed="true"] { background: var(--ink); color: #ffffff; }

/* Hero */
.page { max-width: 72rem; margin: 0 auto; padding: clamp(2rem, 6vw, 4.5rem) 1rem 3rem; display: grid; gap: clamp(3rem, 8vw, 5.5rem); }
.hero { display: grid; gap: 2.5rem; align-items: start; }
@media (min-width: 60rem) {
  .hero { grid-template-columns: minmax(0, 1fr) 27rem; gap: 4rem; }
  .hero-copy { padding-top: 1.5rem; }
}
.eyebrow { margin: 0 0 1rem; color: var(--brand); font-size: 0.9rem; font-weight: 600; }
h1 { margin: 0; font-size: clamp(2.4rem, 6vw, 3.75rem); line-height: 1.04; letter-spacing: -0.035em; font-weight: 700; text-wrap: balance; }
html[lang="zh"] h1 { letter-spacing: -0.01em; line-height: 1.15; }
.lead { margin: 1.25rem 0 0; max-width: 34rem; font-size: 1.15rem; color: var(--ink-2); text-wrap: pretty; }
.checks { margin: 2rem 0 0; padding: 0; list-style: none; display: grid; gap: 0.85rem; }
.checks li { display: flex; gap: 0.7rem; align-items: flex-start; color: var(--ink); }
.checks svg { flex: none; color: var(--success); margin-top: 0.1rem; }

/* Setup card */
.setup { display: grid; gap: 1.5rem; padding: clamp(1.25rem, 4vw, 1.75rem); background: var(--surface); border: 1px solid var(--rule); border-radius: 20px; box-shadow: var(--shadow-card); }
.setup-title { margin: 0; font-size: 1.25rem; letter-spacing: -0.015em; }
fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
legend { display: flex; align-items: center; gap: 0.55rem; margin-bottom: 0.75rem; padding: 0; font-weight: 600; font-size: 0.95rem; }
.step { display: grid; place-items: center; width: 1.4rem; height: 1.4rem; border-radius: 50%; background: var(--ink); color: #ffffff; font-size: 0.75rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.choices { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; }
.choice { position: relative; display: grid; align-content: start; gap: 0.2rem; padding: 0.9rem; border: 1.5px solid var(--rule); border-radius: 14px; background: var(--surface); cursor: pointer; transition: border-color 140ms ease, background-color 140ms ease; }
.choice:hover { border-color: var(--rule-strong); }
.choice input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.choice-badge { display: grid; place-items: center; width: 2.25rem; height: 2.25rem; margin-bottom: 0.45rem; border-radius: 10px; background: var(--paper-2); color: var(--ink-2); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.02em; }
.choice-title { font-weight: 600; line-height: 1.25; }
.choice-detail { color: var(--muted); font-size: 0.8rem; line-height: 1.3; }
.choice:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.choice:has(input:checked) .choice-badge { background: var(--brand); color: #ffffff; }
.choice:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }
@media (max-width: 20rem) {
  .choices { grid-template-columns: 1fr; }
}

.start { position: relative; display: flex; align-items: center; justify-content: center; gap: 0.5rem; width: 100%; min-height: 3.25rem; padding: 0 1.25rem; border: 0; border-radius: 14px; background: var(--brand); color: #ffffff; font: inherit; font-size: 1rem; font-weight: 700; cursor: pointer; transition: background-color 140ms ease, transform 140ms ease; }
.start:hover:not(:disabled) { background: var(--brand-hover); }
.start:active:not(:disabled) { transform: translateY(1px); }
.start:disabled { cursor: progress; opacity: 0.85; }
.start .spinner { display: none; width: 1.1rem; height: 1.1rem; border: 2px solid rgb(255 255 255 / 35%); border-top-color: #ffffff; border-radius: 50%; animation: spin 800ms linear infinite; }
.start.is-busy .spinner { display: block; }
.start.is-busy .start-arrow { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.error { margin: -0.5rem 0 0; min-height: 0; color: var(--danger); font-size: 0.9rem; }
.error:empty { display: none; }
.fineprint { margin: -0.5rem 0 0; color: var(--muted); font-size: 0.82rem; line-height: 1.45; }

/* Features */
.section-title { margin: 0 0 1.25rem; font-size: 1.35rem; letter-spacing: -0.02em; }
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(14.5rem, 1fr)); gap: 1rem; }
.feature { padding: 1.35rem; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); }
.feature-icon { display: grid; place-items: center; width: 2.6rem; height: 2.6rem; border-radius: 12px; background: var(--brand-soft); color: var(--brand); }
.feature h3 { margin: 1rem 0 0.35rem; font-size: 1.02rem; letter-spacing: -0.01em; }
.feature p { margin: 0; color: var(--ink-2); font-size: 0.93rem; }

/* Footer */
.footer { border-top: 1px solid var(--rule); }
.footer-inner { max-width: 72rem; margin: 0 auto; padding: 1.5rem 1rem 2.25rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 1.5rem; color: var(--muted); font-size: 0.85rem; }
.footer a { text-decoration: none; }
.footer a:hover { color: var(--ink); text-decoration: underline; }

@media (max-width: 40rem) {
  .product-by { display: none; }
  .live-pill { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
  .start.is-busy .spinner { border-top-color: rgb(255 255 255 / 35%); }
}
