/* PARAX i:prep — Design-System Chunk 7 (Handoff §3.7, spec T-044/T-052).
   Tokens sind FIX: Navy #0A0E1A, CTA #1E6FFF, Bebas Neue (Headlines),
   DM Sans (Body). WCAG: :focus-visible ist Pflicht. */

/* Schriften selbst gehostet (#71, DSGVO: kein Request an Google).
   Lizenz SIL OFL 1.1 — static/fonts/README.md. unicode-range wie Google
   (latin + latin-ext), damit nur das Noetige geladen wird. */
@font-face {
  font-family: 'Bebas Neue'; font-style: normal; font-weight: 400; font-display: swap;
  src: url('/static/fonts/bebas-neue-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Bebas Neue'; font-style: normal; font-weight: 400; font-display: swap;
  src: url('/static/fonts/bebas-neue-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'DM Sans'; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url('/static/fonts/dm-sans-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'DM Sans'; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url('/static/fonts/dm-sans-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --navy: #0A0E1A;
  --navy-2: #0F1628;
  --cta: #1E6FFF;
  --text: #F0F4FF;
  --text-muted: #A3B3CC;
  --text-dim: #8B9AB8;
  --danger: #E5484D;
  --ok: #46A758;
  --card: #121A30;
  --border: #24304D;
  --radius: 12px;
  --font-head: "Bebas Neue", "Arial Narrow", Impact, sans-serif;
  --font-body: "DM Sans", "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }

/* [hidden] muss IMMER gewinnen, auch gegen .btn { display: inline-block }
   & aehnliche Author-Regeln (sonst bleibt z.B. der Abmelden-Button sichtbar,
   obwohl niemand eingeloggt ist — Ticket #37, per Screenshot gefunden). */
[hidden] { display: none !important; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--navy);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.55;
}

h1, h2, h3 {
  font-family: var(--font-head);
  letter-spacing: 0.03em;
  font-weight: 400;
  margin: 0 0 0.5rem;
}
h1 { font-size: 2.6rem; }
h2 { font-size: 1.9rem; }

a { color: var(--cta); }

/* WCAG-Pflicht: sichtbarer Tastatur-Fokus auf ALLEN interaktiven Elementen */
:focus-visible {
  outline: 3px solid var(--cta);
  outline-offset: 2px;
  border-radius: 4px;
}

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

.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 700;
  border: none;
  border-radius: var(--radius);
  padding: 0.75rem 1.4rem;
  cursor: pointer;
  text-decoration: none;
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-primary { background: var(--cta); color: #fff; border-color: var(--cta); }
.btn-danger {
  background: transparent;
  color: var(--danger);
  border: 1px solid var(--danger);
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.card {
  background: linear-gradient(180deg, var(--navy-2), var(--navy));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

header.site {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
}
header.site .brand { font-family: var(--font-head); font-size: 1.5rem; }

.ai-notice {
  background: var(--navy-2);
  border-bottom: 1px solid var(--border);
  padding: 0.6rem 1.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
}

footer.site {
  border-top: 1px solid var(--border);
  color: var(--text-dim);
  padding: 1.5rem;
  text-align: center;
  font-size: 0.9rem;
}
footer.site a { color: var(--text-muted); margin: 0 0.5rem; }

/* ---------- Landing ---------- */

.hero { text-align: center; padding: 3.5rem 1rem 2.5rem; }
.hero p.sub { color: var(--text-muted); max-width: 60ch; margin: 0 auto 1.5rem; }

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  align-items: stretch;
}
.pack { position: relative; text-align: center; }
.pack .price { font-size: 2rem; font-weight: 700; margin: 0.5rem 0; }

/* Platzhalter (Handoff §3.7): Silhouette + gestrichelte Testimonials */
.placeholder-silhouette {
  width: 160px;
  height: 160px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 30%, #2A3555 28%, transparent 29%),
    radial-gradient(ellipse at 50% 85%, #2A3555 42%, transparent 43%),
    var(--navy-2);
  border: 1px solid var(--border);
}
.testimonial-card {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  color: var(--text-dim);
  background: transparent;
}

/* ---------- Chat-App (Zustaende) ---------- */

.chat-shell { display: grid; gap: 1rem; }
section[data-state] { display: none; }
section[data-state].visible { display: block; }

.chat-log {
  min-height: 320px;
  max-height: 55vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 1rem;
}
.msg { max-width: 72ch; padding: 0.6rem 0.9rem; border-radius: var(--radius); white-space: pre-wrap; }
.msg.user { align-self: flex-end; background: var(--cta); color: #fff; }
.msg.assistant { align-self: flex-start; background: var(--card); border: 1px solid var(--border); }

.session-counter { color: var(--text-dim); font-size: 0.9rem; }

.search-indicator {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text-dim);
  font-size: 14px;
}
.search-indicator .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--cta);
  animation: pulse 1.2s infinite ease-in-out;
}
@keyframes pulse { 0%, 100% { opacity: 0.25; } 50% { opacity: 1; } }

.chat-input { display: flex; gap: 0.6rem; }
.chat-input textarea {
  flex: 1;
  background: var(--navy-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font-body);
  padding: 0.7rem;
  min-height: 3rem;
  resize: vertical;
}

.state-note { color: var(--text-muted); }
.state-note strong { color: var(--text); }

/* Onboarding-Schritte */
.onboarding-steps { display: grid; gap: 0.8rem; counter-reset: step; }
.onboarding-steps [data-step] { padding-left: 0.4rem; }

/* ---------- Konto ---------- */

.account-grid { display: grid; gap: 1rem; }
.danger-zone { border-color: var(--danger); }
.danger-zone h2 { color: var(--danger); }
dialog {
  background: var(--navy-2);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  max-width: 48ch;
}
dialog::backdrop { background: rgba(4, 6, 12, 0.75); }

table.plain { width: 100%; border-collapse: collapse; }
table.plain td, table.plain th {
  text-align: left;
  padding: 0.45rem 0.5rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
}

/* ---------- Formulare (Ticket #37: Auth, CV-Upload) ---------- */

.form-field { display: grid; gap: 0.3rem; margin-bottom: 0.9rem; }
.form-field label { font-size: 0.9rem; color: var(--text-muted); }
.form-field input[type="email"],
.form-field input[type="password"],
.form-field input[type="text"],
.form-field input[type="file"] {
  background: var(--navy-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font-body);
  padding: 0.65rem 0.8rem;
  font-size: 1rem;
  width: 100%;
}

.consent-row {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin: 0.8rem 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}
.consent-row input[type="checkbox"] {
  margin-top: 0.2rem;
  width: 18px;
  height: 18px;
  accent-color: var(--cta);
  flex-shrink: 0;
}

.form-error { color: var(--danger); font-size: 0.9rem; min-height: 1.2em; }
.form-result { color: var(--ok); font-size: 0.9rem; min-height: 1.2em; }

.hint-box {
  border: 1px solid var(--border);
  background: var(--navy-2);
  border-radius: var(--radius);
  padding: 0.8rem 1rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0.9rem;
}

.auth-panel { margin-top: 1.5rem; border-top: 1px solid var(--border); padding-top: 1.5rem; }
.auth-tabs { display: flex; gap: 0.5rem; margin-bottom: 1.2rem; }
.auth-tab {
  flex: 1;
  background: var(--navy-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-muted);
  padding: 0.6rem;
  font-family: var(--font-body);
  font-weight: 700;
  cursor: pointer;
}
.auth-tab.active { background: var(--cta); color: #fff; border-color: var(--cta); }

.btn-link {
  background: transparent;
  border: none;
  color: var(--cta);
  text-decoration: underline;
  padding: 0.4rem 0;
  cursor: pointer;
  font-size: 0.9rem;
  display: block;
}

.cv-manager { margin-top: 1.5rem; border-top: 1px solid var(--border); padding-top: 1.5rem; }
.plain-list { list-style: none; padding: 0; display: grid; gap: 0.5rem; margin: 0.8rem 0 0; }
.plain-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.6rem;
  background: var(--navy-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.6rem 0.9rem;
}

/* ---------- Mobil (<= 480px, Ticket #37 Akzeptanzkriterium) ---------- */
@media (max-width: 480px) {
  header.site { flex-direction: column; align-items: flex-start; gap: 0.6rem; }
  header.site nav { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
  main { padding: 1rem; }
  .chat-input { flex-direction: column; }
  .auth-tabs { flex-direction: column; }
}

/* ---------- Status-Seiten (P-01 / I-06 / K-04) ---------- */

.status-page {
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0.6rem;
}
.status-page .headline { font-family: var(--font-body); font-weight: 700; font-size: 24px; }
.status-page .sub { color: var(--text-muted); max-width: 55ch; }

/* ---------- Rechtsseiten-Rendering (Ticket #59, eigener Block) ---------- */

main.legal-content {
  max-width: 70ch;
  padding-bottom: 3rem;
}
.legal-content h1 { font-size: 2.1rem; margin-top: 0; }
.legal-content h2 { font-size: 1.5rem; margin-top: 2rem; }
.legal-content h3 {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: normal;
  margin-top: 1.5rem;
}
.legal-content p,
.legal-content li { color: var(--text); line-height: 1.7; }
.legal-content ul,
.legal-content ol { padding-left: 1.3rem; }
.legal-content hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2rem 0;
}
.legal-content em:last-of-type {
  display: block;
  color: var(--text-dim);
  font-size: 0.85rem;
  margin-top: 2rem;
}

/* Tabellen mobil scrollbar (390px-Pflicht): Tabelle wird zum scrollenden
   Block, sobald sie breiter ist als der verfuegbare Platz. */
.legal-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.legal-content table th,
.legal-content table td {
  text-align: left;
  padding: 0.5rem 0.7rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.92rem;
  white-space: nowrap;
}
.legal-content table th { color: var(--text); font-weight: 700; }

@media (max-width: 480px) {
  .legal-content table th,
  .legal-content table td { font-size: 0.82rem; padding: 0.4rem 0.5rem; }
}

.transcript-msg { margin: 0 0 0.8rem; }
.transcript-text { margin: 0.2rem 0 0; white-space: pre-wrap; }
