/*
  Base colours inspired by the existing socialperformer.de palette: mostly
  monochrome with vibrant accent tones.  You can adjust the hex values
  below to better match your own branding.  Each carousel card defines
  an individual --accent colour on its style attribute, allowing you to
  customise each service.  The variables declared on :root provide
  sensible defaults.
*/
:root {
  --bg-light: #f9f9f9;
  --bg-dark: #0f0f0f;
  --text-light: #ffffff;
  --text-dark: #1a1a1a;
  --accent-pink: #e91e63;
  --accent-orange: #ff9800;
  --accent-cyan: #00bcd4;
  --accent-green: #4caf50;
  --accent-purple: #9c27b0;
}

body {
  margin: 0;
  font-family: 'Montserrat', sans-serif;
  background-color: var(--bg-light);
  color: var(--text-dark);
  overflow-x: hidden;
}

/* Wrapper sets the total scroll distance for the effect.  A height of
   500vh provides enough travel for a 360° rotation of five cards. */
#scroll-wrapper {
  /* The taller this wrapper, the slower the rotation. 4× viewport
     height yields a 360° rotation of the five cards. */
  height: 400vh;
  position: relative;
}

/* The hero section remains fixed (sticky) at the top while scrolling
   through the wrapper.  A perspective is set on the parent to enable
   3D transforms within. */
#hero-section {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
  perspective: 1000px;
  background-color: var(--bg-dark);
}

/* Rotating carousel container.  transform-style: preserve-3d allows
   child elements to exist in 3D space.  The initial transform is
   updated via JavaScript based on scroll progress. */
#carousel {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.3s ease-out;
}

/* Each card is absolutely positioned in the centre of the carousel and
   pushed out along the Z-axis so they form a circle.  The rotateY
   transform positions each card around the circle; these base
   rotations are overridden in script.js to keep the logic in one place. */
.carousel__item {
  position: absolute;
  top: 50%;
  left: 50%;
  transform-origin: center center;
  transform-style: preserve-3d;
  width: 300px;
  height: 380px;
  margin: -190px 0 0 -150px;
  /* Use a translucent card with a subtle glass effect.  This
     maintains contrast against the dark hero background while
     allowing the neon border to stand out. */
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(8px);
  border: 1px solid var(--accent);
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  text-align: center;
  color: var(--text-light);
}

.carousel__item h3 {
  margin: 0.75rem 0 0.5rem;
  font-size: 1.25rem;
  font-weight: 600;
}

.carousel__item p {
  font-size: 0.9rem;
  line-height: 1.4;
  opacity: 0.8;
}

.carousel__item i {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
  /* Use the card’s accent colour for its icon */
  color: var(--accent);
}

/* Hide the back side of cards.  Without this property the mirrored
   text appears when the card is rotated away from the viewer. */
.carousel__item {
  backface-visibility: hidden;
}

/* Hero text overlay */
/* Overlay hero copy above the carousel.  Position it near the
   top‑left of the hero to avoid covering the rotating cards. */
.hero-text {
  position: absolute;
  top: 15vh;
  left: 8vw;
  transform: none;
  text-align: left;
  color: var(--text-light);
  pointer-events: auto;
  z-index: 2;
  max-width: 40ch;
}

.hero-text h1 {
  font-size: 2.5rem;
  line-height: 1.2;
  margin: 0 0 1rem;
}

.hero-text p {
  font-size: 1.125rem;
  margin: 0 0 1.5rem;
  opacity: 0.8;
}

.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 30px;
  background-image: linear-gradient(45deg, var(--accent-pink), var(--accent-orange));
  color: white;
  font-weight: 600;
  text-decoration: none;
  transition: opacity 0.3s;
  pointer-events: auto;
}

.btn:hover {
  opacity: 0.85;
}

/* Improve readability on smaller screens */
@media (max-width: 600px) {
  .carousel__item {
    width: 250px;
    height: 320px;
    margin: -160px 0 0 -125px;
  }
  .hero-text h1 {
    font-size: 1.75rem;
  }
  .hero-text p {
    font-size: 1rem;
  }
}

/* Accessibility: reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  #carousel {
    transition: none;
  }
}