/* ============================================
   OpenClaw Institut — style.css
   Dark theme, mobile-first, no frameworks
   ============================================ */

/* --- Reset & Base --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #0a0a0f;
  --bg-card: #12121a;
  --bg-card-hover: #1a1a28;
  --accent: #ff4757;
  --accent-hover: #ff6b7a;
  --text: #e8e8f0;
  --text-muted: #8888a0;
  --text-heading: #ffffff;
  --border: #2a2a3a;
  --radius: 12px;
  --radius-sm: 8px;
  --max-width: 1140px;
  --transition: 0.25s ease;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

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

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

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

h1, h2, h3, h4 {
  color: var(--text-heading);
  line-height: 1.3;
}

/* --- Container --- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(10, 10, 15, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.nav-logo {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-heading);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

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

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  list-style: none;
}

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

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-heading);
}

.nav-links .btn-login {
  background: var(--accent);
  color: #fff;
  padding: 0.45rem 1.1rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.85rem;
}

.nav-links .btn-login:hover {
  background: var(--accent-hover);
  color: #fff;
}

/* Hamburger */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  margin: 5px 0;
  transition: var(--transition);
  border-radius: 2px;
}

/* Mobile Nav */
@media (max-width: 768px) {
  .nav-toggle {
    display: block;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: rgba(10, 10, 15, 0.98);
    backdrop-filter: blur(12px);
    flex-direction: column;
    padding: 1.5rem;
    gap: 1rem;
    border-bottom: 1px solid var(--border);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-toggle.open span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .nav-toggle.open span:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle.open span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }
}

/* --- Hero --- */
.hero {
  padding: 10rem 0 5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(255, 71, 87, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 800;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.hero h1 span {
  color: var(--accent);
}

.hero .subtitle {
  font-size: clamp(1rem, 2.5vw, 1.3rem);
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 2.5rem;
}

.btn-primary {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: 0.85rem 2.2rem;
  border-radius: var(--radius-sm);
  font-size: 1.05rem;
  font-weight: 700;
  transition: all var(--transition);
  border: none;
  cursor: pointer;
}

.btn-primary:hover {
  background: var(--accent-hover);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(255, 71, 87, 0.3);
}

.btn-secondary {
  display: inline-block;
  background: transparent;
  color: var(--text);
  padding: 0.85rem 2.2rem;
  border-radius: var(--radius-sm);
  font-size: 1.05rem;
  font-weight: 600;
  border: 1px solid var(--border);
  transition: all var(--transition);
  cursor: pointer;
}

.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* --- Sections --- */
.section {
  padding: 5rem 0;
}

.section-alt {
  background: var(--bg-card);
}

.section-title {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  text-align: center;
  margin-bottom: 0.75rem;
}

.section-subtitle {
  text-align: center;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 3rem;
  font-size: 1.05rem;
}

/* --- Grid --- */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

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

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

@media (min-width: 640px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 900px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

/* --- Cards --- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  transition: all var(--transition);
}

.card:hover {
  border-color: var(--accent);
  background: var(--bg-card-hover);
  transform: translateY(-4px);
}

.card-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
  display: block;
}

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

.card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Section-alt cards (on darker bg) */
.section-alt .card {
  background: var(--bg);
}

.section-alt .card:hover {
  background: var(--bg-card-hover);
}

/* --- Pricing --- */
.pricing-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem 2rem;
  text-align: center;
  transition: all var(--transition);
  position: relative;
}

.pricing-card:hover {
  transform: translateY(-4px);
}

.pricing-card.featured {
  border-color: var(--accent);
  box-shadow: 0 0 40px rgba(255, 71, 87, 0.1);
}

.pricing-card.featured::before {
  content: 'Beliebt';
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: #fff;
  padding: 0.2rem 1rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.pricing-name {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.pricing-price {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--text-heading);
  margin-bottom: 0.25rem;
}

.pricing-price small {
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--text-muted);
}

.pricing-desc {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

.pricing-features {
  list-style: none;
  text-align: left;
  margin-bottom: 2rem;
}

.pricing-features li {
  padding: 0.4rem 0;
  font-size: 0.9rem;
  color: var(--text);
}

.pricing-features li::before {
  content: '✓ ';
  color: var(--accent);
  font-weight: 700;
}

/* --- Schulungen --- */
.training-card {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  transition: all var(--transition);
}

.training-card:hover {
  border-color: var(--accent);
}

.training-icon {
  font-size: 2.5rem;
  flex-shrink: 0;
}

.training-card h3 {
  font-size: 1.15rem;
  margin-bottom: 0.4rem;
}

.training-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

@media (max-width: 640px) {
  .training-card {
    flex-direction: column;
    gap: 0.75rem;
  }
}

/* --- Testimonials --- */
.testimonial-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 640px) {
  .testimonial-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 900px) {
  .testimonial-grid { grid-template-columns: repeat(3, 1fr); }
}

.testimonial {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  font-style: italic;
  color: var(--text-muted);
}

.testimonial .author {
  margin-top: 1rem;
  font-style: normal;
  font-weight: 600;
  color: var(--text);
  font-size: 0.9rem;
}

.testimonial .role {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 400;
}

/* --- Footer --- */
.footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding: 3rem 0 1.5rem;
  margin-top: 2rem;
}

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

@media (min-width: 640px) {
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 900px) {
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr 1fr;
  }
}

.footer h4 {
  font-size: 0.95rem;
  margin-bottom: 1rem;
  color: var(--text-heading);
}

.footer p {
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.7;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.4rem;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 0.85rem;
}

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

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.8rem;
}

/* --- Legal Pages --- */
.legal {
  padding: 8rem 0 4rem;
}

.legal h1 {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  margin-bottom: 0.5rem;
}

.legal .legal-subtitle {
  color: var(--text-muted);
  margin-bottom: 3rem;
  font-size: 1rem;
}

.legal h2 {
  font-size: 1.3rem;
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.legal h3 {
  font-size: 1.05rem;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

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

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

.legal li {
  margin-bottom: 0.4rem;
}

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

.legal strong {
  color: var(--text);
}

.legal-content {
  max-width: 800px;
}

/* --- Contact section --- */
.contact-info {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: center;
}

.contact-item {
  text-align: center;
  min-width: 200px;
}

.contact-item .icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.contact-item h3 {
  font-size: 1rem;
  margin-bottom: 0.3rem;
}

.contact-item p,
.contact-item a {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* --- Badge / Tag --- */
.badge {
  display: inline-block;
  background: rgba(255, 71, 87, 0.1);
  color: var(--accent);
  padding: 0.2rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
}

/* --- Scroll to top indicator --- */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: var(--accent);
  color: #fff;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  opacity: 0;
  pointer-events: none;
  transition: all var(--transition);
  z-index: 900;
  border: none;
  cursor: pointer;
}

.back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
}

/* --- Utilities --- */
.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

/* --- Animations --- */
@media (prefers-reduced-motion: no-preference) {
  .card, .pricing-card, .training-card, .testimonial {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 0.5s ease forwards;
  }

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

  .grid-2 > :nth-child(1), .grid-3 > :nth-child(1), .grid-4 > :nth-child(1),
  .testimonial-grid > :nth-child(1) { animation-delay: 0.05s; }
  .grid-2 > :nth-child(2), .grid-3 > :nth-child(2), .grid-4 > :nth-child(2),
  .testimonial-grid > :nth-child(2) { animation-delay: 0.1s; }
  .grid-3 > :nth-child(3), .grid-4 > :nth-child(3),
  .testimonial-grid > :nth-child(3) { animation-delay: 0.15s; }
  .grid-4 > :nth-child(4) { animation-delay: 0.2s; }
}
