/* =============================================
   Festival "42" — Stylesheet
   ============================================= */

/* --- Reset & Base --- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #fbce2a;
  --primary-dark: #e0b51e;
  --purple: #7b2d8e;
  --purple-light: #a855c7;
  --dark: #111119;
  --dark-alt: #1a1a2e;
  --white: #ffffff;
  --gray: #f4f4f8;
  --gray-text: #555;
  --font-main: 'Segoe UI', system-ui, -apple-system, sans-serif;
  --max-width: 1100px;
  --radius: 12px;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-main);
  color: var(--dark);
  background: var(--white);
  line-height: 1.6;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

/* --- Hero --- */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: var(--dark);
  color: var(--white);
  padding: 2rem 1.5rem;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 50%, rgba(123, 45, 142, 0.3) 0%, transparent 50%),
              radial-gradient(circle at 70% 60%, rgba(251, 206, 42, 0.15) 0%, transparent 40%);
  animation: heroGlow 8s ease-in-out infinite alternate;
}

@keyframes heroGlow {
  0% { transform: translate(0, 0); }
  100% { transform: translate(5%, -3%); }
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero__logo {
  width: 180px;
  margin: 0 auto 1.5rem;
  filter: drop-shadow(0 0 30px rgba(251, 206, 42, 0.3));
}

.hero__title {
  font-size: clamp(3rem, 10vw, 7rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1;
  margin-bottom: 0.5rem;
}

.hero__subtitle {
  font-size: clamp(1.1rem, 3vw, 1.5rem);
  color: var(--primary);
  font-weight: 600;
  margin-bottom: 1rem;
}

.hero__details {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 2.5rem;
}

.hero__cta {
  display: inline-block;
  background: var(--primary);
  color: var(--dark);
  font-size: 1.1rem;
  font-weight: 700;
  padding: 1rem 2.5rem;
  border-radius: 50px;
  transition: transform 0.25s, box-shadow 0.25s, background 0.25s;
}

.hero__cta:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(251, 206, 42, 0.4);
}

.hero__cta:active {
  transform: translateY(0);
}

/* --- Sections (shared) --- */
.section {
  padding: 5rem 1.5rem;
}

.section--alt {
  background: var(--gray);
}

.section__inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.section__title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  text-align: center;
  margin-bottom: 0.5rem;
}

.section__title span {
  color: var(--purple);
}

.section__subtitle {
  text-align: center;
  color: var(--gray-text);
  font-size: 1.1rem;
  margin-bottom: 3rem;
}

/* --- Card Grid --- */
.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

/* --- Cards (Line-Up & Workshops) --- */
.card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  border-left: 4px solid var(--primary);
  transition: transform 0.25s, box-shadow 0.25s;
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 0.6s ease forwards;
}

.card:nth-child(1) { animation-delay: 0.1s; }
.card:nth-child(2) { animation-delay: 0.2s; }
.card:nth-child(3) { animation-delay: 0.3s; }
.card:nth-child(4) { animation-delay: 0.4s; }
.card:nth-child(5) { animation-delay: 0.5s; }
.card:nth-child(6) { animation-delay: 0.6s; }

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

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}

.card--purple {
  border-left-color: var(--purple);
}

.card__tag {
  display: inline-block;
  background: var(--primary);
  color: var(--dark);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.25rem 0.75rem;
  border-radius: 50px;
  margin-bottom: 0.75rem;
}

.card__tag--purple {
  background: var(--purple);
  color: var(--white);
}

.card__title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.card__time {
  font-size: 0.9rem;
  color: var(--gray-text);
  margin-bottom: 0.5rem;
}

.card__text {
  color: var(--gray-text);
  font-size: 0.95rem;
}

/* --- Good to know --- */
.info-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.info-item {
  display: flex;
  gap: 1.2rem;
  align-items: flex-start;
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 0.6s ease forwards;
}

.info-item:nth-child(1) { animation-delay: 0.1s; }
.info-item:nth-child(2) { animation-delay: 0.2s; }
.info-item:nth-child(3) { animation-delay: 0.3s; }
.info-item:nth-child(4) { animation-delay: 0.4s; }
.info-item:nth-child(5) { animation-delay: 0.5s; }

.info-item__icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  background: var(--primary);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
}

.info-item__icon-img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.info-item__content h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.info-item__content p {
  color: var(--gray-text);
  font-size: 0.95rem;
}

/* --- Footer --- */
.footer {
  background: var(--dark);
  color: rgba(255, 255, 255, 0.6);
  text-align: center;
  padding: 3rem 1.5rem;
}

.footer__logo {
  width: 60px;
  margin: 0 auto 1rem;
  opacity: 0.6;
}

.footer__links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.footer__links a {
  color: var(--primary);
  font-weight: 600;
  font-size: 0.95rem;
  transition: color 0.2s;
}

.footer__links a:hover {
  color: var(--white);
}

.footer__copy {
  font-size: 0.85rem;
}

/* --- Legal Pages (Impressum & Datenschutz) --- */
.legal-page {
  min-height: 100vh;
  background: var(--gray);
}

.legal-header {
  background: var(--dark);
  color: var(--white);
  padding: 3rem 1.5rem 2rem;
  text-align: center;
}

.legal-header__logo {
  width: 60px;
  margin: 0 auto 1rem;
}

.legal-header h1 {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 800;
}

.legal-content {
  max-width: 750px;
  margin: 0 auto;
  padding: 3rem 1.5rem 5rem;
  background: var(--white);
  margin-top: 2rem;
  margin-bottom: 4rem;
  border-radius: var(--radius);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.legal-content h2 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  color: var(--purple);
}

.legal-content h2:first-child {
  margin-top: 0;
}

.legal-content p,
.legal-content li {
  color: #333;
  font-size: 0.95rem;
  line-height: 1.7;
}

.legal-content p {
  margin-bottom: 1rem;
}

.legal-content ul {
  list-style: disc;
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.legal-content li {
  margin-bottom: 0.4rem;
}

.legal-content a {
  color: var(--purple);
  text-decoration: underline;
}

.legal-content a:hover {
  color: var(--primary-dark);
}

.legal-back {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--primary);
  font-weight: 600;
  margin-top: 2rem;
  transition: color 0.2s;
}

.legal-back:hover {
  color: var(--white);
}

/* --- Responsive --- */

/* Tablet */
@media (min-width: 768px) {
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .info-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero__logo {
    width: 220px;
  }
}

/* Desktop */
@media (min-width: 1024px) {
  .section {
    padding: 6rem 2rem;
  }

  .card-grid--3 {
    grid-template-columns: repeat(3, 1fr);
  }

  .info-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero__logo {
    width: 260px;
  }
}

/* Accessibility: Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }
}
