/*
 * Seiteneigene Styles: Startseite (index.html).
 * Eingebunden per <link rel="stylesheet"> als erstes Kind von <main>, nicht im
 * <head>: Die Seite nimmt an der partiellen Navigation teil (AP2-04), und
 * layout-shell.js tauscht nur <main>. So kommen diese Styles mit der Seite und
 * gehen mit ihr, statt nach dem Verlassen aktiv zu bleiben.
 */

.home-main {
  display: grid;
  gap: 1.1rem;
}

.home-hero {
  position: relative;
  min-height: 640px;
  display: flex;
  align-items: center;
  padding: 0;
  border-color: transparent;
  box-shadow: 0 40px 80px rgba(5, 10, 15, 0.45);
  background-image:
    linear-gradient(100deg, rgba(8, 14, 20, 0.82) 0%, rgba(8, 14, 20, 0.5) 45%, rgba(8, 14, 20, 0.28) 100%),
    linear-gradient(0deg, rgba(6, 11, 16, 0.6), transparent 35%),
    url('/assets/img/hero-picture.webp');
  background-size: cover;
  background-position: center 40%;
}

[data-theme="dark"] .home-hero {
  background-image:
    linear-gradient(100deg, rgba(8, 14, 20, 0.82) 0%, rgba(8, 14, 20, 0.5) 45%, rgba(8, 14, 20, 0.28) 100%),
    linear-gradient(0deg, rgba(6, 11, 16, 0.6), transparent 35%),
    url('/assets/img/hero-picture-dark.webp');
}

.home-hero-copy {
  position: relative;
  z-index: 1;
  width: fit-content;
  margin: 48px 24px;
  padding: clamp(28px, 4vw, 44px);
  border-radius: 10px;
  background: rgba(13, 24, 33, 0.55);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow:
    0 32px 64px rgba(0, 0, 0, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.home-hero-copy .eyebrow {
  color: rgba(159, 207, 244, 0.95);
}

.home-hero-copy h1 {
  margin: 0 0 14px;
  max-width: 15ch;
  color: #f4f9fc;
  font-size: clamp(2.4rem, 5vw, 4.2rem);
  line-height: 1.02;
}

.home-hero-copy p {
  max-width: 62ch;
  margin: 0 0 20px;
  color: rgba(240, 247, 252, 0.86);
  font-size: 1.08rem;
}

.home-hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 26px;
}

.home-hero-pill {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #eaf3f8;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.home-hero-cta-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 5px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.1);
  color: #f4f9fc;
  font-weight: 700;
  text-decoration: none;
}

.home-hero-cta-secondary:hover,
.home-hero-cta-secondary:focus-visible {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-1px);
}

/* Bewegung nur ohne "Bewegung reduzieren" (WCAG 2.3.3, wie in styles.css):
   bei "reduce" gelten dieselben Endzustände sofort. */
@media (prefers-reduced-motion: no-preference) {
  .home-hero-cta-secondary {
    transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
  }
}

.home-hero-scroll-cue {
  position: absolute;
  z-index: 1;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: rgba(240, 247, 252, 0.55);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

@keyframes home-hero-bounce {
  0%, 100% { transform: translateY(0); opacity: 0.5; }
  50% { transform: translateY(6px); opacity: 1; }
}

@media (prefers-reduced-motion: no-preference) {
  .home-hero-scroll-cue svg {
    animation: home-hero-bounce 1.8s ease-in-out infinite;
  }
}

@media (max-width: 640px) {
  .home-hero {
    min-height: 560px;
  }

  .home-hero-scroll-cue {
    display: none;
  }
}

/* Die helle Überschriftfarbe gehört zum dunklen Theme; im hellen Theme lag
   sie mit 1.04:1 praktisch unsichtbar auf dem hellen Panel (WCAG 1.4.3). */
[data-theme="dark"] .home-main .section-heading h2 {
  color: #f4f9fc;
}

.home-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 14px;
}

.home-card {
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--card-bg);
  padding: 14px;
}

.home-card h3 {
  margin: 0 0 8px;
}

.home-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 12px;
}

.home-link {
  display: block;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--card-bg);
  text-decoration: none;
  color: inherit;
}

.home-link:hover,
.home-link:focus-visible {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--accent-solid) 45%, var(--line));
  box-shadow: 0 10px 24px color-mix(in srgb, var(--accent-solid) 20%, transparent);
}

@media (prefers-reduced-motion: no-preference) {
  .home-link {
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  }
}

.home-link strong {
  display: block;
  margin-bottom: 4px;
}
