/* ============================================
   Sawa Engineering — Dark Theme
   ============================================ */

:root {
  --bg-primary: #0a0f1a;
  --bg-secondary: #111827;
  --bg-card: #0f1629;
  --text-primary: #e8edf5;
  --text-secondary: #94a3b8;
  --accent: #00d4ff;
  --accent-dim: rgba(0, 212, 255, 0.2);
  --accent-glow: rgba(0, 212, 255, 0.08);
  --border: rgba(0, 212, 255, 0.15);
  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  --max-width: 1140px;
  --radius: 12px;
  --transition: 0.3s ease;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-main);
  line-height: 1.7;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* Grid background */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image:
    linear-gradient(rgba(0, 212, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 212, 255, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: 0;
}

/* ---- Layout ---- */

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  position: relative;
  z-index: 1;
}

section {
  padding: 5rem 0;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: opacity var(--transition);
}

a:hover {
  opacity: 0.8;
}

/* ---- Navigation ---- */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  background: rgba(10, 15, 26, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-logo {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.nav-logo span {
  color: var(--accent);
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color var(--transition);
}

.nav-links a:hover {
  color: var(--accent);
  opacity: 1;
}

/* ---- Hero ---- */

.hero {
  padding: 10rem 0 6rem;
  text-align: center;
}

.hero-badge {
  display: inline-block;
  padding: 0.35rem 1rem;
  border: 1px solid var(--accent-dim);
  border-radius: 999px;
  font-size: 0.8rem;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 1.5rem;
  background: var(--accent-glow);
}

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 1.25rem;
}

.hero h1 .highlight {
  background: linear-gradient(135deg, var(--accent), #7c3aed);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 1.2rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 2.5rem;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 2rem;
  background: var(--accent);
  color: var(--bg-primary);
  font-weight: 600;
  border-radius: 8px;
  font-size: 1rem;
  transition: transform var(--transition), box-shadow var(--transition);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 212, 255, 0.25);
  opacity: 1;
}

/* ---- Chat Mockup ---- */

.chat-section {
  padding: 4rem 0;
}

.chat-section h2 {
  text-align: center;
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.chat-section .subtitle {
  text-align: center;
  color: var(--text-secondary);
  margin-bottom: 3rem;
}

.chat-window {
  max-width: 700px;
  margin: 0 auto;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.chat-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  background: rgba(0, 212, 255, 0.03);
}

.chat-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #7c3aed);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
}

.chat-header-info strong {
  display: block;
  font-size: 0.9rem;
}

.chat-header-info span {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.chat-messages {
  padding: 1.5rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-height: 280px;
}

.msg {
  max-width: 80%;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  font-size: 0.9rem;
  line-height: 1.5;
  opacity: 0;
  transform: translateY(8px);
  animation: msgIn 0.4s ease forwards;
}

.msg-user {
  align-self: flex-end;
  background: rgba(0, 212, 255, 0.12);
  border: 1px solid var(--accent-dim);
  color: var(--text-primary);
}

.msg-assistant {
  align-self: flex-start;
  background: var(--bg-card);
  border: 1px solid var(--border);
}

.msg-assistant .source {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-family: var(--font-mono);
}

.msg:nth-child(1) { animation-delay: 0.2s; }
.msg:nth-child(2) { animation-delay: 0.8s; }
.msg:nth-child(3) { animation-delay: 1.6s; }
.msg:nth-child(4) { animation-delay: 2.4s; }

@keyframes msgIn {
  to { opacity: 1; transform: translateY(0); }
}

.typing-indicator {
  display: flex;
  gap: 4px;
  padding: 0.75rem 1rem;
  align-self: flex-start;
  opacity: 0;
  animation: msgIn 0.4s ease forwards;
  animation-delay: 3.2s;
}

.typing-indicator span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-secondary);
  animation: blink 1.4s infinite;
}

.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }

@keyframes blink {
  0%, 60%, 100% { opacity: 0.3; }
  30% { opacity: 1; }
}

/* ---- Focus Cards ---- */

.focus-section h2 {
  text-align: center;
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.focus-section .subtitle {
  text-align: center;
  color: var(--text-secondary);
  margin-bottom: 3rem;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 12px 40px rgba(0, 212, 255, 0.08);
}

.card-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: var(--accent-glow);
  border: 1px solid var(--accent-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  font-size: 1.3rem;
}

.card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* ---- Profil ---- */

.profil-section {
  text-align: center;
}

.profil-section h2 {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.profil-section .subtitle {
  color: var(--text-secondary);
  margin-bottom: 2.5rem;
}

.profil-box {
  max-width: 600px;
  margin: 0 auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem;
}

.profil-box h3 {
  font-size: 1.3rem;
  margin-bottom: 0.25rem;
}

.profil-box .role {
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 1.25rem;
}

.profil-box p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* ---- Kontakt ---- */

.kontakt-section {
  text-align: center;
}

.kontakt-section h2 {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.kontakt-section .subtitle {
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

.kontakt-email {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--accent);
}

/* ---- Footer ---- */

.footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 1rem;
}

.footer-links a {
  color: var(--text-secondary);
  font-weight: 500;
}

.footer-links a:hover {
  color: var(--accent);
}

/* ---- Scroll Animations ---- */

.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---- Legal Pages ---- */

.legal-page {
  padding: 8rem 0 4rem;
}

.legal-page h1 {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 2rem;
}

.legal-page h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  color: var(--accent);
}

.legal-page p,
.legal-page li {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 0.75rem;
}

.legal-page ul {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.legal-page a {
  color: var(--accent);
}

/* ---- Responsive ---- */

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  section {
    padding: 3.5rem 0;
  }

  .hero {
    padding: 7rem 0 4rem;
  }

  .card-grid {
    grid-template-columns: 1fr;
  }

  .msg {
    max-width: 90%;
  }

  .footer-links {
    flex-direction: column;
    gap: 0.75rem;
  }
}
