/* ============================================================
   🎬 CREW CARDS — CINEMATIC GOLDEN LUXURY v6
   Matching website palette: Deep Teal (#0f2e2d) + Gold (#d4af37)
   Background: uibackground.PNG | Characters: .jpg (cover)
   ============================================================ */

:root {
  --gold-primary: #d4af37;
  --gold-bright: #f9e29c;
  --gold-deep: #8a6d3b;
  --gold-glow: rgba(212, 175, 55, 0.5);

  /* Website palette */
  --teal-dark: #0f2e2d;
  --teal-mid: #1a4a48;
  --teal-accent: #22b3c1;
  --teal-glow: rgba(34, 179, 193, 0.4);

  /* Card tokens */
  --card-border: rgba(212, 175, 55, 0.4);
  --card-border-hover: rgba(212, 175, 55, 0.85);
}

/* ============================================================
   1. SECTION — transparent, body uibackground is the backdrop
   ============================================================ */
.crew-selection-area,
.welcome-card-section {

  background: transparent !important;
  /* 75px = 70px header + 5px gap. Bottom 16px is breathing room */
  padding: 75px 20px 16px;
  position: relative;
  overflow: hidden;
  color: white;
  /* Exactly fills the viewport — no scrolling needed */
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  box-sizing: border-box;
}

/* Stardust particles */
.crew-selection-area::before {
  content: '';
  position: absolute;
  inset: 0;
  
  opacity: 0.45;
  pointer-events: none;
  z-index: 1;
  animation: stardustDrift 120s linear infinite;
}

@keyframes stardustDrift {
  from {
    background-position: 0 0;
  }

  to {
    background-position: 600px 600px;
  }
}

/* ============================================================
   2. HEADER
   ============================================================ */
.crew-header {
  position: relative;
  z-index: 5;
  /* Tight margin — keep cards close to title */
  margin-bottom: 18px;
  text-align: center;
  padding: 0 20px;
  max-width: 700px;
  flex-shrink: 0;
  animation: fadeSlideDown 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes fadeSlideDown {
  from {
    opacity: 0;
    transform: translateY(-28px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Badge */
.crew-header-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(15, 46, 45, 0.7);
  border: 1px solid var(--card-border);
  border-radius: 50px;
  padding: 5px 20px;
  margin-bottom: 14px;
  backdrop-filter: blur(16px);
  animation: badgePulse 3.5s ease-in-out infinite;
}

@keyframes badgePulse {

  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(212, 175, 55, 0);
  }

  50% {
    box-shadow: 0 0 0 8px rgba(212, 175, 55, 0.07);
  }
}

.crew-header-badge span {
  font-family: 'Outfit', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--gold-bright);
}

.crew-header-badge .fa {
  color: var(--gold-primary);
  font-size: 0.55rem;
}

/* Title */
.crew-header h1 {
  font-family: 'Cinzel', serif !important;
  font-size: clamp(1.6rem, 3.5vw, 3.2rem);
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: 3px;
  line-height: 1.2;
  background: linear-gradient(135deg, #fff 0%, var(--gold-bright) 30%, var(--gold-primary) 62%, #8a6d3b 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: titleShimmer 5s ease-in-out infinite;
}

@keyframes titleShimmer {

  0%,
  100% {
    background-position: 0% center;
  }

  50% {
    background-position: 100% center;
  }
}

/* Divider */
.crew-header-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 10px;
}

.divider-line {
  display: block;
  width: 80px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-primary), transparent);
}

.crew-header-diamond {
  color: var(--gold-primary);
  font-size: 0.5rem;
  filter: drop-shadow(0 0 6px var(--gold-primary));
}

/* Subtitle */
.crew-header p {
  color: rgba(255, 255, 255, 0.9) !important;
  font-family: 'Outfit', sans-serif !important;
  font-size: 1rem !important;
  font-weight: 400 !important;
  letter-spacing: 4px !important;
  text-transform: uppercase !important;
  opacity: 1 !important;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6);
}

/* ============================================================
   3. CARDS CONTAINER
   ============================================================ */
.crew-card-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  /* Luca | Aria side by side */
  gap: 10px;
  max-width: 1200px;
  width: 100%;
  position: relative;
  z-index: 10;
  padding: 0 12px;
  flex: 1;
  min-height: 0;
}


/* ============================================================
   4. CARD BASE
   ============================================================ */
.premium-crew-card {
  /* Each card fills its grid cell */
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: 580px;
  border-radius: 22px;
  position: relative;
  cursor: pointer;
  overflow: hidden;
  border: 1px solid var(--card-border);
  box-shadow:
    0 16px 40px rgba(0, 0, 0, 0.65),
    inset 0 0 40px rgba(15, 46, 45, 0.3);
  display: flex;
  flex-direction: column;
  transition:
    transform 0.5s cubic-bezier(0.165, 0.84, 0.44, 1),
    box-shadow 0.5s ease,
    border-color 0.4s ease;
  animation: cardRise 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.crew-luca {
  animation-delay: 0.1s;
}

.crew-aria {
  animation-delay: 0.25s;
}

@keyframes cardRise {
  from {
    opacity: 0;
    transform: translateY(55px) scale(0.95);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Top glass shine */
.premium-crew-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
  z-index: 10;
  pointer-events: none;
}

/* Hover — both cards use teal+gold */
.premium-crew-card:hover {
  transform: translateY(-14px) scale(1.02);
  border-color: var(--card-border-hover);
  box-shadow:
    0 40px 80px rgba(0, 0, 0, 0.6),
    0 0 50px var(--gold-glow),
    0 0 25px var(--teal-glow),
    inset 0 0 40px rgba(15, 46, 45, 0.5);
}

/* ============================================================
   5. IMAGE — portrait cover mode
   ============================================================ */
.card-image-wrapper {
  width: 100%;
  position: relative;
  /* Fill the upper portion of card dynamically */
  flex: 1;
  min-height: 0;
  /* allow flex to shrink */
  flex-shrink: 0;
  overflow: hidden;
}

.card-image-wrapper img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  filter: brightness(0.9) contrast(1.05) saturate(1.1);
  transition:
    transform 0.8s cubic-bezier(0.165, 0.84, 0.44, 1),
    filter 0.5s ease;
}

.premium-crew-card:hover .card-image-wrapper img {
  transform: scale(1.06);
  filter: brightness(1.0) contrast(1.08) saturate(1.15);
}

/* Photo → teal-dark fade at bottom (seamlessly into card content) */
.card-image-wrapper::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60%;
  background: linear-gradient(to bottom,
      transparent 0%,
      rgba(10, 30, 28, 0.4) 35%,
      rgba(10, 30, 28, 0.88) 70%,
      #0c201f 100%);
  z-index: 2;
  pointer-events: none;
}

/* Teal+gold glow on hover */
.card-image-wrapper::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 80%,
      rgba(34, 179, 193, 0.25) 0%,
      rgba(212, 175, 55, 0.12) 45%,
      transparent 70%);
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.6s ease;
}

.premium-crew-card:hover .card-image-wrapper::before {
  opacity: 1;
}

/* ============================================================
   6. CARD CONTENT
   ============================================================ */
.card-content {
  /*background: linear-gradient(180deg, #0c201f 0%, var(--teal-dark) 100%);*/
  width: 100%;
  padding: 12px 28px 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  z-index: 5;
}

/* Role icon */
.crew-role-icon {
  font-size: 1.8rem;
  margin-bottom: 4px;
  filter: drop-shadow(0 0 10px rgba(212, 175, 55, 0.6));
  animation: iconFloat 3.5s ease-in-out infinite;
}

@keyframes iconFloat {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-4px);
  }
}

/* Name */
.crew-name {
  font-family: 'Cinzel', serif !important;
  font-size: 27px;
  font-weight: 700;
  letter-spacing: 6px;
  margin-bottom: 6px;
  text-transform: uppercase;
  background: linear-gradient(180deg, #fff 0%, var(--gold-bright) 50%, var(--gold-primary) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 14px rgba(212, 175, 55, 0.4));
}

/* Tagline row */
.crew-tagline-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}

.gold-sparkle {
  color: var(--gold-bright);
  font-size: 0.8rem;
  filter: drop-shadow(0 0 8px var(--gold-primary));
  animation: sparkleTwinkle 2.5s ease-in-out infinite;
}

.gold-sparkle:last-child {
  animation-delay: 1.2s;
}

@keyframes sparkleTwinkle {

  0%,
  100% {
    opacity: 0.9;
    transform: scale(1);
  }

  50% {
    opacity: 0.3;
    transform: scale(0.65);
  }
}

.crew-tagline {
  font-family: 'Outfit', sans-serif;
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.95rem;
  font-weight: 300;
  letter-spacing: 1.5px;
}

/* Trait pills — teal themed to match website */
.crew-trait-pills {
  display: flex;
  gap: 8px;
  margin-bottom: 22px;
  flex-wrap: wrap;
  justify-content: center;
}

.trait-pill {
  font-family: 'Outfit', sans-serif;
  font-size: 0.68rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
  background: rgba(34, 179, 193, 0.12);
  border: 1px solid rgba(34, 179, 193, 0.35);
  border-radius: 30px;
  padding: 5px 14px;
  transition: background 0.3s ease, border-color 0.3s ease;
}

.premium-crew-card:hover .trait-pill {
  background: rgba(34, 179, 193, 0.22);
  border-color: rgba(212, 175, 55, 0.5);
}

/* ============================================================
   7. BUTTON — teal dark bg, gold border (matches site style)
   ============================================================ */
.btn-choose-crew {
  font-family: 'Outfit', sans-serif !important;
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: #fff;
  background: var(--teal-dark);
  border: 1.5px solid var(--gold-primary);
  padding: 14px 0;
  border-radius: 60px;
  width: 100%;
  max-width: 250px;
  text-align: center;
  transition: all 0.45s cubic-bezier(0.165, 0.84, 0.44, 1);
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
}

.premium-crew-card:hover .btn-choose-crew {
  background: var(--teal-mid);
  border-color: var(--gold-bright);
  color: var(--gold-bright);
  letter-spacing: 4px;
  box-shadow:
    0 0 25px var(--gold-glow),
    0 0 12px var(--teal-glow);
}

/* ============================================================
   8. TABLET (≤1060px)
   ============================================================ */
@media (max-width: 1060px) {
  .crew-card-container {
    gap: 10px;
    /* Still 4 columns, 1 row on tablet */
    grid-template-columns: repeat(2, 1fr);
    /* keep side by side on tablet too */
  }

  .premium-crew-card {
    max-width: none;
  }
}

/* ============================================================
   9. MOBILE (≤768px)
   ============================================================ */
@media (max-width: 768px) {

  .crew-selection-area,
  .welcome-card-section {
    padding: 0px 8px 12px;
    min-height: 500px;
    justify-content: flex-start;
    overflow: hidden;
  }

  /* Header — very compact on mobile */
  .crew-header {
    margin-bottom: 10px;
  }

  .crew-header-badge {
    padding: 4px 12px;
    margin-bottom: 8px;
  }

  .crew-header-badge span {
    font-size: 0.55rem;
    letter-spacing: 2px;
  }

  .divider-line {
    width: 30px;
  }

  .crew-header p {
    font-size: 0.65rem !important;
    letter-spacing: 2.5px !important;
    color: rgba(255, 255, 255, 0.9) !important;
  }

  /* Single column on mobile — rows pack tightly */
  .crew-card-container {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    /* rows size to content, no stretching */
    align-content: start;
    /* pack rows to top, no empty gap between */
    gap: 10px;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
  }


  .premium-crew-card {
    width: 100%;
    max-width: none;
    height: 320px;
    max-height: none;
    border-radius: 16px;
    animation-duration: 0.65s;
  }

  .premium-crew-card:hover {
    transform: none;
  }
}

/* ============================================================
   Touch devices — disable ALL hover effects (no sticky hover on tap)
   ============================================================ */
@media (hover: none) {
  .premium-crew-card:hover {
    transform: none !important;
    box-shadow:
      0 16px 40px rgba(0, 0, 0, 0.65),
      inset 0 0 40px rgba(15, 46, 45, 0.3) !important;
    border-color: var(--card-border) !important;
  }

  .premium-crew-card:hover .card-image-wrapper img {
    transform: none !important;
    filter: brightness(0.9) contrast(1.05) saturate(1.1) !important;
  }

  .premium-crew-card:hover .card-image-wrapper::before {
    opacity: 0 !important;
  }

  .premium-crew-card:hover .btn-choose-crew {
    background: var(--teal-dark) !important;
    border-color: var(--gold-primary) !important;
    color: #fff !important;
    letter-spacing: 3px !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5) !important;
  }

  .premium-crew-card:hover .trait-pill {
    background: rgba(34, 179, 193, 0.12) !important;
    border-color: rgba(34, 179, 193, 0.35) !important;
  }


  /* Image fills grid cell height */
  .card-image-wrapper {
    flex: 1;
    min-height: 0;
    height: auto;
  }

  .card-content {
    padding: 8px 12px 18px;
  }

  .crew-role-icon {
    font-size: 1.3rem;
    margin-bottom: 2px;
  }

  .crew-name {
    font-size: 1.2rem;
    letter-spacing: 3px;
    margin-bottom: 3px;
  }

  .crew-tagline-wrap {
    margin-bottom: 10px;
    gap: 5px;
  }

  .crew-tagline {
    font-size: 0.65rem;
    letter-spacing: 0.5px;
  }

  .gold-sparkle {
    font-size: 0.6rem;
  }

  .crew-trait-pills {
    gap: 5px;
    margin-bottom: 14px;
  }

  .trait-pill {
    font-size: 0.56rem;
    padding: 4px 10px;
  }

  .btn-choose-crew {
    font-size: 0.6rem;
    padding: 10px 0;
    letter-spacing: 2px;
    max-width: 100%;
  }
}

/* Very small phones */
@media (max-width: 380px) {
  .card-image-wrapper {
    height: 180px;
  }

  .crew-name {
    font-size: 1rem;
    letter-spacing: 2px;
  }

  .crew-trait-pills {
    display: none;
  }

  .crew-tagline {
    font-size: 0.58rem;
  }
}

/* ============================================================
   10. FOOTER
   ============================================================ */
.site-footer {
  background: rgba(10, 28, 27, 0.6) !important;
  backdrop-filter: blur(12px);
  border-top: 1px solid rgba(212, 175, 55, 0.15);
  padding: 40px 0 28px;
}

.site-footer p {
  color: rgba(255, 255, 255, 0.4);
  font-family: 'Outfit', sans-serif;
  font-size: 0.82rem;
  text-align: center;
  line-height: 2.2;
  margin: 0;
}

.site-footer a {
  color: rgba(212, 175, 55, 0.65);
  text-decoration: none;
  transition: color 0.3s;
}

.site-footer a:hover {
  color: var(--gold-bright);
}