/* Demo page for the KI-Rezeptionist. One screen: the call button is the product. Tokens first, states on [data-state],
   the button's halo follows Mona's voice level (--level from app.js). No external fonts, no images, no scripts but ours. */
:root {
  --ink: #182130;
  --ink-2: #4a5566;
  --paper: #f5f1ea;
  --paper-2: #ffffff;
  --line: #d9d2c5;
  --accent: #c8611a;
  --accent-ink: #ffffff;
  --live: #1f8a5b;
  --speak: #2a62c9;
  --warn: #b3261e;
  --radius: 14px;
  --shadow: 0 1px 2px rgb(24 33 48 / 0.06), 0 8px 24px -12px rgb(24 33 48 / 0.25);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ink: #ece7de;
    --ink-2: #a9b2bf;
    --paper: #131922;
    --paper-2: #1b232e;
    --line: #2d3744;
    --accent: #e3853d;
    --accent-ink: #141a22;
    --live: #3fbf86;
    --speak: #6a9af0;
    --warn: #ff7b72;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.4), 0 8px 24px -12px rgb(0 0 0 / 0.6);
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}
a { color: inherit; text-decoration-color: color-mix(in srgb, var(--ink) 35%, transparent); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--accent); }
h1, h2 { margin: 0; line-height: 1.15; letter-spacing: -0.015em; }
h2 { font-size: 1.0625rem; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font: inherit; color: inherit; }
button:focus-visible { outline: 3px solid var(--speak); outline-offset: 3px; }

.top, main, footer {
  width: 100%;
  max-width: 58rem;
  margin-inline: auto;
  padding-inline: max(1rem, env(safe-area-inset-left));
}
.top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding-block: 1rem;
  font-size: 0.875rem;
}
.brand { font-weight: 650; text-decoration: none; }
.tag { color: var(--ink-2); white-space: nowrap; }

main { flex: 1; display: grid; gap: 2.5rem; padding-block: 1.5rem 3rem; }

.hero { display: grid; gap: 1rem; }
.eyebrow { color: var(--ink-2); font-size: 0.875rem; }
h1 { font-size: clamp(2.125rem, 5vw + 1rem, 3.5rem); font-weight: 720; }
.lede { font-size: 1.125rem; color: var(--ink-2); max-width: 36em; }

/* the call: button + status + mute */
.call { display: grid; gap: 0.75rem; justify-items: start; padding-top: 0.75rem; }
.call-button {
  --halo: var(--accent);
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  width: min(100%, 22rem);
  min-height: 3.75rem;
  padding: 0 1.5rem 0 1.25rem;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 1.125rem;
  font-weight: 650;
  cursor: pointer;
  box-shadow: var(--shadow), 0 0 0 calc(var(--level, 0) * 22px) color-mix(in srgb, var(--halo) 22%, transparent);
  transition: box-shadow 120ms linear, transform 120ms ease, background 200ms ease;
}
.call-button:hover { transform: translateY(-1px); }
.call-button:active { transform: translateY(0); }
.call-button .label { text-align: left; }
.dot {
  flex: none;
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.9;
}
.status { color: var(--ink-2); font-size: 0.9375rem; min-height: 1.5em; max-width: 36em; }
.ghost {
  padding: 0.5rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  font-size: 0.875rem;
  cursor: pointer;
}
.ghost[aria-pressed="true"] { background: var(--line); }

/* states */
.call[data-state="starting"] .call-button { background: var(--ink-2); --halo: var(--ink-2); }
.call[data-state="starting"] .dot { animation: blink 900ms ease-in-out infinite; }
.call[data-state="listening"] .call-button { background: var(--live); --halo: var(--live); color: #fff; }
.call[data-state="listening"] .dot { animation: breathe 2.4s ease-in-out infinite; }
.call[data-state="speaking"] .call-button { background: var(--speak); --halo: var(--speak); color: #fff; }
.call[data-state="ending"] .call-button { background: var(--ink-2); --halo: var(--ink-2); }
.call[data-state="ended"] .call-button,
.call[data-state="error"] .call-button { background: var(--paper-2); color: var(--ink); border: 1.5px solid var(--line); --halo: var(--line); }
.call[data-state="ended"] .dot { background: var(--live); }
.call[data-state="error"] .dot { background: var(--warn); }
.call[data-state="error"] .status { color: var(--warn); }
@keyframes blink { 50% { opacity: 0.25; } }
@keyframes breathe { 50% { transform: scale(1.35); opacity: 0.6; } }
@media (prefers-reduced-motion: reduce) {
  .call-button, .dot { animation: none !important; transition: none; }
}

/* transcript */
.transcript {
  display: grid;
  gap: 0.5rem;
  padding: 1rem 1.125rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper-2);
  box-shadow: var(--shadow);
}
.transcript h2 { font-size: 0.8125rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-2); }
.transcript ol { display: grid; gap: 0.5rem; max-height: 18rem; overflow-y: auto; scroll-behavior: smooth; }
.transcript li { display: grid; grid-template-columns: 3.25rem 1fr; gap: 0.5rem; font-size: 0.9375rem; }
.transcript li b { color: var(--ink-2); font-weight: 600; }
.transcript li[data-role="assistant"] b { color: var(--speak); }
.transcript ol:empty::before { content: "Das Gespräch erscheint hier als Text."; color: var(--ink-2); font-size: 0.9375rem; }

/* what Mona does / examples */
.grid { display: grid; gap: 1.5rem; }
@media (min-width: 46rem) { .grid { grid-template-columns: 1.2fr 1fr; gap: 2rem; } }
.grid article { display: grid; gap: 0.75rem; align-content: start; }
.checks { display: grid; gap: 0.5rem; }
.checks li { position: relative; padding-left: 1.75rem; color: var(--ink); }
.checks li::before {
  content: "";
  position: absolute;
  left: 0.125rem;
  top: 0.45em;
  width: 0.55rem;
  height: 0.9rem;
  border: solid var(--live);
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg) translateY(-15%);
}
.examples { display: grid; gap: 0.5rem; }
.examples li {
  padding: 0.625rem 0.875rem;
  border-left: 3px solid var(--accent);
  background: var(--paper-2);
  border-radius: 0 10px 10px 0;
  color: var(--ink);
}

/* disclosure */
.notice {
  display: grid;
  gap: 0.5rem;
  padding: 1rem 1.125rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink-2);
  font-size: 0.9375rem;
}
.notice h2 { color: var(--ink); }

footer { padding-block: 1.25rem 2rem; color: var(--ink-2); font-size: 0.875rem; border-top: 1px solid var(--line); }
