@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@500;600;700&family=Manrope:wght@400;500;600;700&display=swap');

/* ---------- Design tokens ---------- */

:root {
  --site-bg: #f6f1e9;
  --site-text: #1d2d2a;
  --site-muted: #4f635e;
  --site-accent: #c25b37;
  --site-accent-2: #1f5f5b;
  --site-outline: #d9d0c2;
  --shadow-soft: 0 18px 40px rgba(32, 51, 48, 0.14);
  --radius-lg: 24px;
  --radius-md: 16px;
  --nav-bg: rgba(255, 250, 242, 0.8);
  --panel-bg: linear-gradient(165deg, rgba(255, 250, 242, 0.98), rgba(255, 245, 231, 0.95));
  --body-bg:
    radial-gradient(circle at 0 0, rgba(194, 91, 55, 0.17), transparent 42%),
    radial-gradient(circle at 92% 6%, rgba(31, 95, 91, 0.2), transparent 35%),
    linear-gradient(180deg, #f9f5ef 0%, var(--site-bg) 65%, #f2ebe0 100%);
}

/* Default-dark signal for users who never touched the toggle, same as
   artifact theme-awareness convention: media query first, explicit
   [data-theme] attribute (below) always wins over it. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --site-bg: #12201c;
    --site-text: #f2ede3;
    --site-muted: #b6c2bb;
    --site-accent: #e8865c;
    --site-accent-2: #5aada6;
    --site-outline: rgba(255, 255, 255, 0.14);
    --shadow-soft: 0 20px 44px rgba(0, 0, 0, 0.5);
    --nav-bg: rgba(18, 28, 25, 0.75);
    --panel-bg: linear-gradient(165deg, rgba(28, 43, 39, 0.97), rgba(20, 31, 28, 0.92));
    --body-bg:
      radial-gradient(circle at 0 0, rgba(232, 134, 92, 0.14), transparent 42%),
      radial-gradient(circle at 92% 6%, rgba(90, 173, 166, 0.18), transparent 35%),
      linear-gradient(180deg, #0f1815 0%, var(--site-bg) 65%, #0c1412 100%);
  }
}

:root[data-theme='dark'] {
  --site-bg: #12201c;
  --site-text: #f2ede3;
  --site-muted: #b6c2bb;
  --site-accent: #e8865c;
  --site-accent-2: #5aada6;
  --site-outline: rgba(255, 255, 255, 0.14);
  --shadow-soft: 0 20px 44px rgba(0, 0, 0, 0.5);
  --nav-bg: rgba(18, 28, 25, 0.75);
  --panel-bg: linear-gradient(165deg, rgba(28, 43, 39, 0.97), rgba(20, 31, 28, 0.92));
  --body-bg:
    radial-gradient(circle at 0 0, rgba(232, 134, 92, 0.14), transparent 42%),
    radial-gradient(circle at 92% 6%, rgba(90, 173, 166, 0.18), transparent 35%),
    linear-gradient(180deg, #0f1815 0%, var(--site-bg) 65%, #0c1412 100%);
}

/* ---------- Reset ---------- */

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  font-family: 'Manrope', 'Segoe UI', sans-serif;
  color: var(--site-text);
  background: var(--body-bg);
  padding-bottom: 2.75rem;
  transition: background 220ms ease, color 220ms ease;
}

h1,
h2,
h3,
h4,
h5 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  line-height: 1.08;
  letter-spacing: 0.02em;
  color: var(--site-text);
  margin: 0 0 0.5em;
}

p {
  color: var(--site-muted);
  line-height: 1.75;
  margin: 0 0 1em;
}

a {
  color: var(--site-accent-2);
}

.container {
  width: min(980px, 92vw);
  margin: 0 auto;
}

/* ---------- Navigation ---------- */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  margin: 0.85rem;
  border: 1px solid rgba(217, 208, 194, 0.85);
  border-radius: 999px;
  background: var(--nav-bg);
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 24px rgba(32, 51, 48, 0.1);
}

.site-nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.35rem 1rem;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.brand-logo {
  height: 44px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 6px 10px rgba(31, 95, 91, 0.25));
}

.brand-name {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 700;
  font-size: 1.75rem;
  letter-spacing: 0.03em;
  color: var(--site-accent-2);
}

.nav-toggle {
  display: none;
  border: none;
  background: none;
  cursor: pointer;
  padding: 0.5rem;
  color: var(--site-text);
}

.nav-toggle svg {
  width: 26px;
  height: 26px;
}

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

.nav-link {
  display: inline-block;
  font-weight: 600;
  color: var(--site-text);
  text-decoration: none;
  border-radius: 999px;
  padding: 0.55rem 1rem;
  transition: all 220ms ease;
}

.nav-link:hover,
.nav-link:focus-visible,
.nav-link.active {
  color: #fff;
  background: linear-gradient(135deg, var(--site-accent), #aa4b2c);
  transform: translateY(-1px);
  box-shadow: 0 10px 18px rgba(194, 91, 55, 0.32);
}

/* ---------- Layout shell ---------- */

.content-shell {
  width: min(980px, 92vw);
  margin: 2.25rem auto 0;
  animation: rise-in 450ms ease both;
}

.hero-panel,
.content-panel,
.news-card,
.member-card,
.project-panel {
  background: var(--panel-bg);
  border: 1px solid var(--site-outline);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}

.hero-panel {
  padding: 2.3rem 2.2rem;
  position: relative;
  overflow: hidden;
}

.hero-panel::after {
  content: '';
  position: absolute;
  right: -48px;
  top: -48px;
  width: 170px;
  height: 170px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(194, 91, 55, 0.27), rgba(194, 91, 55, 0));
}

.hero-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.13em;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--site-accent);
  margin: 0 0 0.5rem;
}

.hero-title {
  font-size: clamp(2.2rem, 4.8vw, 4rem);
  margin-bottom: 0.75rem;
}

.hero-subline {
  max-width: 44ch;
  font-weight: 500;
  margin-bottom: 0;
}

.content-panel {
  margin-top: 1.5rem;
  padding: 2rem;
}

.section-title {
  font-size: clamp(2rem, 3.8vw, 3rem);
  margin-bottom: 0.7rem;
}

.title-ornament {
  width: 86px;
  height: 5px;
  border-radius: 10px;
  margin-bottom: 1.5rem;
  background: linear-gradient(90deg, var(--site-accent), var(--site-accent-2));
}

.info-block {
  border-left: 4px solid rgba(194, 91, 55, 0.7);
  padding-left: 1.05rem;
  margin-bottom: 1.25rem;
}

/* ---------- Card grid (news / mitglieder) ---------- */

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 1.75rem;
  margin-top: 0.25rem;
}

.news-card,
.member-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform 280ms ease, box-shadow 280ms ease;
}

.news-card:hover,
.member-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 26px 48px rgba(32, 51, 48, 0.22);
}

.card-media {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 420ms ease;
}

.news-card:hover .card-media img,
.member-card:hover .card-media img {
  transform: scale(1.07);
}

.card-media--graphic {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #d9d3ef 0%, #bfe3da 60%, #eafaf3 100%);
}

.card-graphic {
  width: 52%;
  height: 52%;
  color: #4b4632;
  transition: transform 420ms ease;
}

.news-card:hover .card-graphic {
  transform: scale(1.07) rotate(-2deg);
}

.card-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  margin: 0;
  padding: 1.8rem 1rem 0.6rem;
  background: linear-gradient(180deg, rgba(20, 30, 28, 0) 0%, rgba(18, 28, 26, 0.78) 100%);
  color: #f4efe6;
  font-size: 0.78rem;
  line-height: 1.3;
}

.card-body {
  padding: 1.4rem 1.5rem;
  flex: 1;
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.4rem;
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--site-accent-2);
  text-decoration: none;
  border: 1px solid var(--site-outline);
  border-radius: 999px;
  padding: 0.5rem 1rem;
  transition: all 200ms ease;
}

.card-link svg {
  width: 1.05em;
  height: 1.05em;
  flex: none;
}

.card-link:hover,
.card-link:focus-visible {
  color: #fff;
  background: var(--site-accent-2);
  border-color: var(--site-accent-2);
  transform: translateY(-1px);
}

.card-title {
  font-size: 1.65rem;
  margin-bottom: 0.5rem;
}

.card-text {
  margin-bottom: 0;
}

/* ---------- Footer ---------- */

.site-footer {
  width: min(980px, 92vw);
  margin: 2rem auto 0;
  border-top: 1px solid var(--site-outline);
  padding-top: 1.2rem;
  color: var(--site-muted);
}

.site-footer .footer-name {
  color: var(--site-accent-2);
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 700;
  font-size: 1.35rem;
  margin-bottom: 0.25rem;
}

.site-footer .footer-tag {
  margin-bottom: 0;
  font-size: 0.9rem;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Theme toggle ---------- */

.theme-toggle {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 1200;
}

.theme-toggle-btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  border: 1px solid var(--site-outline);
  background: var(--site-accent-2);
  color: #fff;
  font-weight: 700;
  border-radius: 999px;
  padding: 0.6rem 0.9rem;
  cursor: pointer;
  box-shadow: 0 10px 20px rgba(31, 95, 91, 0.28);
}

.theme-toggle-btn svg {
  width: 1.1em;
  height: 1.1em;
}

.theme-menu {
  position: absolute;
  right: 0;
  bottom: calc(100% + 0.5rem);
  list-style: none;
  margin: 0;
  padding: 0.35rem;
  min-width: 150px;
  background: var(--panel-bg);
  border: 1px solid var(--site-outline);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
  display: none;
}

.theme-toggle.open .theme-menu {
  display: block;
}

.theme-menu button {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  border: none;
  background: none;
  color: var(--site-text);
  font: inherit;
  font-weight: 600;
  text-align: left;
  padding: 0.5rem 0.6rem;
  border-radius: 10px;
  cursor: pointer;
}

.theme-menu button:hover,
.theme-menu button.active {
  background: rgba(194, 91, 55, 0.14);
}

.theme-menu svg {
  width: 1em;
  height: 1em;
  flex: none;
}

/* ---------- Animation ---------- */

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

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

/* ---------- Responsive ---------- */

@media (max-width: 780px) {
  .nav-toggle {
    display: inline-flex;
  }

  .nav-links {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0.25rem;
    background: var(--panel-bg);
    border: 1px solid var(--site-outline);
    border-radius: var(--radius-md);
    padding: 0.6rem;
    box-shadow: var(--shadow-soft);
    display: none;
  }

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

  .nav-link {
    text-align: center;
  }

  .site-nav {
    margin: 0.5rem;
    border-radius: 20px;
    position: relative;
  }

  .site-nav .container {
    padding: 0.55rem 0.8rem;
    position: static;
  }

  .brand-logo {
    height: 36px;
  }

  .brand-name {
    font-size: 1.35rem;
  }

  .content-shell {
    margin-top: 1.3rem;
  }

  .hero-panel,
  .content-panel,
  .project-panel {
    padding: 1.45rem 1.2rem;
  }

  .cards-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
}
