/* ============================================================
   Gripsprompter – Design System
   ============================================================ */

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

:root {
  color-scheme: dark;

  /* Farben */
  --bg:        #0d1210;
  --bg-2:      #111814;
  --panel:     #161e1a;
  --panel-2:   #1c2720;
  --panel-3:   #222e28;
  --text:      #eeeae0;
  --muted:     #96a099;
  --faint:     rgba(238,234,224,0.06);
  --line:      rgba(238,234,224,0.10);
  --line-2:    rgba(238,234,224,0.16);

  /* Akzente */
  --gold:      #d6b56d;
  --gold-2:    #f0d08e;
  --gold-glow: rgba(214,181,109,0.18);
  --sage:      #8fb7a3;
  --sage-dim:  rgba(143,183,163,0.14);
  --danger:    #e49a8f;

  /* Schatten */
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.28);
  --shadow-md: 0 8px 32px rgba(0,0,0,0.36);
  --shadow-lg: 0 24px 72px rgba(0,0,0,0.48);

  /* Radius */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 18px;

  /* Übergänge */
  --t: 180ms ease;
  --t-fast: 100ms ease;

  font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-feature-settings: "cv02","cv03","cv04","cv11";
}

/* ── Reset & Basis ───────────────────────────────────────── */
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

img { max-width: 100%; height: auto; display: block; }

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--t);
}

h1, h2, h3, h4 {
  margin: 0;
  line-height: 1.12;
  letter-spacing: -0.02em;
}

p { margin: 0; }

/* ── Skip Link ───────────────────────────────────────────── */
.skip-link {
  position: absolute;
  left: 16px;
  top: -56px;
  padding: 10px 18px;
  background: var(--gold);
  color: #13100a;
  font-weight: 700;
  border-radius: var(--r-sm);
  z-index: 100;
  transition: top var(--t);
}
.skip-link:focus { top: 14px; }

/* ── Header ──────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 68px;
  padding: 0 clamp(20px, 4vw, 60px);
  background: rgba(13,18,16, 0.82);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.01em;
}
.brand img { width: 34px; height: 34px; }
.brand span { color: var(--text); }

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav a {
  padding: 6px 14px;
  border-radius: 100px;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  transition: color var(--t), background var(--t);
}
.nav a:hover,
.nav a:focus-visible { color: var(--text); background: var(--faint); }
.nav a.active { color: var(--gold); }

/* ── Hero ────────────────────────────────────────────────── */
.hero {
  display: grid;
  grid-template-columns: 1fr min(44%, 520px);
  align-items: center;
  gap: clamp(32px, 6vw, 80px);
  min-height: calc(100svh - 68px);
  padding: clamp(48px, 8vw, 96px) clamp(20px, 4vw, 60px) 56px;
}

.hero-copy { max-width: 780px; }

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  padding: 5px 14px;
  border: 1px solid rgba(214,181,109,0.3);
  border-radius: 100px;
  background: rgba(214,181,109,0.08);
  color: var(--gold);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.kicker::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 8px var(--gold);
}

h1 {
  font-size: clamp(44px, 6.5vw, 88px);
  background: linear-gradient(135deg, var(--text) 0%, var(--muted) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.lead {
  margin-top: 22px;
  color: var(--muted);
  font-size: clamp(17px, 1.8vw, 21px);
  line-height: 1.65;
  max-width: 640px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 36px;
}

/* Vertrauens-Badges */
.trust-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
  margin-top: 40px;
  color: var(--muted);
  font-size: 13px;
}
.trust-row span {
  display: flex;
  align-items: center;
  gap: 6px;
}
.trust-row span::before {
  content: '✓';
  color: var(--sage);
  font-weight: 700;
}

/* Hero Visual */
.hero-visual {
  position: relative;
  align-self: stretch;
  min-height: 400px;
  border-radius: var(--r-lg);
  background:
    radial-gradient(ellipse 80% 60% at 50% 30%, rgba(214,181,109,0.12) 0%, transparent 70%),
    radial-gradient(ellipse 60% 80% at 30% 80%, rgba(143,183,163,0.10) 0%, transparent 70%),
    var(--panel);
  border: 1px solid var(--line-2);
  box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255,255,255,0.06);
  display: grid;
  place-items: center;
  overflow: hidden;
}
.hero-visual::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(255,255,255,0.015) 2px,
    rgba(255,255,255,0.015) 4px
  );
  pointer-events: none;
}
.hero-visual img {
  position: relative;
  z-index: 1;
  width: min(55vw, 320px);
  filter: drop-shadow(0 0 40px rgba(214,181,109,0.22)) drop-shadow(0 20px 40px rgba(0,0,0,0.5));
}

/* ── Buttons ─────────────────────────────────────────────── */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 24px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line-2);
  background: var(--panel-2);
  color: var(--text);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--t), border-color var(--t), transform var(--t-fast), box-shadow var(--t);
  white-space: nowrap;
}
.button:hover,
.button:focus-visible {
  background: var(--panel-3);
  border-color: var(--line-2);
  box-shadow: var(--shadow-sm);
}
.button:active { transform: scale(0.97); }
.button:disabled { opacity: 0.45; cursor: not-allowed; transform: none !important; }

.button.primary {
  background: var(--gold);
  border-color: var(--gold);
  color: #13100a;
  box-shadow: 0 0 0 0 rgba(214,181,109,0);
}
.button.primary:hover,
.button.primary:focus-visible {
  background: var(--gold-2);
  border-color: var(--gold-2);
  box-shadow: 0 0 24px rgba(214,181,109,0.3);
}

.button.ghost {
  background: transparent;
  border-color: var(--line);
}
.button.ghost:hover,
.button.ghost:focus-visible {
  background: var(--faint);
  border-color: var(--line-2);
}

.button.sm {
  min-height: 38px;
  padding: 8px 16px;
  font-size: 14px;
}

/* ── Bands / Sections ────────────────────────────────────── */
main { min-height: calc(100svh - 68px); }

.band {
  padding: clamp(56px, 8vw, 96px) clamp(20px, 4vw, 60px);
  border-top: 1px solid var(--line);
}
.band.alt { background: var(--bg-2); }
.band.dark {
  background: linear-gradient(180deg, var(--bg-2) 0%, var(--bg) 100%);
}

.inner { width: min(1160px, 100%); margin: 0 auto; }

.section-head {
  max-width: 680px;
  margin-bottom: 40px;
}
.section-head h2 { margin-bottom: 14px; }
.section-head p { color: var(--muted); font-size: 18px; line-height: 1.65; }

/* ── Grid / Cards ────────────────────────────────────────── */
.grid { display: grid; gap: 16px; }
.grid-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }

.card {
  position: relative;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--panel);
  transition: border-color var(--t), transform var(--t), box-shadow var(--t), background var(--t);
  overflow: hidden;
}
.card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 0% 0%, rgba(214,181,109,0.06) 0%, transparent 60%);
  opacity: 0;
  transition: opacity var(--t);
}
.card:hover { border-color: rgba(214,181,109,0.25); background: var(--panel-2); }
.card:hover::before { opacity: 1; }

.card h2, .card h3 { margin-bottom: 12px; }
.card p { color: var(--muted); line-height: 1.65; }

.card.feature {
  padding: 32px;
  border-color: var(--line-2);
}

.card.highlight {
  background: linear-gradient(135deg, rgba(214,181,109,0.08) 0%, transparent 60%), var(--panel);
  border-color: rgba(214,181,109,0.22);
}

.price {
  display: block;
  font-size: 42px;
  font-weight: 800;
  color: var(--gold);
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 4px;
}
.price-note {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 20px;
}

/* ── Chat Shell ──────────────────────────────────────────── */
.chat-shell {
  display: grid;
  grid-template-columns: min(340px, 30%) minmax(0,1fr);
  min-height: calc(100svh - 68px);
}

.chat-aside {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 32px clamp(16px, 2.5vw, 32px);
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, var(--bg-2) 0%, var(--bg) 100%);
  overflow-y: auto;
}
.chat-aside .kicker { align-self: flex-start; }
.chat-aside h1 { font-size: clamp(26px, 3vw, 36px); }
.chat-aside p { color: var(--muted); font-size: 15px; line-height: 1.65; }

.notice {
  padding: 12px 16px;
  border-radius: var(--r-sm);
  background: var(--faint);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.status-bar {
  padding: 10px 14px;
  border-radius: var(--r-sm);
  background: var(--faint);
  border: 1px solid var(--line);
  font-size: 13px;
  color: var(--muted);
}
.status-bar.warn { border-color: rgba(214,181,109,0.3); color: var(--gold); }

/* ── Chat Hauptbereich ───────────────────────────────────── */
.chat-main {
  display: flex;
  flex-direction: column;
  height: calc(100svh - 68px);
  min-height: 0;
  background: var(--bg);
  overflow: hidden;
}

.messages {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 32px clamp(20px, 4vw, 56px);
  overflow-y: auto;
  scroll-behavior: smooth;
  flex: 1 1 0;
  min-height: 0;
}

.message {
  max-width: min(720px, 88%);
  padding: 16px 20px;
  border-radius: var(--r-md);
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 16px;
  line-height: 1.65;
  animation: msg-in 240ms ease both;
}

@keyframes msg-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.message.assistant {
  align-self: flex-start;
  background: var(--panel);
  border: 1px solid var(--line);
  border-bottom-left-radius: 4px;
}

.message.user {
  align-self: flex-end;
  background: linear-gradient(135deg, #1e3028, #243629);
  border: 1px solid rgba(143,183,163,0.18);
  border-bottom-right-radius: 4px;
  color: var(--text);
}

/* Tipp-Indikator */
.message.typing {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 18px 22px;
  min-width: 64px;
}
.typing-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--muted);
  animation: typing-bounce 1.2s ease infinite;
}
.typing-dot:nth-child(2) { animation-delay: 0.18s; }
.typing-dot:nth-child(3) { animation-delay: 0.36s; }
@keyframes typing-bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30%            { transform: translateY(-5px); opacity: 1; }
}

/* Chat Eingabe */
.chat-form {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 12px;
  padding: 16px clamp(20px, 4vw, 56px) 20px;
  border-top: 1px solid var(--line);
  background: rgba(13,18,16, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* ── Formulare / Inputs ──────────────────────────────────── */
textarea,
input[type="text"],
input[type="password"] {
  display: block;
  width: 100%;
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  background: rgba(255,255,255,0.03);
  color: var(--text);
  font: inherit;
  transition: border-color var(--t), background var(--t), box-shadow var(--t);
  outline: none;
}
textarea:focus,
input[type="text"]:focus,
input[type="password"]:focus {
  border-color: rgba(143,183,163,0.5);
  background: rgba(255,255,255,0.04);
  box-shadow: 0 0 0 3px rgba(143,183,163,0.08);
}

textarea {
  min-height: 52px;
  max-height: 160px;
  resize: none;
  padding: 14px 16px;
  line-height: 1.55;
  field-sizing: content;
}
input[type="text"],
input[type="password"] {
  min-height: 46px;
  padding: 10px 14px;
}

label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 8px;
}

/* ── Code Panel ──────────────────────────────────────────── */
.code-panel {
  padding: 22px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-md);
  background: var(--panel);
}
.code-panel h2 {
  font-size: 18px;
  margin-bottom: 16px;
  color: var(--text);
}
.code-panel form { display: grid; gap: 10px; }

.code-status {
  margin-top: 10px;
  font-size: 14px;
  color: var(--muted);
  min-height: 20px;
  transition: color var(--t);
}
.code-status.ok { color: var(--sage); }
.code-status.error { color: var(--danger); }

/* ── Starter Chips ───────────────────────────────────────── */
.starter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 4px 0 8px;
  align-self: flex-start;
  max-width: min(720px, 88%);
}
.starter-chip {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border: 1px solid var(--line-2);
  border-radius: 100px;
  background: var(--panel);
  color: var(--muted);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
  transition: background var(--t), border-color var(--t), color var(--t);
  text-align: left;
}
.starter-chip:hover {
  background: var(--panel-2);
  border-color: rgba(214,181,109,0.3);
  color: var(--text);
}

/* ── Footer ──────────────────────────────────────────────── */
.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 24px clamp(20px, 4vw, 60px);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}
.footer-links { display: flex; gap: 20px; }
.footer-links a:hover { color: var(--text); }

/* ── Legal Seiten ────────────────────────────────────────── */
.legal {
  width: min(840px, 100%);
  margin: 0 auto;
  padding: clamp(48px, 7vw, 80px) clamp(20px, 4vw, 60px);
}
.legal h1 { margin-bottom: 12px; }
.legal h2 {
  font-size: 22px;
  margin-top: 40px;
  margin-bottom: 12px;
  color: var(--text);
}
.legal p, .legal li {
  color: var(--muted);
  line-height: 1.75;
}
.legal p + p { margin-top: 14px; }
.legal ul {
  margin: 12px 0;
  padding-left: 24px;
}
.legal ul li + li { margin-top: 8px; }
.legal a { color: var(--sage); border-bottom: 1px solid transparent; }
.legal a:hover { border-color: var(--sage); }

/* ── Divider ─────────────────────────────────────────────── */
.divider {
  height: 1px;
  background: var(--line);
  margin: 0;
}

/* ── Accessibility ───────────────────────────────────────── */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

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

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 900px) {
  .site-header {
    position: static;
    flex-direction: column;
    align-items: flex-start;
    min-height: auto;
    padding: 14px 20px;
    gap: 10px;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: clamp(36px, 6vw, 56px);
    gap: 36px;
  }
  .hero-visual { min-height: 220px; }

  .grid-3, .grid-2 { grid-template-columns: 1fr; }

  .chat-shell { grid-template-columns: 1fr; }
  .chat-aside {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    max-height: none;
  }
  .chat-main { min-height: 60svh; }
  .chat-form { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .actions { flex-direction: column; }
  .button { width: 100%; }
  .trust-row { flex-direction: column; align-items: flex-start; gap: 10px; }
}
