/* ============================================
   Mobile & Responsive Styles
   Spielgruppe im Licht der Farben
   ============================================ */

/* ---------- Global overflow fix ---------- */

html, body {
  overflow-x: hidden;
  max-width: 100vw;
}

/* ---------- Hamburger Menu Button ---------- */

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.4rem;
  z-index: 110;
  -webkit-tap-highlight-color: transparent;
}

.nav-toggle span {
  display: block;
  width: 26px;
  height: 3px;
  background: #fff;
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
  margin: 5px 0;
}

/* Hamburger → X animation */
.nav-toggle.is-open span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}
.nav-toggle.is-open span:nth-child(2) {
  opacity: 0;
}
.nav-toggle.is-open span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* ---------- Tablet (max-width: 900px) ---------- */

@media (max-width: 900px) {
  .gallery-grid {
    columns: 2;
  }
  .glance-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .contact-grid {
    grid-template-columns: 1fr;
    max-width: 360px;
    margin: 0 auto;
  }
  .steps-grid {
    grid-template-columns: 1fr;
    max-width: 360px;
    margin: 0 auto;
  }
  .pricing-grid {
    grid-template-columns: 1fr;
    max-width: 340px;
    margin: 0 auto;
  }
}

/* ---------- Mobile (max-width: 640px) ---------- */

@media (max-width: 640px) {

  /* Show hamburger button */
  .nav-toggle {
    display: block;
  }

  /* Mobile nav overlay */
  nav {
    position: fixed;
    top: 0;
    right: 0;
    width: 75vw;
    max-width: 300px;
    height: 100vh;
    height: 100dvh;
    background: linear-gradient(170deg, var(--color-text) 0%, #3a3229 100%);
    padding: 5rem 2rem 2rem;
    transform: translateX(100%);
    transition: transform 0.35s ease;
    z-index: 105;
    box-shadow: -4px 0 24px rgba(0,0,0,0.15);
  }

  nav.is-open {
    transform: translateX(0);
  }

  nav ul {
    flex-direction: column;
    gap: 0;
  }

  nav a {
    display: block;
    padding: 1rem 0;
    font-size: 1.1rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
  }

  nav a:last-child {
    border-bottom: none;
  }

  nav a.active {
    border-bottom-color: rgba(255,255,255,0.1);
    color: var(--color-sun);
  }

  /* Overlay backdrop */
  .nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 104;
  }

  .nav-overlay.is-visible {
    display: block;
  }

  /* Header layout */
  header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
  }

  header .container {
    flex-direction: row;
    flex-wrap: nowrap;
    text-align: left;
  }

  .site-title {
    font-size: 1.15rem;
  }

  /* Push body content below fixed header */
  body {
    padding-top: 56px;
  }
  body.home {
    padding-top: 0;
  }

  /* Homepage hero accounts for fixed header */
  .home .hero-home {
    padding-top: 4.5rem;
  }

  /* Gallery */
  .gallery-grid {
    columns: 1;
    column-gap: 0;
  }

  .gallery-item {
    margin-bottom: 0.75rem;
  }

  .hero h1 {
    font-size: 1.8rem;
  }

  h2 { font-size: 1.4rem; }

  .two-col {
    grid-template-columns: 1fr;
  }

  .profile-section {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .profile-image .rounded-image {
    width: 200px;
    height: 250px;
    margin: 0 auto;
  }

  /* Homepage hero */
  .hero-home {
    height: 100vh;
    height: 100dvh;
    padding: 3.5rem 1.5rem 3.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .hero-home__tagline {
    font-size: 0.8rem;
  }

  .keyword-pill {
    font-size: 0.8rem;
    padding: 0.3rem 0.9rem;
  }

  .orb { filter: blur(50px); opacity: 0.35; }
  .hero-doodle { display: none; }
  .page-hero::before, .page-hero::after { display: none; }

  /* Welcome */
  .welcome-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .welcome-text .section-title--left {
    text-align: center;
  }
  .welcome-text .section-title--left::after {
    margin: 0.6rem auto 0;
  }
  .image-frame__accent {
    top: 10px; left: 10px;
  }

  /* Feature cards */
  .feature-grid {
    grid-template-columns: 1fr;
  }

  /* Prisca */
  .prisca-layout {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 2rem;
  }
  .prisca-image {
    display: flex;
    justify-content: center;
  }
  .prisca-image__frame img {
    width: 220px;
    height: 280px;
  }
  .prisca-image__ring {
    width: 236px;
    height: 296px;
  }

  /* Glance */
  .glance-grid {
    grid-template-columns: 1fr;
  }

  /* Band */
  .section-band {
    height: 300px;
  }
  .band-quote {
    font-size: 1rem;
  }

  /* Page hero */
  .page-hero {
    padding: 4.5rem 1.5rem 3rem;
  }

  /* Schedule */
  .schedule-modern {
    padding: 1.2rem 1rem;
  }
  .schedule-modern::before {
    left: calc(1rem + 50px + 1rem + 6px - 1px);
  }

  /* Callout */
  .callout-box {
    flex-direction: column;
    gap: 0.8rem;
  }
}
