/* ==========================================================================
   VP: Contact/Footer Section
   ========================================================================== */

.contact {
  min-height: 100vh;
  width: 100%;
  background: linear-gradient(180deg, var(--color-navy) 0%, var(--color-purple) 100%);
  position: relative;
  z-index: 13;  /* Highest for layered pinning */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-3xl) var(--space-xl);
}

/* WebGL Shader Canvas */
#contact-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

/* Content Container */
.contact__content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1400px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2xl);
}

/* Title - Gold, larger */
.contact__title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  color: var(--color-gold);
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

/* ==========================================================================
   Skill Wheel Component
   ========================================================================== */

.contact__skill-wheel {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2xl);
  width: 100%;
  max-width: 1200px;
}

/* Labels - VT323, WHITE, larger */
.contact__skill-label {
  font-family: var(--font-body);
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  color: var(--color-white);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Desktop Labels - inside skill-wheel, hidden on mobile */
.contact__skill-label--desktop {
  display: block;
}

/* Mobile Labels - outside skill-wheel, hidden on desktop */
.contact__skill-label--mobile-top,
.contact__skill-label--mobile-bottom {
  display: none;
  text-align: center;
}

/* Wheel wrapper - takes up space in layout, own stacking context */
.contact__wheel-wrapper {
  flex: 1;
  max-width: 420px;
  height: 280px;  /* ~5 Items à 56px */
  position: relative;
  z-index: 0;
  isolation: isolate;
}

/* Wheel container - absolute positioned, overflow visible */
.contact__wheel {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100%;
  overflow: visible;
  display: flex;
  justify-content: center;
  padding: 6px 0; /* Space for item borders */
  touch-action: none; /* Prevent page scroll while dragging */
  cursor: grab;
  user-select: none;
}

.contact__wheel:active {
  cursor: grabbing;
}

.contact__wheel-track {
  position: relative;
  width: 100%;
  height: 0;  /* Items sind absolute, Track nimmt keinen Platz ein */
}

/* Skill Items - Absolute positioned, GSAP sets top */
.contact__wheel-item {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-body);
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  color: var(--color-magenta);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-align: center;
  padding: var(--space-sm) var(--space-lg);
  box-sizing: border-box;
  border: 3px solid var(--color-magenta);
  background: transparent;
  white-space: nowrap;
  min-width: 420px;  /* Einheitliche Breite wie Buttons */
  transition: background 0.3s ease,
              color 0.3s ease,
              border-color 0.3s ease,
              opacity 0.3s ease;
}

/* Center item - Navy BG, Magenta Border, White Text, Scale */
.contact__wheel-item.is-center {
  color: var(--color-white);
  background: var(--color-navy);
  border-color: var(--color-magenta);
  transform: translateX(-50%) scale(1.1);
  opacity: 1 !important;
}

/* Near items (±1) - 50% opacity */
.contact__wheel-item.is-near {
  opacity: 0.5;
}

/* Far items (±2) - 25% opacity */
.contact__wheel-item.is-far {
  opacity: 0.25;
}

/* Hidden items (±3 and beyond) - completely invisible */
.contact__wheel-item.is-hidden {
  opacity: 0;
  pointer-events: none;
}

/* ==========================================================================
   Contact Buttons - Thicker border, same width, consistent gap
   ========================================================================== */

.contact__buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-md);
  margin-top: var(--space-xl);
  max-width: calc(280px * 2 + var(--space-md)); /* Force 2 buttons per row on desktop */
  margin-left: auto;
  margin-right: auto;
}

.contact__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body);
  font-size: clamp(1.2rem, 2vw, 1.6rem); /* Match about__button */
  color: var(--color-gold);
  text-decoration: none;
  border: 2px solid var(--color-gold); /* Match about__button */
  padding: var(--space-sm) var(--space-lg); /* Match about__button */
  width: 280px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: background 0.3s ease, color 0.3s ease;
}

.contact__button:hover {
  background: var(--color-gold);
  color: var(--color-black);
}

.contact__button--disabled {
  opacity: 0.5;
  pointer-events: none;
}

.contact__button--solid {
  background: var(--color-gold);
  color: var(--color-black);
}

.contact__button--solid:hover {
  background: var(--color-gold);
  color: var(--color-black);
}

/* ==========================================================================
   Footer Info - Vertical, Purple
   ========================================================================== */

.contact__footer {
  position: absolute;
  bottom: var(--space-xl);
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xs);
}

.contact__link {
  font-family: var(--font-body);
  font-size: var(--fs-sm);
  color: var(--color-magenta);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  transition: color 0.3s ease;
}

.contact__link:hover {
  color: var(--color-gold);
}

.contact__year {
  font-family: var(--font-body);
  font-size: var(--fs-sm);
  color: var(--color-magenta);
}

/* ==========================================================================
   Responsive - Tablet (max 1024px)
   ========================================================================== */

@media (max-width: 1024px) {
  .contact {
    padding: var(--space-4xl) var(--space-xl);
    padding-top: var(--space-5xl);
    padding-bottom: var(--space-5xl);
  }

  /* Hide desktop labels, show mobile labels */
  .contact__skill-label--desktop {
    display: none;
  }

  .contact__skill-label--mobile-top {
    display: block;
    margin-bottom: var(--space-3xl);  /* Größerer Abstand - Labels außerhalb Wheel */
  }

  .contact__skill-label--mobile-bottom {
    display: block;
    margin-top: var(--space-4xl);  /* Noch größerer Abstand nach unten */
  }

  /* Skill wheel - only contains wrapper on mobile */
  .contact__skill-wheel {
    flex-direction: column;
    gap: 0;
  }

  .contact__wheel-wrapper {
    height: 280px;  /* 5 Items à ~56px */
    width: 100%;
    max-width: 100%;
  }

  .contact__wheel-item {
    width: 420px;
    max-width: 90vw;
  }

  .contact__button {
    width: 420px;
    max-width: 90vw;
  }
}

/* ==========================================================================
   Responsive - Mobile (max 768px)
   ========================================================================== */

@media (max-width: 768px) {
  .contact {
    padding: var(--space-4xl) var(--space-lg);
  }

  .contact__buttons {
    flex-direction: column;
    width: 100%;
    align-items: center;
    margin-top: 0;  /* Kein extra Abstand auf Mobile */
  }

  .contact__button {
    width: 340px;
    max-width: 90vw;
  }

  .contact__wheel-wrapper {
    height: 260px;  /* 5 Items, etwas kleiner */
  }

  .contact__wheel-item {
    width: 340px;
    min-width: unset;  /* Global min-width aufheben */
    max-width: 90vw;
    font-size: var(--fs-md);
    padding: var(--space-xs) var(--space-lg);
  }
}

/* ==========================================================================
   Responsive - Small Mobile (max 480px)
   ========================================================================== */

@media (max-width: 480px) {
  .contact {
    padding: var(--space-4xl) var(--space-md);
  }

  .contact__wheel-wrapper {
    height: 240px;  /* 5 Items, kleinste Version */
  }

  .contact__wheel-item {
    width: 290px;
    min-width: unset;  /* Global min-width aufheben */
    max-width: 90vw;
    font-size: var(--fs-base);
  }

  .contact__skill-label {
    font-size: var(--fs-md);
  }

  .contact__button {
    width: 290px;
    max-width: 90vw;
  }
}

/* ==========================================================================
   Animation States (for GSAP)
   ========================================================================== */

.contact__content {
  opacity: 0;
}

/* ==========================================================================
   SEO Navigation (hidden under canvas)
   ========================================================================== */

.seo-nav {
  position: absolute;
  top: 0;
  left: 0;
  z-index: -1;
  pointer-events: none;
}

.seo-nav a {
  display: inline-block;
  font-size: 1px;
  color: transparent;
}
