/* KrotiBot download page. Colours come from the app: ink pills for actions, each bot's bubble tone, the
   private desktop wallpaper's sky blue and the chief's tangerine. No web fonts: the system's own CJK faces. */
:root {
  --sky: #eef3ff;
  --sky-deep: #dce7ff;
  --paper: #ffffff;
  --ink: #1a2238;
  --muted: #586379;
  --line: #d6deef;
  --tangerine: #f2802e;
  --focus: #2f6feb;
  --tone-chief: #fde3cf;
  --tone-tinglan: #dbe7ff;
  --tone-bohe: #d7f2e6;
  --sans: "HarmonyOS Sans SC", "MiSans", "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", "Noto Sans CJK SC",
    "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--ink);
  background:
    radial-gradient(60rem 32rem at 82% -6rem, rgba(242, 128, 46, 0.13), transparent 70%),
    linear-gradient(180deg, var(--sky) 0, var(--sky) 30rem, var(--paper) 52rem);
  background-repeat: no-repeat;
  min-height: 100vh;
}

img { display: block; }

a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -3rem;
  padding: 0.5rem 0.875rem;
  background: var(--ink);
  color: var(--paper);
  border-radius: 999px;
  text-decoration: none;
}
.skip:focus { top: 1rem; }

/* Header */
.top {
  max-width: 72rem;
  margin: 0 auto;
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  font-weight: 700;
  font-size: 1.0625rem;
  text-decoration: none;
}
.brand img { border-radius: 9px; }
.lang {
  font: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  min-width: 2.75rem;
  min-height: 2rem;
  padding: 0.125rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--ink);
  cursor: pointer;
}
.lang:hover { background: var(--paper); }

main { max-width: 72rem; margin: 0 auto; padding: 0 1.5rem; }

/* Hero: the pitch and the download on the left, the bots introducing themselves on the right. */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 4rem;
  align-items: center;
  padding: 3.5rem 0 5rem;
}

h1 {
  margin: 0;
  font-size: clamp(2.5rem, 5.4vw, 4.25rem);
  line-height: 1.14;
  font-weight: 800;
  letter-spacing: -0.015em;
  text-wrap: balance;
}
html[lang="en"] h1 { letter-spacing: -0.03em; line-height: 1.04; }

.lede {
  margin: 1.5rem 0 0;
  max-width: 34em;
  font-size: 1.1875rem;
  color: var(--muted);
}
html[lang="en"] .lede { max-width: 36em; }

.get { margin-top: 2.25rem; }

.primary {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  min-height: 3.25rem;
  padding: 0.75rem 1.75rem 0.75rem 1.375rem;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-size: 1.0625rem;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 10px 24px -12px rgba(26, 34, 56, 0.65);
  transition: background-color 120ms ease, transform 120ms ease;
}
.primary:hover { background: #2b3552; }
.primary:active { transform: translateY(1px); }
.primary:focus-visible { border-radius: 999px; }

.meta { margin: 0.875rem 0 0; font-size: 0.9375rem; color: var(--muted); }
.alt { margin: 0.25rem 0 0; font-size: 0.9375rem; color: var(--muted); }
.alt a { color: var(--ink); font-weight: 600; text-underline-offset: 3px; }
.quiet { color: var(--muted); }
.alt .quiet { margin-left: 0.25rem; }

/* The chat window, drawn like the app's own conversation view. */
.chat {
  margin: 0;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: 0 30px 70px -34px rgba(47, 111, 235, 0.45), 0 2px 0 rgba(26, 34, 56, 0.03);
  overflow: hidden;
}
.chat-bar {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.75rem 1.125rem;
  border-bottom: 1px solid #edf1f8;
  background: #fafbfe;
}
.dot { width: 0.625rem; height: 0.625rem; border-radius: 50%; background: #dfe5f0; }
.chat-title { margin-left: 0.625rem; font-size: 0.875rem; font-weight: 600; color: var(--muted); }

.thread { list-style: none; margin: 0; padding: 1.5rem 1.25rem 1.75rem; display: grid; gap: 1.125rem; }

.msg { display: grid; grid-template-columns: 3.5rem minmax(0, 1fr); gap: 0.75rem; align-items: start; }
.msg[data-tone="chief"] { --tone: var(--tone-chief); }
.msg[data-tone="tinglan"] { --tone: var(--tone-tinglan); }
.msg[data-tone="bohe"] { --tone: var(--tone-bohe); }
.face {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  background: var(--tone);
  object-fit: cover;
}
.msg b { display: block; font-size: 0.8125rem; font-weight: 700; color: var(--muted); line-height: 1.4; margin-bottom: 0.25rem; }
.msg p {
  margin: 0;
  display: inline-block;
  padding: 0.625rem 0.9375rem;
  background: var(--tone);
  border-radius: 4px 18px 18px 18px;
  font-size: 0.96875rem;
  line-height: 1.65;
  max-width: 26em;
}

/* One orchestrated moment: the bots speak in turn when the page opens. */
.js .thread .msg { opacity: 0; transform: translateY(8px); }
.js .thread.play .msg { animation: speak 420ms cubic-bezier(0.2, 0.7, 0.2, 1) forwards; }
.js .thread.play .msg:nth-child(1) { animation-delay: 350ms; }
.js .thread.play .msg:nth-child(2) { animation-delay: 1250ms; }
.js .thread.play .msg:nth-child(3) { animation-delay: 2150ms; }
.js .thread.play .msg:nth-child(4) { animation-delay: 3050ms; }
@keyframes speak { to { opacity: 1; transform: none; } }

/* Steps: a real sequence, so it is numbered. */
.steps, .facts { padding: 4rem 0; border-top: 1px solid var(--line); }
h2 { margin: 0 0 2rem; font-size: 1.75rem; line-height: 1.3; font-weight: 800; letter-spacing: -0.01em; }

.steps ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2.5rem;
  counter-reset: step;
}
.steps li { counter-increment: step; position: relative; padding-top: 3.5rem; }
.steps li::before {
  content: counter(step);
  position: absolute;
  top: 0;
  left: 0;
  width: 2.25rem;
  height: 2.25rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 2px solid var(--tangerine);
  color: var(--ink);
  font-weight: 800;
  font-size: 1rem;
  line-height: 1;
}
h3 { margin: 0 0 0.5rem; font-size: 1.125rem; line-height: 1.45; font-weight: 700; }
.steps p { margin: 0; color: var(--muted); max-width: 30em; }

/* A small likeness of the SmartScreen choices, so people recognise them. */
.steps .smartscreen {
  margin-top: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.625rem 0.875rem;
  background: #1f5fa8;
  color: #ffffff;
  border-radius: 4px;
  font-family: "Segoe UI", var(--sans);
  font-size: 0.875rem;
}
.ss-link { text-decoration: underline; text-underline-offset: 3px; }
.ss-then { opacity: 0.75; }
.ss-button { padding: 0.125rem 0.75rem; border: 1px solid rgba(255, 255, 255, 0.85); }

/* Facts */
.facts dl { margin: 0; display: grid; }
.facts dl > div {
  display: grid;
  grid-template-columns: 9rem minmax(0, 1fr);
  gap: 1.5rem;
  padding: 1rem 0;
  border-bottom: 1px solid #e9eef7;
}
.facts dl > div:first-child { padding-top: 0; }
.facts dt { font-weight: 700; }
.facts dd { margin: 0; color: var(--muted); max-width: 44em; }
.sum-row { display: grid; grid-template-columns: 5.5rem minmax(0, 1fr); gap: 0.75rem; align-items: baseline; }
.sum-row + .sum-row { margin-top: 0.375rem; }
code {
  font-family: "Cascadia Mono", Consolas, ui-monospace, monospace;
  font-size: 0.8125rem;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.foot {
  max-width: 72rem;
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
  border-top: 1px solid var(--line);
  font-size: 0.875rem;
  color: var(--muted);
}
.foot p { margin: 0 0 0.25rem; max-width: 46em; }
.foot a { text-underline-offset: 3px; }

@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; gap: 3rem; padding: 2rem 0 4rem; }
  .steps ol { grid-template-columns: 1fr; gap: 2rem; }
  .steps li { padding-top: 0; padding-left: 3.25rem; }
}

@media (max-width: 560px) {
  body { font-size: 1rem; }
  .top, main, .foot { padding-left: 1.125rem; padding-right: 1.125rem; }
  .lede { font-size: 1.0625rem; }
  .primary { width: 100%; justify-content: center; }
  .thread { padding: 1.25rem 0.875rem 1.5rem; }
  .facts dl > div { grid-template-columns: 1fr; gap: 0.25rem; }
  .sum-row { grid-template-columns: 1fr; gap: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .js .thread .msg { opacity: 1; transform: none; animation: none !important; }
  .primary { transition: none; }
}

[hidden] { display: none !important; }
