/* ============================================================
   CASE STUDY — INDIVIDUAL PAGE
   Fireflies / Crimson Motorsports / App Prototype
   Requires styles.css to be loaded first
   ============================================================ */

/* Additional layout variables for this page */
:root {
    --max-width:   1200px;
    --section-pad: 50px 90px;
  }
  
  /* ============================================================
     BACK BAR
     ============================================================ */
     .back-bar {
      padding: 24px 90px 0;
      display: flex;
      justify-content: flex-start;
    }
    
    /* Left-align the back link text */
    .back-bar .proj-nav-block {
      align-items: flex-start;
    }
  /* ============================================================
     HERO — overrides the homepage .hero for case study pages
     ============================================================ */
  .back-bar ~ .hero,
  .back-bar + .hero {
    height: auto;
    overflow: hidden;
    margin-top: 32px;
    position: relative;
    background: var(--midnight);
  }
  
  .back-bar ~ .hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
  }
  
  /* ============================================================
     META ROW — 4 columns
     ============================================================ */
  .meta-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
    padding: 56px 90px;
    /* border-bottom: 1.5px solid var(--blush); */
  }
  
  .meta-block dt {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 24px;
    color: var(--berry);
    margin-bottom: 10px;
  }
  
  .meta-block dd {
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 18px;
    color: var(--midnight);
    line-height: 1.5;
  }
  
  /* Tools list inside meta */
  .tools-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 4px;
  }
  
  .tools-list {
    list-style: none;
    display: flex;
    flex-direction: row; /* change from column to row */
    flex-wrap: wrap;
    gap: 8px;
  }
  
  /* ============================================================
     SHARED SECTION STYLES
     ============================================================ */
  .cs-section {
    padding: var(--section-pad);
    max-width: var(--max-width);
    margin: 0 auto;
  }
  
  .cs-section-full {
    padding: var(--section-pad);
  }
  
  .cs-section-alt {
    background: var(--white);
    padding: var(--section-pad);
  }
  
  /* Section headings */
  .cs-section h2,
  .cs-section-full h2,
  .cs-section-alt h2 {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 32px;
    color: var(--berry);
    margin-bottom: 16px;
    letter-spacing: -0.01em;
  }
  
  .cs-section h3,
  .cs-section-full h3,
  .cs-section-alt h3 {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 24px;
    color: var(--berry);
    margin-bottom: 12px;
  }
  
  .cs-section p,
  .cs-section-full p,
  .cs-section-alt p {
    font-family: 'Lexend', sans-serif;
    font-weight: 300;
    font-size: 18px;
    color: var(--cobalt);
    line-height: 1.75;
  }
  
  /* ============================================================
     OVERVIEW — single full row
     ============================================================ */
  .overview-row {
    padding: var(--section-pad);
    /* border-bottom: 1.5px solid var(--blush); */
  }
  
  .overview-row h2 {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 24px;
    color: var(--berry);
    margin-bottom: 5px;
  }
  
  .overview-row p {
    font-family: 'Lexend', sans-serif;
    font-weight: 300;
    font-size: 18px;
    color: var(--cobalt);
    line-height: 1.75;
    max-width: 1600px;
  }
  
  /* ============================================================
     OBJECTIVES + TEAM STRUCTURE — two col, right side
     ============================================================ */
  .objectives-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 60px;
    padding: var(--section-pad);
    /* border-bottom: 1.5px solid var(--blush); */
  }
  
  .objectives-row h2 {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 24px;
    color: var(--berry);
    margin-bottom: 5px;
  }
  
  .objectives-row p {
    font-family: 'Lexend', sans-serif;
    font-weight: 300;
    font-size: 18px;
    color: var(--cobalt);
    line-height: 1.75;
    max-width: 860px;
  }
  
  .objectives-col {
    display: flex;
    flex-direction: column;
    gap: 40px;
  }
  
  /* ============================================================
     PROCESS — single row intro
     ============================================================ */
  .process-intro {
    padding: var(--section-pad);
    padding-bottom: 40px;
  }
  
  .process-intro h2 {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 24px;
    color: var(--berry);
    margin-bottom: 5px;
  }
  
  .process-intro p {
    font-family: 'Lexend', sans-serif;
    font-weight: 300;
    font-size: 18px;
    color: var(--cobalt);
    line-height: 1.75;
    max-width: 1600px;
  }
  
  /* ============================================================
     TWO-COL PROCESS SECTIONS
     image left, text right  /  text left, image right
     ============================================================ */
  .process-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    padding: 0 90px 60px;
  }
  
  .process-row.reverse {
    direction: rtl;
  }
  
  .process-row.reverse > * {
    direction: ltr;
  }
  
  .process-row h3 {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 24px;
    color: var(--berry);
    margin-bottom: 5px;
  }
  
  .process-row p {
    font-family: 'Lexend', sans-serif;
    font-weight: 300;
    font-size: 18px;
    color: var(--cobalt);
    line-height: 1.75;
  }
  
  .process-img {
    width: 100%;
    border-radius: 16px;
    overflow: hidden;
    background: var(--blush);
    aspect-ratio: 16 / 9;
  }

    /* Portrait process image — 9:16 for tall flowcharts/diagrams */
  .process-img.portrait {
    aspect-ratio: 9 / 16;
    max-width: 420px;
    margin: 0 auto;
  }
  
  .process-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
  
  /* ============================================================
     SINGLE ROW LABEL (AI Concept Art, Iconography etc.)
     ============================================================ */
  .label-row {
    padding: 48px 90px 24px;
  }
  
  .label-row h3 {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 24px;
    color: var(--berry);
    margin-bottom: 5px;
  }
  
  .label-row p {
    font-family: 'Lexend', sans-serif;
    font-weight: 300;
    font-size: 18px;
    color: var(--cobalt);
    line-height: 1.75;
    max-width: 1600px;
  }
  
  /* ============================================================
     IMAGE GRIDS
     ============================================================ */
  
  /* 3-column image grid */
  .img-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    padding: 0 90px 48px;
  }
  
  /* 7-column image grid */
  .img-grid-7 {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 12px;
    padding: 0 90px 48px;
  }
  
  /* 2-column image grid */
  .img-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
    padding: 0 90px 48px;
  }
  /* Smaller 3-col grid for square AI concept art */
  .img-grid-3.small {
    margin: 0 auto;
    padding: 0 0 20px;
    max-width: 1000px; /* adjust to taste */
  }
  
  .img-grid-3 img,
  .img-grid-2 img {
    width: 100%;
    border-radius: 12px;
    object-fit: cover;
    aspect-ratio: 1 / 1; /* default square for first AI row */
  }
   
  /* 16:9 variant for second AI concept art row */
  .img-grid-3.wide img {
    aspect-ratio: 16 / 9;
  }
   
  .img-grid-7 img {
    width: 100%;
    border-radius: 12px;
    object-fit: cover;
    aspect-ratio: 1 / 1;
  }
  
/* ============================================================
   LOGO ROW
   ============================================================ */
   .logo-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    padding: 0 90px 60px;
    align-items: start;
  }
   
  .logo-col h3 {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 24px;
    color: var(--berry);
    margin-bottom: 12px;
  }
   
  .logo-col p {
    font-family: 'Lexend', sans-serif;
    font-weight: 300;
    font-size: 18px;
    color: var(--cobalt);
    line-height: 1.75;
    margin-bottom: 20px;
  }
   
  /* Left col — primary logo, 16:9 */
  .logo-col > img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 12px;
  }
     
  /* ROW 1 — 4 logomarks, 1:1 square, side by side */
  .logomark-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 12px;
  }
   
  .logomark-row img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 10px;
  }
  
  /* ROW 2 — 3 full logos, side by side */
  .logo-variation-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 12px;
  }

  .logo-variation-row img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 10px;
  }

   
/* ============================================================
   5 LOGOS IN ONE ROW (BIGGER + CLEAN STRIP)
============================================================ */

.logo-variations {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  padding: 0 90px 20px;
  margin: 0;
  align-items: stretch;
}

.logo-box {
  height: 260px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 20px;
  overflow: hidden;
  background: var(--white); /* consistent white behind all logos */
  transition: transform 0.25s ease;
}

.logo-box:hover {
  transform: translateY(-3px);
}

.logo-box img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
  border-radius: 12px;
}

.logo-box:nth-child(3),
.logo-box:nth-child(4) {
  background: #A60F2D;
}

/* ============================================================
   OPTIONAL POLISH
============================================================ */

.logo-box {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.logo-box:hover {
  transform: translateY(-3px);
}
  
/* ============================================================
   BRANDING CAROUSEL
   ============================================================ */

   .branding-carousel {
    padding-bottom: 60px;
    overflow: hidden;
  }
  
  /* Wrapper */
  .branding-track-wrapper {
    perspective: 1200px;
    padding: 20px 0;
  }
  
  /* Track */
  .branding-track {
    display: flex;
    align-items: center;
    gap: 24px;
    transition: transform 0.6s ease;
  }
  
  /* Slides */
  .branding-slide {
    flex: 0 0 38%;
    border-radius: 20px;
    overflow: hidden;
    opacity: 0.45;
    transform: scale(0.8) rotateY(8deg);
    filter: blur(1px);
    transition: all 0.5s ease;
    cursor: pointer;
  }
  
  /* Active */
  .branding-slide.active {
    opacity: 1;
    transform: scale(1) rotateY(0deg);
    filter: none;
    z-index: 2;
    box-shadow: 0 20px 60px rgba(21, 43, 89, 0.18);
  }
  
  /* Image */
  .branding-slide img {
    width: 100%;
    display: block;
  }
  
  /* Footer */
  .branding-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }
  
  /* Counter */
  .branding-counter {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    color: var(--slate);
  }
  
  .branding-counter span {
    color: var(--berry);
  }
  
  /* Dots */
  .branding-dots {
    display: flex;
    gap: 10px;
  }
  
  .branding-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--blush);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
  }
  
  .branding-dot.active {
    background: var(--berry);
    width: 28px;
    border-radius: 999px;
  }
  
  /* ============================================================
     FINAL OUTCOME — 2 col text left, image right
     ============================================================ */
  .outcome-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    padding: var(--section-pad);
    background: var(--porcelin);
  }
  
  .outcome-row h2 {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 32px;
    color: var(--berry);
    margin-bottom: 16px;
  }
  
  .outcome-row p {
    font-family: 'Lexend', sans-serif;
    font-weight: 300;
    font-size: 18px;
    color: var(--cobalt);
    line-height: 1.75;
  }
  
  .outcome-img {
    width: 100%;
    border-radius: 16px;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    /* background: var(--blush); */
  }
  
  .outcome-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
  }
  
  /* ============================================================
     REFLECTION
     ============================================================ */
  .reflection-section {
    padding: var(--section-pad);
    text-align: center;
  }
  
  .reflection-section h2 {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 32px;
    text-align: center;
    color: var(--berry);
    margin-bottom: 24px;
  }
  
  .reflection-section p {
    font-family: 'Lexend', sans-serif;
    font-weight: 300;
    font-size: 18px;
    color: var(--cobalt);
    line-height: 1.75;
    text-align: left;
    max-width: 860px;
    margin: 0 auto;
  }
  
  /* ============================================================
     FOOTER
     ============================================================ */
     .case-study-top {
      padding: 0 0 30px;
    }  
      
  /* ============================================================
     NEXT CASE STUDY NAV
     ============================================================ */
     .project-nav,
     .project-cm-nav {
       display: flex;
       justify-content: space-between;
       align-items: flex-start;
       padding: 60px 90px;
     }
     
     .proj-nav-block {
       display: flex;
       flex-direction: column;
       text-decoration: none;
       width: 48%;
       gap: 4px;
       transition: transform 0.2s ease;
     }
     
     .proj-nav-block:hover {
       transform: translateX(4px);
     }
     
     .proj-nav-block.next {
       align-items: flex-end;
       text-align: right;
     }
     
     .proj-nav-label {
       font-family: 'Inter', sans-serif;
       font-weight: 500;
       font-size: 14px;
       color: var(--slate);
       letter-spacing: 0.04em;
       text-transform: uppercase;
     }
     
     .proj-nav-title {
       font-family: 'Inter', sans-serif;
       font-weight: 700;
       font-size: 22px;
       color: var(--midnight);
     }
  
/* ============================================================
   PHONE MOCKUP CAROUSEL — inline column version
   Phone frame overlays the carousel slides
   ============================================================ */

.phone-carousel-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Wrapper sits inside a .process-row column */
.phone-carousel-col {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 300px; /* controls the width of the phone */
  margin: 0 auto;
}

.phone-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
  width: 300px;
  height: 614px;
  border-radius: 44px;
}

.phone-slide {
  flex: 0 0 100%;
  scroll-snap-align: start;
  height: 100%;
}

.phone-slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: top; /* align image to top */
  display: block;
  /* border-radius: 44px; */
}
 
/* The scrollable track */
.phone-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
  width: 100%;
  border-radius: 44px;
}
 
.phone-track::-webkit-scrollbar {
  display: none;
}
 
/* Each slide is one screen — fills the track */
.phone-slide {
  flex: 0 0 100%;
  scroll-snap-align: start;
}
 
 
/* Phone frame PNG sits absolutely on top of the track */
.phone-frame-overlay {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
}
 
/* Dots */
.phone-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
}
 
.phone-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--blush);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background 0.25s ease, width 0.25s ease, border-radius 0.25s ease;
}
 
.phone-dot.active {
  background: var(--berry);
  width: 28px;
  border-radius: 999px;
}
 
/* Counter */
.phone-counter {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 14px;
  color: var(--slate);
  margin-top: 8px;
  letter-spacing: 0.04em;
}
 
.phone-counter span {
  color: var(--berry);
  font-weight: 700;
}
 


  /* ============================================================
     RESPONSIVE
     ============================================================ */
  @media (max-width: 900px) {
    :root { --section-pad: 60px 40px; }
  
    .back-bar { padding: 24px 40px 0; }
    .meta-row { grid-template-columns: repeat(2, 1fr); padding: 40px; }
    .objectives-row { grid-template-columns: 1fr; padding: 40px; }
    .process-row { grid-template-columns: 1fr; padding: 0 40px 48px; }
    .process-row.reverse { direction: ltr; }
    .logo-row { grid-template-columns: 1fr; padding: 0 40px 48px; }
    .img-grid-3 { grid-template-columns: repeat(2, 1fr); padding: 0 40px 40px; }
    .img-grid-7 { grid-template-columns: repeat(4, 1fr); padding: 0 40px 40px; }
    .img-grid-2 { grid-template-columns: 1fr; padding: 0 40px 40px; }
    .outcome-row { grid-template-columns: 1fr; padding: 40px; }
    .branding-carousel { padding: 0 40px 48px; }
    .media-label { padding: 48px 40px 20px; }
    .media-slider { padding: 0 40px 16px; }
    .media-thumbs { padding: 16px 40px 48px; }
    .project-nav { padding: 32px 40px 48px; }
    .label-row { padding: 40px 40px 20px; }
  }
  
  @media (max-width: 600px) {
    :root { --section-pad: 48px 24px; }
  
    .back-bar { padding: 20px 24px 0; }
    .hero { height: 300px; }
    .meta-row { grid-template-columns: repeat(2, 1fr); padding: 32px 24px; gap: 20px; }
    .meta-block dt { font-size: 18px; }
    .meta-block dd { font-size: 16px; }
    .img-grid-3 { grid-template-columns: 1fr; padding: 0 24px 32px; }
    .img-grid-7 { grid-template-columns: repeat(3, 1fr); padding: 0 24px 32px; }
    .process-row { padding: 0 24px 40px; }
    .label-row { padding: 32px 24px 16px; }
    .branding-carousel { padding: 0 24px 40px; }
    .media-label { padding: 40px 24px 16px; }
    .media-slider { padding: 0 24px 12px; }
    .media-thumbs { padding: 12px 24px 40px; }
    .project-nav { padding: 24px 24px 40px; }
    .overview-row { padding: 48px 24px; }
    .objectives-row { padding: 32px 24px; }
    .process-intro { padding: 48px 24px 32px; }
  }

  @media (max-width: 768px) {

    /* container padding */
    .branding-carousel {
      padding: 0 12px;
    }
  
    /* viewport */
    .branding-track-wrapper {
      overflow: hidden;
      width: 100%;
    }
  
    /* track */
    .branding-track {
      display: flex;
      gap: 12px;
      transition: transform 0.6s ease;
      align-items: center;
    }
  
    /* 🔥 KEY CHANGE — make slide dominate screen */
    .branding-slide {
      flex: 0 0 92vw;   /* viewport-based width = MUCH larger feel */
      max-width: 92vw;
    }
  
    /* 🔥 makes image visually taller + more immersive */
    .branding-slide img {
      width: 100%;
      height: 70vh;         /* THIS is what you were missing */
      object-fit: contain;  /* keeps full design visible */
      border-radius: 18px;
    }
  
    /* active emphasis */
    .branding-slide.active {
      transform: scale(1.02);
    }

    .logo-variations {
      display: grid;
      grid-template-columns: repeat(5, 1fr);
      gap: 16px;
      padding: 0 90px 60px;
      margin: 0;
      align-items: stretch;
    }
    
    .logo-box {
      height: 260px;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 20px;
      border-radius: 20px;
      overflow: hidden;
      background: var(--porcelain);
      transition: transform 0.25s ease;
    }
    
    .logo-box:hover {
      transform: translateY(-3px);
    }
    
    .logo-box img {
      max-width: 100%;
      max-height: 100%;
      object-fit: contain;
      display: block;
    }

    .logo-box:last-child {
      grid-column: 1 / -1;
      width: 60%;
      justify-self: center;
    
      display: flex;
      align-items: center;
      justify-content: center;
    }   

    /* ONLY Tiny Haven prototype section */
    .th-prototype {
      grid-template-columns: 1fr;
      margin: 15% 0;
    }
  
    /* text becomes first */
    .th-prototype > div:nth-child(2) {
      grid-row: 1;
    }
  
    /* carousel becomes second */
    .th-prototype > div:nth-child(1) {
      grid-row: 2;
    }
  
  }