/* ==========================================================================
   ALAFRAME — CASE STUDY PRESENTATION (V2)
   13-Point Editorial Campaign Deck with Multi-Format Switcher
   ========================================================================== */

.case-study-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(4, 5, 4, 0.97);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--duration-normal) var(--ease-out-expo), visibility var(--duration-normal);
  overflow-y: auto;
  overflow-x: hidden;
}

.case-study-overlay.active {
  opacity: 1;
  visibility: visible;
}

.case-study-modal {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  min-height: 100vh;
  padding: var(--space-2xl) var(--container-pad) var(--space-5xl);
  position: relative;
}

/* Modal Nav Bar */
.case-study-topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-md) 0;
  background: rgba(4, 5, 4, 0.88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: var(--space-2xl);
}

.case-study-nav-left {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.case-study-close-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-primary);
  cursor: pointer;
}

.case-study-close-btn:hover {
  background: var(--bg-surface-elevated);
  border-color: var(--accent);
  color: var(--accent);
}

.case-study-pagination {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.btn-page-nav {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  color: var(--text-primary);
  border-radius: 4px;
  cursor: pointer;
}

.btn-page-nav:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--bg-surface-elevated);
}

/* Hero Section of Case Study */
.cs-header-block {
  margin-bottom: var(--space-2xl);
}

.cs-meta-row {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  flex-wrap: wrap;
  margin-bottom: var(--space-sm);
}

.cs-title {
  font-family: var(--font-display);
  font-size: var(--text-4xl);
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-md);
}

.cs-subtitle {
  font-size: var(--text-xl);
  color: var(--text-secondary);
  max-width: 48ch;
}

/* Interactive Multi-Format Stage */
.cs-media-stage {
  margin-bottom: var(--space-3xl);
  background-color: #000000;
  border: 1px solid var(--border-medium);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow-modal);
}

.cs-format-switcher-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-sm) var(--space-lg);
  background-color: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
}

.format-toggle-group {
  display: flex;
  gap: 6px;
}

.btn-format-toggle {
  font-family: var(--font-body);
  font-size: var(--text-2xs);
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 4px;
  border: 1px solid transparent;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-format-toggle.active {
  background-color: var(--accent);
  border-color: var(--accent);
  color: #000000;
}

.cs-media-display-box {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-xl);
  background: radial-gradient(circle at 50% 50%, #111511 0%, #050605 100%);
  min-height: 520px;
}

.cs-active-frame {
  max-width: 100%;
  max-height: 720px;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all var(--duration-normal) var(--ease-out-expo);
}

.cs-active-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Dynamic Aspect Ratio Classes */
.cs-active-frame.format-16-9 {
  width: 100%;
  aspect-ratio: 16 / 9;
}

.cs-active-frame.format-9-16 {
  width: 340px;
  aspect-ratio: 9 / 16;
}

.cs-active-frame.format-1-1 {
  width: 520px;
  aspect-ratio: 1 / 1;
}

/* Strategic Breakdown Grid */
.cs-breakdown-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: var(--space-3xl);
  margin-bottom: var(--space-4xl);
}

.cs-brief-block {
  display: flex;
  flex-direction: column;
  gap: var(--space-2xl);
}

.cs-brief-card {
  padding: var(--space-xl);
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
}

.cs-brief-label {
  font-family: var(--font-mono);
  font-size: var(--text-2xs);
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--space-xs);
}

.cs-brief-title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  margin-bottom: var(--space-sm);
  letter-spacing: -0.01em;
}

.cs-brief-text {
  font-size: var(--text-base);
  color: var(--text-secondary);
  line-height: 1.65;
}

/* Specifications Sidebar */
.cs-specs-sidebar {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.cs-spec-box {
  padding: var(--space-lg);
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
}

.cs-spec-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: var(--space-md);
}

.cs-spec-item:last-child {
  margin-bottom: 0;
}

.cs-spec-key {
  font-family: var(--font-mono);
  font-size: var(--text-2xs);
  color: var(--text-muted);
  text-transform: uppercase;
}

.cs-spec-val {
  font-size: var(--text-sm);
  color: var(--text-primary);
  font-weight: 500;
}

/* Variations Matrix Inside Case Study */
.cs-variations-section {
  margin-bottom: var(--space-4xl);
  padding: var(--space-2xl);
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
}

.cs-variations-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
  margin-top: var(--space-xl);
}

.cs-variation-card {
  background-color: var(--bg-primary);
  border: 1px solid var(--border-subtle);
  padding: var(--space-lg);
  border-radius: 4px;
}

.cs-variation-tag {
  font-family: var(--font-mono);
  font-size: var(--text-2xs);
  color: var(--accent);
  margin-bottom: var(--space-xs);
}

.cs-variation-hook {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  margin-bottom: var(--space-xs);
}

.cs-variation-desc {
  font-size: var(--text-xs);
  color: var(--text-secondary);
  line-height: 1.55;
}

/* Case Study Bottom Conversion Bar */
.cs-bottom-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-2xl);
  background-color: var(--bg-surface);
  border: 1px solid var(--border-medium);
  border-radius: 8px;
  flex-wrap: wrap;
  gap: var(--space-lg);
}

.cs-bottom-text h4 {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  margin-bottom: 4px;
}

.cs-bottom-text p {
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

/* Responsive */
@media (max-width: 900px) {
  .cs-breakdown-grid {
    grid-template-columns: 1fr;
  }
  .cs-variations-grid {
    grid-template-columns: 1fr;
  }
  .cs-media-display-box {
    padding: var(--space-md);
    min-height: 380px;
  }
  .cs-active-frame.format-9-16 {
    width: 260px;
  }
}

/* ==========================================================================
   ALAFRAME — REAL PORTFOLIO VIEWERS (PHASE 2)
   1. Tower 28 6-Hook Variation Matrix
   2. Editorial Brand Photography Carousels
   3. Single Commercial Video Viewer
   ========================================================================== */

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

.editorial-modal-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background-color: #000000;
  display: block;
}

/* --- 1. TOWER 28 HOOK MATRIX --- */
.t28-variation-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: var(--space-3xl);
  width: 100%;
}

.t28-variation-header {
  text-align: center;
  margin-bottom: var(--space-xl);
  max-width: 600px;
}

.t28-counter-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: var(--text-2xs);
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--accent);
  background: var(--accent-subtle);
  border: 1px solid var(--accent-border);
  padding: 4px 12px;
  border-radius: 4px;
  margin-bottom: var(--space-sm);
}

.t28-hook-title {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}

.t28-hook-headline {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 1.8vw, 1.5rem);
  line-height: 1.35;
  color: var(--text-primary);
  font-weight: 600;
}

.t28-video-wrapper {
  position: relative;
  width: 100%;
  max-width: 380px;
  aspect-ratio: 9 / 16;
  border-radius: 8px;
  overflow: hidden;
  background: #000000;
  border: 1px solid var(--border-medium);
  box-shadow: var(--shadow-modal);
  margin-bottom: var(--space-xl);
}

/* Floating Navigation Arrows on Stage */
.stage-nav-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  background: rgba(6, 7, 6, 0.75);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  color: var(--text-primary);
  font-size: 24px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: all var(--duration-fast);
}

.stage-nav-arrow:hover {
  background: var(--accent);
  color: #000000;
  border-color: var(--accent);
}

.stage-nav-prev {
  left: 12px;
}

.stage-nav-next {
  right: 12px;
}

/* Hook Selector Pills */
.t28-hook-selector {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: var(--space-lg);
}

.hook-pill-btn {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.06em;
  padding: 8px 16px;
  border-radius: 4px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--duration-fast);
}

.hook-pill-btn:hover {
  border-color: var(--border-medium);
  color: var(--text-primary);
}

.hook-pill-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #000000;
  font-weight: 700;
}

.viewer-honest-disclaimer {
  font-family: var(--font-mono);
  font-size: var(--text-2xs);
  color: var(--text-muted);
  text-align: center;
  letter-spacing: 0.08em;
  max-width: 650px;
  line-height: 1.5;
}

/* --- 2. STATIC CAROUSEL STAGE --- */
.carousel-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: var(--space-3xl);
  width: 100%;
}

.carousel-counter {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--text-secondary);
  letter-spacing: 0.15em;
  margin-bottom: var(--space-md);
}

.carousel-image-frame {
  position: relative;
  width: 100%;
  max-width: 480px;
  border-radius: 8px;
  overflow: hidden;
  background: #000000;
  border: 1px solid var(--border-medium);
  box-shadow: var(--shadow-modal);
  margin-bottom: var(--space-xl);
}

.carousel-image-frame.aspect-3-4 {
  aspect-ratio: 3 / 4;
}

.carousel-image-frame.aspect-4-5 {
  aspect-ratio: 4 / 5;
}

.carousel-image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.carousel-thumb-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  max-width: 720px;
}

.carousel-thumb-item {
  width: 54px;
  height: 72px;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  cursor: pointer;
  opacity: 0.6;
  transition: all var(--duration-fast);
  padding: 0;
}

.carousel-thumb-item:hover {
  opacity: 0.9;
  border-color: var(--border-medium);
}

.carousel-thumb-item.active {
  opacity: 1;
  border-color: var(--accent);
  box-shadow: 0 0 10px rgba(184, 255, 0, 0.3);
}

.carousel-thumb-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* --- 3. SINGLE COMMERCIAL VIDEO STAGE --- */
.single-video-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: var(--space-3xl);
  width: 100%;
}

.single-video-frame {
  position: relative;
  width: 100%;
  border-radius: 8px;
  overflow: hidden;
  background: #000000;
  border: 1px solid var(--border-medium);
  box-shadow: var(--shadow-modal);
}

.single-video-frame.aspect-9-16 {
  max-width: 420px;
  aspect-ratio: 9 / 16;
}

.single-video-frame.aspect-16-9 {
  max-width: 1080px;
  aspect-ratio: 16 / 9;
}

.single-video-meta-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  max-width: 420px;
  margin-top: var(--space-md);
  padding: var(--space-sm) var(--space-md);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  flex-wrap: wrap;
  gap: var(--space-xs);
}

.single-video-frame.aspect-16-9 + .single-video-meta-bar {
  max-width: 1080px;
}

.video-spec-label .spec-key {
  font-family: var(--font-mono);
  font-size: var(--text-2xs);
  color: var(--text-muted);
  margin-right: 4px;
}

.video-spec-label .spec-val {
  font-family: var(--font-mono);
  font-size: var(--text-2xs);
  color: var(--text-primary);
  font-weight: 600;
}

.viewer-bottom-action {
  display: flex;
  justify-content: center;
  margin-top: var(--space-2xl);
}
