/* Inphonia – Testtelefon
   Nachtindigo als Grund, Messing als einziger Akzent. Schriften liegen auf dem eigenen Server (DSGVO). */

@font-face {
  font-family: "Syne";
  src: url("fonts/syne.woff2") format("woff2-variations"), url("fonts/syne.woff2") format("woff2");
  font-weight: 400 800;
  font-display: swap;
}
@font-face {
  font-family: "Figtree";
  src: url("fonts/figtree.woff2") format("woff2-variations"), url("fonts/figtree.woff2") format("woff2");
  font-weight: 300 900;
  font-display: swap;
}

:root {
  --nacht: #1A1D3A;
  --nacht-tief: #13152B;
  --flaeche: #222650;
  --linie: #343A6B;
  --messing: #C8A45A;
  --messing-hell: #E2C98E;
  --porzellan: #ECEEF5;
  --nebel: #8C92B0;
  --salbei: #86BFA8;
  --rose: #E48A9A;

  --anzeige: "Syne", "Avenir Next", "Segoe UI", sans-serif;
  --text: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;

  --r-klein: 10px;
  --r-gross: 22px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

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

body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(1200px 700px at 22% 38%, #262A5C 0%, transparent 60%),
    var(--nacht);
  color: var(--porzellan);
  font: 400 1rem/1.55 var(--text);
}

button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--messing-hell); outline-offset: 3px; border-radius: 6px; }

.unsichtbar { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Kopf ---------- */

.kopf {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 22px clamp(16px, 4vw, 48px);
}
.marke { display: flex; align-items: center; gap: 10px; color: var(--porzellan); text-decoration: none; }
.zeichen { width: 34px; height: 34px; }
.zeichen rect, .zeichen circle { fill: var(--messing); }
.zeichen path { fill: none; stroke: var(--messing); stroke-width: 3; stroke-linecap: round; }
.wortmarke {
  font: 700 1.55rem/1 var(--anzeige);
  letter-spacing: 0.01em;
}
.kanzlei {
  margin: 0;
  padding-left: 18px;
  border-left: 1px solid var(--linie);
  color: var(--nebel);
  font-size: 0.9rem;
}
.kopf .leise { margin-left: auto; }

.leise {
  background: transparent;
  border: 1px solid var(--linie);
  border-radius: 999px;
  padding: 7px 16px;
  color: var(--porzellan);
  font-size: 0.9rem;
}
.leise:hover { border-color: var(--messing); }

.haupt {
  background: var(--messing);
  color: var(--nacht-tief);
  border: 0;
  border-radius: var(--r-klein);
  padding: 11px 20px;
  font-weight: 600;
}
.haupt:hover { background: var(--messing-hell); }

input, select {
  width: 100%;
  background: var(--nacht-tief);
  border: 1px solid var(--linie);
  border-radius: var(--r-klein);
  padding: 11px 14px;
}
input:focus, select:focus { border-color: var(--messing); outline: none; }

/* ---------- Anmeldung ---------- */

.anmeldung { flex: 1; display: grid; place-items: center; padding: 24px 16px 64px; }
.anmeldung-inhalt { max-width: 34rem; }
.anmeldung h1 {
  font: 700 clamp(2rem, 5vw, 3.2rem)/1.08 var(--anzeige);
  letter-spacing: -0.01em;
  margin: 0 0 18px;
}
.anmeldung p { color: var(--nebel); margin: 0 0 28px; max-width: 30rem; }
.anmeldung label { display: block; font-size: 0.9rem; margin-bottom: 6px; color: var(--nebel); }
.zeile { display: flex; gap: 10px; }

/* ---------- Bühne ---------- */

.buehne {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(0, 1.15fr);
  gap: clamp(24px, 4vw, 64px);
  padding: 8px clamp(16px, 4vw, 48px) 32px;
  align-items: start;
}

.anruf {
  position: sticky;
  top: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* Der Klangring – das eine große Element der Seite */
.ring {
  position: relative;
  width: min(440px, 82vw);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
}
#wellen { position: absolute; inset: 0; width: 100%; height: 100%; }

.knopf {
  position: relative;
  width: 38%;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 0;
  display: grid;
  place-items: center;
  font: 700 clamp(0.95rem, 2.4vw, 1.1rem)/1.2 var(--anzeige);
  transition: transform 0.15s ease, background-color 0.2s ease;
}
.knopf span { max-width: 7.5em; }
.knopf:active { transform: scale(0.97); }
.anrufen { background: var(--messing); color: var(--nacht-tief); box-shadow: 0 0 0 10px rgba(200, 164, 90, 0.12); }
.anrufen:hover { background: var(--messing-hell); }
.auflegen { background: var(--flaeche); color: var(--porzellan); border: 1px solid var(--rose); }
.auflegen:hover { background: #2B2F5E; }

.status {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 18px 0 4px;
  font-size: 1.05rem;
}
.light { width: 9px; height: 9px; border-radius: 50%; background: var(--linie); }
.light.listening { background: var(--salbei); }
.light.thinking { background: var(--messing); }
.light.speaking { background: var(--messing-hell); }
.zeit { color: var(--nebel); font-variant-numeric: tabular-nums; }

.mithoeren { min-height: 1.6em; margin: 0; color: var(--nebel); font-style: italic; max-width: 28rem; }

.messwerte {
  display: grid;
  grid-template-columns: repeat(3, auto);
  gap: 6px 28px;
  margin: 18px 0 0;
}
.messwerte dt { color: var(--nebel); font-size: 0.8rem; }
.messwerte dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }

.einstellungen {
  width: 100%;
  max-width: 24rem;
  margin-top: 24px;
  text-align: left;
  display: grid;
  gap: 6px;
}
.einstellungen label { font-size: 0.85rem; color: var(--nebel); margin-top: 8px; }
.hinweis { color: var(--nebel); font-size: 0.85rem; margin: 6px 0 0; }

/* ---------- Gesprächsverlauf ---------- */

.protokoll { display: flex; flex-direction: column; gap: 16px; min-width: 0; }

.verlauf {
  min-height: 46vh;
  max-height: 64vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 6px 4px 6px 0;
  scrollbar-color: var(--linie) transparent;
}
.verlauf .empty { margin: auto 0; max-width: 32rem; color: var(--nebel); }
.verlauf .empty .einladung {
  font: 700 clamp(1.5rem, 3vw, 2.1rem)/1.15 var(--anzeige);
  color: var(--porzellan);
  margin: 0 0 12px;
}

.msg { max-width: 88%; line-height: 1.5; }
.msg small { display: block; font-size: 0.8rem; color: var(--nebel); margin-bottom: 2px; }
.msg.nova {
  align-self: flex-start;
  padding-left: 14px;
  border-left: 2px solid var(--messing);
  font-size: 1.08rem;
}
.msg.you {
  align-self: flex-end;
  background: var(--flaeche);
  padding: 10px 14px;
  border-radius: 14px 14px 4px 14px;
}

/* Was Nova im Hintergrund erledigt: Akte, Kollisionsprüfung, Frist … */
.msg.sys {
  align-self: flex-start;
  max-width: 100%;
  font-size: 0.85rem;
  color: var(--nebel);
  padding: 3px 0 3px 14px;
  border-left: 2px dotted var(--linie);
}
.msg.sys::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 8px; vertical-align: 1px; background: var(--nebel); }
.msg.sys.ok::before { background: var(--salbei); }
.msg.sys.warn { color: var(--porzellan); }
.msg.sys.warn::before { background: var(--rose); }

.tippen { display: flex; gap: 10px; }

.durchstellen {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 18px 20px;
  border: 1px solid var(--messing);
  border-radius: var(--r-gross);
  background: rgba(200, 164, 90, 0.08);
}
.durchstellen h2 { font: 700 1.15rem/1.2 var(--anzeige); margin: 0 0 4px; }
.durchstellen p { margin: 0; color: var(--nebel); font-size: 0.9rem; }
.klingeln { width: 42px; height: 42px; flex: none; border-radius: 50%; background: var(--messing); position: relative; }
.klingeln::after { content: ""; position: absolute; inset: -7px; border-radius: 50%; border: 2px solid var(--messing); animation: klingeln 1.2s ease-out infinite; }
@keyframes klingeln { from { transform: scale(0.85); opacity: 1; } to { transform: scale(1.45); opacity: 0; } }

.notiz {
  background: var(--porzellan);
  color: var(--nacht-tief);
  border-radius: var(--r-gross);
  padding: 22px 24px;
}
.notiz header { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 10px; }
.notiz h2 { font: 700 1.2rem/1.2 var(--anzeige); margin: 0; }
.notiz .leise { color: var(--nacht-tief); border-color: #C5C9DA; }
.notiz pre { margin: 0; white-space: pre-wrap; font: 400 0.95rem/1.6 var(--text); }

.fehler { color: var(--rose); font-size: 0.95rem; margin: 0; }

.szenarien { border-top: 1px solid var(--linie); padding-top: 14px; }
.szenarien summary { cursor: pointer; font-weight: 600; }
.faelle { display: grid; gap: 10px; margin: 12px 0 18px; }
.faelle dt { font-weight: 600; }
.faelle dd { margin: 0; color: var(--nebel); font-size: 0.92rem; }
.tabelle { overflow-x: auto; margin-top: 14px; }
table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
caption { text-align: left; font-weight: 600; padding-bottom: 6px; }
th, td { text-align: left; padding: 6px 10px 6px 0; border-bottom: 1px solid var(--linie); white-space: nowrap; }
th { color: var(--nebel); font-weight: 500; }

.fuss { padding: 18px clamp(16px, 4vw, 48px); color: var(--nebel); font-size: 0.8rem; }

/* ---------- Kleine Bildschirme ---------- */

@media (max-width: 860px) {
  .buehne { grid-template-columns: 1fr; }
  .anruf { position: static; }
  .verlauf { min-height: 0; max-height: none; }
  .kanzlei { display: none; }
}
@media (max-width: 480px) {
  .messwerte { grid-template-columns: repeat(3, 1fr); gap: 6px 12px; }
  .zeile, .tippen { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  .klingeln::after { animation: none; }
  .knopf { transition: none; }
}
