/* styles.css */

/* Grundlayout */
:root {
  --color-bg: #f7fafc;
  --color-surface: #ffffff;
  --color-surface-alt: #eef7f6;
  --color-text: #1f2937;
  --color-muted: #64748b;
  --color-primary: #0f766e;
  --color-primary-light: #ccfbf1;
  --color-secondary: #7c3aed;
  --color-accent: #f59e0b;
  --color-border: #dbe4ea;
  --shadow-soft: 0 16px 40px rgba(15, 23, 42, 0.08);
  --radius-large: 24px;
  --radius-medium: 16px;
  --header-height: 74px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 24px);
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.7;
}

a {
  color: inherit;
  text-decoration: none;
}

p {
  margin: 0 0 1rem;
}

ul {
  margin: 0;
  padding-left: 1.2rem;
}

/* Navigation */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid var(--color-border);
  backdrop-filter: blur(14px);
}

.navbar {
  max-width: 1180px;
  height: 100%;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-weight: 800;
  color: var(--color-primary);
  letter-spacing: -0.03em;
  font-size: 1.2rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.nav-links a {
  display: inline-flex;
  padding: 0.55rem 0.8rem;
  border-radius: 999px;
  color: var(--color-muted);
  font-size: 0.95rem;
  transition: background 180ms ease, color 180ms ease;
}

.nav-links a:hover,
.nav-links a:focus {
  background: var(--color-primary-light);
  color: var(--color-primary);
}

/* Hero */
.hero {
  max-width: 1180px;
  min-height: calc(100vh - var(--header-height));
  margin: 0 auto;
  padding: 5rem 1.5rem 4rem;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: 3rem;
  align-items: center;
}

.hero-content {
  opacity: 0;
}

.eyebrow {
  display: inline-flex;
  margin-bottom: 1rem;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  background: var(--color-primary-light);
  color: var(--color-primary);
  font-weight: 700;
  font-size: 0.9rem;
}

.hero h1 {
  margin: 0 0 1.25rem;
  font-size: clamp(2.35rem, 6vw, 4.8rem);
  line-height: 1.05;
  letter-spacing: -0.06em;
}

.hero p {
  max-width: 660px;
  color: var(--color-muted);
  font-size: 1.12rem;
}

.hero-button {
  display: inline-flex;
  margin-top: 1rem;
  padding: 0.85rem 1.2rem;
  border-radius: 999px;
  background: var(--color-primary);
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 12px 24px rgba(15, 118, 110, 0.22);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.hero-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 30px rgba(15, 118, 110, 0.28);
}

.hero-graphic {
  position: relative;
  min-height: 360px;
  border-radius: var(--radius-large);
  background:
    radial-gradient(circle at 25% 25%, rgba(15, 118, 110, 0.18), transparent 32%),
    radial-gradient(circle at 80% 70%, rgba(124, 58, 237, 0.16), transparent 30%),
    #ffffff;
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  opacity: 0;
}

.cell-shape {
  position: absolute;
  border-radius: 999px;
  background: linear-gradient(135deg, #99f6e4, #14b8a6);
  opacity: 0.9;
}

.cell-large {
  width: 210px;
  height: 118px;
  left: 55px;
  top: 95px;
  transform: rotate(-18deg);
}

.cell-small {
  width: 130px;
  height: 78px;
  right: 48px;
  bottom: 64px;
  transform: rotate(24deg);
}

.virus-shape {
  position: absolute;
  width: 88px;
  height: 88px;
  right: 88px;
  top: 72px;
  border-radius: 50%;
  border: 8px solid var(--color-secondary);
  background: #ede9fe;
}

.virus-shape span {
  position: absolute;
  width: 12px;
  height: 34px;
  background: var(--color-secondary);
  border-radius: 999px;
  left: 50%;
  top: -28px;
  transform-origin: 50% 72px;
}

.virus-shape span:nth-child(1) {
  transform: translateX(-50%) rotate(0deg);
}

.virus-shape span:nth-child(2) {
  transform: translateX(-50%) rotate(120deg);
}

.virus-shape span:nth-child(3) {
  transform: translateX(-50%) rotate(240deg);
}

/* Hauptbereiche */
.content-section {
  max-width: 1180px;
  margin: 0 auto;
  padding: 5rem 1.5rem;
}

.section-alt {
  max-width: none;
  background: var(--color-surface-alt);
}

.section-alt > * {
  max-width: 1180px;
  margin-left: auto;
  margin-right: auto;
}

.section-header {
  margin-bottom: 1.75rem;
}

.section-number {
  display: inline-flex;
  margin-bottom: 0.5rem;
  color: var(--color-primary);
  font-weight: 800;
  letter-spacing: 0.08em;
}

.section-header h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.card-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: 1.5rem;
  align-items: stretch;
}

.info-card,
.visual-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-large);
  padding: 1.6rem;
  box-shadow: var(--shadow-soft);
}

.info-card h3,
.visual-card h3 {
  margin-top: 0;
  margin-bottom: 0.75rem;
  font-size: 1.35rem;
}

.full-width-card {
  width: 100%;
}

.caption {
  margin-top: 1rem;
  color: var(--color-muted);
  font-size: 0.95rem;
  text-align: center;
}

/* Tipp-Boxen */
.tip-button {
  margin-top: 0.5rem;
  padding: 0.7rem 1rem;
  border: none;
  border-radius: 999px;
  background: var(--color-primary);
  color: #ffffff;
  font-weight: 700;
  cursor: pointer;
  transition: background 180ms ease, transform 180ms ease;
}

.tip-button:hover {
  background: #115e59;
  transform: translateY(-1px);
}

.tip-box {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: var(--radius-medium);
  background: #f0fdfa;
  border: 1px solid #99f6e4;
  color: #134e4a;
}

/* Prokaryoten-Grafik */
.visual-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 320px;
}

.bacterium {
  position: relative;
  width: min(100%, 350px);
  height: 180px;
  margin: 0 auto;
  border-radius: 999px;
  background: linear-gradient(135deg, #99f6e4, #2dd4bf);
  border: 10px solid #0f766e;
  overflow: hidden;
}

.nucleoid {
  position: absolute;
  width: 130px;
  height: 70px;
  left: 105px;
  top: 52px;
  border: 4px dashed #134e4a;
  border-radius: 50%;
}

.plasmid {
  position: absolute;
  width: 32px;
  height: 32px;
  border: 4px solid #7c3aed;
  border-radius: 50%;
}

.plasmid-one {
  left: 62px;
  top: 48px;
}

.plasmid-two {
  right: 68px;
  bottom: 42px;
}

.ribosome {
  position: absolute;
  width: 14px;
  height: 14px;
  background: #f59e0b;
  border-radius: 50%;
}

.r1 {
  left: 80px;
  bottom: 45px;
}

.r2 {
  right: 110px;
  top: 38px;
}

.r3 {
  right: 52px;
  top: 88px;
}

/* Viren-Grafik */
.virus-visual {
  position: relative;
  overflow: hidden;
}

.virus-icon {
  position: absolute;
  left: 48px;
  top: 92px;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: #ede9fe;
  border: 8px solid var(--color-secondary);
}

.virus-core {
  position: absolute;
  inset: 24px;
  border-radius: 50%;
  background: var(--color-secondary);
}

.host-cell {
  position: absolute;
  right: 48px;
  top: 78px;
  width: 150px;
  height: 115px;
  border-radius: 48% 52% 56% 44%;
  background: linear-gradient(135deg, #fecaca, #f97316);
}

.moving-arrow {
  position: absolute;
  left: 45%;
  top: 92px;
  color: var(--color-primary);
  font-size: 3rem;
  font-weight: 900;
}

/* Gram-Vergleich */
.comparison {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.2rem;
  margin: 1.5rem 0;
}

.comparison-card {
  padding: 1.2rem;
  border-radius: var(--radius-medium);
  border: 1px solid var(--color-border);
  background: #ffffff;
}

.wall {
  width: 100%;
  border-radius: 999px;
  margin: 1rem 0 0.5rem;
}

.thick-wall {
  height: 44px;
  background: #8b5cf6;
}

.thin-wall {
  height: 16px;
  background: #8b5cf6;
}

.outer-membrane {
  width: 100%;
  height: 18px;
  margin-bottom: 0.7rem;
  border-radius: 999px;
  background: #f97316;
}

/* Reproduktion-Schritte */
.steps {
  display: grid;
  gap: 0.75rem;
}

.step {
  position: relative;
  padding: 0.9rem 1rem;
  border-radius: var(--radius-medium);
  background: #ffffff7a;
  border: 1px solid var(--color-border);
  font-weight: 800;
  color: var(--color-primary);
}

.step::after {
  content: "↓";
  display: block;
  margin-top: 0.45rem;
  color: var(--color-muted);
}

.step:last-child::after {
  content: "";
  margin: 0;
}

/* Lernhilfe */
.help-section {
  padding-bottom: 6rem;
}

.learning-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}

.learning-grid div {
  padding: 1rem;
  border-radius: var(--radius-medium);
  background: #f8fafc;
  border: 1px solid var(--color-border);
}

.learning-grid strong,
.learning-grid span {
  display: block;
}

.learning-grid strong {
  color: var(--color-primary);
}

.learning-grid span {
  color: var(--color-muted);
  font-size: 0.95rem;
}

/* Footer */
.footer {
  padding: 2rem 1.5rem;
  text-align: center;
  color: var(--color-muted);
  background: #ffffff;
  border-top: 1px solid var(--color-border);
}

/* Animation-Ausgangszustände */
.content-section .section-header,
.info-card,
.visual-card,
.comparison-card,
.learning-grid div,
.step {
  opacity: 0;
}

/* Responsive Design */
@media (max-width: 900px) {
  .site-header {
    height: auto;
  }

  .navbar {
    min-height: var(--header-height);
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 0.7rem;
    padding-top: 0.85rem;
    padding-bottom: 0.85rem;
  }

  .nav-links {
    flex-wrap: wrap;
  }

  .nav-links a {
    padding: 0.45rem 0.65rem;
    font-size: 0.9rem;
  }

  .hero {
    min-height: auto;
    grid-template-columns: 1fr;
    padding-top: 3rem;
  }

  .hero-graphic {
    min-height: 300px;
  }

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

  .content-section {
    padding-top: 4rem;
    padding-bottom: 4rem;
  }
}

@media (max-width: 560px) {
  body {
    line-height: 1.6;
  }

  .navbar,
  .hero,
  .content-section {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .info-card,
  .visual-card {
    padding: 1.2rem;
  }

  .hero h1 {
    font-size: 2.3rem;
  }

  .hero-graphic {
    display: none;
  }

  .virus-icon {
    left: 28px;
  }

  .host-cell {
    right: 28px;
    width: 120px;
  }
}
