:root {
  color-scheme: light;
  --ink: #18212b;
  --muted: #586575;
  --paper: #f6f4ef;
  --white: #fff;
  --line: rgba(24, 33, 43, .14);
  --blue: #087db3;
  --green: #467650;
  --clay: #a95032;
  --gold: #b88b2b;
  --shadow: 0 18px 48px rgba(24, 33, 43, .14);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); }
a { color: inherit; -webkit-tap-highlight-color: rgba(8, 125, 179, .18); }

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 10;
  border-bottom: 1px solid rgba(24, 33, 43, .1);
  background: rgba(238, 233, 222, .86);
  backdrop-filter: blur(18px) saturate(1.12);
  color: var(--ink);
  box-shadow: 0 10px 32px rgba(24, 33, 43, .08);
}

.nav {
  width: min(1160px, calc(100% - 32px));
  min-height: 64px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  min-width: 0;
  max-width: 100%;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
  overflow-wrap: anywhere;
}
.nav-links { display: flex; align-items: center; gap: 18px; font-size: .92rem; }
.nav-links a { text-decoration: none; opacity: .74; }
.nav-links a:hover, .nav-links a:focus-visible { opacity: 1; text-decoration: underline; text-underline-offset: 5px; }

.hero {
  min-height: 88vh;
  display: grid;
  align-items: end;
  position: relative;
  overflow: hidden;
  color: var(--white);
  background:
    linear-gradient(90deg, rgba(8, 12, 16, .86) 0%, rgba(8, 12, 16, .56) 43%, rgba(8, 12, 16, .16) 100%),
    linear-gradient(0deg, rgba(8, 12, 16, .44), rgba(8, 12, 16, .1)),
    url("../sportunterricht_eu.jpg") center / cover no-repeat;
}

.hero-inner {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
  padding: 120px 0 72px;
}

.eyebrow {
  margin: 0 0 18px;
  color: rgba(255, 255, 255, .78);
  font-size: .86rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
}

h1 {
  max-width: 860px;
  margin: 0;
  font-size: clamp(3.4rem, 9vw, 8.8rem);
  line-height: .88;
}

.hero-copy {
  max-width: 720px;
  margin: 26px 0 0;
  color: rgba(255, 255, 255, .86);
  font-size: clamp(1.08rem, 2vw, 1.34rem);
  line-height: 1.56;
  overflow-wrap: anywhere;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.button {
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 6px;
  padding: 0 18px;
  background: var(--white);
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 10px 28px rgba(0, 0, 0, .18);
}
.button.secondary { background: rgba(255, 255, 255, .08); color: var(--white); box-shadow: none; }
.button:hover, .button:focus-visible { transform: translateY(-1px); }

.section { width: min(1160px, calc(100% - 32px)); margin: 0 auto; padding: 72px 0; }
.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 430px);
  gap: 36px;
  align-items: end;
  margin-bottom: 30px;
}
h2 { margin: 0; font-size: clamp(2rem, 4vw, 4.25rem); line-height: 1; }
.section-heading p { margin: 0; color: var(--muted); line-height: 1.65; font-size: 1.02rem; }

.link-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.resource-card {
  min-height: 242px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
  background: rgba(255, 255, 255, .72);
  text-decoration: none;
  -webkit-tap-highlight-color: rgba(8, 125, 179, .16);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .9) inset;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.resource-card:hover, .resource-card:focus-visible {
  transform: translateY(-4px);
  border-color: rgba(8, 125, 179, .42);
  box-shadow: var(--shadow);
  outline: none;
}
.resource-top { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  padding: 0 10px;
  background: rgba(8, 125, 179, .1);
  color: #075f86;
  font-size: .78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.arrow {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: var(--white);
  font-weight: 900;
}
.resource-card h3 { margin: 28px 0 12px; font-size: 1.34rem; line-height: 1.15; }
.resource-card p { margin: 0; color: var(--muted); line-height: 1.58; }
.resource-card small { display: block; margin-top: 24px; color: rgba(24, 33, 43, .62); overflow-wrap: anywhere; }
.resource-card:nth-child(2n) .tag { background: rgba(70, 118, 80, .12); color: var(--green); }
.resource-card:nth-child(3n) .tag { background: rgba(169, 80, 50, .12); color: var(--clay); }
.resource-card:nth-child(4n) .tag { background: rgba(184, 139, 43, .16); color: #78570f; }

.profile-band { background: #1d272f; color: var(--white); }
.profile {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
  padding: 60px 0;
  display: grid;
  grid-template-columns: 1.25fr .75fr;
  gap: 42px;
  align-items: center;
}
.profile h2 { font-size: clamp(2rem, 4vw, 3.6rem); }
.profile p { margin: 22px 0 0; color: rgba(255, 255, 255, .78); font-size: 1.08rem; line-height: 1.7; }
.contact-panel { border-left: 3px solid var(--blue); padding-left: 24px; }
.contact-panel a { display: inline-flex; margin-top: 14px; color: var(--white); font-weight: 800; text-decoration: none; }
.contact-panel a:hover, .contact-panel a:focus-visible { text-decoration: underline; text-underline-offset: 5px; }

.site-footer { background: #101418; color: rgba(255, 255, 255, .78); }
.footer-inner {
  width: min(1160px, calc(100% - 32px));
  min-height: 138px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 26px;
  padding: 28px 0;
}
.footer-copy { line-height: 1.65; }
.footer-copy strong { display: block; color: var(--white); font-size: 1rem; }
.footer-copy a { color: var(--white); text-decoration: none; }
.footer-copy a:hover, .footer-copy a:focus-visible { text-decoration: underline; text-underline-offset: 5px; }
.footer-logo { width: 96px; height: 96px; object-fit: contain; flex: 0 0 auto; }
.footer-logo-link { display: inline-flex; flex: 0 0 auto; cursor: default; }

.admin-body { background: #eef1f3; }
.admin-wrap { width: min(1060px, calc(100% - 32px)); margin: 0 auto; padding: 38px 0; }
.admin-top { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 24px; }
.admin-top h1 { color: var(--ink); font-size: clamp(2rem, 6vw, 4rem); line-height: 1; }
.panel, .table-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 10px 26px rgba(24, 33, 43, .08);
}
.panel { padding: 22px; margin-bottom: 18px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.field-full { grid-column: 1 / -1; }
label { display: grid; gap: 7px; color: var(--muted); font-weight: 700; font-size: .9rem; }
input, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px;
  color: var(--ink);
  background: #fbfbfa;
  font: inherit;
}
textarea { min-height: 94px; resize: vertical; }
.check { display: flex; gap: 10px; align-items: center; color: var(--ink); }
.check input { width: auto; }
.admin-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 6px;
  padding: 12px 16px;
  min-height: 46px;
  background: var(--ink);
  color: var(--white);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
}
.admin-button.light { background: #dfe5e8; color: var(--ink); }
.admin-button.danger { background: #8d2c1d; }
.admin-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.admin-actions form { margin: 0; }
.notice { border-left: 4px solid var(--blue); padding: 12px 14px; background: #e9f4f8; margin-bottom: 16px; }
.error { border-left-color: #8d2c1d; background: #fbebe8; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { font-size: .82rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.table-panel { overflow-x: auto; }

@media (max-width: 900px) {
  .nav { min-height: 58px; }
  .nav-links { display: none; }
  .hero {
    min-height: 84vh;
    background: linear-gradient(0deg, rgba(8, 12, 16, .86), rgba(8, 12, 16, .32)), url("../sportunterricht_eu.jpg") center / cover no-repeat;
  }
  .section-heading, .profile { grid-template-columns: 1fr; }
  .link-grid, .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .nav,
  .hero-inner,
  .section,
  .profile,
  .footer-inner,
  .admin-wrap {
    width: min(100% - 24px, 1160px);
  }

  .site-header {
    background: rgba(238, 233, 222, .94);
  }

  .nav {
    min-height: 54px;
    width: calc(100% - 20px);
    gap: 10px;
  }

  .brand {
    max-width: 100%;
    font-size: clamp(.82rem, 5vw, .98rem);
    line-height: 1.1;
    white-space: normal;
  }

  .hero {
    min-height: 78svh;
    background-position: center top;
  }

  .hero-inner {
    padding: 88px 0 42px;
  }

  .eyebrow {
    margin-bottom: 14px;
    font-size: .74rem;
    line-height: 1.35;
    letter-spacing: .06em;
  }

  h1 {
    max-width: 100%;
    font-size: clamp(2.7rem, 14vw, 4.15rem);
    line-height: .94;
    overflow-wrap: anywhere;
  }

  .hero-copy {
    max-width: 100%;
    margin-top: 20px;
    font-size: .96rem;
    line-height: 1.5;
    hyphens: auto;
  }

  .hero-actions {
    gap: 10px;
    margin-top: 26px;
  }

  .hero-actions, .button { width: 100%; }
  .button { min-height: 52px; padding: 0 14px; }

  .section {
    padding: 48px 0;
  }

  .section-heading {
    gap: 16px;
    margin-bottom: 22px;
  }

  h2 {
    font-size: clamp(1.85rem, 9vw, 2.55rem);
    line-height: 1.04;
  }

  .section-heading p {
    font-size: .98rem;
    line-height: 1.6;
  }

  .link-grid, .form-grid { grid-template-columns: 1fr; }
  .resource-card {
    min-height: 0;
    padding: 18px;
  }

  .resource-card h3 {
    margin-top: 22px;
    font-size: 1.18rem;
  }

  .resource-card p {
    font-size: .96rem;
  }

  .resource-card small {
    margin-top: 18px;
    font-size: .82rem;
  }

  .tag {
    min-height: 26px;
    font-size: .72rem;
  }

  .arrow {
    width: 32px;
    height: 32px;
  }

  .profile {
    gap: 26px;
    padding: 46px 0;
  }

  .profile p {
    font-size: 1rem;
    line-height: 1.62;
  }

  .contact-panel {
    padding-left: 18px;
  }

  .footer-inner, .admin-top { align-items: flex-start; flex-direction: column; }
  .footer-inner {
    gap: 18px;
    min-height: 0;
  }

  .footer-copy {
    font-size: .94rem;
  }

  .footer-logo { width: 82px; height: 82px; }

  .admin-wrap {
    padding: 24px 0;
  }

  .admin-top {
    gap: 14px;
  }

  .admin-actions,
  .admin-actions form,
  .admin-button {
    width: 100%;
  }

  .panel {
    padding: 18px;
  }

  input,
  textarea {
    min-height: 48px;
    font-size: 16px;
  }

  th,
  td {
    padding: 12px;
  }
}

@media (max-width: 380px) {
  .nav {
    width: calc(100% - 16px);
  }

  h1 {
    font-size: 2.45rem;
  }

  .hero-copy {
    font-size: .9rem;
    line-height: 1.46;
  }

  .section-heading p,
  .profile p {
    font-size: .95rem;
  }

  .resource-card {
    padding: 16px;
  }
}
