:root {
  --bg-dark: #000000;
  --text-primary: #f5f5f7;
  --text-secondary: #D4AF37;
  --accent: #ffffff;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  background-color: var(--bg-dark);
}

body {
  background-color: transparent;
  color: var(--text-primary);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ---------------- Loader ---------------- */
#loader {
  position: fixed;
  inset: 0;
  background: var(--bg-dark);
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: opacity 1s ease, visibility 1s;
}
.loader-text {
  font-size: 1.2rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-secondary);
  animation: pulse 2s infinite cubic-bezier(0.4, 0, 0.6, 1);
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .5; }
}

/* ---------------- Video Background ---------------- */
.video-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  pointer-events: none;
  background: var(--bg-dark);
}
#bg-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.7; /* Keep it slightly dim for contrast */
}
.video-overlay {
  position: absolute;
  inset: 0;
  /* Darken edges slightly to center focus and improve text readability */
  background: radial-gradient(circle at center, transparent 0%, rgba(0,0,0,0.85) 100%);
  z-index: 1;
}

/* ---------------- Structural Classes ---------------- */
.align-left {
  padding-left: 10vw;
  padding-right: 40vw;
}
.align-right {
  padding-left: 40vw;
  padding-right: 10vw;
}
.align-center {
  padding: 0 15vw;
  text-align: center;
}

.panel {
  min-height: 120vh; /* Giving enough breathing room to the scroll */
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  z-index: 2;
  padding: 10vh 0;
}

/* ---------------- Typography ---------------- */
.brand-logo {
  max-width: 180px;
  margin-bottom: 5vh;
  opacity: 0.9;
}

.studio-brand-logo {
  max-width: 480px;
  margin-top: 4.5rem;
  opacity: 0.85;
  display: block;
  transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.studio-brand-logo:hover {
  opacity: 1;
}

.hero-title {
  font-size: clamp(3rem, 7vw, 10rem);
  line-height: 0.95;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.highlight {
  color: var(--text-secondary);
}

.text-blue {
  color: #0A84FF; /* Premium electric blue */
}

.hero-subtitle {
  font-size: clamp(1.2rem, 2vw, 2.2rem);
  line-height: 1.4;
  font-weight: 300;
  color: var(--text-primary);
  max-width: 90%;
  margin-top: 3rem;
}

.huge-text {
  font-size: clamp(2.5rem, 5vw, 6.5rem);
  line-height: 1.1;
  font-weight: 400;
  letter-spacing: -0.02em;
}

.large-text {
  font-size: clamp(1.5rem, 3vw, 3rem);
  line-height: 1.3;
  font-weight: 300;
  letter-spacing: -0.01em;
}

.craft-desc {
  margin-top: 4rem;
}

.text-secondary {
  color: var(--text-secondary);
}

.section-title {
  font-size: clamp(3rem, 6vw, 8rem);
  line-height: 1;
  font-weight: 600;
  letter-spacing: -0.03em;
  margin-bottom: 2rem;
}

.massive-title {
  font-size: clamp(4rem, 12vw, 15rem);
  line-height: 0.8;
  font-weight: 600;
  letter-spacing: -0.04em;
  margin-bottom: 2rem;
}

.small-label {
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  display: block;
}

/* ---------------- Specific Sections ---------------- */
.pillars-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 3vw;
  padding: 0 5vw;
}
.pillar {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  text-align: center;
}
.pillar-title {
  font-size: clamp(1.2rem, 2.5vw, 2.5rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
  color: var(--text-secondary);
}
.pillar-desc {
  font-size: clamp(1rem, 1.1vw, 1.2rem);
  line-height: 1.5;
  color: var(--text-primary);
  margin-bottom: 2rem;
  font-weight: 300;
  max-width: 85%;
  margin-left: auto;
  margin-right: auto;
}
.pillar-img-wrapper {
  max-width: 75%;
  width: 100%;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.7s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  z-index: 1;
}

.pillar-img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  border-radius: inherit;
  opacity: 0.85;
  transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Luxurious Golden Frame Inlay (Museum Frame style) */
.pillar-img-wrapper::before {
  content: '';
  position: absolute;
  inset: 10px; /* Fine frame margin */
  border: 1px solid #D4AF37;
  border-radius: 8px;
  opacity: 0;
  transform: scale(1.05);
  transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
  z-index: 3;
}

/* Premium Light Sweep Shimmer effect (White and Gold gradient) */
.pillar-img-wrapper::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -60%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    45deg,
    transparent 0%,
    transparent 40%,
    rgba(255, 255, 255, 0.12) 48%,
    rgba(212, 175, 55, 0.28) 50%,
    rgba(255, 255, 255, 0.12) 52%,
    transparent 60%,
    transparent 100%
  );
  transform: rotate(25deg) translate(-30%, -30%);
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
  z-index: 2;
}

/* Luxurious hover trigger states */
.pillar-img-wrapper:hover {
  transform: translateY(-8px) scale(1.03);
  border-color: rgba(212, 175, 55, 0.35);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.75), 
              0 0 30px rgba(212, 175, 55, 0.28);
}

.pillar-img-wrapper:hover .pillar-img {
  transform: scale(1.04);
  opacity: 1;
}

.pillar-img-wrapper:hover::before {
  opacity: 1;
  transform: scale(1);
}

.pillar-img-wrapper:hover::after {
  opacity: 1;
  animation: lightSweep 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes lightSweep {
  0% {
    transform: rotate(25deg) translate(-30%, -30%);
  }
  100% {
    transform: rotate(25deg) translate(20%, 20%);
  }
}

.product {
  min-height: 120vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  z-index: 2;
  padding: 10vh 0;
}

/* ---------------- Character Grid ---------------- */
.character-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8rem;
  margin-top: 3rem;
  width: 100%;
  max-width: 1750px;
  perspective: 1000px; /* Subtle depth on grid hover */
}

/* ---------------- Rope Winding Layout (CARDS ROPE) ---------------- */
.rope-outer-container {
  width: 100%;
  display: flex;
  justify-content: center;
  overflow: visible;
  position: relative;
  perspective: 2000px; /* Enable beautiful 3D perspective depth */
}

.rope-layout-wrapper {
  position: relative;
  width: 115vw !important; /* Expanded majestic scale - wider and more spacious */
  max-width: 2400px !important;
  margin: 6rem 0 0 0;
  aspect-ratio: 1920 / 1080;
  overflow: visible;
  flex-shrink: 0;
  transform-style: preserve-3d; /* Keep children in 3D space */
  will-change: transform;
}

.rope-bg-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  z-index: 1;
  filter: drop-shadow(0 20px 30px rgba(0, 0, 0, 0.75));
  transform: translateZ(0); /* Anchor back in 3D space */
  will-change: transform;
}

.rope-grid {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  margin: 0 !important;
  padding: 0 !important;
  max-width: none !important;
  display: block !important; /* Overwrite grid display on desktop to allow absolute positioning of children */
}

/* Absolute Positions on Rope Loops for 6 Cards */
.rope-grid .character-card {
  position: absolute !important;
  width: 14.5% !important;
  aspect-ratio: 2 / 3 !important;
  border-radius: 0 !important; /* Keep natural torn PNG shape */
}

/* Card 1: Grog Card (top-left) */
.rope-grid .character-card[data-char-id="carta-grog"] {
  left: 11.35% !important;
  top: 13.39% !important;
}

/* Card 2: Scoundrel Card (bottom-left) */
.rope-grid .character-card[data-char-id="carta-astuta"] {
  left: 21.9% !important;
  top: 53.41% !important;
}

/* Card 3: Captain Card (top-center) */
.rope-grid .character-card[data-char-id="carta-cap"] {
  left: 41.38% !important;
  top: 13.65% !important;
}

/* Card 4: Hmm Card (bottom-center) */
.rope-grid .character-card[data-char-id="carta-hummm"] {
  left: 53.74% !important;
  top: 49.83% !important;
}

/* Card 5: Cutpurse Card (top-right) */
.rope-grid .character-card[data-char-id="carta-ladra"] {
  left: 63.99% !important;
  top: 5.67% !important;
}

/* Card 6: Nonsense Card (bottom-right) */
.rope-grid .character-card[data-char-id="carta-nonsense"] {
  left: 78.88% !important;
  top: 44.9% !important;
}


.character-card {
  position: relative;
  aspect-ratio: 2 / 3;
  border-radius: 20px;
  overflow: visible;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  outline: none !important;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  transform-style: preserve-3d;
  transform: translateZ(40px); /* Lift cards slightly in 3D space to float elegantly */
}

.character-card.active {
  cursor: pointer;
}

.character-card.active:hover {
  transform: translateY(-12px) scale(1.03) rotateX(2deg) translateZ(60px); /* Extra lift on hover */
}

/* --- Slow and elegant idle floating animations (Simulating ocean sways) --- */
@keyframes cardFloat1 {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-10px) rotate(0.6deg); }
}

@keyframes cardFloat2 {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-7px) rotate(-0.5deg); }
}

@keyframes cardFloat3 {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-12px) rotate(0.4deg); }
}

/* Assign distinct floating loops for realistic desynchronized motion on the rope */
.rope-grid .character-card[data-char-id="carta-grog"] .character-poster {
  animation: cardFloat1 7s ease-in-out infinite;
}
.rope-grid .character-card[data-char-id="carta-astuta"] .character-poster {
  animation: cardFloat2 8s ease-in-out infinite;
}
.rope-grid .character-card[data-char-id="carta-cap"] .character-poster {
  animation: cardFloat3 9s ease-in-out infinite;
}
.rope-grid .character-card[data-char-id="carta-hummm"] .character-poster {
  animation: cardFloat1 8.5s ease-in-out infinite;
}
.rope-grid .character-card[data-char-id="carta-ladra"] .character-poster {
  animation: cardFloat2 7.5s ease-in-out infinite;
}
.rope-grid .character-card[data-char-id="carta-nonsense"] .character-poster {
  animation: cardFloat3 9.5s ease-in-out infinite;
}

.character-poster {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: visible;
  border-radius: inherit;
}

.character-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.character-card.active:hover .character-poster img {
  transform: scale(1.06);
}

.character-overlay {
  position: absolute;
  inset: 0;
  background: transparent !important;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 2rem 1.8rem;
  z-index: 2;
  transition: background 0.5s ease;
}

.character-card.active:hover .character-overlay {
  background: transparent !important;
}

.char-name {
  font-size: clamp(1.2rem, 1.8vw, 1.8rem);
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 0.4rem;
  letter-spacing: -0.01em;
  transition: color 0.3s ease;
}

.character-card.active:hover .char-name {
  color: #D4AF37; /* Highlight active name in gold on hover */
}

.char-action {
  font-size: 0.8rem;
  color: #D4AF37;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-weight: 600;
  transform: translateY(12px);
  opacity: 0;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.character-card.active:hover .char-action {
  transform: translateY(0);
  opacity: 1;
}

/* Placeholders Styles */
.character-card.placeholder {
  cursor: not-allowed;
  opacity: 0.55;
  transition: opacity 0.5s ease, border-color 0.5s ease, transform 0.5s ease;
}

.character-card.placeholder:hover {
  opacity: 0.85;
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-4px);
}

.poster-placeholder-bg {
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at center, rgba(20, 20, 24, 0.8) 0%, rgba(10, 10, 12, 0.95) 100%);
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.poster-placeholder-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.02) 0%, transparent 100%);
  pointer-events: none;
}

.silhueta {
  font-size: 3.5rem;
  opacity: 0.08;
  filter: grayscale(1);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.character-card.placeholder:hover .silhueta {
  opacity: 0.15;
  transform: scale(1.08);
}

.char-badge {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: rgba(255, 255, 255, 0.35);
  font-weight: 400;
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.02);
  align-self: flex-start;
}

/* ---------------- 3D Story Modal Overlay ---------------- */
.story-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  /* Premium background: cinematic dark radial vignette */
  background: radial-gradient(circle at center, rgba(0, 0, 0, 0.45) 0%, rgba(0, 0, 0, 0.9) 100%);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  overflow: hidden;
}

.story-bg-layer {
  position: absolute;
  inset: -2%; /* Extended very slightly (only 2%) to preserve original scale and fit perfectly on the page */
  background: url('../img/BG CARDS.png') no-repeat center center;
  background-size: cover;
  pointer-events: none;
  z-index: 0;
  will-change: transform;
  transform: translateZ(0); /* Anchor in 3D space */
}

.story-overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: all;
}

.story-close-btn {
  position: absolute;
  top: 4vh;
  right: 4vw;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.7);
  font-size: 2rem;
  line-height: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 10010;
  padding-bottom: 4px; /* Align cross vertically */
}

.story-close-btn:hover {
  background: rgba(212, 175, 55, 0.1);
  border-color: #D4AF37;
  color: #D4AF37;
  transform: rotate(90deg) scale(1.05);
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.2);
}

.story-modal-wrapper {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  width: 95%;
  max-width: 1650px; /* Expanded to fit larger illustration and carousel beautifully */
  gap: 6rem;
  position: relative;
  padding: 2rem;
  z-index: 10005;
  transform-style: preserve-3d; /* Support nested 3D elements */
  will-change: transform;
}

.story-portrait-side {
  flex: 1.3; /* Increased flex ratio from 1 */
  max-width: 680px; /* Increased from 520px */
  display: flex;
  justify-content: center;
  align-items: center;
  perspective: 1200px;
  position: relative; /* Positioning context for background brushstroke */
  transform-style: preserve-3d;
  --brushstroke-x: 0px;
  --brushstroke-y: 0px;
}

.story-portrait-side::before {
  content: '';
  position: absolute;
  top: -25%;
  left: -35%;
  width: 170%;
  height: 150%;
  background: url('../img/BG PINCELADAS.png') no-repeat center center;
  background-size: contain;
  opacity: 0.95; /* high legibility and premium contrast */
  z-index: 1;
  pointer-events: none;
  transform: translate3d(var(--brushstroke-x), var(--brushstroke-y), 10px) rotateY(-5deg);
  will-change: transform;
}

.story-char-img {
  width: 100%;
  height: auto;
  max-height: 85vh; /* Increased from 72vh for majestic scale */
  object-fit: contain;
  filter: none !important;
  border: none !important;
  box-shadow: none !important;
  outline: none !important;
  position: relative;
  z-index: 2; /* Sits firmly on top of the brushstrokes background */
  transform-style: preserve-3d;
  will-change: transform;
  animation: storyCharFloat 7.5s ease-in-out infinite;
}

@keyframes storyCharFloat {
  0%, 100% { transform: translateZ(50px) rotateY(-5deg) translateY(0); }
  50% { transform: translateZ(50px) rotateY(-5deg) translateY(-14px); }
}

.story-content-side {
  flex: 1.2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transform-style: preserve-3d;
}

.story-char-title {
  max-width: 380px; /* Limit size for the character name PNG logo */
  width: 90%;
  height: auto;
  object-fit: contain;
  display: block;
  margin: 0 auto 4.5rem auto; /* Centered, with 4.5rem margin-bottom */
  opacity: 0;
  transform: translateY(-20px) translateZ(40px); /* Lift title slightly */
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.1s,
              opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.1s;
}

/* Proportional name logo scale adjustments to match CAP's visual weight and height */
.story-overlay[data-char-id="carta-cap"] .story-char-title {
  max-width: 380px;
}
.story-overlay[data-char-id="carta-astuta"] .story-char-title {
  max-width: 680px; /* "SCOUNDREL" is long and flat */
}
.story-overlay[data-char-id="carta-ladra"] .story-char-title {
  max-width: 580px; /* "CUTPURSE" is long and flat */
}
.story-overlay[data-char-id="carta-grog"] .story-char-title {
  max-width: 550px; /* "GROG" is medium flat */
}
.story-overlay[data-char-id="carta-nonsense"] .story-char-title {
  max-width: 620px; /* "NONSENSE" is long */
}
.story-overlay[data-char-id="carta-hummm"] .story-char-title {
  max-width: 480px; /* "HMM" is taller */
}

.story-overlay.active .story-char-title {
  opacity: 1;
  transform: translateY(0) translateZ(40px); /* Keep Z lift active */
}

/* ---------------- 3D Carousel Scene ---------------- */
.carousel-3d-scene {
  width: 100%;
  height: 540px;
  perspective: 1200px;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  overflow: visible;
  transform: translateZ(30px); /* Lift carousel forward */
}

.carousel-3d-ring {
  width: 720px;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  display: flex;
  justify-content: center;
  align-items: center;
  will-change: transform;
}

.carousel-3d-card {
  position: absolute;
  width: 630px;
  height: 470px;
  background: transparent !important; /* No background frame, transparent floating text */
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border: none !important; /* No frame border */
  box-shadow: none !important; /* No background shadow */
  outline: none !important;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  will-change: transform, opacity, filter;
  pointer-events: none; /* Managed dynamically in JavaScript */
}

.story-text {
  font-size: clamp(1.2rem, 1.55vw, 1.55rem);
  line-height: 1.65;
  color: #D4AF37; /* Premium Gold */
  font-weight: 400;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8); /* Dark shadow for excellent legibility on dark glass */
  text-align: center;
  letter-spacing: 0.015em;
  opacity: 0.95;
}

/* ---------------- Carousel Controls ---------------- */
.story-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 820px;
  margin-top: 5.5rem;
  z-index: 10;
  opacity: 0;
  transform: translateY(20px) translateZ(30px); /* Lift controls forward */
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.2s,
              opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.2s;
}

.story-overlay.active .story-controls {
  opacity: 1;
  transform: translateY(0) translateZ(30px); /* Keep Z lift active */
}

.story-nav-btn {
  background: rgba(212, 175, 55, 0.03);
  border: 1px solid rgba(212, 175, 55, 0.15);
  color: #D4AF37;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  padding: 0.75rem 1.6rem;
  border-radius: 30px;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.story-nav-btn:hover {
  background: rgba(212, 175, 55, 0.12);
  border-color: #D4AF37;
  box-shadow: 0 0 15px rgba(212, 175, 55, 0.2);
  color: #ffffff;
}

.story-dots {
  display: flex;
  gap: 0.9rem;
  align-items: center;
}

.story-dots .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.story-dots .dot:hover {
  background: rgba(212, 175, 55, 0.5);
}

.story-dots .dot.active {
  width: 22px;
  border-radius: 4px;
  background: #D4AF37;
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
}


/* ---------------- Timeline Section ---------------- */
.timeline-section {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.timeline {
  margin-top: 4rem;
  display: flex;
  flex-direction: column;
  position: relative;
  border-left: 1px solid rgba(255, 255, 255, 0.15);
  margin-left: 1rem;
}

.timeline-item {
  position: relative;
  padding-left: 3rem;
  padding-bottom: 4rem;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-line {
  position: absolute;
  left: -1px;
  top: 0;
  bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom, #D4AF37 0%, #D4AF37 30%, transparent 100%);
}

.timeline-dot {
  position: absolute;
  left: -4px;
  top: 0.6rem;
  width: 7px;
  height: 7px;
  background-color: #D4AF37;
  border-radius: 50%;
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.8);
}

.timeline-step {
  font-size: clamp(1.5rem, 2.5vw, 2.5rem);
  font-weight: 300;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.timeline-step .gold-text {
  color: #D4AF37;
  font-weight: 400;
}

.timeline-desc {
  font-size: clamp(1rem, 1.2vw, 1.5rem);
  color: var(--text-secondary);
  font-weight: 300;
  line-height: 1.5;
  max-width: 500px;
}

/* ---------------- CTA / Footer ---------------- */
.cta {
  min-height: 100vh;
  background: linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,0.8) 100%);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  justify-content: center;
  align-items: center;
}
.cta-title {
  font-size: clamp(2rem, 4vw, 5rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 4rem;
  font-weight: 400;
}
.footer-links {
  display: flex;
  gap: 3rem;
  justify-content: center;
}
.link {
  color: var(--text-primary);
  text-decoration: none;
  font-size: 1.2rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  transition: all 0.3s ease;
}
.link:hover {
  color: var(--text-secondary);
}
.link.highlight {
  font-weight: 600;
  border-bottom: 1px solid var(--text-primary);
  padding-bottom: 4px;
}
.link.highlight:hover {
  border-color: var(--text-secondary);
}

/* ---------------- GSAP Overrides ---------------- */
[data-anim] {
  opacity: 0; /* Changed from visibility: hidden to opacity to ensure text is selectable after animation or fallback */
}

/* ---------------- Mobile Adjustments ---------------- */
@media (max-width: 768px) {
  .align-left, .align-right, .align-center {
    padding: 0 8vw;
  }
  .panel {
    min-height: 100vh;
  }
  .pillars-wrapper {
    flex-direction: column;
    gap: 4rem;
    padding: 15vh 5vw;
  }
  .footer-links {
    flex-direction: column;
    gap: 2rem;
  }
}

/* Media adjustments for 3D Carousel and Character Grid */
@media (max-width: 900px) {
  .story-modal-wrapper {
    flex-direction: column;
    gap: 2rem;
    width: 100%;
    padding: 1.5rem;
  }

  .story-portrait-side {
    position: absolute;
    inset: 0;
    width: 100%;
    max-width: 100%;
    height: 100%;
    opacity: 0.12; /* Ambient background character behind text */
    z-index: 1;
    pointer-events: none;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
  }

  .story-portrait-side::before {
    transform: none;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
  }

  .story-char-img {
    height: 90%;
    width: 90%;
    max-height: 90vh;
    object-fit: contain;
    transform: none;
    filter: none;
  }

  .story-content-side {
    position: relative;
    z-index: 2;
    width: 100%;
  }

  .character-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 4.5rem;
    max-width: 950px;
  }
  .rope-bg-image {
    display: none !important;
  }
  .rope-layout-wrapper {
    aspect-ratio: auto !important;
    height: auto !important;
    max-width: 950px !important;
    margin: 2rem auto !important;
    width: 100% !important;
  }
  .rope-grid {
    position: relative !important;
    width: 100% !important;
    height: auto !important;
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 4.5rem !important;
  }
  .rope-grid .character-card {
    position: relative !important;
    left: auto !important;
    top: auto !important;
    width: 100% !important;
    aspect-ratio: 2 / 3 !important;
  }
  .carousel-3d-scene {
    height: 400px;
  }
  .carousel-3d-ring {
    width: 400px;
  }
  .carousel-3d-card {
    width: 370px;
    height: 320px;
    padding: 2rem 1.6rem;
  }
  .story-text {
    font-size: 1.1rem;
    line-height: 1.55;
  }
  .story-char-title {
    max-width: 280px;
    margin-bottom: 3rem;
  }
  .story-overlay[data-char-id="carta-cap"] .story-char-title {
    max-width: 280px;
  }
  .story-overlay[data-char-id="carta-astuta"] .story-char-title {
    max-width: 500px;
  }
  .story-overlay[data-char-id="carta-ladra"] .story-char-title {
    max-width: 430px;
  }
  .story-overlay[data-char-id="carta-grog"] .story-char-title {
    max-width: 410px;
  }
  .story-overlay[data-char-id="carta-nonsense"] .story-char-title {
    max-width: 460px;
  }
  .story-overlay[data-char-id="carta-hummm"] .story-char-title {
    max-width: 360px;
  }
  .story-controls {
    margin-top: 4.2rem;
    max-width: 530px;
  }
}

@media (max-width: 600px) {
  .character-grid {
    grid-template-columns: 1fr;
    gap: 3.2rem;
    max-width: 460px;
    margin-left: auto;
    margin-right: auto;
  }
  .rope-layout-wrapper {
    max-width: 460px !important;
    width: 100% !important;
  }
  .rope-grid {
    grid-template-columns: 1fr !important;
    gap: 3.2rem !important;
  }
  .carousel-3d-scene {
    height: 340px;
  }
  .carousel-3d-ring {
    width: 320px;
  }
  .carousel-3d-card {
    width: 290px;
    height: 260px;
    padding: 1.5rem 1.2rem;
    border-radius: 20px;
  }
  .story-text {
    font-size: 1rem;
    line-height: 1.5;
  }
  .story-char-title {
    max-width: 220px;
    margin-bottom: 2.2rem;
  }
  .story-overlay[data-char-id="carta-cap"] .story-char-title {
    max-width: 220px;
  }
  .story-overlay[data-char-id="carta-astuta"] .story-char-title {
    max-width: 390px;
  }
  .story-overlay[data-char-id="carta-ladra"] .story-char-title {
    max-width: 340px;
  }
  .story-overlay[data-char-id="carta-grog"] .story-char-title {
    max-width: 320px;
  }
  .story-overlay[data-char-id="carta-nonsense"] .story-char-title {
    max-width: 360px;
  }
  .story-overlay[data-char-id="carta-hummm"] .story-char-title {
    max-width: 280px;
  }
  .story-controls {
    margin-top: 3.5rem;
    max-width: 450px;
  }
  .story-nav-btn {
    font-size: 0.75rem;
    padding: 0.6rem 1.1rem;
    letter-spacing: 0.1em;
  }
  .story-close-btn {
    top: 3vh;
    right: 5vw;
    width: 44px;
    height: 44px;
    font-size: 1.6rem;
  }
}

/* ---------------- Contact Page ---------------- */
.contact-page {
  background-color: transparent;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 0;
  display: flex;
  flex-direction: column;
  perspective: 1500px;
  perspective-origin: center center;
}

.contact-nav {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: 3vw 5vw;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
}

.contact-nav .contact-logo {
  max-width: 140px;
  opacity: 0.95;
  transition: opacity 0.3s ease;
}

.contact-nav .contact-logo:hover {
  opacity: 1;
}

/* Text Highlights */
.text-blue {
  color: #0A84FF;
}

/* Deep textured background layer far back in Z space */
.contact-bg-texture {
  position: absolute;
  inset: -10%; /* Extended slightly to prevent hard clipping during parallax movement */
  background: linear-gradient(to right, #020204 15%, rgba(2, 2, 4, 0.6) 45%, transparent 70%),
              url('../img/BG_CONTATO.jpg') no-repeat center center;
  background-size: cover; /* Expanded proportionally to cover the entire viewport */
  opacity: 1; /* Fully visible and vibrant */
  pointer-events: none;
  z-index: 0;
  transform: translateZ(-100px) scale(1.15);
  will-change: transform;
}

/* Subtle brand blue glow centered behind content in Z-space - perfectly soft and borderless */
.contact-brand-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) translateZ(-50px);
  width: 120vw;
  height: 120vh;
  background: radial-gradient(circle at center, rgba(10, 132, 255, 0.18) 0%, rgba(10, 132, 255, 0) 30%);
  pointer-events: none;
  z-index: 0;
  will-change: transform;
}

.contact-container {
  flex: 1;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  padding: 8vw 5vw 4vh 5vw; /* Balanced padding to align perfectly after absolute nav */
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  transform-style: preserve-3d;
  will-change: transform;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  width: 100%;
  gap: 5vw;
  transform-style: preserve-3d;
}

.contact-left {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-left: 2vw;
  transform-style: preserve-3d;
  margin-left: -200px; /* Shift contact details to the left by 200px on desktop */
}

.contact-left .massive-title {
  font-size: clamp(4.5rem, 7.5vw, 7.5rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
  margin: 0;
  color: #ffffff;
  transform: translateZ(80px);
  transform-style: preserve-3d;
}

.contact-subtitle {
  font-size: clamp(1.2rem, 1.8vw, 1.6rem);
  font-weight: 300;
  color: var(--text-secondary);
  margin-top: 2rem;
  line-height: 1.45;
  max-width: 90%;
  transform: translateZ(40px);
}

.contact-right {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0;
  transform-style: preserve-3d;
}

.contact-info-wrapper {
  margin-top: 3.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 1rem;
  transform: translateZ(30px);
}

.contact-info-block {
  display: flex;
  align-items: center;
  gap: 1.8rem;
  padding: 2.2rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  transform: translateZ(30px);
  transform-style: preserve-3d;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.contact-info-block:hover {
  transform: translateZ(60px) translateX(12px);
  border-color: rgba(212, 175, 55, 0.25);
}

.contact-info-block.borderless {
  border-bottom: none;
}

.info-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  flex-shrink: 0;
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.info-icon svg {
  width: 18px;
  height: 18px;
}

.contact-info-block:hover .info-icon {
  border-color: #D4AF37;
  color: #D4AF37;
  transform: scale(1.15) translateZ(15px);
  background-color: rgba(212, 175, 55, 0.08);
  box-shadow: 0 0 15px rgba(212, 175, 55, 0.25);
}

.info-content h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: #ffffff;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.info-content p {
  font-size: 1.15rem;
  color: #0A84FF;
  font-weight: 400;
  margin: 0;
  transition: color 0.4s ease;
}

.contact-info-block:hover .info-content p {
  color: #ffffff;
}

.social-circles {
  display: flex;
  gap: 1.2rem;
  margin-top: 0.4rem;
  transform-style: preserve-3d;
}

.social-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background-color: transparent;
  color: var(--text-primary);
  border: 1px solid rgba(255, 255, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  transform: translateZ(10px);
}

.social-circle svg {
  width: 16px;
  height: 16px;
}

.social-circle:hover {
  border-color: #D4AF37;
  color: #D4AF37;
  transform: scale(1.15) translateZ(15px);
  background-color: rgba(212, 175, 55, 0.08);
  box-shadow: 0 0 15px rgba(212, 175, 55, 0.25);
}

/* Mobile responsive */
@media (max-width: 900px) {
  .contact-page {
    perspective: none;
  }
  .contact-nav {
    position: relative;
    justify-content: center;
    padding: 6vw 8vw;
  }
  .contact-container {
    padding: 4vh 8vw;
    transform-style: flat;
    transform: none !important;
  }
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
    transform-style: flat;
  }
  .contact-left {
    padding-left: 0;
    transform-style: flat;
    margin-left: 0 !important; /* Reset alignment shift on mobile viewports */
  }
  .contact-left .massive-title {
    font-size: clamp(3rem, 8vw, 4.5rem);
    transform: none;
  }
  .contact-subtitle {
    max-width: 100%;
    transform: none;
    margin-top: 1.5rem;
  }
  .contact-info-wrapper {
    margin-top: 2.5rem;
  }
  .contact-right {
    padding-left: 0;
    transform-style: flat;
  }
  .contact-info-block {
    padding: 1.8rem 0;
    transform: none !important;
    transform-style: flat;
  }
  .contact-info-block:hover {
    transform: translateX(8px) !important;
  }
  .social-circles {
    transform-style: flat;
  }
  .social-circle {
    transform: none !important;
  }
  .social-circle:hover {
    transform: scale(1.1) !important;
  }
  .contact-bg-texture {
    transform: none !important;
    inset: 0;
    background: linear-gradient(to bottom, rgba(2, 2, 4, 0.9) 0%, rgba(2, 2, 4, 0.5) 50%, rgba(2, 2, 4, 0.95) 100%),
                url('../img/BG_CONTATO.jpg') no-repeat center center;
    background-size: cover;
    opacity: 1;
  }
  .contact-brand-glow {
    transform: translate(-50%, -50%) !important;
    width: 140vw;
    height: 140vh;
    background: radial-gradient(circle at center, rgba(10, 132, 255, 0.22) 0%, rgba(10, 132, 255, 0) 35%);
  }
}

/* --- Elegant Deep Sea Background Bubbles --- */
.story-bubbles-container {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 1; /* Behind the content card stack but on top of moving background layer */
  pointer-events: none;
}

.story-bubble {
  position: absolute;
  bottom: -40px;
  background: radial-gradient(circle at 35% 35%, rgba(255, 255, 255, 0.45) 0%, rgba(255, 255, 255, 0.08) 55%, rgba(10, 132, 255, 0.18) 100%);
  border-radius: 50%;
  pointer-events: none;
  box-shadow: inset -2px -2px 6px rgba(255, 255, 255, 0.25), 
              0 0 10px rgba(10, 132, 255, 0.15);
  will-change: transform, opacity;
}

/* Performant GPU Swaying Trajectories */
.story-bubble.swim-left {
  animation-name: riseSwayLeft;
  animation-timing-function: linear;
  animation-iteration-count: 1;
}

.story-bubble.swim-right {
  animation-name: riseSwayRight;
  animation-timing-function: linear;
  animation-iteration-count: 1;
}

.story-bubble.swim-straight {
  animation-name: riseSwayStraight;
  animation-timing-function: linear;
  animation-iteration-count: 1;
}

@keyframes riseSwayLeft {
  0% {
    transform: translate3d(0, 0, 0) scale(0.65);
    opacity: 0;
  }
  12% {
    opacity: var(--bubble-opacity, 0.6);
  }
  50% {
    transform: translate3d(-35px, -50vh, 0) scale(1.0);
  }
  88% {
    opacity: calc(var(--bubble-opacity, 0.6) * 0.45);
  }
  100% {
    transform: translate3d(15px, -108vh, 0) scale(0.7);
    opacity: 0;
  }
}

@keyframes riseSwayRight {
  0% {
    transform: translate3d(0, 0, 0) scale(0.55);
    opacity: 0;
  }
  12% {
    opacity: var(--bubble-opacity, 0.6);
  }
  50% {
    transform: translate3d(40px, -50vh, 0) scale(0.9);
  }
  88% {
    opacity: calc(var(--bubble-opacity, 0.6) * 0.45);
  }
  100% {
    transform: translate3d(-20px, -108vh, 0) scale(0.75);
    opacity: 0;
  }
}

@keyframes riseSwayStraight {
  0% {
    transform: translate3d(0, 0, 0) scale(0.6);
    opacity: 0;
  }
  12% {
    opacity: var(--bubble-opacity, 0.7);
  }
  50% {
    transform: translate3d(10px, -50vh, 0) scale(0.85);
  }
  88% {
    opacity: calc(var(--bubble-opacity, 0.7) * 0.45);
  }
  100% {
    transform: translate3d(-5px, -108vh, 0) scale(0.75);
    opacity: 0;
  }
}

/* ---------------- Team Page ---------------- */
.team-page {
  background-color: transparent;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 0;
  display: flex;
  flex-direction: column;
  perspective: 1500px;
  perspective-origin: center center;
}

.team-bg-texture {
  position: absolute;
  inset: -10%;
  background: linear-gradient(to right, #020204 15%, rgba(2, 2, 4, 0.6) 45%, transparent 70%),
              url('../img/BG_TEAM.png') no-repeat center center;
  background-size: cover;
  opacity: 0.65;
  pointer-events: none;
  z-index: 0;
  transform: translateZ(-100px) scale(1.15);
  will-change: transform;
}

.team-brand-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) translateZ(-50px);
  width: 120vw;
  height: 120vh;
  background: radial-gradient(circle at center, rgba(10, 132, 255, 0.15) 0%, rgba(10, 132, 255, 0) 35%);
  pointer-events: none;
  z-index: 0;
  will-change: transform;
}

.team-container {
  flex: 1;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  padding: 8vw 5vw 4vh 5vw;
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  transform-style: preserve-3d;
  will-change: transform;
}

.team-content-wrapper {
  display: flex;
  flex-direction: column;
  width: 100%;
  gap: 4rem;
  transform-style: preserve-3d;
}

.team-header {
  transform: translateZ(60px);
}

.team-header .massive-title {
  font-size: clamp(4.5rem, 7.5vw, 7.5rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
  margin: 0;
  color: #ffffff;
}

.team-subtitle {
  font-size: clamp(1.2rem, 1.8vw, 1.6rem);
  font-weight: 300;
  color: var(--text-secondary);
  margin-top: 1.5rem;
  line-height: 1.45;
  max-width: 600px;
}

.team-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 3rem;
  width: 100%;
  transform-style: preserve-3d;
  transform: translateZ(40px);
}

.team-card {
  flex: 1 1 220px;
  max-width: 260px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transform-style: preserve-3d;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
}

/* Floating Animations for Team Cards */
.team-card[data-float="1"] {
  animation: cardFloat1 7.5s ease-in-out infinite;
}

.team-card[data-float="2"] {
  animation: cardFloat2 8.5s ease-in-out infinite;
}

.team-card[data-float="3"] {
  animation: cardFloat3 9.5s ease-in-out infinite;
}

.team-card:hover {
  transform: translateY(-12px) scale(1.05) translateZ(50px) !important;
}

.member-image-wrapper {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: radial-gradient(circle at center, rgba(20, 20, 24, 0.8) 0%, rgba(10, 10, 12, 0.95) 100%);
  position: relative;
  margin-bottom: 1.8rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  transition: border-color 0.6s ease, box-shadow 0.6s ease;
  transform-style: preserve-3d;
}

.team-card:hover .member-image-wrapper {
  border-color: #D4AF37;
  box-shadow: 0 15px 40px rgba(212, 175, 55, 0.25);
}

/* Gold Museum Frame Inlay for Member Photo */
.member-image-wrapper::before {
  content: '';
  position: absolute;
  inset: 6px;
  border: 1px solid #D4AF37;
  border-radius: 50%;
  opacity: 0;
  transform: scale(1.06);
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
  z-index: 3;
}

.team-card:hover .member-image-wrapper::before {
  opacity: 1;
  transform: scale(1);
}

.member-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.team-card:hover .member-img {
  transform: scale(1.08);
}

.member-name {
  font-size: 1.5rem;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 0.5rem;
  letter-spacing: -0.01em;
  transition: color 0.3s ease;
}

.team-card:hover .member-name {
  color: #D4AF37;
}

.member-role {
  font-size: 0.9rem;
  color: #0A84FF;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-weight: 600;
}

.team-footer {
  margin-top: 2rem;
  text-align: center;
  font-size: 1.1rem;
  color: var(--text-primary);
  opacity: 0.8;
  transform: translateZ(30px);
}

.team-cta-link {
  text-decoration: none;
  font-weight: 600;
  border-bottom: 1px solid transparent;
  transition: all 0.3s ease;
}

.team-cta-link:hover {
  border-bottom-color: #0A84FF;
}

/* Mobile responsive for Team page */
@media (max-width: 900px) {
  .team-page {
    perspective: none;
  }
  .team-container {
    padding: 4vh 8vw;
    transform-style: flat;
    transform: none !important;
  }
  .team-content-wrapper {
    transform-style: flat;
    transform: none !important;
    gap: 3rem;
  }
  .team-header {
    text-align: center;
    transform: none !important;
  }
  .team-header .massive-title {
    font-size: clamp(3rem, 8vw, 4.5rem);
  }
  .team-subtitle {
    margin: 1.5rem auto 0 auto;
  }
  .team-grid {
    transform-style: flat;
    transform: none !important;
    gap: 2.5rem;
  }
  .team-card {
    flex: 1 1 45%;
    max-width: 220px;
    animation: none !important;
    transform: none !important;
  }
  .team-card:hover {
    transform: translateY(-6px) !important;
  }
  .team-bg-texture {
    transform: none !important;
    inset: 0;
    background: linear-gradient(to bottom, rgba(2, 2, 4, 0.9) 0%, rgba(2, 2, 4, 0.5) 50%, rgba(2, 2, 4, 0.95) 100%),
                url('../img/BG_TEAM.png') no-repeat center center;
    background-size: cover;
    opacity: 0.65;
  }
  .team-brand-glow {
    transform: translate(-50%, -50%) !important;
  }
}

@media (max-width: 600px) {
  .team-card {
    flex: 1 1 100%;
    max-width: 240px;
  }
}
