:root {
  --ink: #1a2e28;
  --ink-soft: #3d534b;
  --paper: #f3f7f4;
  --leaf: #2f6b56;
  --leaf-bright: #3d8f72;
  --accent: #c45c26;
  --line: rgba(26, 46, 40, 0.12);
  --shadow: 0 16px 40px rgba(26, 46, 40, 0.08);
  --radius: 14px;
  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Source Sans 3', system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
}

.bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 80% 50% at 10% -10%, rgba(61, 143, 114, 0.22), transparent 55%),
    radial-gradient(ellipse 60% 40% at 100% 0%, rgba(196, 92, 38, 0.12), transparent 50%),
    linear-gradient(180deg, #eef5f0 0%, var(--paper) 40%, #e8f0eb 100%);
}

.bg::after {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.35;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.4'/%3E%3C/svg%3E");
  pointer-events: none;
}

a {
  color: var(--leaf);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--accent);
}

.wrap {
  width: min(1080px, calc(100% - 2rem));
  margin-inline: auto;
}

.site-header {
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(8px);
  background: rgba(243, 247, 244, 0.7);
  position: sticky;
  top: 0;
  z-index: 10;
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--ink);
  text-decoration: none;
}

.brand span {
  color: var(--ink-soft);
  font-weight: 500;
}

.nav {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.nav a {
  text-decoration: none;
  font-weight: 600;
  color: var(--ink-soft);
}

.nav a:hover {
  color: var(--leaf);
}

.hero {
  padding: clamp(3rem, 10vw, 6rem) 0 clamp(2.5rem, 6vw, 4rem);
}

.hero-inner {
  max-width: 40rem;
  animation: rise 0.7s ease both;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.kicker {
  margin: 0 0 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.8rem;
  color: var(--leaf);
}

.brand-hero {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 8vw, 4.2rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.lead {
  margin: 0 0 1rem;
  font-size: 1.15rem;
  color: var(--ink-soft);
  max-width: 36rem;
}

.meta {
  margin: 0 0 1.5rem;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.cta-row {
  margin: 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  border: 1.5px solid transparent;
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--leaf);
  color: #fff;
}

.btn-primary:hover {
  background: var(--leaf-bright);
  color: #fff;
}

.btn-secondary {
  background: #fff;
  color: var(--ink);
  border-color: var(--line);
}

.btn-secondary:hover {
  border-color: var(--leaf);
  color: var(--leaf);
}

.btn-ghost {
  background: transparent;
  color: var(--leaf);
  border-color: transparent;
}

.section {
  padding: 2.5rem 0 4rem;
}

.section-top {
  padding-top: 2rem;
}

.section h2,
.page-title {
  font-family: var(--font-display);
  margin: 0 0 0.5rem;
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  letter-spacing: -0.02em;
}

.section-lead {
  margin: 0 0 1.75rem;
  color: var(--ink-soft);
  max-width: 40rem;
}

.crumb {
  margin: 0 0 0.75rem;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.cat-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}

.cat-card {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  height: 100%;
  padding: 1.25rem 1.35rem;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, transform 0.15s ease;
  animation: rise 0.55s ease both;
}

.cat-grid li:nth-child(2) .cat-card { animation-delay: 0.05s; }
.cat-grid li:nth-child(3) .cat-card { animation-delay: 0.1s; }
.cat-grid li:nth-child(4) .cat-card { animation-delay: 0.15s; }
.cat-grid li:nth-child(5) .cat-card { animation-delay: 0.2s; }
.cat-grid li:nth-child(6) .cat-card { animation-delay: 0.25s; }
.cat-grid li:nth-child(7) .cat-card { animation-delay: 0.3s; }

.cat-card:hover {
  border-color: var(--leaf);
  transform: translateY(-2px);
  color: inherit;
}

.cat-count {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.cat-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}

.cat-desc {
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.file-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.75);
  overflow: hidden;
}

.file-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.85rem;
  align-items: center;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--line);
}

.file-row:last-child {
  border-bottom: 0;
}

.file-kind {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  background: #e4eee8;
  color: var(--ink-soft);
  min-width: 4.2rem;
  text-align: center;
}

.kind-pdf { background: #f0d5c4; color: #8a3d16; }
.kind-html { background: #d8ebe2; color: #1f5c47; }
.kind-word { background: #d9e4f5; color: #2a4a7a; }
.kind-odt { background: #e8e0f5; color: #4a3a6e; }

.file-main {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.file-name {
  font-weight: 600;
  word-break: break-word;
}

.file-size {
  font-size: 0.85rem;
  color: var(--ink-soft);
}

.file-actions {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.site-footer {
  margin-top: auto;
  padding: 2rem 0;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.site-footer a {
  color: var(--ink-soft);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--leaf);
}

@media (max-width: 700px) {
  .file-row {
    grid-template-columns: auto 1fr;
  }

  .file-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }
}

/* Lernspiele */
.game-wrap {
  max-width: 40rem;
}

.exercise {
  margin-top: 1.25rem;
  padding: 1.35rem 1.4rem;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  animation: rise 0.45s ease both;
}

.exercise-intro {
  margin: 0 0 1rem;
  color: var(--ink-soft);
}

.help-toggle {
  display: inline-block;
  margin: 0 0 0.75rem;
  padding: 0;
  border: 0;
  background: none;
  color: var(--leaf);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.help-box {
  margin: 0 0 1rem;
  padding: 0.85rem 1rem;
  background: #e4eee8;
  border-radius: 10px;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.progress-pill {
  display: inline-block;
  margin: 0 0 0.85rem;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  background: #e4eee8;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--ink-soft);
}

.question {
  font-family: var(--font-display);
  font-size: 1.35rem;
  margin: 0 0 1rem;
  letter-spacing: -0.02em;
  line-height: 1.35;
  white-space: pre-wrap;
}

.option-grid {
  display: grid;
  gap: 0.65rem;
  margin-bottom: 1rem;
}

.option {
  text-align: left;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  border: 1.5px solid var(--line);
  background: #fff;
  font: inherit;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.12s ease;
}

.option:hover:not(:disabled) {
  border-color: var(--leaf);
  transform: translateY(-1px);
}

.option:disabled {
  cursor: default;
}

.option.correct {
  border-color: #1f7a4c;
  background: #e3f5eb;
}

.option.wrong {
  border-color: #a33b2c;
  background: #fceceb;
}

.feedback {
  margin: 0 0 0.5rem;
  font-weight: 700;
}

.feedback.ok {
  color: #1f7a4c;
}

.feedback.bad {
  color: #a33b2c;
}

.feedback-hint {
  margin: 0 0 1rem;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.success-banner {
  margin: 0 0 1.25rem;
  padding: 1rem 1.1rem;
  border-radius: 12px;
  background: #e3f5eb;
  color: #1f5c47;
  font-weight: 700;
  font-size: 1.1rem;
}

.error {
  color: #a33b2c;
  font-weight: 600;
}

.audio-row {
  margin: 0 0 1rem;
}

.dict-label {
  display: block;
  margin: 0 0 0.35rem;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.dict-input {
  display: block;
  width: 100%;
  margin: 0 0 1rem;
  padding: 0.75rem 1rem;
  font: inherit;
  font-size: 1.15rem;
  font-weight: 600;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
}

.dict-input:focus {
  outline: none;
  border-color: var(--leaf);
  box-shadow: 0 0 0 3px rgba(47, 107, 86, 0.15);
}

.dict-input:disabled {
  background: #eef5f0;
}
