/* ==========================================================================
   WOLFMEDIA — GTA SAN ANDREAS HERO BRICK REVEAL STYLES
   Per HERO-BRICK-REVEAL.md: Angled Parallelogram Panels, Ken Burns Motion,
   VHS Scanlines, Edge Color Bars, 8 Typography Sections, and Title Slam
   ========================================================================== */

/* ─── HERO SECTION ──────────────────────────────────────── */
.hero-section {
  position: relative;
  width: 100vw;
  height: 100vh;
  min-height: 680px;
  overflow: hidden;
  background: #050505;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0;
}

/* ─── BRICK CLUSTER (Center Floating Parallelograms) ─────── */
.brick-cluster {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  gap: 0;
  z-index: 5;
  pointer-events: auto;
}

.brick-row {
  display: flex;
  flex-direction: row;
  gap: -8px;              /* negative gap = overlapping edges */
  align-items: flex-end; /* bottom-aligned within row */
}

.row-b {
  margin-top: -38px;      /* rows overlap vertically like brick wall */
  margin-left: 24px;      /* offset for staggered GTA comic-book feel */
}

/* ─── SINGLE BRICK (PARALLELOGRAM) ───────────────────────── */
.brick {
  width: 142px;
  flex-shrink: 0;
  margin-right: -12px;    /* horizontal overlap */
  position: relative;
  z-index: 1;

  /* THE KEY: parallelogram shape matching GTA SA intro titles */
  clip-path: polygon(12% 0%, 100% 0%, 88% 100%, 0% 100%);

  /* Shadow to separate bricks */
  filter: drop-shadow(4px 4px 10px rgba(0,0,0,0.95));

  /* Hover: bricks slightly separate and lift */
  transition: margin-right 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.3s ease, z-index 0s;
  cursor: pointer;
}

.brick:hover {
  z-index: 15;
  margin-right: 0;
  transform: translateY(-6px) scale(1.03);
}

/* ─── INNER (counter-skew prevents content distortion) ────── */
.brick-inner {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
  background-color: #0A0A0A;
}

/* ─── PHOTO ──────────────────────────────────────────────── */
.brick-photo {
  width: 118%;           /* slightly wider to fill parallelogram without clipping */
  height: 100%;
  object-fit: cover;
  object-position: top center;
  filter: contrast(1.18) saturate(0.85) brightness(0.92);
  display: block;
  will-change: transform;
}

/* ─── KEN BURNS ANIMATIONS (Subtle Motion Inside Bricks) ─── */
.kb-zoom-in   { animation: kb-zoom-in   8s ease-in-out infinite alternate; }
.kb-zoom-out  { animation: kb-zoom-out  9s ease-in-out infinite alternate; }
.kb-pan-right { animation: kb-pan-right 10s ease-in-out infinite alternate; }
.kb-pan-left  { animation: kb-pan-left  7s ease-in-out infinite alternate; }
.kb-pan-up    { animation: kb-pan-up    8s ease-in-out infinite alternate; }

@keyframes kb-zoom-in {
  from { transform: scale(1.0); }
  to   { transform: scale(1.14); }
}

@keyframes kb-zoom-out {
  from { transform: scale(1.14); }
  to   { transform: scale(1.0); }
}

@keyframes kb-pan-right {
  from { transform: scale(1.1) translateX(-3.5%); }
  to   { transform: scale(1.1) translateX(3.5%); }
}

@keyframes kb-pan-left {
  from { transform: scale(1.1) translateX(3.5%); }
  to   { transform: scale(1.1) translateX(-3.5%); }
}

@keyframes kb-pan-up {
  from { transform: scale(1.1) translateY(3.5%); }
  to   { transform: scale(1.1) translateY(-3.5%); }
}

/* ─── VIGNETTE ON EACH BRICK ─────────────────────────────── */
.brick-vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 35%, rgba(5,5,5,0.75) 100%);
  pointer-events: none;
  z-index: 2;
}

/* ─── VHS SCANLINES ON EACH BRICK ────────────────────────── */
.brick-inner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 3px,
    rgba(0,0,0,0.22) 3px,
    rgba(0,0,0,0.22) 4px
  );
  z-index: 3;
  pointer-events: none;
}

/* ─── NEON COLOUR BAR (REMOVED AS PER USER REQUEST) ─────── */
.brick::after {
  display: none !important;
}

/* Assign colours per brick */
#brick-1 { --brick-colour: #1E90FF; }
#brick-2 { --brick-colour: #7B2FFF; }
#brick-3 { --brick-colour: #FF6A1A; }
#brick-4 { --brick-colour: #00CFFF; }
#brick-5 { --brick-colour: #F9D923; }
#brick-6 { --brick-colour: #FFFFFF; }
#brick-7 { --brick-colour: #1E90FF; }
#brick-8 { --brick-colour: #7B2FFF; }

/* ─── TYPOGRAPHY SECTIONS (Float Outside Cluster) ───────── */
.type-sections {
  position: absolute;
  inset: 0;
  pointer-events: auto;
  z-index: 10;
  overflow: hidden;
}

.type-label {
  position: absolute;
  opacity: 0;
  max-width: 320px;
  pointer-events: auto;
  cursor: pointer;
  transition: opacity 0.4s ease, transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), filter 0.3s ease;
  user-select: none;
}

.type-label:hover {
  opacity: 1 !important;
  transform: scale(1.05);
  filter: drop-shadow(0 0 15px var(--brick-colour, #1E90FF));
}

.type-label.is-active {
  opacity: 1 !important;
  transform: scale(1.06);
  filter: drop-shadow(0 0 16px var(--brick-colour, #1E90FF));
}

.type-label.is-dimmed {
  opacity: 0.35 !important;
}

.brick-cluster.is-dimmed {
  opacity: 0.15 !important;
  filter: blur(2px) grayscale(30%) !important;
  pointer-events: auto;
  transition: all 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.brick.is-active-brick {
  z-index: 25;
  filter: drop-shadow(0 0 20px var(--brick-colour, #1E90FF)) brightness(1.2) !important;
  transform: translateY(-8px) scale(1.06);
}

/* Desktop fine-tuned positions — 4 on left, 4 on right evenly spaced */
#type-1 { left: 5%; top: 22%; text-align: left;  --brick-colour: #1E90FF; }
#type-5 { left: 5%; top: 38%; text-align: left;  --brick-colour: #F9D923; }
#type-3 { left: 5%; top: 54%; text-align: left;  --brick-colour: #FF6A1A; }
#type-7 { left: 5%; top: 70%; text-align: left;  --brick-colour: #1E90FF; }

#type-2 { right: 5%; top: 22%; text-align: right; --brick-colour: #7B2FFF; }
#type-6 { right: 5%; top: 38%; text-align: right; --brick-colour: #FFFFFF; }
#type-4 { right: 5%; top: 54%; text-align: right; --brick-colour: #00CFFF; }
#type-8 { right: 5%; top: 70%; text-align: right; --brick-colour: #7B2FFF; }

.type-role {
  display: block;
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brick-colour, #1E90FF);
  margin-bottom: 4px;
  text-shadow: 0 0 10px rgba(0,0,0,0.8);
}

.type-name {
  display: block;
  font-family: 'Pricedown', 'Impact', sans-serif;
  font-size: clamp(1.6rem, 2.4vw, 2.4rem);
  color: #FFFFFF;
  letter-spacing: -0.01em;
  line-height: 0.95;
  text-shadow:
    2px 2px 0 rgba(0,0,0,0.9),
    0 0 20px rgba(30,144,255,0.4);
}

/* ─── TYPOGRAPHY EFFECTS SPECIFICS ──────────────────────── */

/* Effect 1: Blinking cursor */
.type-cursor::after {
  content: '|';
  color: #1E90FF;
  display: inline-block;
  margin-left: 2px;
  animation: blink 0.6s step-end infinite;
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* Effect 7: VHS Scanline text */
.type-7 .type-name {
  background-image: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 1px,
    rgba(0,0,0,0.5) 1px,
    rgba(0,0,0,0.5) 2px
  );
  background-size: 100% 2px;
  background-clip: text;
  -webkit-background-clip: text;
}

/* Effect 8: Curtain split wrapper */
.type-name-wrap {
  position: relative;
  display: inline-block;
}

.name-top, .name-bottom {
  display: block;
}

.name-bottom {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
}

/* ─── RESPONSIVE BREAKPOINTS (Per HERO-BRICK-REVEAL.md) ──── */
/* ─── RESPONSIVE BREAKPOINTS (768px, 480px, 360px) ──────── */
@media (max-width: 1024px) {
  .brick {
    width: 105px;
    margin-right: -8px;
  }
  .row-a #brick-1 { height: 200px !important; }
  .row-a #brick-2 { height: 250px !important; }
  .row-a #brick-3 { height: 185px !important; }
  .row-a #brick-4 { height: 235px !important; }
  .row-b #brick-5 { height: 220px !important; }
  .row-b #brick-6 { height: 245px !important; }
  .row-b #brick-7 { height: 195px !important; }
  .row-b #brick-8 { height: 230px !important; }

  .type-name {
    font-size: 1.4rem;
  }

  .hero-solo-detail {
    max-width: 360px;
  }
}

/* 768px Breakpoint: Single Column Reflow & Vertical Stacking */
@media (max-width: 768px) {
  .hero-section {
    min-height: 100vh;
    min-height: 100dvh;
    padding-top: 80px;
    padding-bottom: 75px;
    justify-content: flex-start;
    overflow-y: auto;
    overflow-x: hidden;
  }

  /* Single Column Reflow for Brick Cluster */
  .brick-cluster {
    position: relative;
    top: auto;
    left: auto;
    transform: none;
    margin: 1rem auto 1.5rem auto;
    width: 100%;
    max-width: 320px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    z-index: 10;
  }

  /* Stack both rows vertically in a clean single column */
  .brick-row,
  .row-a,
  .row-b {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    width: 100% !important;
    margin: 0 !important;
    gap: 10px !important;
  }

  /* All 8 bricks reflow with single-column responsive sizing */
  .brick {
    width: 100% !important;
    max-width: 280px !important;
    height: 90px !important;
    margin-right: 0 !important;
    clip-path: polygon(6% 0%, 100% 0%, 94% 100%, 0% 100%) !important;
    border-radius: 4px;
    transition: transform 0.3s ease, filter 0.3s ease, opacity 0.4s ease;
  }

  .brick-photo {
    width: 100% !important;
    height: 100% !important;
    object-position: center 25% !important;
  }

  /* When solo mode is active on mobile, hide inactive bricks cleanly */
  .hero-section.is-solo-active .brick-cluster {
    margin-bottom: 0.5rem;
  }

  .hero-section.is-solo-active .brick {
    display: none !important;
  }

  .hero-section.is-solo-active .brick.is-solo-brick {
    display: block !important;
    width: 100% !important;
    max-width: 300px !important;
    height: 180px !important;
    transform: none !important;
    margin: 0 auto !important;
    filter: drop-shadow(0 0 25px var(--brick-colour, #1E90FF)) brightness(1.1) !important;
  }

  /* Stacking Typography Labels in Mobile View */
  .type-sections {
    position: relative;
    inset: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 0.5rem 1rem;
    z-index: 12;
    width: 100%;
    pointer-events: none;
  }

  .type-label {
    position: relative !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    bottom: auto !important;
    text-align: center !important;
    width: 100%;
    max-width: 320px;
    display: none; /* In overview, we show the active or first member, or pills at bottom */
  }

  .type-label.is-active,
  .type-label:first-child {
    display: block !important;
    opacity: 1 !important;
  }

  .type-name {
    font-size: clamp(1.5rem, 5vw, 2rem) !important;
    text-align: center;
  }

  .type-role {
    text-align: center;
  }

  /* Mobile Solo Detail Card */
  .hero-solo-detail {
    position: relative !important;
    top: auto !important;
    bottom: auto !important;
    left: auto !important;
    right: auto !important;
    transform: none !important;
    width: 92% !important;
    max-width: 440px !important;
    margin: 0.75rem auto 1.5rem auto !important;
    background: rgba(8, 9, 13, 0.94) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
    padding: 16px !important;
    border-left: 3px solid var(--solo-color, #1E90FF) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-right: 1px solid rgba(255, 255, 255, 0.05) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
    border-radius: 6px !important;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.9) !important;
    z-index: 25 !important;
  }

  .hero-solo-name {
    font-size: clamp(2rem, 6.5vw, 2.5rem) !important; /* ~32px mobile */
    line-height: 1.05;
  }

  .hero-solo-role {
    font-size: 0.88rem !important;
  }

  .hero-solo-bio {
    font-size: 0.82rem !important;
    line-height: 1.6 !important;
    max-height: 110px !important;
  }

  .hero-solo-quote {
    padding: 0.5rem 0.75rem;
  }

  .hero-solo-quote-text {
    font-size: 0.8rem;
  }

  /* Touch-friendly controls: min 44px */
  .hero-solo-controls {
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 6px;
  }

  .hero-solo-btn {
    min-height: 44px;
    height: 44px;
    padding: 0 14px;
    font-size: 0.75rem;
  }

  /* Touch-friendly Ticker */
  .hero-crew-ticker {
    bottom: 8px;
    padding: 4px 8px;
    max-width: 96vw;
  }

  .hero-ticker-pill {
    min-height: 44px;
    height: 44px;
    padding: 6px 12px;
    font-size: 0.75rem;
  }
}

/* 480px Breakpoint (Standard Mobile) */
@media (max-width: 480px) {
  .hero-section {
    padding-top: 72px;
    padding-bottom: 70px;
  }

  .brick-cluster {
    max-width: 290px;
  }

  .brick {
    max-width: 270px !important;
    height: 80px !important;
  }

  .hero-section.is-solo-active .brick.is-solo-brick {
    max-width: 270px !important;
    height: 160px !important;
  }

  .hero-solo-detail {
    padding: 14px !important;
  }

  .hero-solo-name {
    font-size: 2rem !important; /* exactly 32px on 16px root */
  }

  .hero-solo-btn {
    flex: 1 1 calc(50% - 6px);
    justify-content: center;
  }
}

/* 360px Breakpoint (Compact Mobile) */
@media (max-width: 360px) {
  .hero-section {
    padding-top: 68px;
    padding-bottom: 65px;
  }

  .brick-cluster {
    max-width: 260px;
  }

  .brick {
    max-width: 250px !important;
    height: 75px !important;
  }

  .hero-section.is-solo-active .brick.is-solo-brick {
    max-width: 250px !important;
    height: 145px !important;
  }

  .hero-solo-name {
    font-size: 1.85rem !important;
  }

  .hero-solo-detail {
    width: 95% !important;
    padding: 12px !important;
  }
}

/* ─── NATIVE HERO SOLO FOCUS MODE (NO POPUP) ─────────────────── */

/* When spotlight is active, hide all overview names */
.hero-section.is-solo-active .type-sections {
  opacity: 0 !important;
  pointer-events: none !important;
  transition: opacity 0.4s ease;
}

/* When spotlight is active, hide all other bricks except the active one */
.hero-section.is-solo-active .brick {
  opacity: 0 !important;
  pointer-events: none !important;
  transform: scale(0.85);
  transition: all 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.hero-section.is-solo-active .brick.is-solo-brick {
  opacity: 1 !important;
  pointer-events: auto !important;
  z-index: 25;
  transform: scale(1.22) translateY(-6px) !important;
  filter: drop-shadow(0 0 35px var(--brick-colour, #1E90FF)) brightness(1.12) !important;
}

/* Native in-hero typography block (NO popup frame, transparent canvas integration) */
.hero-solo-detail {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  max-width: 440px;
  width: 90%;
  z-index: 20;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.45s ease, transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.hero-solo-detail.is-visible {
  opacity: 1;
  pointer-events: auto;
}

/* Left vs Right positioning */
.hero-solo-detail[data-side="left"] {
  left: 5%;
  right: auto;
  text-align: left;
}

.hero-solo-detail[data-side="right"] {
  right: 5%;
  left: auto;
  text-align: left;
}


.hero-solo-company {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--solo-color, #1E90FF);
  text-transform: uppercase;
}

.hero-solo-name {
  font-family: var(--font-pricedown);
  font-size: clamp(2.4rem, 4.2vw, 3.8rem);
  line-height: 0.95;
  color: #FFFFFF;
  letter-spacing: 0.02em;
  text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.9), 0 0 25px rgba(255, 255, 255, 0.2);
}

.hero-solo-role-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.hero-solo-role {
  font-family: var(--font-nav);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #FFFFFF;
}

.hero-solo-subtitle {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--solo-color, #1E90FF);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-solo-bio {
  font-family: var(--font-space);
  font-size: 0.88rem;
  line-height: 1.6;
  color: #CBD5E1; /* text-slate-300 */
  max-height: 180px;
  overflow-y: auto;
  padding-right: 4px;
}

.hero-solo-bio::-webkit-scrollbar {
  width: 3px;
}
.hero-solo-bio::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
}

.hero-solo-quote {
  position: relative;
  background: rgba(28, 28, 30, 0.4);
  border-left: 3px solid var(--solo-color, #1E90FF);
  padding: 0.6rem 0.9rem;
  border-radius: 0 4px 4px 0;
}

.hero-solo-quote-text {
  font-family: var(--font-space);
  font-style: italic;
  font-size: 0.84rem;
  line-height: 1.45;
  color: #F1F5F9;
}

/* In-Hero Controls */
.hero-solo-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
}

.hero-solo-btn {
  height: 28px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #E2E8F0;
  background: rgba(28, 28, 30, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 2px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.hero-solo-btn:hover {
  border-color: var(--solo-color, #1E90FF);
  color: #FFFFFF;
  background: rgba(30, 144, 255, 0.2);
}

.hero-solo-btn--all {
  border-color: rgba(0, 207, 255, 0.4);
  color: #00CFFF;
}

.hero-solo-btn--paused {
  border-color: #FF6A1A !important;
  color: #FF6A1A !important;
}

/* ─── BOTTOM GTA HUD TICKER ──────────────────────────────── */
.hero-crew-ticker {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 5px;
  z-index: 25;
  background: rgba(5, 5, 5, 0.75);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 4px 10px;
  border-radius: 3px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  overflow-x: auto;
  max-width: 95vw;
}

.hero-ticker-pill {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(232, 232, 232, 0.6);
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 4px 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.hero-ticker-pill:hover {
  color: #FFFFFF;
  border-bottom-color: rgba(255, 255, 255, 0.4);
}

.hero-ticker-pill.is-active {
  color: #FFFFFF;
  font-weight: 700;
  border-bottom-color: var(--ticker-color, #1E90FF);
  text-shadow: 0 0 8px var(--ticker-color, #1E90FF);
}

.hero-ticker-pill--all {
  color: #00CFFF;
  font-weight: 700;
}

.hero-ticker-pill--all.is-active {
  border-bottom-color: #00CFFF;
  text-shadow: 0 0 10px #00CFFF;
}
