/* ── Shared mobile accessibility & layout fixes ── */

#mobile-menu {
  z-index: 60;
}

.mobile-menu-btn {
  min-width: 48px;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin: -0.25rem -0.5rem -0.25rem 0;
}

@media (max-width: 1023px) {
  .mobile-menu-btn {
    display: inline-flex;
  }
}

.mobile-menu-close {
  min-width: 48px;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  line-height: 1;
  padding: 0.5rem;
}

#mobile-menu .mobile-menu-link {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1.25rem;
}

body.mobile-menu-open {
  overflow: hidden;
}

/* Touch-friendly CTAs */
.btn-cta,
.btn-dark,
a.btn-dark {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: max(0.75rem, 12px);
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

.store-badge-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
}

.store-badge-link img {
  height: 3rem;
  width: auto;
}

.contact-link {
  min-height: 48px;
  display: flex;
  align-items: center;
  padding: 0.5rem 0;
}

.carousel-control {
  min-width: 48px;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.nav-tagline {
  font-size: max(0.75rem, 11px) !important;
  display: block;
}

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

/* Decorative giant text — clip overflow on mobile */
.bg-deco-wrap {
  overflow: hidden;
}

@media (max-width: 1023px) {
  nav a img[alt="Ermeutika"] {
    max-width: calc(100vw - 6.5rem);
    height: 2.5rem !important;
    object-fit: contain;
  }

  .nav-tagline {
    display: none !important;
  }

  .hero-headline {
    font-size: clamp(2.25rem, 11vw, 5rem) !important;
    white-space: normal !important;
    margin-bottom: 2rem !important;
  }

  .hero-subline {
    white-space: normal !important;
    font-size: clamp(1rem, 4.2vw, 1.35rem) !important;
    line-height: 1.5 !important;
  }

  .pillars-grid {
    flex-direction: column !important;
    gap: 2.5rem !important;
    align-items: stretch !important;
  }

  .pillars-grid p {
    white-space: normal !important;
  }

  .pillars-grid h2,
  .pillars-grid h3 {
    font-size: clamp(1.5rem, 6vw, 2rem) !important;
  }

  .split-content-right {
    padding-left: 1.25rem !important;
    padding-right: 1.25rem !important;
    padding-top: 6rem !important;
    padding-bottom: 3rem !important;
    align-items: flex-start !important;
    justify-content: flex-end !important;
    min-height: auto !important;
  }

  .split-content-right .max-w-2xl {
    max-width: 100% !important;
    text-align: left !important;
  }

  .split-content-right img[alt="mygoo.fun"] {
    height: clamp(3rem, 14vw, 5rem) !important;
  }

  .mygoo-hero-overlay {
    display: block;
    position: absolute;
    inset: 0;
    z-index: 5;
    pointer-events: none;
    background: linear-gradient(
      to bottom,
      rgba(13, 27, 46, 0.1) 0%,
      rgba(13, 27, 46, 0.75) 45%,
      rgba(13, 27, 46, 0.95) 100%
    );
  }

  .mygoo-hero-section {
    display: flex;
    flex-direction: column;
    min-height: auto !important;
    padding-top: 5.5rem;
    background: #0d1b2e !important;
  }

  .mygoo-hero-section .mygoo-hero-art {
    position: relative !important;
    inset: auto !important;
    order: 2;
    height: min(68vh, 560px);
    min-height: 420px;
    overflow: hidden;
  }

  .mygoo-hero-section .mygoo-hero-art img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    object-position: center top;
    filter: brightness(1.05) contrast(1.12) saturate(0.9) !important;
  }

  .mygoo-hero-section .mygoo-hero-content {
    order: 1;
    min-height: auto !important;
    padding: 1.25rem !important;
    justify-content: flex-start !important;
    background: linear-gradient(180deg, rgba(8, 15, 28, 0.98), rgba(13, 27, 46, 0.9));
  }

  .mygoo-hero-section .mygoo-hero-content .max-w-2xl {
    width: 100%;
    padding: 1.25rem;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 1.5rem;
    background: rgba(8, 15, 28, 0.78);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(12px);
  }

  .mygoo-hero-section .mygoo-hero-content img[alt="mygoo.fun"] {
    height: clamp(2.75rem, 13vw, 4.25rem) !important;
    max-width: min(100%, 18rem);
  }

  .mygoo-hero-section .mygoo-hero-content p {
    margin-bottom: 1.25rem !important;
  }

  .mygoo-hero-section .mygoo-hero-content p:first-of-type {
    letter-spacing: 0.24em !important;
    font-size: clamp(0.78rem, 3.4vw, 1rem) !important;
  }

  .mygoo-hero-section .mygoo-hero-content .store-badge-link img {
    height: 2.65rem !important;
  }

  .mygoo-hero-section .mygoo-hero-overlay {
    display: none !important;
  }

  .gaia-hero {
    display: flex;
    flex-direction: column;
    min-height: auto !important;
    padding-top: 5.25rem;
    background: #080f1c !important;
  }

  .gaia-hero .gaia-hero-copy {
    order: 1;
    flex: none !important;
    display: block !important;
    width: calc(100% - 2rem);
    margin: 0 1rem 1rem;
    padding: 1.5rem !important;
    text-align: left !important;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 1.5rem;
    background: rgba(8, 15, 28, 0.82);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(12px);
  }

  .gaia-hero .gaia-hero-copy h1 {
    margin-top: 2.75rem !important;
    margin-bottom: 0.75rem !important;
    font-size: clamp(1.65rem, 7vw, 2.35rem) !important;
    line-height: 1.08 !important;
  }

  .gaia-hero .gaia-hero-copy p {
    font-size: clamp(1rem, 4vw, 1.25rem) !important;
    line-height: 1.45 !important;
  }

  .gaia-hero .gaia-hero-bg {
    position: relative !important;
    inset: auto !important;
    order: 2;
    height: 42vh;
    min-height: 300px;
    overflow: hidden;
  }

  .gaia-hero .gaia-hero-bg img {
    height: 100% !important;
    object-fit: cover;
    object-position: center top !important;
  }

  .gaia-hero .gaia-pillars {
    order: 3;
    width: calc(100% - 2rem) !important;
    margin: 1rem 1rem 1.25rem !important;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 1.5rem;
    overflow: hidden;
    background: rgba(8, 15, 28, 0.9) !important;
  }

  .gaia-hero .gaia-pillars > div {
    padding: 1.5rem !important;
  }

  .gaia-hero .gaia-pillars > div + div {
    border-top: 1px solid rgba(255, 255, 255, 0.12);
  }

  .gaia-hero .gaia-pillars h2 {
    margin-bottom: 0.5rem !important;
    font-size: clamp(1.25rem, 5vw, 1.6rem) !important;
  }

  .gaia-hero .gaia-pillars p {
    font-size: clamp(0.95rem, 3.8vw, 1.125rem) !important;
    line-height: 1.55 !important;
  }

  .gaia-tagline {
    white-space: normal !important;
    font-size: clamp(1.125rem, 4.5vw, 1.5rem) !important;
  }

  .section-cta-overlap {
    margin-bottom: -3rem !important;
    padding-top: 3rem !important;
  }

  .projects-title {
    font-size: clamp(2.5rem, 12vw, 4.5rem) !important;
  }

  .projects-intro {
    font-size: clamp(1rem, 4vw, 1.25rem) !important;
  }

  .projects-intro br {
    display: none;
  }

  .team-role {
    color: #4b5563 !important;
  }

  .accent-magenta {
    color: #c2186d !important;
  }

  .chi-intro br {
    display: none;
  }

  .contatti-cta {
    white-space: normal !important;
    text-align: center;
    font-size: clamp(1rem, 4vw, 1.35rem) !important;
    padding: 1rem 1.5rem !important;
    max-width: 100%;
  }

  .contatti-link-text {
    font-size: clamp(1.125rem, 4.5vw, 1.75rem) !important;
    word-break: break-word;
  }

  .contatti-hero {
    height: auto !important;
    min-height: 100vh;
  }

  .contatti-hero h1 {
    font-size: clamp(2.5rem, 12vw, 4.5rem) !important;
    margin-bottom: 2rem !important;
  }

  .contatti-panel {
    padding-left: 1.5rem !important;
    padding-right: 1.5rem !important;
  }
}

.mygoo-hero-overlay {
  display: none;
}

@media (min-width: 1024px) {
  .split-content-right {
    padding-left: 38%;
  }

  .mygoo-hero-section .mygoo-hero-overlay {
    display: block;
    position: absolute;
    inset: 0;
    z-index: 5;
    pointer-events: none;
    background: linear-gradient(
      to right,
      rgba(13, 27, 46, 0.15) 0%,
      rgba(13, 27, 46, 0.55) 38%,
      rgba(13, 27, 46, 0.88) 52%,
      rgba(13, 27, 46, 0.96) 100%
    );
  }

  .mygoo-hero-section .mygoo-hero-content .max-w-2xl {
    padding: 2rem 2.25rem;
    border-radius: 1.25rem;
    background: rgba(8, 15, 28, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(10px);
  }
}
