/* ==========================================
   PITCH BLACK BODY
   ========================================== */
body.case-study-page {
  background-color: #2b2b2b;
  margin: 0;
  overflow-x: hidden;
  overflow-y: auto !important; 
}

/* ==========================================
   REAL SMOKE BACKGROUND
   ========================================== */
.smoke-container {
  position: fixed;
  top: 0; 
  left: 0;
  width: 100vw; 
  height: 100vh;
  z-index: 0; 
  overflow: hidden;
  pointer-events: none;
}

.real-smoke-video {
  width: 100vw;
  height: 100vh;
  object-fit: cover;
  opacity: 0.5;
  mix-blend-mode: screen;
  filter: grayscale(100%) contrast(120%);
}

/* ==========================================
   FORENSIC DESK: CSS PAPER VARIABLES
   ========================================== */
:root {
  --manila-light: #F7EAD0;
  --manila-base: #E8D3AD;
  --manila-dark: #D4B98C;
  --ink-black: #1A1A1A;
  --stamp-red: #C83B3B;
  --paper-grain: radial-gradient(rgba(0,0,0,0.04) 1px, transparent 1px);
}

/* ==========================================
   THE FORENSIC DESK (Spacing Fixes)
   ========================================== */
.detective-desk {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding-top: 100px;
  position: relative;
  z-index: 10;
}

.folder-stack {
  position: relative;
  width: 100%;
  max-width: 900px;
  height: 650px;
  perspective: 2000px;
  margin-top: 40px; 
}

.case-folder {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  transition: z-index 0.1s;
}

/* ==========================================
   THE TABS
   ========================================== */
.folder-tab {
  position: absolute;
  top: -45px;
  left: calc(var(--folder-index) * 210px); 
  width: 200px;
  height: 45px;
  background-color: var(--manila-dark);
  background-image: var(--paper-grain);
  background-size: 4px 4px;
  border-radius: 8px 8px 0 0;
  border: 1px solid rgba(0,0,0,0.1);
  border-bottom: none;
  display: flex;
  align-items: center;
  padding: 0 15px;
  cursor: pointer;
  box-shadow: inset 0 2px 5px rgba(255,255,255,0.4);
  z-index: 1;
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.folder-tab:hover {
  transform: translateY(-8px);
  background-color: var(--manila-light);
  /* Fills the 8px gap with a solid block of golden amber */
  box-shadow: 0 8px 0 #eaa023, inset 0 2px 5px rgba(255,255,255,0.4); 
}

.tab-text {
  font-family: 'Special Elite', monospace;
  font-weight: bold;
  font-size: 0.9rem;
  color: var(--ink-black);
  letter-spacing: 1px;
}

/* ==========================================
   THE COVERS & INSIDES
   ========================================== */
.folder-cover, .folder-inside {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border-radius: 0 12px 12px 12px;
  padding: 60px;
  background-image: var(--paper-grain);
  background-size: 4px 4px;
}

.folder-cover {
  background-color: var(--manila-base);
  box-shadow: 10px 20px 40px rgba(0,0,0,0.5), inset 15px 0 30px rgba(0,0,0,0.05);
  transform-origin: left center; 
  z-index: 3;
  border: 1px solid rgba(0,0,0,0.05);
  border-left: 3px solid rgba(0,0,0,0.15);
  display: flex;
  flex-direction: column;
  justify-content: center;
  transform-style: preserve-3d; /* 3D flip fix */
}

.folder-cover > * {
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.folder-inside {
  background-color: var(--manila-light);
  z-index: 2;
  box-shadow: inset 0 0 80px rgba(0,0,0,0.08);
  border-left: 3px solid rgba(0,0,0,0.1);
  overflow-y: auto;
  overflow-x: hidden;
  scroll-behavior: smooth;
  padding-right: 20px;
}

/* Custom Analog Scrollbar */
.folder-inside::-webkit-scrollbar { width: 6px; }
.folder-inside::-webkit-scrollbar-track { background: rgba(0,0,0,0.05); border-radius: 4px; }
.folder-inside::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.2); border-radius: 4px; }
.folder-inside::-webkit-scrollbar-thumb:hover { background: rgba(0,0,0,0.4); }

/* ==========================================
   ANALOG TYPOGRAPHY
   ========================================== */
.stamp-confidential {
  position: absolute;
  top: 50px; right: 50px;
  color: var(--stamp-red);
  border: 6px solid var(--stamp-red);
  padding: 10px 25px;
  font-family: 'Staatliches', cursive;
  font-size: 3rem;
  letter-spacing: 4px;
  transform: rotate(-12deg);
  opacity: 0.75;
  mix-blend-mode: multiply;
}

.case-title {
  font-family: 'Staatliches', cursive;
  font-size: 5rem;
  color: var(--ink-black);
  margin-bottom: 10px;
  line-height: 1;
}

.case-meta {
  font-family: 'Special Elite', monospace;
  font-size: 1.2rem;
  color: rgba(26, 26, 26, 0.7);
}

.folder-inside h2 {
  font-family: 'Staatliches', cursive;
  font-size: 2.5rem;
  color: var(--ink-black);
  border-bottom: 2px dashed rgba(0,0,0,0.2);
  padding-bottom: 10px;
  margin-bottom: 20px;
}

.folder-inside p {
  font-family: 'Special Elite', monospace;
  font-size: 1.1rem;
  color: var(--ink-black);
  line-height: 1.6;
}

/* ==========================================
   NAVBAR & FOOTER OVERRIDES
   ========================================== */
body.case-study-page .navbar {
  background: rgba(20, 20, 20, 0.6) !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

body.case-study-page .navbar .nav-links a {
  color: rgba(255, 255, 255, 0.6) !important;
}

body.case-study-page .navbar .nav-links a.active, 
body.case-study-page .navbar .nav-links a:hover {
  color: #ffffff !important;
}

body.case-study-page .nav-logo {
  filter: invert(1); 
}

body.case-study-page .site-footer {
  position: relative !important;
  display: block !important;
  width: 100%;
  background-color: #030303; 
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  margin-top: 10vh;
  padding: 80px 5%;
  z-index: 10;
}

/* ==========================================
   COVER INDEX BUTTONS
   ========================================== */
.cover-index {
  list-style: none;
  padding: 0;
  margin-top: 40px;
}
.cover-index li { margin-bottom: 8px; }
.index-trigger {
  background: none;
  border: none;
  font-family: 'Special Elite', monospace;
  font-size: 1.1rem;
  color: var(--ink-black);
  cursor: pointer;
  padding: 0;
  text-align: left;
  transition: opacity 0.2s;
}
.index-trigger:hover { opacity: 0.5; }

/* ==========================================
   EDITORIAL TYPOGRAPHY & LAYOUT
   ========================================== */
.red-ink { color: var(--stamp-red); }

.evidence-block {
  margin-bottom: 35px;
  position: relative;
}

.folder-inside h3 {
  margin-bottom: 8px;
  margin-top: 0;
}

.detailed-grid {
  display: grid;
  grid-template-columns: 1fr 200px;
  gap: 40px;
}

.report-content { max-width: 600px; }

.report-sub {
  font-family: 'Staatliches', cursive;
  font-size: 1.5rem;
  color: var(--stamp-red);
  margin-top: 40px;
  margin-bottom: 10px;
}

.sticky-sidebar {
  position: sticky;
  top: 40px; 
  height: max-content;
}

.sticky-index-links {
  list-style: none;
  padding: 0;
  font-family: 'Special Elite', monospace;
  font-size: 0.9rem;
  line-height: 2;
}

.typewriter-list {
  font-family: 'Special Elite', monospace;
  font-size: 1.1rem;
  line-height: 1.6;
  color: var(--ink-black);
  margin-bottom: 20px;
  padding-left: 20px;
}
.typewriter-list li { margin-bottom: 8px; }

/* ==========================================
   FLOATING ACTION BAR & BUTTONS
   ========================================== */
.floating-action-bar {
  position: sticky;
  bottom: 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 0 10px;
  z-index: 9999;
  pointer-events: none; 
}

.black-btn {
  pointer-events: auto; 
  background-color: var(--ink-black);
  color: #fff;
  font-family: 'Special Elite', monospace;
  border: none;
  padding: 15px 30px;
  cursor: pointer;
  border-radius: 4px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  transition: background 0.2s, transform 0.2s;
}

.black-btn:hover {
  background-color: var(--stamp-red);
  transform: translateY(-5px);
}

/* The Fade-in Detailed Report Button */
.detailed-report-btn {
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.4s ease, visibility 0.4s, transform 0.4s ease, background 0.2s;
}

.detailed-report-btn.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* ==========================================
   EVIDENCE CLUSTERS (Photos & Videos)
   ========================================== */
.asset-cluster {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 25px;
  margin-bottom: 35px;
  justify-content: center;
}

.mt-40 { margin-top: 25px !important; }

.freestanding-asset {
  max-width: 45%; 
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0px 15px 25px rgba(0,0,0,0.25));
  mix-blend-mode: multiply; 
}

/* Modifier for single images that need to be larger */
.asset-large {
  max-width: 70%; /* Increased from 45% to make it roughly 50% bigger */
}

.tilt-left { transform: rotate(-2deg); }
.tilt-right { transform: rotate(2deg); }

.video-evidence {
  position: relative;
  width: 80%;
  margin: 0 auto;
  padding: 15px;
  background-color: #f7f7f7;
  box-shadow: 0 10px 25px rgba(0,0,0,0.15);
  transform: rotate(1deg);
}
.video-evidence video {
  width: 100%;
  height: auto;
}

/* ==========================================
   THE WHITE PAPER (Size Fix)
   ========================================== */
.white-paper-wrapper {
  position: relative;
  width: 100%;
  margin: 30px 0;
}

/* 1. The image is now absolute. It stretches to perfectly match the text. */
.white-paper-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: fill; 
  filter: drop-shadow(0px 10px 20px rgba(0,0,0,0.15));
  mix-blend-mode: multiply;
  z-index: 1;
}

/* 2. The text is now relative. IT controls the height of the paper. */
.white-paper-text {
  position: relative; 
  width: 90%;
  /* 40px Top, 40px Right, 120px Bottom (buffer for the tear), 40px Left */
  padding: 80px 40px 120px 60px; 
  display: flex;
  flex-direction: column;
  justify-content: flex-start; /* Anchors text safely to the top */
  box-sizing: border-box;
  z-index: 2;
}

/* Resets headings so they don't add awkward vertical gaps */
.white-paper-text h3 {
  margin-top: 0;
  margin-bottom: 10px;
}

/* ==========================================
   DETAILED REPORT BUTTON SPACING
   ========================================== */
.report-content .close-folder-btn {
  margin-top: 60px; /* Gives the paragraph plenty of breathing room */
  margin-bottom: 20px; /* Ensures it doesn't hug the absolute bottom of the scroll area */
  display: block; 
}