:root {
  --paper: #fbfaf6;
  --ink: #172e3a;
  --muted: #586e73;
  --teal: #0b8792;
  --green: #27833d;
  --gold: #e0aa2d;
  --pale: #edf5f2;
  --line: #a8babc;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
}

.hero {
  position: relative;
  overflow: hidden;
  color: white;
  background: #087f89 url("assets/hero-materialinsel.png") center / cover no-repeat;
  border-top: 12px solid var(--gold);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(5,76,84,.9) 0%, rgba(7,103,111,.72) 42%, rgba(7,105,110,.12) 72%);
}

.hero__inner, main, footer {
  width: min(1080px, calc(100% - 40px));
  margin-inline: auto;
}

.hero__inner { position: relative; z-index: 1; padding: 82px 0 88px; }

.eyebrow {
  margin: 0 0 10px;
  font-size: .78rem;
  font-weight: 850;
  letter-spacing: .14em;
}

.teal { color: var(--teal); }

h1, h2, h3 { margin-top: 0; line-height: 1.12; }
h1 { margin-bottom: 18px; font-size: clamp(3rem, 9vw, 6.8rem); letter-spacing: -.055em; }
h2 { font-size: clamp(1.8rem, 4vw, 2.7rem); }
h3 { margin-bottom: 12px; font-size: clamp(1.5rem, 3vw, 2rem); }
.lead { max-width: 700px; margin: 0; font-size: clamp(1.05rem, 2vw, 1.3rem); }

main { padding: 68px 0 90px; }

.intro {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: end;
  gap: 36px;
  margin-bottom: 42px;
  padding-bottom: 24px;
  border-bottom: 2px solid var(--teal);
}
.intro h2 { margin-bottom: 0; }
.intro > p { margin: 0; color: var(--muted); }

.subject-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 72px;
}

.subject-tile {
  --accent: var(--teal);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-height: 350px;
  padding: 18px 18px 20px;
  color: var(--ink);
  background: white;
  border: 1px solid var(--line);
  border-top: 6px solid var(--accent);
  border-radius: 20px;
  box-shadow: 0 12px 34px rgba(23,46,58,.07);
  text-decoration: none;
  transition: transform .16s ease, box-shadow .16s ease;
}
.subject-tile:hover, .subject-tile:focus-visible { transform: translateY(-4px); box-shadow: 0 18px 42px rgba(23,46,58,.13); }
.subject-tile:focus-visible { outline: 4px solid var(--gold); outline-offset: 3px; }
.subject-tile__image { width: 100%; height: 190px; margin: 0 auto 12px; object-fit: contain; }
.subject-tile__text { display: grid; gap: 7px; }
.subject-tile__text strong { font-size: 1.08rem; line-height: 1.2; }
.subject-tile__text small { color: var(--muted); font-size: .93rem; }
.subject-tile__arrow { align-self: flex-end; margin-top: auto; color: var(--accent); font-size: 1.8rem; font-weight: 800; }
.subject-tile.geschichte { --accent: #a65d38; }
.subject-tile.gl { --accent: #24778e; }
.subject-tile.deutsch { --accent: #8d4e86; }
.subject-tile.politik { --accent: #466a3b; }

.project-section { margin: 0 0 72px; }
.project-section__heading { margin-bottom: 28px; }
.project-feature {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(290px, .75fr);
  overflow: hidden;
  color: white;
  background: #19324a;
  border-radius: 24px;
  box-shadow: 0 16px 42px rgba(23,46,58,.16);
  text-decoration: none;
  transition: transform .16s ease, box-shadow .16s ease;
}
.project-feature:hover, .project-feature:focus-visible { transform: translateY(-4px); box-shadow: 0 22px 50px rgba(23,46,58,.22); }
.project-feature:focus-visible { outline: 4px solid var(--gold); outline-offset: 4px; }
.project-feature > img { width: 100%; height: 360px; object-fit: cover; }
.project-feature__content { display: flex; flex-direction: column; justify-content: center; padding: 44px; }
.project-feature__content .eyebrow { color: #d8c18d; }
.project-feature__content strong { font-size: clamp(2rem, 4vw, 3.2rem); line-height: 1.02; }
.project-feature__content small { margin-top: 15px; color: #dce9e7; font-size: 1.05rem; }
.project-feature__link { margin-top: 34px; color: #f0c96a; font-weight: 850; }

.project-downloads { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 30px; }
.project-downloads .download-button { min-width: 0; }
.source-note { margin-top: 24px; padding: 18px 20px; color: var(--muted); background: var(--pale); border-left: 5px solid var(--gold); border-radius: 0 12px 12px 0; }

.breadcrumb { margin: 0 0 34px; }
.breadcrumb a { color: var(--teal); font-weight: 750; text-decoration: none; }
.fach-intro { display: grid; grid-template-columns: 82px 1fr; gap: 24px; align-items: center; margin-bottom: 42px; }
.fach-icon { display: grid; place-items: center; width: 82px; height: 82px; background: #eef6f3; border: 1px solid var(--line); border-radius: 22px; overflow: hidden; }
.fach-icon img { width: 100%; height: 100%; object-fit: contain; }
.fach-intro h2 { margin-bottom: 7px; }
.fach-intro p { margin: 0; color: var(--muted); }

.grade-list { display: grid; gap: 16px; }
.grade {
  overflow: hidden;
  background: white;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 8px 26px rgba(23,46,58,.05);
}
.grade summary { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 22px 26px; cursor: pointer; list-style: none; font-size: 1.2rem; font-weight: 850; }
.grade summary::-webkit-details-marker { display: none; }
.grade summary::after { content: "+"; display: grid; place-items: center; width: 34px; height: 34px; color: white; background: var(--fach-accent, var(--teal)); border-radius: 50%; font-size: 1.35rem; }
.grade[open] summary::after { content: "−"; }
.grade[open] summary { border-bottom: 1px solid var(--line); }
.grade__content { padding: 24px 26px 28px; background: #fdfdfb; }
.empty { margin: 0; padding: 22px; color: var(--muted); background: var(--pale); border-radius: 12px; }
.theme { padding: 24px; background: white; border-left: 6px solid var(--fach-accent, var(--teal)); border-radius: 12px; box-shadow: 0 8px 22px rgba(23,46,58,.05); }
.theme + .theme { margin-top: 18px; }
.theme h3 { margin-bottom: 8px; font-size: 1.35rem; }
.theme p { color: var(--muted); }
.download-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }
.download-button {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-width: 245px;
  padding: 14px 17px;
  color: white;
  background: var(--green);
  border: 2px solid transparent;
  border-radius: 12px;
  font-weight: 850;
  text-decoration: none;
  box-shadow: 0 7px 18px rgba(23,46,58,.12);
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.download-button:hover, .download-button:focus-visible { transform: translateY(-2px); box-shadow: 0 11px 25px rgba(23,46,58,.18); }
.download-button:focus-visible { outline: 4px solid var(--gold); outline-offset: 3px; }
.download-button--standard:hover { background: #17672c; }
.download-button--inclusive { background: var(--teal); }
.download-button--inclusive:hover { background: #066c74; }
.download-button--media { color: var(--ink); background: #f5d77f; border-color: #d5a523; }
.download-button--media:hover { background: #edc958; }
.download-button--parent { background: #6e568b; }
.download-button--parent:hover { background: #594371; }
.download-button__text { display: grid; gap: 2px; line-height: 1.2; }
.download-button__text strong { font-size: .98rem; }
.download-button__text small { font-size: .76rem; font-weight: 650; opacity: .88; }
.download-button__icon { font-size: 1.35rem; }

.material-card {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr auto;
  position: relative;
  overflow: hidden;
  background: white;
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: 0 16px 45px rgba(23,46,58,.08);
}

.material-card__tag {
  position: absolute;
  top: 0;
  left: 0;
  padding: 8px 20px;
  color: #694d06;
  background: #fff2c9;
  border-bottom-right-radius: 14px;
  font-size: .75rem;
  font-weight: 850;
  letter-spacing: .1em;
}

.material-card__content { padding: 60px 48px 42px; }
.material-card__content p { max-width: 680px; color: var(--muted); }
.material-card__content ul { padding-left: 1.2rem; }

.download {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-width: 235px;
  padding: 32px;
  color: white;
  background: var(--green);
  font-weight: 850;
  text-decoration: none;
  transition: background .15s ease, transform .15s ease;
}
.download:hover, .download:focus-visible { background: #17672c; }
.download:focus-visible { outline: 4px solid var(--gold); outline-offset: -6px; }
.download span { font-size: 1.6rem; }

.coming-soon {
  padding: 44px;
  background: var(--pale);
  border-left: 8px solid var(--gold);
  border-radius: 0 20px 20px 0;
}
.coming-soon h2 { margin-bottom: 8px; }
.coming-soon p:last-child { margin-bottom: 0; color: var(--muted); }

footer {
  padding: 26px 0 38px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: .9rem;
}

@media (max-width: 720px) {
  .hero__inner { padding: 58px 0 64px; }
  main { padding-top: 48px; }
  .intro { grid-template-columns: 1fr; gap: 12px; }
  .subject-grid { grid-template-columns: 1fr; }
  .subject-tile { min-height: 0; padding: 20px; }
  .subject-tile__image { height: 210px; }
  .fach-intro { grid-template-columns: 62px 1fr; }
  .fach-icon { width: 62px; height: 62px; border-radius: 17px; }
  .material-card { grid-template-columns: 1fr; }
  .material-card__content { padding: 58px 26px 28px; }
  .download { min-width: 0; padding: 22px; }
  .coming-soon { padding: 30px 26px; }
  .project-feature { grid-template-columns: 1fr; }
  .project-feature > img { height: 250px; }
  .project-feature__content { padding: 30px 26px; }
  .project-downloads { grid-template-columns: 1fr; }
}

@media (min-width: 721px) and (max-width: 1040px) {
  .subject-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .subject-tile { min-height: 360px; }
  .subject-tile:last-child { grid-column: 1 / -1; }
}
