/* GRID.Whisper – TOMORIS Brandguide.
   Core Blue #030f5c, Pulse Blue #004aff, Cloud White #eceff1, Fusion Orange #ed4a00.
   Nunito Sans mit System-Fallback (kein externes CDN). Font-Dateien koennen lokal unter
   /frontend/assets/fonts ergaenzt und hier per @font-face eingebunden werden. */

:root {
  --core-blue: #030f5c;
  --pulse-blue: #004aff;
  --cloud-white: #eceff1;
  --fusion-orange: #ed4a00;
  --ink: #0a1230;
  --muted: #5b6178;
  --surface: #ffffff;
  --border: #d7dbe4;
  --danger: #c0341d;
  --radius: 12px;
  --shadow: 0 10px 30px rgba(3, 15, 92, 0.08);
  --font: "Nunito Sans", "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font);
  color: var(--ink);
  background: linear-gradient(180deg, var(--cloud-white) 0%, #f7f8fb 100%);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.5;
}

/* Header */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem clamp(1rem, 4vw, 2.5rem);
  background: var(--core-blue);
  color: #fff;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: #fff;
}

.brand-mark {
  font-weight: 800;
  letter-spacing: 0.06em;
  font-size: 1.35rem;
}

.brand-dot {
  color: var(--fusion-orange);
}

.brand-tagline {
  font-size: 0.75rem;
  font-weight: 600;
  color: #b9c2e6;
  letter-spacing: 0.04em;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-link {
  color: #dfe4f5;
  text-decoration: none;
  font-weight: 600;
  padding: 0.5rem 0.9rem;
  border-radius: 8px;
  transition: background 0.15s, color 0.15s;
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.lang-toggle {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: #fff;
  font-family: inherit;
  font-weight: 700;
  border-radius: 8px;
  padding: 0.45rem 0.7rem;
  cursor: pointer;
  transition: background 0.15s;
}

.lang-toggle:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* Main / Cards */
.site-main {
  flex: 1;
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  padding: clamp(1.25rem, 4vw, 2.5rem) 1rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(1.25rem, 4vw, 2rem);
}

h1 {
  font-size: clamp(1.4rem, 4vw, 1.9rem);
  font-weight: 800;
  letter-spacing: 0.03em;
  margin: 0 0 0.5rem;
  color: var(--core-blue);
}

h2 {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--core-blue);
  margin: 0 0 0.75rem;
}

.intro {
  color: var(--muted);
  margin: 0 0 1.25rem;
}

/* Formularfelder */
.field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1.1rem;
}

.field-label {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--core-blue);
}

textarea,
input[type="text"],
input[type="password"],
select {
  font-family: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.7rem 0.8rem;
  width: 100%;
  transition: border-color 0.15s, box-shadow 0.15s;
}

textarea {
  resize: vertical;
  min-height: 120px;
}

textarea:focus,
input:focus,
select:focus {
  outline: none;
  border-color: var(--pulse-blue);
  box-shadow: 0 0 0 3px rgba(0, 74, 255, 0.15);
}

.counter {
  font-size: 0.8rem;
  color: var(--muted);
  align-self: flex-end;
}

.hint {
  font-size: 0.82rem;
  color: var(--muted);
}

.hint.accent {
  color: var(--fusion-orange);
  font-weight: 600;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

/* Buttons */
.btn {
  font-family: inherit;
  font-weight: 800;
  letter-spacing: 0.03em;
  font-size: 1rem;
  border: none;
  border-radius: 10px;
  padding: 0.8rem 1.2rem;
  cursor: pointer;
  transition: background 0.15s, transform 0.05s, opacity 0.15s;
}

.btn:disabled {
  opacity: 0.6;
  cursor: default;
}

.btn:active:not(:disabled) {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--pulse-blue);
  color: #fff;
  width: 100%;
}

.btn-primary:hover:not(:disabled) {
  background: #003ad1;
}

.btn-secondary {
  background: var(--cloud-white);
  color: var(--core-blue);
  border: 1px solid var(--border);
  width: 100%;
  margin-top: 0.5rem;
}

.btn-secondary:hover {
  background: #e2e6ec;
}

.btn-danger {
  background: var(--fusion-orange);
  color: #fff;
  width: 100%;
}

.btn-danger:hover:not(:disabled) {
  background: #cc3f00;
}

.btn-copy {
  background: var(--core-blue);
  color: #fff;
  padding: 0.7rem 1rem;
  white-space: nowrap;
}

.btn-copy.is-copied {
  background: #1c8a3b;
}

.btn-block {
  width: 100%;
  margin-top: 0.5rem;
}

/* Copy-Zeilen */
.copy-row {
  display: flex;
  gap: 0.5rem;
  align-items: stretch;
}

.copy-row input,
.copy-row textarea {
  flex: 1;
  font-family: "SFMono-Regular", "Consolas", "Liberation Mono", monospace;
  font-size: 0.9rem;
}

/* Meta / Anzeige */
.meta {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin: 0 0 1rem;
  padding: 0.9rem 1rem;
  background: var(--cloud-white);
  border-radius: 10px;
}

.meta div {
  display: flex;
  flex-direction: column;
}

.meta dt {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  font-weight: 700;
}

.meta dd {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--core-blue);
}

/* QR */
.qr-field {
  align-items: center;
}

.qr {
  width: 200px;
  max-width: 100%;
  padding: 0.75rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
}

.qr svg {
  display: block;
  width: 100%;
  height: auto;
}

/* Hinweise / Fehler */
.error {
  background: #fdecea;
  border: 1px solid #f4c7c0;
  color: var(--danger);
  padding: 0.75rem 0.9rem;
  border-radius: 10px;
  font-size: 0.92rem;
  margin-bottom: 1rem;
}

.notice {
  background: #e8f0ff;
  border: 1px solid #bcd2ff;
  color: var(--core-blue);
  padding: 0.75rem 0.9rem;
  border-radius: 10px;
  font-size: 0.92rem;
  font-weight: 600;
}

.notice-deleted {
  background: #fff1eb;
  border-color: #f6cbb6;
  color: var(--fusion-orange);
}

/* So funktioniert's */
.how ol {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--muted);
}

.how li {
  margin-bottom: 0.5rem;
}

/* Footer */
.site-footer {
  background: var(--core-blue);
  color: #cdd5ee;
  padding: 1.5rem clamp(1rem, 4vw, 2.5rem);
  text-align: center;
}

.footer-brand {
  font-weight: 800;
  letter-spacing: 0.05em;
  color: #fff;
  margin: 0 0 0.35rem;
}

.footer-zk {
  font-size: 0.8rem;
  max-width: 640px;
  margin: 0 auto;
  line-height: 1.5;
}

@media (max-width: 480px) {
  .grid-2 {
    grid-template-columns: 1fr;
  }
  .brand-tagline {
    display: none;
  }
}
