/* =========================================
   PROJECT PAGE LAYOUT SYSTEM
   ================================********* */

/* --- 1. The Main Grid Container --- */
.project-page-layout {
  display: grid;
  grid-template-columns: 1fr min(70ch, 100%) 1fr;
  
  /* UPDATED: Remove side padding here, let the margin/width logic handle it */
  padding: 8rem 0 4rem 0; 
  
  /* UPDATED: Sync with global constraint */
  max-width: 1800px; 
  margin: 0 auto; 
  
  /* Add Safety Padding locally to match global 1rem */
  padding-left: 1rem;
  padding-right: 1rem;
  
  width: 100%;
  box-sizing: border-box;
  row-gap: 3rem; 
}

/* --- 2. Default Block Behavior --- */
.project-page-layout > * {
  /* CHANGED: All blocks default to the center column */
  grid-column: 2;
}

/* --- 3. Global Media Reset for Project Pages --- */
.project-page-layout img,
.project-page-layout video,
.project-page-layout iframe {
  width: 100%;
  height: auto;
  display: block;
}


/* =========================================
   PROJECT HERO SECTION
   ================================********* */

/* 1. The Container */
.project-hero {
  /* This rule correctly breaks out to span all 3 columns */
  grid-column: 1 / -1;
  max-width: 70vw; 
  width: 100%;
  margin-bottom: 2rem;
}

/* 2. The Title */
.hero-title {
  font-size: clamp(4rem, 6vw, 7.5rem);
  line-height: 1.1;
  margin: 0 0 3rem 0;
  font-weight: 500;
  letter-spacing: -0.03em;
}

/* 3. The Metadata List */
.hero-meta {
  font-family: "Geist", sans-serif;
  font-weight: 300;
  letter-spacing: -0.02rem;
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  gap: 4rem;
}

.hero-meta li {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.meta-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.075rem;
  color: var(--color-muted);
  font-weight: 500;
}

.meta-value {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--color-secondary);
}


/* =========================================
   REUSABLE CONTENT BLOCKS
   ================================********* */

/* BLOCK A: Full-Width Image/Video (<figure>) */
.image-full-width {
  grid-column: 1 / -1; /* Breakout rule */
  width: 100%;
  margin: 0;
  display: block;
}

.image-full-width figcaption {
  text-align: center;
  color: var(--color-muted);
}

.hack-cards {
  margin-left: 0;
  margin-right: 0;
}

.b-w-images img{
  filter: grayscale(100%);
  transition: filter 0.3s ease;
}

/* Optional: Bring back color on hover */
.b-w-images img:hover {
  filter: grayscale(0%);
}

.figcap-center {
  text-align: center;
  padding-top: 2rem;
}

/* BLOCK B: Side-by-Side (Text + Image) */
.side-by-side {
  grid-column: 1 / -1; /* Breakout rule */
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: center;
}

/* BLOCK C: Two-Column Image Grid */
.image-grid-2col {
  grid-column: 1 / -1; /* Breakout rule */
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

/* BLOCK D: Standard Text Block */
.text-block {
  /* * FIXED: Removed 'grid-column: 1' so it
   * properly uses the default 'grid-column: 2'.
   */
  font-size: 1.1rem;
  line-height: 1.6;
  color: var(--color-secondary);
  padding-bottom: 2rem;
}

/* Spacing between paragraphs in the same block */
.text-block p + p {
  margin-top: 1.5rem;
}

/* Standardize subheadings inside text blocks */
.text-block h2, 
.text-block h3 {
  margin-top: 3rem;
  margin-bottom: 1rem;
  line-height: 1.2;
}

/* Remove bottom margin from the last item to avoid double gaps */
.text-block > *:last-child {
  margin-bottom: 0;
}

.text-content p{
    line-height: 1.6;
}

.text-content h3 {
    margin-bottom: 0.5rem;
}

/* BLOCK E: Intro Two-Column Text Grid */
.intro-text-grid {
  grid-column: 1 / -1; /* Breakout rule */
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  margin-bottom: 2rem;
}

.intro-column h3 {
  font-size: 1.1rem;
  letter-spacing: -0.01rem;
  color: var(--color-muted);
  margin-bottom: 1rem;
}

.intro-column p {
  font-size: 1.2rem;
  line-height: 1.5;
  margin: 0;
  color: var(--color-secondary);
}

.data-sources {
  font-size: 0.8rem;
  color: var(--color-muted);
}

/* BLOCK F: Centered Video Block */
.video-block-centered {
  grid-column: 1 / -1;   /* Span full width */
  justify-self: center;  /* Center itself in the grid */
  max-width: 1000px;     /* Set a max-width for desktop */
  width: 100%;
  margin: 0;
}

.video-block-centered figcaption {
  font-size: 1.1rem;
  color: var(--color-muted);
  text-align: center;
  margin-top: 0.5rem;
}

/* BLOCK G: Full-Width Project Divider */
.project-divider {
  /* This tells it to break out of the center column
     and span the full width of the layout */
  grid-column: 1 / -1;
  
  /* Style the line to match your site */
  border: 0;
  height: 1px;
  background-color: var(--color-border);
  
  /* Reset default <hr> margins. The 'row-gap' from
     .project-page-layout will handle the spacing. */
  margin: 0;
}

/* BLOCK H: Picture component */
.image-full-width picture {
  display: block;
  width: 100%;
}

#personas-grid {
  padding: 4rem;
}

@media (min-width: 1300px) {#personas-grid {padding: 6rem;}}


/* BLOCK I: Module Header + Description */
.module-header {
  text-align: center;
  max-width: 680px; /* Slightly wider for the longer paragraph */
  margin: 0 auto 3rem auto; /* Controls gap to the browser window */
}

.module-header h2 {
  font-size: 3.2rem;
  font-weight: 500;
  line-height: 1.2;
  margin-bottom: 1rem;
  color: var(--color-primary);
}

.module-header p {
  color: var(--color-secondary);
  font-size: 1.1rem;
  line-height: 1.6;
}

/* Mobile Adjustment */
@media (max-width: 768px) {
  .module-header {
    text-align: left; /* Often reads better left-aligned on mobile */
    margin-bottom: 3rem;
  }
}

/* =========================================
   TL;DR BUTTON
   ========================================= */

.btn-lift-arrow {
  /* 1. Layout */
  display: inline-flex;
  align-items: center;
  justify-content: center; /* Keeps the inner anchor centered */
  
  position: relative;
  overflow: hidden; /* Clips the arrow start position */
  text-decoration: none;
  cursor: pointer;
  
  /* 2. Sizing */
  padding: 16px 32px;
  box-sizing: border-box;
  min-width: 180px; /* Optional: good structure */
  width: 300px;
  margin: auto;

  /* 3. Typography */
  font-family: "Geist", sans-serif;
  font-weight: 450;
  font-size: 1rem;
  letter-spacing: -0.02rem;

  /* 4. Colors */
  color: var(--color-primary);
  border: 1px solid var(--color-primary);
  background-color: transparent;

  /* 5. Transitions */
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* --- THE ANCHOR (Holds Text + Arrow) --- */
.btn-text-anchor {
  position: relative; /* This makes the arrow stick to THIS element */
  display: inline-block;
}

/* --- THE ARROW (Hanging to the left) --- */
.lift-arrow-icon {
  position: absolute;
  
  /* Position it to the left of the text */
  right: 100%; 
  margin-right: 12px; /* The gap between arrow and text */
  
  /* Vertically center relative to the text line */
  top: 50%;
  margin-top: -9px; /* Half of icon height (18px) to center it */
  
  /* Initial State: Hidden Down Below */
  transform: translateY(150%);
  opacity: 0;
  
  /* Animation Physics */
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s ease;
  
  /* Ensure it doesn't capture mouse events */
  pointer-events: none; 
}

.lift-arrow-icon svg {
  display: block;
  width: 18px; 
  height: 18px;
  stroke: currentColor;
  stroke-width: 2.5;
  fill: none;
}

/* --- HOVER STATE --- */
.btn-lift-arrow:hover {
  background-color: var(--color-primary); 
  color: var(--color-bg-main); 
}

.btn-lift-arrow:hover .lift-arrow-icon {
  /* Slide up to normal position (0) */
  transform: translateY(0);
  opacity: 1;
}

@media (max-width: 768px) {
  .btn-lift-arrow {
    width: 100%;
  }
}

/* =========================================
   Before/After Slider Component
   ================================********* */
   
@keyframes pulse-left {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(-3px); }
}

@keyframes pulse-right {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(3px); }
}

.ba-slider {
  max-width: 70rem;   /* e.g., 1200px. Adjust as you like! */
  justify-self: center; /* This centers it within the full-width grid */

  grid-column: 1 / -1;
  position: relative;
  width: 100%;
  line-height: 0; 
  overflow: hidden;
  user-select: none;
}

.ba-image-container {
  position: relative;
  display: block;
  width: 100%;
  height: auto;
}

.ba-image-container:not(.ba-image-after-container) {
  z-index: 1;
}

.ba-image-after-container {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  z-index: 2;
  clip-path: polygon(0 0, 50% 0, 50% 100%, 0 100%);
}

.ba-image-before,
.ba-image-after {
  display: block;
  width: 100%;
  height: auto;
}

.ba-slider-handle {
  position: absolute;
  z-index: 3;
  top: 0;
  left: 50%;
  height: 100%;
  width: 2px;
  background: black;
  box-shadow: 0 0 5px rgba(0,0,0,0.3);
  transform: translateX(-50%);
  cursor: ew-resize;
}

.ba-handle-thumb {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  border-radius: 0;
  background: black;
  display: grid;
  place-items: center;
  transition: width 0.3s ease, height 0.3s ease;
}

.ba-handle-thumb::before,
.ba-handle-thumb::after {
  content: '';
  position: absolute;
  width: 24px;
  height: 24px;
  background-repeat: no-repeat;
  background-position: center;
  transition: all 0.3s ease;
}

.ba-handle-thumb::before {
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="%23FFF" stroke-width="2" stroke-linecap="butt" stroke-linejoin="miter"><path d="M8 17l-5-5 5-5"/></svg>');
  /* FIXED: Matched animation to pulse-right */
  animation: pulse-left 1.5s ease-in-out infinite; 
}

.ba-handle-thumb::after {
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="%23FFF" stroke-width="2" stroke-linecap="butt" stroke-linejoin="miter"><path d="M16 17l5-5-5-5"/></svg>');
  animation: pulse-right 1.5s ease-in-out infinite;
}

/* --- 4. Label Styles (Sleek & Scalable) --- */
.ba-label {
  position: absolute;
  bottom: clamp(0.75rem, 1.5vw, 1.25rem);
  
  background: rgba(0, 0, 0, 0.2); 
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.15); 
  border-radius: 2rem; 
  
  /* FIXED: Changed to use a non-changing variable */
  color: var(--color-glass-text, #191919); 
  font-family: inherit;
  font-size: clamp(0.6rem, 1vw, 1rem); 
  font-weight: 500;
  letter-spacing: -0.01rem;
  padding: clamp(0.4rem, 1vw, 1rem) clamp(0.8rem, 2vw, 1.25rem);
  width: max-content; 
  transition: all 0.3s ease;

  cursor: pointer;
  z-index: 10; /* Ensure it sits on top of everything */
  pointer-events: auto; /* Ensure clicks register */
}

/* NEW: Smooth Glide Animation Class */
/* We toggle this class in JS so dragging remains instant, but clicks are smooth */
.ba-slider.is-animating .ba-slider-handle,
.ba-slider.is-animating .ba-image-after-container {
  transition: all 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}

.ba-image-container:not(.ba-image-after-container) .ba-label {
  right: clamp(0.75rem, 1.5vw, 1.25rem);
}

.ba-image-after-container .ba-label {
  left: clamp(0.75rem, 1.5vw, 1.25rem);
}

/* =========================================
   ADDITIONAL PROJECTS NAV COMPONENT
   ================================********* */

/* --- 1. The Main Section --- */
/* FIXED: Increased specificity */
section.additional-projects {
  padding-top: 4rem;
  padding-bottom: 2rem;
}

/* --- 2. The Main Wrapper (Mobile-First) --- */
/* FIXED: Increased specificity */
section.additional-projects .additional-projects-wrapper {
  padding-left: 1rem;
  padding-right: 1rem;
  max-width: 1800px;
  margin: 0 auto;
  
  position: relative;
  padding-top: 3rem;
}

/* --- 3. The Indented Divider Line --- */
/* FIXED: Increased specificity */
section.additional-projects .additional-projects-wrapper::before {
  content: '';
  position: absolute;
  top: 0;
  left: 1rem;
  right: 1rem;
  height: 1px;
  background-color: var(--color-border);
}

/* --- 4. The Title (Mobile-First) --- */
/* FIXED: Increased specificity */
section.additional-projects h4 {
  margin-bottom: 3rem;
}

/* --- 5. The Grid (Mobile & Tablet) --- */
/* FIXED: Increased specificity */
section.additional-projects .project-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
}


/* =========================================
   ADDITIONAL PROJECT NAV BREAKPOINT
   ================================********* */
@media (min-width: 940px) {

  /* FIXED: Increased specificity */
  section.additional-projects .additional-projects-wrapper {
    display: grid;
    grid-template-columns: 1fr 3fr; 
    gap: 2rem;
    align-items: start;
  }

  /* FIXED: Increased specificity */
  section.additional-projects h4 {
    grid-column: 1;
    margin-top: 0;
    margin-bottom: 0;
  }
  
  /* FIXED: Increased specificity */
  section.additional-projects .project-grid {
    grid-column: 2;
    grid-template-columns: repeat(2, 20rem); /* 20rem = 320px */
    justify-content: end; 
  }
}

/* =========================================
   MIX & MATCH LAYOUT BUILDER
   ========================================= */

/* 1. Main Breakout Container */
.mix-match-component {
  grid-column: 1 / -1;
  width: 100%;
  max-width: 1300px;
  margin: 4rem auto;
  box-sizing: border-box;
}

/* 2. Wrapper Grid */
.mm-wrapper {
  display: grid;
  grid-template-columns: 1fr 300px; 
  gap: 2rem;
  width: 100%;
  height: 85vh;
  max-height: 750px;
}

/* --- CANVAS --- */
.mm-stage {
  background: var(--color-bg-main);
  border-radius: 12px;
  border: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  box-shadow: 0 20px 40px rgba(0,0,0,0.05);
}

.browser-bar {
  height: 44px;
  background: var(--color-bg-secondary);
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  padding: 0 1rem;
  gap: 8px;
  flex-shrink: 0;
}

.dot { width: 10px; height: 10px; border-radius: 50%; }
.dot.red { background: #FF5F56; }
.dot.yellow { background: #FFBD2E; }
.dot.green { background: #27C93F; }

.url-bar {
  flex: 1;
  height: 28px;
  background: var(--color-bg-main);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  margin-left: 1rem;
  display: flex;
  align-items: center;
  justify-content: left;
  padding-left: 0.5rem;
  font-size: 0.75rem;
  color: var(--color-muted);
  font-family: inherit;
}

.mm-canvas-content {
  flex: 1;
  overflow-y: auto;
  background: var(--color-bg-main);
  position: relative;
  scrollbar-width: none; 
}
.mm-canvas-content::-webkit-scrollbar { display: none; }

/* --- CONTROLS --- */
.mm-controls {
  background: var(--color-bg-secondary);
  border-radius: 12px;
  padding: 1.5rem;
  border: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  gap: 2rem;
  overflow-y: auto;
}

.mm-controls h3 { margin: 0; font-size: 1.6rem; color: var(--color-primary); }
.mm-desc { margin: 0.5rem 0 0 0; font-size: 0.9rem; color: var(--color-muted); line-height: 1.4; }

.control-group { display: flex; flex-direction: column; gap: 0.8rem; }
.group-label { font-size: 0.75rem; text-transform: uppercase; font-weight: 600; color: var(--color-muted); letter-spacing: 0.05em; }

.toggle-row {
  display: flex;
  background: var(--color-bg-main);
  border-radius: 8px;
  padding: 4px;
  gap: 4px;
}

.toggle-btn {
  flex: 1;
  /* CHANGED: transparent border instead of 'none' to reserve space */
  border: 1px solid transparent; 
  background: transparent;
  padding: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  color: var(--color-muted);
  font-family: inherit;
}

.toggle-btn:hover { 
  color: var(--color-primary); 
}

.toggle-btn.active {
  background: var(--color-bg-secondary);
  color: var(--color-primary);
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  font-weight: 600;
  
  /* This border now replaces the transparent one, keeping total size identical */
  border: 1px solid var(--color-border); 
}

/* =========================================
   WIREFRAME SKELETONS
   ========================================= */

.mod {
  padding: 2rem 2rem;
  background: var(--color-bg-main);
}

/* --- Skeleton Shapes (Lo-Fi Fidelity) --- */
.sk-block { background: var(--color-border); border-radius: 4px; }
.sk-block.dark { background: var(--color-secondary); opacity: 0.8; } /* For Logos/Buttons */
.sk-title { height: 32px; background: var(--color-primary); border-radius: 4px; }
.sk-line { height: 10px; background: var(--color-border); border-radius: 2px; }
.sk-pill { height: 28px; background: var(--color-border); border-radius: 100px; opacity: 0.5; }

/* --- MODULE: HEADER --- */
.mod-header { 
  display: flex; 
  align-items: center; 
  justify-content: space-between; 
  height: 50px; 
  gap: 1rem;
  background: var(--color-bg-secondary); /* Header usually distinct */
}

#logo-img {
  height: 20px; /* Restrict height to match UI */
  width: auto;  /* Maintain aspect ratio */
  flex-shrink: 0; 
}

.nav-links { display: flex; gap: 1rem; }
.nav-item { width: 3vw; max-width: 50px; height: 12px; }
.header-actions { display: flex; gap: 1rem; }
.action-btn { width: 7vw; max-width: 170px; height: 32px; border: 1px solid var(--color-border); background: transparent; }
.sign-in-btn { width: 5vw; max-width: 120px; height: 32px; }

/* Ver A: Standard (Logo Left, Nav Right) */
.mod-header.v-a .nav-links { margin-left: auto; margin-right: 2rem; }

/* Ver B: Center (Logo Center, Nav split?) - Simplified to Logo Center */
.mod-header.v-b { justify-content: center; position: relative; }
.mod-header.v-b .logo-img { margin: 0 auto; }
.mod-header.v-b .header-actions { position: absolute; right: 2rem; }
.mod-header.v-b .nav-links { position: absolute; left: 2rem; }

/* Ver C: Minimal (Logo Left, Sign In Right, No Nav) */
.mod-header.v-c .nav-links { display: none; }
.mod-header.v-c .action-btn { display: none; }


/* --- MODULE: SEARCH --- */
.mod-search {
  min-height: 320px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2rem;
  padding: 4rem 2rem;
}

.search-content { width: 100%; max-width: 800px; margin: 0 auto; display: flex; flex-direction: column; gap: 1.5rem; }
.search-title { width: 50%; height: 40px; }
.search-input { width: 100%; height: 60px; background: var(--color-bg-secondary); border: 1px solid var(--color-border); border-radius: 4px; }

/* Chips Container */
.search-meta.chips { display: flex; gap: 1rem; }
.search-meta.links { display: none; }
.chip { width: 80px; }

.search-meta.chips { 
  display: flex; 
  gap: 0.5rem; 
  
  flex-wrap: wrap; 
}

/* Ver A: Center Aligned */
.mod-search.v-a { align-items: center; text-align: center; }
.mod-search.v-a .search-content { align-items: center; }
.mod-search.v-a .search-title { width: 60%; }
.mod-search.v-a .search-meta.chips { justify-content: center; }

/* Ver B: Left Aligned */
.mod-search.v-b { align-items: flex-start; text-align: left; }
.mod-search.v-b .search-content { align-items: flex-start; margin: 0; }
.mod-search.v-b .search-meta.chips { justify-content: flex-start; }

/* Ver C: Minimal / Link */
.mod-search.v-c { align-items: center; text-align: center; }
.mod-search.v-c .search-content { align-items: center; }
.mod-search.v-c .search-meta.chips { display: none; }
.mod-search.v-c .search-meta.links { display: block; width: 100%; }
.mod-search.v-c .link-line { width: 40%; margin: 0 auto; background: var(--color-muted); }


/* --- MODULE: BROWSE --- */
.mod-browse { min-height: 500px; padding: 4rem 2rem; background: var(--color-bg-secondary); }
.browse-grid { display: grid; gap: 1rem; width: 100%; }

.b-card { 
  background: var(--color-bg-main); 

  height: 160px; 
  padding: 1.5rem; 
  display: flex; 
  flex-direction: column; 
  gap: 0.8rem; 
}

.icon-circle { width: 32px; height: 32px; border-radius: 50%; background: var(--color-border); margin-bottom: 0.5rem; flex-shrink: 0;}
.b-title { width: 70%; height: 16px; }
.b-line { width: 90%; }
.b-line.short { width: 60%; }

/* Ver A: Text Only (Hide Icon) */
.mod-browse.v-a .browse-grid { grid-template-columns: repeat(4, 1fr); }
.mod-browse.v-a .icon-circle { display: none; }

/* Ver B: Icon Cards */
.mod-browse.v-b .browse-grid { grid-template-columns: repeat(4, 1fr); }

/* Ver C: List View */
.mod-browse.v-c .browse-grid { grid-template-columns: 1fr 1fr; }
.mod-browse.v-c .b-card { height: 80px; flex-direction: row; align-items: center; }
.mod-browse.v-c .icon-circle { margin-bottom: 0; margin-right: 1rem; }
.mod-browse.v-c .b-title { width: 30%; }
.mod-browse.v-c .b-line { display: none; } /* Hide desc in list view */

/* Ver D: Grid (Similar to B but adjusted per screenshot) */
.mod-browse.v-d .browse-grid { grid-template-columns: repeat(4, 1fr); }
.mod-browse.v-d .b-card { align-items: center; text-align: center; }
.mod-browse.v-d .icon-circle { margin-bottom: 1rem; width: 40px; height: 40px; }


/* --- MODULE: FAQ --- */
.mod-faq { min-height: 350px; padding: 4rem 2rem; display: flex; flex-direction: column; align-items: left; }
.faq-header { width: 300px; margin-bottom: 3rem; background: var(--color-primary); opacity: 1; }
.faq-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; width: 100%; }
.faq-col { display: flex; flex-direction: column; gap: 1.5rem; }

.faq-row { display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--color-border); padding-bottom: 1rem; }
.faq-line { width: 80%; height: 12px; }
.chevron { width: 12px; height: 12px; border-right: 2px solid var(--color-border); border-bottom: 2px solid var(--color-border); transform: rotate(45deg); }

/* Ver A: Links (No Chevron, just text) */
.mod-faq.v-a {align-items: center}
.mod-faq.v-a .chevron { display: none; }
.mod-faq.v-a .faq-row { border-bottom: none; } /* Clean list */
.mod-faq.v-a .faq-line { text-decoration: underline; background: var(--color-secondary); height: 10px; }

/* Ver B: Accordion */
.mod-faq.v-b .chevron { display: block; }


/* =========================================
   RESPONSIVE LOGIC (Fixes Overlap)
   ========================================= */

/* 1. TABLET & SMALL LAPTOP (900px down to 600px) */
@media (max-width: 900px) {
  
  /* SWITCH TO FLEXBOX: Safer for vertical stacking */
  .mm-wrapper { 
    display: flex;
    flex-direction: column;
    
    /* CRITICAL FIX 1: Allow height to grow infinitely */
    height: auto !important; 
    min-height: 0;
    
    /* CRITICAL FIX 2: Reset the desktop max-height limit! */
    max-height: none; 
    
    gap: 1.5rem;
  }
  
  .mm-stage {
    height: 60vh;
    min-height: 500px; 
    width: 100%;
  }
  
  .mm-controls { 
    width: 100%;
    height: auto; 
    max-height: none; 
    overflow: visible; 
  }

  /* Keep Grid adjustments for internal modules */
  .mod-browse.v-a .browse-grid, 
  .mod-browse.v-b .browse-grid, 
  .mod-browse.v-d .browse-grid { grid-template-columns: 1fr 1fr; }
  .mod-browse.v-c .browse-grid { grid-template-columns: 1fr; }
  .faq-grid { gap: 2rem; }
}


/* 2. TRUE MOBILE (Under 600px) */
@media (max-width: 600px) {
  
  .mm-wrapper {
    display: flex;
    flex-direction: column;
    height: auto !important;
    
    /* CRITICAL FIX: Reset max-height here too just in case */
    max-height: none; 
    
    gap: 1rem;
  }
  
  .mm-stage { 
    height: 60vh;
    min-height: 450px;
    width: 100%;
  }

  .mm-controls {
    width: 100%;
    height: auto;
    max-height: none;
    overflow: visible;
  }

  /* --- Shrink Logic (Same as before) --- */
  .mod {
    padding: 1.5rem 1rem; 
    min-height: auto;     
    gap: 1rem;            
  }

/* --- COMPACT HEADER (Mobile) --- */
  .mod-header {
    height: 60px;       
    min-height: 60px;
    padding: 0 1rem;
    gap: 1rem; /* Ensure spacing between logo, dots, and button */
  }
  
  /* 1. LOGO: Shrink slightly */
  #logo-img { height: 18px; }

  /* 2. SIGN IN BUTTON: Keep visible and rectangular (as requested) */
  .sign-in-btn { 
    width: 15vw; /* Specific mobile width */
    height: 32px;
    display: block !important; /* Force visible */
  }
  
  /* Hide the secondary 'action button' to save space */
  .mod-header .action-btn { display: none; }


  /* --- NAV LINKS TRANSFORMATION --- */

  /* Default (Minimal/Center): Hide Nav Links completely */
  .mod-header .nav-links { display: none; }

  /* Standard (v-a) EXCEPTION: Show Nav Links as Dots */
  .mod-header.v-a .nav-links {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    
    /* Push dots to the right of the logo, but left of the button */
    margin-left: auto; 
    margin-right: 1rem;
  }

  /* Turn the bars into dots */
  .mod-header.v-a .nav-links .nav-item {
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    background: var(--color-border); /* Subtle grey dots */
    opacity: 1;
  }
  
  /* COMPACT SEARCH */
  .mod-search {
    min-height: 180px; 
    gap: 1rem;
    padding: 2rem 1rem;
  }
  .search-input { height: 44px; }
  .search-title { height: 24px; }

  /* COMPACT BROWSE */
  .mod-browse { padding: 2rem 1rem; }
  .browse-grid { gap: 0.5rem; }
  
  .b-card {
    height: 110px; 
    padding: 1rem;
    gap: 0.5rem;
  }
  .icon-circle { width: 24px; height: 24px; margin-bottom: 0.25rem; }
  .b-title { height: 12px; }

  /* COMPACT FAQ */
  .mod-faq {
    padding: 2rem 1rem;
    min-height: auto;
  }
  .faq-header {
    margin-bottom: 1.5rem;
    height: 24px; 
    width: 200px;
  }
  .faq-grid { grid-template-columns: 1fr; gap: 1.5rem; }
}

/* =========================================
   CONSOLIDATED MOBILE BREAKPOINTS (max-width: 768px)
   ================================********* */
@media (max-width: 768px) {
  
  /* 1. Tighter vertical spacing on mobile */
  /* FIXED: Combined duplicate rules */
  .project-page-layout {
    row-gap: 2rem;
    grid-template-columns: 1fr; /* Force 1 column */
  }

  /* 2. Hero Adjustments */
  .project-hero {
    margin-bottom: 2rem;
    max-width: 100%;
  }

  /* 2+1 Layout for Hero Meta */
  .hero-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem 1rem;
  }

  /* 3. Content Block Stacking */
  .side-by-side,
  .intro-text-grid,
  .image-grid-2col {
    grid-template-columns: 1fr;
  }
  
  .side-by-side {
    gap: 1.5rem;
  }
  
  .intro-text-grid {
    gap: 2rem;
  }

  /* --- 4. SLIDER MOBILE STYLES --- */
  
  .ba-handle-thumb {
    width: 32px;
    height: 32px;
  }
  
  .ba-handle-thumb::before,
  .ba-handle-thumb::after {
     width: 20px;
     height: 20px;
     background-size: 18px 18px; 
  }
  .ba-handle-thumb::before {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="%23FFF" stroke-width="2.5" stroke-linecap="butt" stroke-linejoin="miter"><path d="M8 17l-5-5 5-5"/></svg>');
  }
  .ba-handle-thumb::after {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="%23FFF" stroke-width="2.5" stroke-linecap="butt" stroke-linejoin="miter"><path d="M16 17l5-5-5-5"/></svg>');
  }
  
  .ba-label {
      font-size: 0.75rem;
      padding: 0.75rem 0.8rem;
      bottom: 0.5rem;
      border-radius: 0.75rem; 
      backdrop-filter: none; 
      -webkit-backdrop-filter: none;
      border: 1px solid rgba(255, 255, 255, 0.1);
  }

  .ba-image-container:not(.ba-image-after-container) .ba-label {
    right: 0.5rem;
  }
  .ba-image-after-container .ba-label {
    left: 0.5rem;
  }

  /* --- 5. PICTURE COMPONENT --- */
  #personas-grid {
  padding: 3rem;
  }

  /* 2. This rule forces ALL blocks to fill the new single column. */
  .project-page-layout > * {
    grid-column: 1;
  }
}

/* =========================================
   USER JOURNEY MAP (Responsive Grid with Legend)
   ========================================= */

/* --- 1. Mobile-First (Stacked Cards) --- */
.user-journey-map {
  grid-column: 1 / -1; 
  
  /* NEW: Allow it to grow, but cap it so it doesn't look stretched on huge screens */
  width: 100%;
  max-width: 1400px; 
  margin: 4rem auto; /* Vertical spacing + Auto centering */
  
  border: 1px solid var(--color-border);
  border-radius: 4px;
  overflow: hidden;
  background: var(--color-bg-main); 
  
  /* Ensure padding doesn't add to width */
  box-sizing: border-box;
}
/* Hide Legend on Mobile */
.journey-legend {
  display: none;
}

/* The Stage Container */
.journey-stage {
  border-bottom: 4px solid var(--color-border);
  background: transparent;
}
.journey-stage:last-child {
  border-bottom: none;
}

.stage-title {
  background: var(--color-bg-secondary);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  padding: 1rem; /* Normalized padding */
  margin: 0;
  border-bottom: 1px solid var(--color-border);
  line-height: normal;
}

.journey-cell {
  padding: 1rem;
  border-bottom: 1px solid var(--color-border);
}

.journey-cell:last-child {
  border-bottom: none;
  /* On mobile, center the experience cell content */
  text-align: center; 
}

/* --- Mobile Labels (The headers inside cards) --- */
.mobile-label {
  display: block;
  font-size: 0.9rem;
  color: var(--color-muted);
  letter-spacing: 0.1rem;
  font-weight: 600;
  margin-top: 0;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  /* On mobile, labels are often centered or left. 
     Your previous h3 was text-align: center, so let's match that. */
  text-align: center; 
}

/* Content Lists */
.journey-cell ul {
  list-style-type: disc;
  margin: 0;
  padding-left: 1rem;
  /* Override square if you prefer disc */
  list-style-type: square; 
  text-align: left; /* Ensure lists align left even if parent is centered */
}

.journey-cell li {
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
  padding: 0.15rem 0;
}

/* --- Experience Content (Emoji + Text) --- */
.experience-content {
  /* Default block display for mobile */
  display: block; 
}

.experience-emoji {
  font-size: 1.8rem;
  margin: 0;
}

.emoji-text {
  font-size: 0.95rem;
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
}

/* =========================================
   EMOJI WEATHER SYSTEM (Global & Mobile Ready)
   ========================================= */

/* 1. Target the Container (Stage 2) */
/* This targets the 3rd DIV (Stage 2) because Legend is #1, Stage 1 is #2 */
.user-journey-map > div:nth-child(3) .experience-content {
  position: relative;
  z-index: 0;
  overflow: hidden; /* Clips the rain so it doesn't spill out */
  
  /* Reset Borders/Backgrounds */
  border: none;
  background: var(--color-bg-main); 
  
  /* NEW: Mobile Structure Fixes */
  /* Ensures the container has shape on mobile so rain is visible */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  border-radius: 8px; /* Rounded corners for the "container" look */
  min-height: 80px;   /* Force height so emojis have space to fall */
}

/* 2. The Main Emoji (Target for Shake) */
.experience-emoji {
  display: inline-block;
  transform-origin: bottom center;
  will-change: transform;
  font-size: 2rem; /* Ensure consistent size */
}

.experience-emoji.is-shaking {
  animation: emoji-panic 1.2s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

/* 3. The Rain Drops */
.rain-emoji {
  position: absolute;
  top: -50px; 
  opacity: 0;
  pointer-events: none; 
  z-index: -1; 
  will-change: transform, opacity;
  line-height: 1; 
}

/* 4. Animations */
@keyframes emoji-panic {
  10%, 90% { transform: translate3d(-2px, 0, 0) rotate(-10deg); }
  20%, 80% { transform: translate3d(3px, 0, 0) rotate(8deg); }
  30%, 50%, 70% { transform: translate3d(-5px, 0, 0) rotate(-15deg); }
  40%, 60% { transform: translate3d(5px, 0, 0) rotate(12deg); }
}

@keyframes emoji-fall {
  0% {
    opacity: 1;
    transform: translateY(0) scale(0.8);
  }
  70% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    /* On mobile, 350px might be too far, but overflow:hidden handles it. */
    transform: translateY(350px) scale(1);
  }
}


/* --- 2. Desktop Layout (Grid + Legend) --- */
@media (min-width: 900px) { /* Bumped to 900px for safety with 5 columns */
  
  .user-journey-map {
    display: grid;
    /* 5 Columns: 150px Legend + 4 Equal Stages */
    grid-template-columns: 160px repeat(4, 1fr);
    grid-template-rows: auto auto auto auto;
    
    /* Remove the card wrapper styles */
    background: transparent;
    border: none;
    overflow: visible;
  }
  
  /* --- The Legend Column --- */
  .journey-legend {
    display: grid;
    grid-row: 1 / -1;
    grid-template-rows: subgrid;
    
    /* Typography */
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--color-muted);
    text-align: right;
  }
  
  .legend-cell {
    padding: 1rem 1.5rem 1rem 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    
    /* Align perfectly with content cells */
    border-bottom: 1px solid transparent; 
  }
  
  .legend-header {
    border-bottom: 1px solid transparent;
  }

  /* --- The Stages --- */
  .journey-stage {
    display: grid;
    grid-row: 1 / -1;
    grid-template-rows: subgrid;
    
    border-bottom: none;
    /* Right border for columns */
    border-right: 1px solid var(--color-border);
    background: transparent;
  }
  
  /* Add border to the left of the FIRST stage to separate from Legend */
  .journey-stage:first-of-type {
    border-left: 1px solid var(--color-border);
  }
  
  .journey-stage:last-child {
    border-right: none;
  }
  
  /* --- The Cells --- */
  .journey-cell {
    height: 100%;
    border-bottom: 1px solid var(--color-border);
    padding: 1.5rem 1rem;
    /* Reset alignment */
    text-align: left;
  }
  
  .journey-cell:last-child {
    border-bottom: none;
    /* Center the experience cell specifically */
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column; 
    height: 100%; /* Force cell to fill the Grid row height */
  }

  /* HIDE the inline labels on desktop */
  .mobile-label {
    display: none;
  }
  
  /* --- Header Styling --- */
  .stage-title {
    border-bottom: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: flex-start; /* Align left */
    background: transparent;
    font-size: 1.1rem;
    padding: 1rem;
    white-space: nowrap;
  }

  /* --- Experience "Pill" Styling (Desktop Only) --- */
  .experience-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    
    background: var(--color-bg-main);
    padding: 1rem 1.5rem;
    border-radius: 12px;
    min-width: 100px;

    flex: 1; 
    width: 100%; /* Fill the cell width */
  }
  
  .experience-emoji {
    font-size: 2rem;
  }
  
  .emoji-text {
    margin: 0;
    font-weight: 600;
    font-size: 0.85rem;
  }
}


/* =========================================
   EMOJI WEATHER SYSTEM (Playful Interaction)
   ========================================= */

/* 1. The Inner Content (The Pill) */
.user-journey-map > div:nth-child(3) .experience-content {
  position: relative;
  z-index: 1; /* Sit ON TOP of the rain */
  
  /* CHANGED: Transparent background so we see rain behind it */
  background: transparent; 
  border: none;
  
  /* Reset overflow so it doesn't clip anything (though rain is now in parent) */
  overflow: visible; 
}

/* 2. The Main Emoji (Target for Shake) */
.experience-emoji {
  display: inline-block;
  transform-origin: bottom center;
  will-change: transform;
}

.experience-emoji.is-shaking {
  /* CHANGED: Duration increased to 1.2s for a "heavier" shake */
  animation: emoji-panic 1.2s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

/* 3. The Rain Drops */
.rain-emoji {
  position: absolute;
  top: -60px; /* Start higher up */
  opacity: 0;
  pointer-events: none; 
  
  /* CHANGED: z-index 0 puts it behind the text (z-index 1) 
     but in front of the global background */
  z-index: 0; 
  
  will-change: transform, opacity;
  line-height: 1; 
}

/* 4. Animations */
@keyframes emoji-panic {
  /* CHANGED: More "sway", less "buzz" */
  10%, 90% { transform: translate3d(-2px, 0, 0) rotate(-10deg); }
  20%, 80% { transform: translate3d(3px, 0, 0) rotate(8deg); }
  30%, 50%, 70% { transform: translate3d(-5px, 0, 0) rotate(-15deg); }
  40%, 60% { transform: translate3d(5px, 0, 0) rotate(12deg); }
}

@keyframes emoji-fall {
  0% {
    opacity: 1;
    transform: translateY(0) scale(0.8);
  }
  70% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateY(350px) scale(1);
  }
}

/* =========================================
   STRATEGY GRID LAYOUT
   ================================********* */

.horizons-list li {
  padding-bottom: 1rem;
}

.strategy-grid {
  display: grid;
  width: 100%;
  margin: 4rem auto;
  gap: 2rem;
  row-gap: 3rem;
  
  /* Mobile: 1 Column */
  grid-template-columns: 1fr; 
}

/* Tablet: 2 Columns (2 + 1 Layout) */
@media (min-width: 600px) {
  .strategy-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* Desktop: 3 Columns (Full Row) */
@media (min-width: 1024px) {
  .strategy-grid {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

/* --- The Card Styling --- */
.strategy-card {
  display: flex;
  flex-direction: column;
  /* No white box, purely content based as requested */
}

/* --- 1. The Circle & Number --- */
.strat-marker {
  position: relative;
  width: 60px;
  height: 60px;
  display: grid;
  place-items: center; 
  margin-bottom: 1.5rem;
}

.strat-circle {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 2px solid var(--color-primary); /* Thin border */
  border-radius: 50%;
  
  /* Initial Animation State */
  opacity: 0;
  transform: scale(0.5);
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.strat-number {
  font-family: "Geist", sans-serif;
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--color-primary);
  z-index: 1;

  margin: 0;
  line-height: 1; 
  
  /* Initial Animation State */
  opacity: 0;
  transform: translateY(5px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

/* --- 2. The Content --- */
.strat-content {
  /* Initial Animation State */
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.strat-content h3 {
  font-size: 1.5rem;
  font-weight: 500;
  margin: 0 0 1rem 0;
  color: var(--color-primary);
  line-height: 1.2;
}

.strat-content ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.strat-content li {
  font-size: 1.1rem;
  color: var(--color-muted); /* Grey text */
  padding: 0.2rem 0;
  line-height: 1.4;
}


/* =========================================
   Vision statement (Animated Purple)
   ================================********* */

/* Container spacing and alignment */
.zeos-vision-module {
  padding: 5rem 1.5rem; /* Generous whitespace top/bottom */
  text-align: center;
  display: flex;
  justify-content: center;
  /* background-color removed as requested */
}

.zeos-vision-container {
  max-width: 56rem; /* Prevents text from stretching too wide */
  margin: 0 auto;
}

/* Optional Accent Line */
.vision-accent {
  width: 60px;
  height: 6px;
  background-color: var(--color-primary);
  margin: 0 auto 40px auto;
}

/* Main Headline Style */
.vision-headline {
  /* font-family inherited from body or set globally */
  font-size: clamp(2rem, 5vw, 3.5rem); /* Responsive font size */
  font-weight: 800; /* Extra Bold */
  line-height: 1.1;
  margin-bottom: 2rem;
  letter-spacing: -0.02em; /* Tight tracking looks more premium */
}

/* =========================================
   Fluid "Plasma" Text Effect
   ================================********* */

.text-gradient {
  /* 1. The Fluid Gradient 
     We use a large angle (135deg) and multiple stops to create "pools" of color.
     Added a lighter mid-tone (#B8A5FF) to make the fluid motion visible. */
  background-image: linear-gradient(
    135deg,
    #A38FFE 0%,    /* Main Purple */
    #5A4D97 25%,   /* Dark Purple */
    #A490FF 50%,   /* Bright Highlight (The "Liquid" shine) */
    #5A4D97 75%,   /* Dark Purple */
    #A38FFE 100%   /* Main Purple */
  );

  /* 2. Size: HUGE background relative to text.
     This allows us to move "windows" of the gradient over the text. */
  background-size: 300% 300%;

  /* 3. Clip & Text Settings */
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: #A38FFE; /* Fallback */

  /* 4. Animation: Long duration (8s) for a slow, thick liquid feel */
  animation: liquid-flow 8s ease-in-out infinite;
}

/* The Animation Path:
   Instead of just X axis, we move X and Y to create a "wave" motion.
*/
@keyframes liquid-flow {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* Subtext Style */
.vision-subtext {
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: clamp(1.2rem, 3vw, 1.5rem); /* Slightly smaller than headline */
  font-weight: 500; /* Medium Bold */
  line-height: 1.5;
  color: var(--color-bg-muted); /* Softer grey variable */
  max-width: 47rem;
  margin: 0 auto;
}

/* Animation Keyframes */
@keyframes gradient-flow {
  0% {
    background-position: 0% 50%;
  }
  100% {
    background-position: 200% 50%;
  }
}

/* =========================================
   SCROLLYTELLING MODULE (Straight Screen)
   ================================********* */

.scrolly-module {
  position: relative;
  height: 400vh; /* Determines scroll speed */
  margin-bottom: 5rem;

  /* STICKY FIX: 
     We use negative margins to break out of the container 
     instead of 'transform'. Transform kills sticky. 
  */
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  
  /* Ensure it sits above other background elements if needed */
  z-index: 1; 
  cursor: default;
}

.sticky-viewport {
  position: sticky;
  top: 0;
  height: 100vh;
  width: 100%;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}

.scrolly-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr; /* Text vs Visual */
  width: 100%;
  max-width: 1400px;
  padding: 0 2rem;
  gap: 1rem;
  align-items: center;
}

/* --- Left Column: Navigation --- */
.scrolly-text-col {
  position: relative;
  z-index: 10;
}

.step-list {
  list-style: none;
  padding: 0;
  margin: 0;
  position: relative;
}

.progress-track {
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 2px;
  background: var(--color-border, #E0E0E0);
}

.progress-bar {
  position: absolute;
  left: 0;
  top: 0;
  width: 2px;
  background: var(--color-primary); /* ZEOS Purple */
  height: 0%;
  transition: height 0.1s linear;
}

.step-item {
  padding-left: 2rem;
  margin-bottom: 3rem;
  opacity: 0.3;
  transform: translateX(0);
  transition: all 0.5s ease;
}

.step-item.is-active {
  opacity: 1;
  transform: translateX(10px);
}

.step-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0 0 0.5rem 0;
  color: var(--color-primary);
}

.step-desc {
  font-size: 1.1rem;
  line-height: 1.6;
  color: var(--color-secondary);
  max-width: 400px;
  display: none;
  animation: fadeInUp 0.6s ease forwards;
}

.step-item.is-active .step-desc {
  display: block;
}

/* =========================================
   SCROLLY INTERACTIVITY (Desktop Only)
   ========================================= */
@media (min-width: 901px) {
  .step-title {
    cursor: pointer;
    transition: color 0.2s ease, transform 0.2s ease;
    display: inline-block;
    position: relative;
    z-index: 20; 
  }

  .step-title:hover {
    color: var(--color-primary); 
    transform: translateX(5px);
  }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* --- Right Column: The MacBook (Contained + Wide Look + Responsive Thickness) --- */
.scrolly-visual-col {
  display: flex;
  justify-content: center;
  align-items: center;
  perspective: 2000px;
  padding: 2rem; 
}

.macbook-wrapper {
  /* Wrapper width = Widest part (The Base) */
  width: 100%;
  max-width: 800px;
  position: relative;
  transform-style: preserve-3d;
}

/* 1. The Screen (Lid) */
.mb-lid {
  /* We shrink the screen to 84% so the 100% base appears wider */
  width: 84%; 
  margin: 0 auto;
  
  background: #0d0d0d;
  border-radius: 12px 12px 0 0;
  padding: 1.5%;
  position: relative;
  z-index: 10;
  box-shadow: inset 0 0 0 2px #7c7c7f;
}

.mb-camera {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 12%;
  height: 2.5%;
  background: #0d0d0d;
  border-radius: 0 0 4px 4px;
  z-index: 20;
}

.mb-screen-inner {
  background: #121212;
  width: 100%;
  aspect-ratio: 16/10;
  overflow: hidden;
  position: relative;
}

/* Content Images/Videos */
.screen-content {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.05);
  transition: opacity 0.8s ease, transform 1.2s ease;
}

.screen-content.is-visible {
  opacity: 1;
  transform: scale(1);
}

/* 2. The Base (Keyboard Area) */
.mb-base {
  background: linear-gradient(180deg, #C2C2C4 0%, #A5A5A7 100%);
  
  /* RESPONSIVE THICKNESS: Scales between 12px and 18px based on screen width */
  height: clamp(12px, 1.5vw, 18px); 
  
  /* Base fills the container (100%), defining the boundary */
  width: 100%; 
  margin-left: 0;
  
  border-radius: 4px 4px 10px 10px;
  position: relative;
  z-index: 5;
  box-shadow: 0 20px 40px rgba(0,0,0,0.25);
}

.mb-base::after {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 15%;
  height: 6px;
  background: #888;
  border-radius: 0 0 5px 5px;
  opacity: 0.5;
}

/* --- Mobile Styles --- */
@media (max-width: 900px) {
  .scrolly-module {
    height: auto;
    padding: 4rem 1rem;
    margin-bottom: 0;
  }
  
  .sticky-viewport {
    position: static;
    height: auto;
    display: block;
  }

  .scrolly-grid {
    display: block;
    padding: 0;
  }

  .scrolly-visual-col, .progress-track {
    display: none;
  }

  .step-item {
    opacity: 1;
    margin-bottom: 5rem;
    padding-left: 0;
    transform: none !important;
  }

  .step-title {
    color: var(--color-primary); 
    font-size: 1.8rem;
    margin-bottom: 1rem;
  }

  .step-desc {
    display: block;
    animation: none;
    max-width: 100%;
    margin-bottom: 1.5rem;
  }

  .mobile-visual-wrapper {
    display: block;
    width: 100%;
    margin-top: 1rem;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid var(--color-border);
    background: #000;
  }
  
  .mobile-visual-wrapper video {
    width: 100%;
    height: auto;
    display: block;
  }
}

@media (min-width: 901px) {
  .mobile-visual-wrapper { display: none; }
}

/* --- FIX MOBILE VIDEOS --- */
@media (max-width: 900px) {
  
  /* Force the container to respect the video height */
  .mobile-visual-wrapper .video-facade {
    height: auto !important;
    overflow: visible !important;
  }

  /* Force the video to be visible and take up space */
  .mobile-visual-wrapper .video-facade video {
    position: static !important; /* Resets 'absolute' so it takes up space */
    opacity: 1 !important;       /* Resets '0' so it is visible */
    width: 100% !important;
    height: auto !important;
  }

  /* THE CROP FIX: Zoom in and push the Left/Bottom edges out */
  .mobile-visual-wrapper video {
    /* 1. Anchor the video to the clean edges (Top & Right) */
    transform-origin: top right !important;
    
    /* 2. Zoom in by 5% to push the dirty edges (Left & Bottom) off-screen */
    transform: scale(1.02) !important;
    
    /* Ensure the zooming doesn't blur perfectly sharp text too much */
    will-change: transform; 
  }
}

/* =========================================
   CASCADE ANIMATION LOGIC
   ================================********* */

/* When the GRID receives .is-visible from JS: */

/* 1. Animate Elements to Visible State */
.strategy-grid.is-visible .strat-circle { opacity: 1; transform: scale(1); }
.strategy-grid.is-visible .strat-number { opacity: 1; transform: translateY(0); }
.strategy-grid.is-visible .strat-content { opacity: 1; transform: translateY(0); }


/* 2. THE WATERFALL DELAYS (The Magic) */

/* --- CARD 1 --- */
.strategy-grid.is-visible .strategy-card:nth-child(1) .strat-circle { transition-delay: 0.1s; }
.strategy-grid.is-visible .strategy-card:nth-child(1) .strat-number { transition-delay: 0.25s; }
.strategy-grid.is-visible .strategy-card:nth-child(1) .strat-content { transition-delay: 0.4s; }

/* --- CARD 2 (Starts after Card 1 finishes mostly) --- */
.strategy-grid.is-visible .strategy-card:nth-child(2) .strat-circle { transition-delay: 0.3s; }
.strategy-grid.is-visible .strategy-card:nth-child(2) .strat-number { transition-delay: 0.45s; }
.strategy-grid.is-visible .strategy-card:nth-child(2) .strat-content { transition-delay: 0.6s; }

/* --- CARD 3 (Starts after Card 2) --- */
.strategy-grid.is-visible .strategy-card:nth-child(3) .strat-circle { transition-delay: 0.5s; }
.strategy-grid.is-visible .strategy-card:nth-child(3) .strat-number { transition-delay: 0.65s; }
.strategy-grid.is-visible .strategy-card:nth-child(3) .strat-content { transition-delay: 0.8s; }

/* =========================================
   EVOLUTION CARD COMPONENT
   (Layout handled by .side-by-side)
   ================================********* */

.evolution-wrapper {
  width: 100%;
  height: fit-content;
  
  /* Use system variables */
  background: var(--color-bg-secondary);
  border: 1px solid var(--color-border);
  
  border-radius: 8px; /* Matches your other rounded elements */

  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* --- Card Header --- */
.evo-header {
  padding: 1.5rem 2rem;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-bg-secondary);
}

.evo-title {
  margin: 0;
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--color-primary);
  letter-spacing: -0.02em;
}

.evo-subtitle {
  margin: 0.25rem 0 0 0;
  font-size: 0.9rem;
  color: var(--color-muted);
}

/* --- List Items --- */
.evo-list {
  padding: 0;
}

.evo-item {
  display: flex;
  align-items: center;
  /* Fixed height to prevent layout jumps */
  height: 125px; 
  padding: 0 2rem;
  border-bottom: 1px solid var(--color-border);
  transition: background 0.2s ease;
}

.evo-item:last-child {
  border-bottom: none;
}

/* --- The Visual Box (Icon/Image) --- */
.evo-visual {
  /* Default State: Collapsed */
  width: 0;
  margin-right: 0;
  opacity: 0;
  
  height: 64px;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
  background: transparent;
  transition: all 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.evo-layer {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.layer-identicon { opacity: 0; transform: scale(0.9); z-index: 1; }
.layer-ai        { opacity: 0; transform: scale(1.1); z-index: 2; }

/* --- Text Content inside Card --- */
.evo-content {
  flex-grow: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-height: 100%; 
}

.evo-item-title {
  font-size: 1rem;
  font-weight: 600;
  color: #0066CC; /* Brand Blue */
  margin-bottom: 0.25rem;
  text-decoration: underline;
  text-decoration-color: rgba(0, 102, 204, 0.2);
  text-underline-offset: 3px;
  
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.evo-item-desc {
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--color-secondary);
  
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* --- Controls / Slider --- */
.evo-controls {
  padding: 2rem 2rem 1.5rem 2rem;
  background: var(--color-bg-secondary);
  border-top: 1px solid var(--color-border);
}

#evo-slider {
  -webkit-appearance: none;
  width: 100%;
  background: transparent;
  cursor: pointer;
  margin: 0;
}
#evo-slider:focus { outline: none; }

/* Thumb */
#evo-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  height: 24px; width: 24px;
  border-radius: 50%;
  background: var(--color-primary); 
  border: 1px solid rgba(0,0,0,0.1);
  cursor: grab;
  margin-top: -10px;
  position: relative;
  z-index: 2;
}

/* Track */
#evo-slider::-webkit-slider-runnable-track {
  width: 100%; height: 4px;
  cursor: pointer;
  background: var(--color-border);
  border-radius: 2px;
}

.evo-labels {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  width: 100%;
  margin-top: 1rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* --- Individual Labels --- */
.evo-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0;
  padding: 0;

  cursor: pointer; 
  user-select: none; /* Prevents blue text highlighting on click */
  transition: color 0.2s ease;
}

.evo-label:hover {
  color: var(--color-primary);
}

/* 3. Force the First label to align Left */
.evo-label:first-child {
  text-align: left;
}

/* 2. Middle Label (The Fix) */
.evo-label:nth-child(2) {
  text-align: center;
  
  /* MAGIC FIX: Add indent equal to letter-spacing to re-center the word visually.
     Without this, the text looks shifted to the left because of the trailing space. */
  text-indent: 0.05em; 
}

/* 4. Force the Last label to align Right */
.evo-label:last-child {
  text-align: right;
}

.evo-label.active {
  color: var(--color-primary); 
  transition: color 0.3s ease;
}

/* =========================================
   STATE LOGIC
   ================================********* */

/* State 2: Identicon */
[data-state="2"] .evo-visual {
  width: 64px; margin-right: 1rem; opacity: 1;
}
[data-state="2"] .layer-identicon { opacity: 1; transform: scale(1); }

/* State 3: AI Art */
[data-state="3"] .evo-visual {
  width: 64px; margin-right: 1rem; opacity: 1;
}
[data-state="3"] .layer-identicon { opacity: 0; transform: scale(0.9); }
[data-state="3"] .layer-ai { opacity: 1; transform: scale(1); }


/* =========================================
   METRICS VISUALIZATION (Floating Numbers)
   ========================================= */

.metrics-viz {
  display: flex;
  align-items: flex-end; 
  justify-content: center;
  gap: 2rem;
  
  /* Fixed height for the chart area */
  height: 450px; /* Increased slightly for the floating numbers */
  width: 100%;
  padding-top: 2rem;
}

.metric-col {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  /* CHANGED: Left align everything instead of center */
  align-items: flex-start; 
  height: 100%;
  flex: 1;
  max-width: 300px;
}

/* --- The Bar Track (Background Rail) --- */
.metric-track {
  width: 100%;
  height: 100%; 
  position: relative;
  /* IMPORTANT: Removed overflow: hidden so the number can sit on top */
}

/* --- The Bar Fill (Animated Part) --- */
.metric-fill {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 0%; 
  background: var(--color-muted);
  /* Match track corners at the bottom only */
  transition: height 1.5s cubic-bezier(0.22, 1, 0.36, 1);
}

/* --- The Number Group (Riding on top) --- */
.metric-data-group {
  position: absolute;
  /* Anchor to the top of the growing bar */
  top: 0;
  left: 0;
  /* Push it up by 100% of its own height so it sits ON TOP of the bar */
  transform: translateY(-100%);
  
  /* Spacing between number and bar */
  padding-bottom: 0.25rem; 
  
  color: var(--color-primary);
  text-align: left;
  white-space: nowrap; /* Prevent wrapping */
}

.metric-number {
  /* Slightly smaller font size looks cleaner in this layout */
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
}

.metric-unit {
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--color-primary); /* Match number color now */
  vertical-align: baseline;
  margin-left: 2px;
}

/* --- Label & Footnote --- */
.metric-label {
  margin-top: 1rem;
  text-align: left; /* Left align label too */
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-secondary);
  line-height: 1.4;
  width: 100%;
}

.cite {
  font-size: 0.6rem;
  vertical-align: super;
  opacity: 0.7;
}

/* =========================================
   BLUEPRINT COMPARISON (Old vs New)
   ========================================= */

/* Main Container */
.blueprint-comparison {
  grid-column: 1 / -1; 
  display: grid;
  grid-template-columns: 1fr; 
  gap: 4rem;
  width: 100%;
  max-width: 1400px;
  margin: 4rem auto;
  box-sizing: border-box;
  align-items: start;
}

.comp-label {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-muted);
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 0.5rem;
  font-weight: 600;
}

/* --- LEFT COL: OLD DESIGN --- */
.comparison-col { width: 100%; }

.old-card-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
  align-items: center; /* Default: Center */
}

.old-card {
  background: #FFFFFF;
  border: 1px solid #E5E5E5;
  border-radius: 8px;
  padding: 1.5rem;
  width: 100%;
  max-width: 520px; /* Matched width */
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  font-family: inherit;
  position: relative;
}

.old-card.second-card { display: none; } 

/* Old Card Typography */
.old-title { font-size: 1rem; font-weight: 700; margin: 0 0 0.75rem 0; line-height: 1.3; color: #191919; }
.old-desc { font-size: 0.85rem; color: #666666; line-height: 1.5; margin-bottom: 1.25rem; }
.old-badge-red { display: inline-block; background-color: #F74558; color: white; font-size: 0.7rem; font-weight: 700; padding: 0.3rem 0.8rem; border-radius: 100px; margin-bottom: 1.5rem; letter-spacing: 0.02em; }
.old-meta-stack { display: flex; flex-direction: column; gap: 0.6rem; margin-bottom: 1.5rem; }
.old-meta-row { font-size: 0.8rem; color: #666666; display: flex; align-items: center; gap: 0.6rem; }
.old-icon { font-size: 0.9rem; width: 16px; text-align: center; color: #888; }
.old-avatars { display: flex; margin-bottom: 1rem; }
.old-avatars img { width: 32px; height: 32px; border-radius: 50%; border: 2px solid #fff; margin-right: -10px; background: #eee; }
.old-link { font-size: 0.7rem; font-weight: 700; color: #2D46B9; text-decoration: none; text-transform: uppercase; letter-spacing: 0.05em; display: block; border-top: 1px solid #eee; padding-top: 1rem; margin-top: 0.5rem; }


/* --- RIGHT COL: NEW DESIGN --- */
.blueprint-wrapper {
  position: relative;
  width: 100%;
  padding-right: 0; 
  transition: padding 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center; /* Default: Center */
}

.blueprint-card {
  background: #FFFFFF;
  border-radius: 8px;
  padding: 1.5rem;
  width: 100%;
  max-width: 520px; 
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
  position: relative;
  z-index: 2;
  overflow: visible; 
}

/* PINNED ANNOTATIONS */
.bp-pinned-note {
  display: none; 
  align-items: center;
  position: absolute; 
  left: 100%; 
  top: 50%;
  transform: translateY(-50%) translateX(-10px);
  margin-left: 1.5rem; 
  width: 160px; 
  opacity: 0;
  transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
  transition-delay: calc(var(--delay) * 100ms);
}
.blueprint-wrapper.is-visible .bp-pinned-note { opacity: 1; transform: translateY(-50%) translateX(0); }

.bp-label { 
  font-family: monospace; font-size: 0.75rem; color: #E91E63; font-weight: 600; 
  text-transform: uppercase; background: #FFF0F5; padding: 0.3rem 0.6rem; border-radius: 4px; 
  white-space: normal; text-align: left;
}
.bp-line { width: 30px; height: 1px; background: #FFD2D2; margin-right: 0.5rem; position: relative; flex-shrink: 0; }
.bp-line::before { content: ''; position: absolute; left: 0; top: -2px; width: 5px; height: 5px; background: #E91E63; border-radius: 50%; }

.bp-header { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1rem; position: relative; }
.bp-tag { font-size: 0.65rem; font-weight: 700; text-transform: uppercase; padding: 0.3rem 0.6rem; border-radius: 1.2em; letter-spacing: 0.02em; }
.tag-hack { background-color: #FFDfb8; color: #8a4b00; }
.tag-status { background-color: #D1E7DD; color: #0F5132; }
.bp-content-block { position: relative; }
.bp-content-block h4 { font-size: 1.1rem; font-weight: 600; margin: 0 0 0.75rem 0; color: #000; line-height: 1.25; }
.bp-desc { font-size: 0.8rem; color: #666666; line-height: 1.5; margin: 0 0 1.5rem 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; max-width: 440px; }
.bp-skills-block { position: relative; margin-bottom: 1.5rem; }
.bp-section-label { font-size: 0.6rem; font-weight: 700; text-transform: uppercase; color: var(--color-muted); letter-spacing: 0.05em; margin-bottom: 0.5rem; }
.bp-skills { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.bp-skills span { background: #F0F0F0; color: #333; padding: 0.25rem 0.75rem; border-radius: 100px; font-size: 0.7rem; font-weight: 500; }
.bp-footer { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 1.5rem; border-top: 1px solid #F0F0F0; padding-top: 1rem; position: relative; }
.bp-meta-list { display: flex; flex-direction: column; gap: 0.4rem; }
.bp-meta-row { font-size: 0.75rem; color: #666666; display: flex; align-items: center; gap: 0.5rem; }
.bp-icon { font-size: 0.9rem; width: 16px; text-align: center; }
.bp-avatar-stack { display: flex; padding-right: 0.5rem; }
.bp-avatar-stack img { width: 28px; height: 28px; border-radius: 50%; border: 2px solid #FFF; margin-left: -10px; object-fit: cover; box-shadow: 0 2px 5px rgba(0,0,0,0.1); }
.bp-avatar-stack img:first-child { margin-left: 0; }
.bp-action { text-align: right; position: relative; }
.bp-action a { font-size: 0.75rem; font-weight: 700; color: #2D46B9; text-decoration: none; text-transform: uppercase; letter-spacing: 0.05em; }

/* Mobile List (Red Boxes) */
.mobile-annotations-list {
  display: flex; flex-direction: column; gap: 0.5rem; width: 100%; margin-top: 1.5rem; max-width: 520px;
}
.mobile-note {
  font-family: monospace; font-size: 0.75rem; color: #E91E63; font-weight: 600; text-transform: uppercase; background: #FFF0F5; border: 1px solid #FFD2D2; padding: 0.5rem 1rem; border-radius: 4px; text-align: center;
}

/* =========================================
   BLUEPRINT BREAKPOINTS
   ========================================= */

/* 1. TABLET (540px - 768px) 
   State: Single Column (Stacked)
   We enabled Side Labels, so we need extra space on the right.
*/
@media (min-width: 540px) {
  .mobile-annotations-list { display: none; }
  .bp-pinned-note { display: flex; }
  
  /* NEW CARD: Add padding to hold the labels */
  .blueprint-wrapper { 
    padding-right: 180px; 
    align-items: center; 
  }
  
  /* OLD CARD: Add matching padding so it aligns perfectly with the New Card */
  .old-card-container {
    padding-right: 180px;
    align-items: center;
  }
  
  .note-header { top: 0.6rem; transform: none; }
  .blueprint-wrapper.is-visible .note-header { transform: none; }
  .note-title { top: 0.5rem; transform: none; }
  .blueprint-wrapper.is-visible .note-title { transform: none; }
  .note-skills { top: 60%; }
  .note-meta { top: 0.6rem; transform: none; }
  .blueprint-wrapper.is-visible .note-meta { transform: none; }
  .note-cta { top: 50%; }
}

/* 2. LAPTOP/DESKTOP (768px+) 
   State: Side-by-Side (1 Old vs 1 New)
*/
@media (min-width: 768px) {
  .blueprint-comparison { grid-template-columns: 0.8fr 1.2fr; gap: 2rem; }
  
  /* Reset alignment for side-by-side view */
  .old-card-container { 
    align-items: flex-start; 
    padding-right: 0; /* Remove the balancing padding */
  }
  
  .blueprint-wrapper { 
    padding-right: 160px; 
    /* Keep center or switch to flex-start depending on preference.
       flex-start usually looks better in 2-col mode */
    align-items: flex-start; 
  }
}

/* 3. LARGE DESKTOP (1300px+) 
   State: Full Grid (2 Old vs 1 New)
*/
@media (min-width: 1300px) {
  .blueprint-comparison { grid-template-columns: 1fr 1fr; gap: 3rem; }
  .old-card.second-card { display: block; }
  .old-card-container { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
}

/* =========================================
   RESTORED BENTO GRID STYLES (Final Polish)
   ========================================= */

/* --- 0. BENTO THEME VARIABLES --- */
:root {
  /* TINTS (Light Mode) */
  --bento-tint-purple: #F4F2FF;
  --bento-tint-blue: #F3F7FF;
  --bento-tint-red: #FFF0F0;
  --bento-tint-graphic: #F5F5F7;
  --bento-tint-article: #F9F8FD; /* New Lavender Tint */
  
  /* BORDERS */
  --bento-dash-color: #C7C7D1;
  /* The subtle border for Light Mode definition */
  --bento-border-light: rgba(0,0,0,0.06); 
  
  /* SHADOW */
  --bento-shadow: 0 4px 12px rgba(0,0,0,0.04);
}

[data-theme="dark"] {
  /* TINTS (Dark Mode - Transparent) */
  --bento-tint-purple: rgba(99, 91, 255, 0.15);     
  --bento-tint-blue: rgba(10, 132, 255, 0.15); 
  --bento-tint-red: rgba(255, 69, 58, 0.15);   
  --bento-tint-graphic: var(--color-bg-secondary);
  --bento-tint-article: rgba(255, 255, 255, 0.01);
  
  /* BORDERS */
  --bento-dash-color: var(--color-border);
  
  /* SHADOW */
  --bento-shadow: none;
}


/* --- 1. SECTION WRAPPER --- */
.component-zoo-section {
  grid-column: 1 / -1;
  width: 100%;
  max-width: 1300px;
  margin: 6rem auto;
  box-sizing: border-box;
}

/* --- 2. GRID ENGINE --- */
.masonry-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  grid-auto-flow: dense; 
  gap: 1rem;
  width: 100%;
}


/* --- 3. CARD BASE STYLES --- */
.zoo-item {
  position: relative;
  border-radius: 8px; 
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 1.8rem;
  min-height: 220px;
  box-sizing: border-box;
  color: var(--color-primary);
  cursor: default;
  
  /* Base Animation Setup */
  opacity: 0;
  transform: translate3d(0, 30px, 0) scale(0.98);
  will-change: transform, opacity, box-shadow;
  backface-visibility: hidden;
  perspective: 1000px; 
  transition: transform 0.3s cubic-bezier(0.25, 0.1, 0.25, 1), box-shadow 0.3s ease;
}

/* =========================================
   SPOTLIGHT CARD EFFECT (Theme Aware)
   ========================================= */

/* 1. Define Variables for Light vs Dark */
:root {
  /* LIGHT MODE: A subtle grey/black beam creates contrast against light cards */
  --spotlight-color: rgba(0, 0, 0, 0.12);
}

[data-theme="dark"] {
  /* DARK MODE: A white beam glows against the dark cards */
  --spotlight-color: rgba(255, 255, 255, 0.25);
}

/* 2. Base Card Updates */
.zoo-item {
  position: relative;
  overflow: visible; 
}

/* 3. Disable the old hover effects */
.zoo-item:hover {
  transform: none !important; 
  box-shadow: none !important;
  z-index: 2; 
}

/* 4. The Spotlight Layer */
.zoo-item::after {
  content: "";
  position: absolute;
  inset: -1px; 
  border-radius: 9px; 
  padding: 1.5px; 
  
  /* USE THE VARIABLE HERE */
  background: radial-gradient(
    500px circle at var(--x, 0px) var(--y, 0px),
    var(--spotlight-color),
    transparent 40%
  );
  
  /* Masking keeps the effect only on the border */
  -webkit-mask: 
    linear-gradient(#fff 0 0) content-box, 
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 10;
}

/* Reveal on Hover */
.zoo-item:hover::after {
  opacity: 1;
}

.zoo-item.wide { grid-column: span 2; }
.zoo-item.tall { grid-row: span 2; }

/* Labels & Meta */
.item-label {
  position: absolute;
  top: 1.2rem; left: 1.5rem;
  font-size: 0.65rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em;
  opacity: 0.5; pointer-events: none;
  color: var(--color-muted); 
}

.media-meta {
  font-size: 1rem; font-weight: 450;
  color: var(--color-muted); 
}


/* --- 4. COLOR THEMES (Specific Border Logic) --- */

/* Purple Theme */
.zoo-item.style-info {
  background-color: var(--bento-tint-purple); 
  /* Light Mode: Uniform Grey Border */
  border: 1px solid var(--bento-border-light);
}
/* Dark Mode Override: Specific Purple Border */
[data-theme="dark"] .zoo-item.style-info { 
  border-color: rgba(99, 91, 255, 0.3); 
}

/* Blue Theme */
.zoo-item.style-feedback {
  background-color: var(--bento-tint-blue); 
  border: 1px solid var(--bento-border-light);
}
/* Dark Mode Override: Specific Blue Border */
[data-theme="dark"] .zoo-item.style-feedback { 
  border-color: rgba(10, 132, 255, 0.3); 
}

/* Red Theme */
.zoo-item.style-warning {
  background-color: var(--bento-tint-red);
  border: 1px solid var(--bento-border-light);
}
/* Dark Mode Override: Specific Red Border */
[data-theme="dark"] .zoo-item.style-warning { 
  border-color: rgba(255, 69, 58, 0.3); 
}

/* Article Theme (Lavender) */
.zoo-item.style-article {
  background-color: var(--bento-tint-article);
  border: 1px solid var(--bento-border-light);
  box-shadow: var(--bento-shadow);
}
/* Dark Mode Override: Subtle White Border */
[data-theme="dark"] .zoo-item.style-article { 
  border-color: rgba(255, 255, 255, 0.08); 
}

/* White Theme (Standard) */
.zoo-item.style-white {
  background-color: var(--color-bg-secondary); 
  border: 1px solid var(--bento-border-light); 
  box-shadow: var(--bento-shadow);
}
/* Dark Mode Override: System Grey Border */
[data-theme="dark"] .zoo-item.style-white { 
  border-color: var(--color-border); 
}

/* Graphic/Grey Theme */
.zoo-item.style-graphic {
  background-color: var(--bento-tint-graphic);
  border: 1px solid var(--bento-border-light);
  display: flex; 
}
/* Dark Mode Override: System Grey Border */
[data-theme="dark"] .zoo-item.style-graphic { 
  border-color: var(--color-border); 
}


/* --- INNER CONTAINER --- */
.media-inner-border {
  border: 2px dashed var(--bento-dash-color);
  border-radius: 8px; 
  width: 100%; height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  margin-top: 1.5rem;
}


/* --- VIDEO HERO (Exception: No Border) --- */

/* NEW INNER CONTAINER STYLE */
.media-inner-border {
  /* The dashed border moves here */
  border: 2px dashed var(--bento-dash-color);
  border-radius: 8px; 
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-top: 1.5rem;
}

/* --- 5. COMPONENT LAYOUTS --- */

.component-layout {
  display: flex; gap: 1rem; align-items: flex-start;
  margin-top: auto; width: 100%;
}
.icon-fixed {
  flex-shrink: 0; width: 24px; height: 24px; margin-top: 2px;
}
.icon-fixed img { width: 100%; height: 100%; display: block; }

.text-stack h4 {
  margin: 0 0 0.25rem 0;
  font-size: 1rem; font-weight: 700;
  color: var(--color-primary); /* Global Var */
}

.text-stack p {
  margin: 0; font-size: 0.95rem; line-height: 1.5;
  color: var(--color-secondary); /* Global Var */
}

.article-card h4 {
  font-size: 1.4rem; margin-bottom: 0.5rem;
  color: var(--color-primary); /* Global Var */
}
.article-card p {
  font-size: 1rem;
  color: var(--color-muted); /* Global Var */
}

/* Emphasis Block */
.emphasis-layout {
  display: flex; gap: 1rem; align-items: flex-start; margin-top: auto;
}
.emphasis-bar {
  width: 8px;
  background-color: #A490FF; /* Fixed ZEOS Purple */
  border-radius: 4px;
  align-self: stretch;
  min-height: 3rem;
}

/* --- Video Hero Content --- */
.zoo-item.style-video {
    background-image: url('../images/help_center/zeos-video-thumbnail2.webp');
    background-size: cover; background-position: center;
    color: white; border: none; position: relative; overflow: hidden;
}

.zoo-item.style-video::before {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to bottom, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0.7) 100%);
    z-index: 2; pointer-events: none; 
}

.video-content {
    position: relative; z-index: 1; width: 100%; height: 100%;
    display: flex; flex-direction: column; justify-content: space-between;
}

.video-tag {
    align-self: flex-start; display: inline-block; padding: 4px 10px; 
    border: 1px solid rgba(255,255,255,0.6); 
    border-radius: 20px; font-size: 0.65rem; font-weight: 600; text-transform: uppercase;
    margin-bottom: 0; color: white;
}

.video-title {
    font-size: 1.4rem; font-weight: 600; line-height: 1.2;
    color: white; max-width: 95%; margin-bottom: 0;
}

/* The Play Button (Static Colors) */
.play-btn {
    position: absolute; top: 50%; left: 50%;
    transform: translate(-50%, -50%); z-index: 3;
    display: inline-flex; align-items: center; gap: 12px;
    
    background: white; 
    padding: 6px 20px 6px 6px; 
    border-radius: 100px; border: none; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.2); 
    cursor: pointer;
    transition: transform 0.2s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.2s ease;
}

.play-icon { width: 32px; height: 32px; display: block; }

.btn-text {
    color: #3A3248; /* Dark text */
    font-size: 0.9rem; letter-spacing: -0.02rem; font-weight: 600; white-space: nowrap;
}

#video-duration { color: #948CA6; font-weight: 400; }

.play-btn:hover { 
    transform: translate(-50%, -50%) scale(1.05);
    box-shadow: 0 15px 40px rgba(0,0,0,0.3);
}

/* --- STICKY NAV --- */
.toc-wrapper {
  margin-top: auto; width: 100%; display: flex; flex-direction: column;
  gap: 0.8rem; padding-left: 1rem;
}

.toc-heading {
  margin: 0; font-size: 1rem; font-weight: 600; line-height: 1.4;
  position: relative; 
  color: var(--color-primary); /* Global Var */
}

.toc-heading.inactive {
  font-weight: 400;
  color: var(--color-muted); /* Global Var */
}

.toc-heading.active {
  color: var(--color-primary); /* Fixed ZEOS Purple */
  font-weight: 600;
}

.toc-heading.active::before {
  content: ''; position: absolute; left: -1rem; top: 0; height: 100%; width: 4px;  
  background-color: #A490FF; border-radius: 2px;
}

.toc-list {
  list-style: none; padding: 0; margin: 0 0 0 1.5rem; 
  display: flex; flex-direction: column; gap: 0.5rem;
}

.toc-list li.sub {
  font-size: 1rem;
  color: var(--color-muted); /* Global Var */
  font-weight: 400;
}

.center-stack { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 0.5rem; margin: auto; }

/* --- ICONS & INTERACTIVE (Using IDs per request) --- */

.feedback-faces { display: flex; gap: 1.5rem; margin-top: 0.5rem; }

#face-icon { 
  width: 40px; height: 40px; cursor: pointer; transition: transform 0.2s; display: block; 
}
/* Invert black icons to white in dark mode */
[data-theme="dark"] #face-icon { filter: brightness(0) invert(1); }

#face-icon:hover { transform: scale(1.1); }

#media-graphic { 
  width: 35px; height: auto; margin-bottom: 1rem; opacity: 0.6; display: block;
}
/* Invert black icons to white in dark mode */
[data-theme="dark"] #media-graphic { filter: brightness(0) invert(1); }


/* --- ARTICLE CARD ARROW (Using ID) --- */
.card-arrow-btn {
  width: 48px; height: 32px; 
  border: 2px solid var(--color-primary); /* Fixed purple border */
  border-radius: 8px; 
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all 0.2s;
}

#arrow-icon { width: auto; height: 16px; display: block; transition: filter 0.2s; }

/* Invert black icons to white in dark mode */
[data-theme="dark"] #arrow-icon { filter: brightness(0) invert(1); }
[data-theme="dark"] .card-arrow-btn:hover #arrow-icon { filter: none; }

.card-arrow-btn:hover { background: var(--color-primary); }
/* Invert on hover so it shows white against purple bg */
.card-arrow-btn:hover #arrow-icon { filter: brightness(0) invert(1); }


/* --- DOWNLOAD LIST ICONS (Using IDs) --- */
.d-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 1rem 0.8rem; margin: 0 -0.8rem; 
  cursor: pointer; transition: background-color 0.2s ease;
  border-bottom: 1px solid var(--color-border); /* Global Var */
}
.d-row:last-child { border-bottom: none; }

.d-row:hover {
  background-color: var(--color-bg-main); /* Global Var for hover */
  border-radius: 8px;
}

.d-left { 
  display: flex; align-items: center; gap: 0.8rem; 
  font-size: 0.95rem; font-weight: 500; 
  color: var(--color-primary); /* Global Var */
}

#file-icon { width: 16px; height: 16px; opacity: 0.6; display: block; }
#down-icon { width: 16px; height: 16px; opacity: 0.4; transition: opacity 0.2s; display: block; }

/* Invert black icons to white in dark mode */
[data-theme="dark"] #file-icon,
[data-theme="dark"] #down-icon { filter: brightness(0) invert(1); }

.d-row:hover #down-icon { opacity: 1; }
.download-list { padding-top: 2rem; }


/* --- ANIMATIONS & MOBILE --- */
@media (max-width: 768px) {
  .zoo-item.wide, .zoo-item.tall { grid-column: span 1; grid-row: span 1; }
  .masonry-grid { grid-template-columns: 1fr; gap: 1rem; }
  .zoo-item { min-height: 200px; }

  /* 1. Reduce padding on the card itself to give content more width */
  .zoo-item {
    padding: 1.25rem; /* Was 1.8rem */
  }

  /* 2. Compact the Sticky Nav Text */
  .toc-heading {
    font-size: 0.9rem; /* Scale down heading */
  }

  .toc-list li.sub {
    font-size: 0.85rem; /* Scale down list items */
  }

  /* 3. Reclaim Horizontal Space */
  .toc-wrapper {
    padding-left: 0.5rem; /* Pull everything left slightly */
  }
  
  .toc-list {
    margin-left: 1rem; /* Reduce indentation (Was 1.5rem) */
  }

  /* 4. Adjust the Purple Bar to fit the new spacing */
  .toc-heading.active::before {
    left: -0.8rem; /* Move closer to text (Was -1rem) */
    width: 3px;   /* Slightly thinner */
  }

  /* 1. Hide the last list item on mobile to save space */
  .toc-list li.sub:last-child {
    display: none;
  }

  /* 2. CRITICAL FIX: Force the text down */
  /* This ensures the title NEVER overlaps the "Sticky Nav" label,
     even if the list is still long. It forces the card to grow taller instead. */
  .toc-wrapper {
    margin-top: 3.5rem !important; 
  }
}

@keyframes bentoReveal {
  to { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
}

.start-bento .zoo-item {
  animation: bentoReveal 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.start-bento .zoo-item:nth-child(1) { animation-delay: 0.05s; }
.start-bento .zoo-item:nth-child(2) { animation-delay: 0.1s; }
.start-bento .zoo-item:nth-child(3) { animation-delay: 0.15s; }
.start-bento .zoo-item:nth-child(4) { animation-delay: 0.2s; }
.start-bento .zoo-item:nth-child(5) { animation-delay: 0.25s; }
.start-bento .zoo-item:nth-child(6) { animation-delay: 0.3s; }
.start-bento .zoo-item:nth-child(7) { animation-delay: 0.35s; }
.start-bento .zoo-item:nth-child(8) { animation-delay: 0.4s; }
.start-bento .zoo-item:nth-child(9) { animation-delay: 0.45s; }
.start-bento .zoo-item:nth-child(10) { animation-delay: 0.5s; }

/* =========================================
   SYSTEM ARCHITECTURE MAP
   ========================================= */

/* The Grid Container on the right side */
.module-map-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr; /* 2x2 Layout */
  gap: 3rem 1.5rem; /* Row Gap vs Col Gap */
  width: 100%;
  padding-right: 1.6rem;
  box-sizing: border-box;
}

.map-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.map-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-muted);
  font-weight: 600;
  text-align: center;
}

/* Base Card Style (The Wireframe) */
.map-card {
  width: 100%;
  background-color: var(--color-bg-secondary); /* Adapts to Dark Mode */
  border: 2px dashed var(--color-border);  /* Reusing Bento variable */
  border-radius: 8px;
  position: relative;
  transition: transform 0.3s ease, border-color 0.3s ease;
  will-change: transform;
  backface-visibility: hidden; /* Standard fix for Webkit/Chrome flickering */
  transform: translateZ(0);    /* Hardware acceleration trigger */
}

/* Hover Effect: Subtle Lift */
.map-card:hover {
  transform: translateY(-4px);
  border-color: var(--color-primary); /* Highlight on hover */
  cursor: default;
}

/* Aspect Ratios */
.map-card.tall {
  aspect-ratio: 14/15; /* Vertical Rectangle */
}

.map-card.wide {
  aspect-ratio: 3/2; /* Horizontal Rectangle */
}


/* --- The "Stacked" Effect for Article Pages --- */
.map-card.stacked {


  /* We use pseudo-elements to create the layers behind */
  position: relative;
  z-index: 2; /* Keep main card on top */
}

.map-card.stacked::before,
.map-card.stacked::after {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background-color: var(--color-bg-secondary);
  border: 2px dashed var(--color-border);
  border-radius: 8px;
  z-index: -1; /* Sit behind */
  transition: border-color 0.3s ease;
  will-change: transform;
  backface-visibility: hidden;
  transform: translateZ(0);
}

.map-card.stacked::before {
  transform: translate(0.7rem, 0.7rem); /* First layer offset */
}

.map-card.stacked::after {
  transform: translate(1.5rem, 1.5rem); /* Second layer offset */
}

/* When the main card is hovered, change the ghosts' borders too */
.map-card.stacked:hover::before,
.map-card.stacked:hover::after {
  border-color: var(--color-primary);
}


/* --- Mobile Responsiveness --- */
@media (max-width: 768px) {
  
  /* The .side-by-side parent already handles stacking the text on top. 
     We just need to tweak the grid itself. */
  
  .module-map-wrapper {
    /* Keep it 2 columns on mobile (wireframes are small enough) 
       or switch to 1 if you prefer big blocks. 2 usually looks best here. */
    grid-template-columns: 1fr 1fr; 
    gap: 3rem 1rem;
    
    /* Add some margin top to separate from text */
    margin-top: 1rem; 
    padding-right: 1.6rem;
  }
}

/* =========================================
   PROJECT TIMELINE COMPONENT
   ========================================= */

/* 1. Container & Layout */
.timeline-section {
  grid-column: 1 / -1;
  width: 100%;
  max-width: 1600px; /* Wide but contained */
  margin: 5rem auto;
  box-sizing: border-box;
}

.timeline-wrapper {
  position: relative;
  padding: 2rem 0;
}

/* 2. Date Markers (The "Dec 2025" and "Q2 2026") */
.time-marker {
  font-family: "Geist", sans-serif;
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--color-muted);
  position: absolute;
  opacity: 0; /* Hidden initially for animation */
  transition: opacity 0.5s ease 0.3s; /* Delay appearance */
}

/* 3. The List Container */
.timeline-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  position: relative;
}

/* 4. The Steps (Items) */
.t-step {
  position: relative;
  flex: 1; /* Distribute space evenly */
}

.t-label {
  font-size: 1.1rem; /* Base size */
  font-weight: 400;
  line-height: 1.2;
  margin: 0;
  color: var(--color-primary);
  opacity: 0; /* Animation start state */
  transform: translateY(10px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

/* 5. The Ticks (The vertical lines) */
.t-tick {
  display: block;
  background-color: var(--color-primary);
}

/* --- Timeline Header Styling --- */
.timeline-header {
  /* 1. Mobile First (Left Aligned) */
  text-align: left;
  margin-top: 0;
  margin-bottom: 6rem; /* Space between header and timeline */
  
  /* 2. Animation Setup (Start Hidden) */
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

/* Desktop Override (Center Aligned) */
@media (min-width: 901px) {
    .timeline-section {
      padding: 0 2rem;
  }
  
  .timeline-header {
    text-align: center;
    margin-bottom: 3rem; /* More breathing room on desktop */
  }
}

/* 3. Animation Trigger */
/* When section becomes visible, reveal header immediately */
.timeline-section.is-visible .timeline-header {
  opacity: 1;
  transform: translateY(0);
}

/* =========================================
   MOBILE LAYOUT (Vertical)
   ========================================= */
@media (max-width: 900px) {
  
  .timeline-wrapper {
    padding-left: 2rem; /* Make room for vertical line */
    border-left: 1px solid var(--color-primary); /* The Timeline Spine */
  }

  /* Position Dates */
  .time-marker.start { top: -48px; left: 0; font-weight: 400; }
  .time-marker.end   { bottom: -48px; left: 0; font-weight: 400; }

  .timeline-list {
    flex-direction: column;
    gap: 3rem;
    padding-top: 2rem;
    padding-bottom: 1rem;
  }

  /* The Tick becomes a horizontal connector */
  .t-tick {
    position: absolute;
    left: -2rem; /* Reach back to the spine */
    top: 0.6rem;
    width: 1.5rem; /* Length of tick */
    height: 1px;   /* Thickness */
  }

  .t-label {
    padding-left: 1rem;
    font-size: 1.2rem; /* Larger text on mobile for readability */
  }
}

/* =========================================
   DESKTOP LAYOUT (Horizontal)
   ========================================= */
@media (min-width: 901px) {

  .timeline-wrapper {
    padding-top: 4rem; /* Space for text above line */
    padding-bottom: 1rem; /* Space for dates below line */
  }

  /* The Main Horizontal Line */
  .timeline-list::before {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0; /* Sit on the baseline */
    height: 1px; /* Thickness of main line */
    background-color: var(--color-primary);
    
    /* Animation Logic: Draw line from left to right */
    width: 0%; 
    transition: width 1.5s cubic-bezier(0.22, 1, 0.36, 1);
  }

  /* Trigger animation when parent has .is-visible */
  .timeline-section.is-visible .timeline-list::before {
    width: 100%;
  }

  .t-step {
    text-align: left;
    padding-right: 1rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-end; /* Push content to bottom */
    height: 120px; /* Fixed height for label area */
    padding-bottom: 2rem; /* Distance from text to line */
  }

  /* The Tick (Vertical line connecting line to text area) */
  .t-tick {
    position: absolute;
    bottom: 0; /* Anchor to main line */
    left: 0;
    width: 1px; /* Match main line thickness */
    height: 24px; /* Height of the tick */
  }

  /* Position Dates below the line */
  .time-marker.start { 
    top: auto; bottom: 0; left: 0; 
    transform: translateY(100%); padding-top: 1rem;
  }
  .time-marker.end { 
    top: auto; bottom: 0; right: 0; 
    transform: translateY(100%); padding-top: 1rem;
  }
}

/* =========================================
   ANIMATION SEQUENCE
   ========================================= */

/* Reveal Dates */
.timeline-section.is-visible .time-marker {
  opacity: 1;
}

/* Reveal Labels Staggered */
.timeline-section.is-visible .t-label {
  opacity: 1;
  transform: translateY(0);
  /* Calculate delay based on index: 1.5s (line draw) + stagger */
  transition-delay: calc(0.5s + (var(--delay) * 0.1s));
}

/* =========================================
   FEATURE AUDIT (The Cloud)
   ========================================= */

.feature-audit-section {
  /* 1. Break out of the center text column */
  grid-column: 1 / -1;
  
  /* 2. Set a wider width (1200px is a good "Mid-Wide" size) */
  width: 100%;
  max-width: 1200px; 
  
  /* 3. Center it on the screen */
  margin: 6rem auto;

  box-sizing: border-box;
}

.audit-grid-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  margin: 4rem 0;
}

/* --- Left Column: Typography --- */
.audit-context h3 {
  margin-top: 0;
  margin-bottom: 1.5rem;
}

.stat-row {
  display: flex;
  align-items: center;
  gap: 2rem;
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--color-border);
}

.stat-item {
  display: flex;
  flex-direction: column;
}

.stat-num {
  font-size: 2.5rem;
  font-weight: 600;
  color: var(--color-primary);
  line-height: 1;
  letter-spacing: -0.05rem;
}

.stat-label {
  font-size: 0.9rem;
  color: var(--color-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 500;
  margin-top: 0.5rem;
}

.stat-divider {
  width: 1px;
  height: 40px;
  background-color: var(--color-border);
}

/* --- Right Column: The Visual Container --- */
.audit-visual-wrapper {
  position: relative;
  height: 400px;
  background-color: var(--color-bg-secondary);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  overflow: hidden; /* Clips everything outside */
  
  /* Mask at top and bottom for smooth entry/exit */
  mask-image: linear-gradient(to bottom, 
    transparent 0%, 
    black 15%, 
    black 85%, 
    transparent 100%
  );
  -webkit-mask-image: linear-gradient(to bottom, 
    transparent 0%, 
    black 15%, 
    black 85%, 
    transparent 100%
  );
}

/* --- The Moving Track --- */
.audit-cloud-track {
  /* This moves the entire stack of tags */
  display: flex;
  flex-direction: column;
  
  /* Infinite Loop Animation */
  /* We move it by -50% because that is exactly the height of ONE set */
  animation: infiniteScroll 40s linear infinite;
  
  /* Ensure it starts at the top */
  transform: translateY(0);
}

/* Pause animation on hover */
.audit-visual-wrapper:hover .audit-cloud-track {
  animation-play-state: paused;
}

/* --- The Groups of Tags --- */
.audit-cloud-group {
  padding: 0.4rem 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  justify-content: center;
  align-content: flex-start;
  
  /* Ensure consistent height calculations */
  box-sizing: border-box;
}

/* --- The Individual Chips --- */
.a-tag {
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0.6rem 1rem;
  background-color: var(--color-bg-main);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  color: var(--color-secondary);
  white-space: nowrap;
  box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

/* Highlight a few for visual interest */
.a-tag.highlight {
  background-color: var(--color-primary);
  color: var(--color-bg-main);
  border-color: var(--color-primary);
}

/* --- The "Lens" Overlay --- */
.audit-lens {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 1rem 1.5rem;
  border-radius: 100px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.1);
  
  display: flex;
  align-items: center;
  gap: 0.8rem;
  z-index: 10;
}

/* Dark Mode Lens Fix */
[data-theme="dark"] .audit-lens {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.lens-icon {
  color: var(--color-primary);
  display: flex;
}

.lens-text {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-primary);
}

/* --- Animation Keyframes (The Loop) --- */
@keyframes infiniteScroll {
  0% { 
    transform: translateY(0); 
  }
  100% { 
    /* Move exactly half the total height (the height of one group) */
    transform: translateY(-50%); 
  }
}

/* --- Mobile --- */
@media (max-width: 900px) {
  .audit-grid-layout {
    grid-template-columns: 1fr;
    gap: 4rem;
  }
  
  .audit-visual-wrapper {
    height: 300px;
  }
}

/* =========================================
   CONWAY'S LAW MODULE (Side-by-Side)
   ========================================= */

/* The Container */
.conway-visual-container {
  display: grid;
  grid-template-columns: 1fr 120px 1fr;
  align-items: center;
  gap: 0;
  width: 100%;
}

/* --- COMPACT MODIFIER (For Side-by-Side Layouts) --- */
.conway-visual-container.compact {
  /* Remove top margin since it's now inside a layout */
  margin-top: 0; 
  
  /* Shrink the middle gap to give cards more room */
  grid-template-columns: 1fr 60px 1fr; 
}

/* Adjust connector width for compact mode */
.conway-visual-container.compact .conway-connectors {
  width: 100%; /* Fill the 60px column */
}

/* --- The Cards --- */
.conway-card {
  background: var(--color-bg-secondary);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 1.5rem; /* Reduced padding slightly */
  height: 280px;   /* Slightly shorter to match text height */
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 2;
}

.card-label {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-muted);
  font-weight: 600;
  margin-bottom: 1.5rem;
  text-align: center;
}

/* --- Internal Elements (Nodes) --- */
.org-nodes, .nav-nodes {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  flex: 1;
}

.node-group {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.4rem;
  background: var(--color-bg-main);
  border-radius: 50px;
  border: 1px solid var(--color-border);
  width: fit-content;
  margin: 0 auto;
  padding-right: 1rem;
}

.node-group:hover {
  /* Scale up slightly and change border color */
  transform: scale(1.03);
  border-color: var(--color-primary);
  background: var(--color-bg-secondary); /* Subtle contrast boost */
  z-index: 10; /* Ensure it pops over neighbors if tight */
  transition: transform 0.2s ease;
}

.node-avatar {
  width: 24px;  /* Smaller avatar */
  height: 24px;
  border-radius: 50%;
  flex-shrink: 0;
}

.node-name, .nav-text {
  font-size: 0.85rem; /* Smaller font to fit narrow columns */
  font-weight: 500;
  white-space: nowrap; /* Prevent wrapping */
}

/* Nav Item Styling */
.ia-nav-item {
  background: var(--color-bg-main);
  border: 1px solid var(--color-border);
  border-left-width: 4px;
  border-radius: 6px;
  padding: 0.8rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.ia-nav-item:hover {
  /* Slide to the right to simulate "opening" */
  transform: translateX(6px);
  transition: transform 0.2s ease;
}

/* --- Connectors --- */
.conway-connectors {
  height: 180px; /* Aligns with internal node spacing */
  width: 100%;
  position: relative;
  z-index: 1;
}

.conway-connectors svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.connector-line {
  fill: none;
  stroke: var(--color-border);
  stroke-width: 2;
  stroke-dasharray: 6;
  vector-effect: non-scaling-stroke;
  animation: dashFlow 20s linear infinite;
}

/* Colors */
.color-1 { background-color: #A38FFE; }
.color-2 { background-color: #315ADC; }
.color-3 { background-color: #FF4C00; }
.border-1 { border-left-color: #A38FFE; }
.border-2 { border-left-color: #315ADC; }
.border-3 { border-left-color: #FF4C00; }

@keyframes dashFlow {
  to { stroke-dashoffset: -100; }
}

/* --- Mobile Responsiveness --- */
@media (max-width: 768px) {
  /* Stacking handled by .side-by-side parent */
  
  /* Reset the Diagram grid for mobile */
  .conway-visual-container.compact {
    grid-template-columns: 1fr; /* Stack vertically */
    margin-top: 2rem;
  }

  .conway-visual-container.compact .conway-connectors {
    height: 60px;
    width: 60px;
    margin: 0 auto;
    transform: rotate(90deg); /* Lines flow down */
  }
  
  .conway-card {
    height: auto;
    padding: 2rem 1.5rem;
  }
  
  .org-nodes, .nav-nodes {
    gap: 1.5rem;
  }
}

/* =========================================
   ZEOS IA EVOLUTION MODULE
   ========================================= */

.ia-evolution-module {
  --chip-added: #2E7D32;   
  --chip-removed: #D32F2F; 
  
  --stagger: 0.4s;       
  --act-1: 0s;           
  --act-2: 2.4s;         /* Bumped slightly to let Act 1 finish reading */
  --act-3-space: 4.4s;   
  --act-3-pills: 5.4s;   
  
  --slow-shift: cubic-bezier(0.65, 0, 0.35, 1);
  --spring-pop: cubic-bezier(0.22, 1, 0.36, 1);
  
  width: 100%; 
  max-width: 1400px;
  margin: 4rem auto; 
}

/* Dark Mode Colors */
@media (prefers-color-scheme: dark) {
  .ia-evolution-module { --chip-added: #81C784; --chip-removed: #E57373; }
}
[data-theme="dark"] .ia-evolution-module {
  --chip-added: #81C784; --chip-removed: #E57373; 
}

.ia-evolution-container { width: 100%; display: flex; flex-direction: column; align-items: center; }

/* --- Segmented Control --- */
.ia-segmented-control {
  position: relative; display: flex; background: var(--color-bg-secondary);
  border: 1px solid var(--color-border); border-radius: 100px; padding: 0.3rem;
  margin-bottom: 3.5rem; box-shadow: 0 4px 12px rgba(0,0,0,0.03);
}

.ia-segment {
  position: relative; z-index: 2; flex: 1; padding: 0.7rem 1.8rem;
  font-size: 0.95rem; font-weight: 600; text-align: center; color: var(--color-secondary);
  background: none; border: none; border-radius: 100px; cursor: pointer;
  transition: color 0.3s ease; font-family: inherit; white-space: nowrap;
}

.ia-segment.active { color: var(--color-bg-main); }

.ia-segment-bg {
  position: absolute; top: 0.3rem; bottom: 0.3rem; left: 0.3rem; width: calc(50% - 0.3rem);
  background: var(--color-primary); border-radius: 100px; transition: transform 0.5s var(--spring-pop); z-index: 1;
}

.state-new .ia-segment-bg { transform: translateX(100%); }

/* --- The Grid & 2-Phase Expansion --- */
.ia-chip-grid {
  display: flex; flex-wrap: wrap; justify-content: center; align-content: flex-start; 
  width: 100%; max-width: 650px; min-height: 250px; margin: -0.5rem; 
  transition: max-width 0.8s var(--slow-shift) 0.4s;
}

.state-new .ia-chip-grid {
  /* Phase 1 now takes 0.6s to perfectly match the unified width expansion of the chips */
  animation: expandPhase1 0.6s var(--slow-shift) 0s forwards,
             expandPhase2 0.8s var(--slow-shift) var(--act-3-space) forwards;
}

@keyframes expandPhase1 {
  100% { max-width: 780px; }
}
@keyframes expandPhase2 {
  0% { max-width: 780px; }
  100% { max-width: 1020px; }
}

/* --- Base Chip Style --- */
.ia-chip {
  margin: 0.4rem; height: 38px; padding: 0 1.2rem;
  border: 1px solid var(--color-border); border-radius: 100px;
  background: var(--color-bg-secondary); color: var(--color-primary);
  font-weight: 600; font-size: 0.9rem; white-space: nowrap;
  display: inline-flex; align-items: center; justify-content: center;
  box-sizing: border-box; overflow: hidden; 
}

/* --- The Sequencing --- */
.old-name { position: relative; display: inline-block; transition: opacity 0.3s ease; }
.old-name::after {
  content: ''; position: absolute; top: 50%; left: 0; margin-top: -1px;
  width: 0%; height: 2px; background-color: currentColor; border-radius: 2px;
  transition: width 0.3s ease;
}

/* REVERSE SEQUENCE */
.ia-chip.added {
  max-width: 0; margin: 0; padding: 0 0; border-width: 0; opacity: 0;
  background-color: var(--color-bg-secondary); border-color: var(--chip-added);
  transition: opacity 0.2s ease 0s, border-width 0s 0.2s,
              padding 0.6s var(--slow-shift) 0.2s, max-width 0.6s var(--slow-shift) 0.2s, 
              margin 0.6s var(--slow-shift) 0.2s; 
}
.added-name { opacity: 0; transform: translateY(8px); transition: opacity 0.2s ease 0s, transform 0.2s ease 0s; }
.new-name {
  display: inline-block; max-width: 0; opacity: 0; margin-left: 0; overflow: hidden; white-space: nowrap;
  transform: translateY(8px);
  transition: opacity 0.2s ease 0s, transform 0.2s ease 0s, max-width 0.4s var(--slow-shift) 0.2s, margin-left 0.4s var(--slow-shift) 0.2s;
}
.ia-chip.removed { transition: color 0.3s ease, border-color 0.3s ease; }

/* FORWARD: ACT 1 (Renames) */
/* 1. Expand the empty width of ALL Act 1 chips simultaneously at 0s */
.state-new .ia-chip.renamed .new-name {
  margin-left: 0.6rem; max-width: 200px; opacity: 1; transform: translateY(0);
  /* Notice margin and max-width have NO stagger applied. They fire at var(--act-1) */
  transition: margin-left 0.6s var(--slow-shift) var(--act-1), 
              max-width 0.6s var(--slow-shift) var(--act-1), 
              opacity 0.4s ease calc(var(--act-1) + 0.6s + (var(--seq) * var(--stagger)) + 0.3s),
              transform 0.6s var(--spring-pop) calc(var(--act-1) + 0.6s + (var(--seq) * var(--stagger)) + 0.3s);
}

/* 2. Once the width finishes expanding (0.6s), stagger the strikethrough */
.state-new .ia-chip.renamed .old-name::after { 
  width: 100%; 
  transition: width 0.3s ease calc(var(--act-1) + 0.6s + (var(--seq) * var(--stagger))); 
}
.state-new .ia-chip.renamed .old-name { 
  opacity: 0.4; 
  transition: opacity 0.3s ease calc(var(--act-1) + 0.6s + (var(--seq) * var(--stagger))); 
}

/* FORWARD: ACT 2 (Removals) */
.state-new .ia-chip.removed .old-name::after { width: 100%; transition: width 0.4s ease calc(var(--act-2) + (var(--seq) * var(--stagger))); }
.state-new .ia-chip.removed {
  color: var(--chip-removed); border-color: var(--chip-removed);
  transition: color 0.4s ease calc(var(--act-2) + (var(--seq) * var(--stagger)) + 0.4s), 
              border-color 0.4s ease calc(var(--act-2) + (var(--seq) * var(--stagger)) + 0.4s);
}
.state-new .ia-chip.removed .old-name { opacity: 0.5; transition: opacity 0.4s ease calc(var(--act-2) + (var(--seq) * var(--stagger)) + 0.4s); }

/* FORWARD: ACT 3 (Additions) */
.state-new .ia-chip.added {
  margin: 0.4rem; max-width: 300px; padding: 0 1.2rem; border-width: 1px; opacity: 1;
  background-color: var(--color-bg-secondary); border-color: var(--chip-added); color: var(--chip-added);
  
  transition: margin 0.8s var(--slow-shift) var(--act-3-space),
              max-width 0.8s var(--slow-shift) var(--act-3-space),
              padding 0.8s var(--slow-shift) var(--act-3-space),
              border-width 0s var(--act-3-space),
              opacity 0.4s ease calc(var(--act-3-pills) + (var(--seq) * var(--stagger)));
}
.state-new .ia-chip.added .added-name {
  opacity: 1; transform: translateY(0);
  transition: opacity 0.85s ease calc(var(--act-3-pills) + (var(--seq) * var(--stagger)) + 0.3s),
              transform 0.85s var(--spring-pop) calc(var(--act-3-pills) + (var(--seq) * var(--stagger)) + 0.3s);
}

/* --- Mobile Adjustments --- */
@media (max-width: 768px) {
  .ia-chip-grid { min-height: 380px; }
  .ia-chip { padding: 0 1rem; font-size: 0.85rem; }
  .ia-segment { padding: 0.6rem 1rem; font-size: 0.85rem; }
}

/* =========================================
   THEME IMAGE OVERRIDES (Fix for Ghost Logos)
   ========================================= */
/* 1. By default (Light Mode), force the dark logo to stay hidden */
.project-page-layout img.theme-img-dark {
  display: none !important;
}

/* 2. In Dark Mode, hide the light logo */
[data-theme="dark"] .project-page-layout img.theme-img-light {
  display: none !important;
}

/* 3. In Dark Mode, allow the dark logo to display */
[data-theme="dark"] .project-page-layout img.theme-img-dark {
  display: block !important;
}