/* JumboCode Case Study Styles */

/* Import main design system */
@import url('style.css');
@import url('cargurus.css');

/* JumboCode specific variables */
:root {
  --jumbo-primary: #28A07E;
  --jumbo-secondary: #007095;
  --jumbo-accent: #32C89E;
  --jumbo-text-dark: #000000;
  --jumbo-text-light: #727272;
  --jumbo-bg-light: rgba(0, 0, 0, 0.05);
  --jumbo-border: rgba(50, 200, 158, 0.6);
}

/* Simple utility class for common image pattern */
.img-block {
  display: block;
}

/* Headline Section */
.headline-section {
  padding: var(--spacing-large) 0 0;
  background: var(--color-bg);
}

.headline {
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size: var(--type-size-title);
  line-height: 1.5em;
  color: var(--jumbo-text-dark);
  max-width: 600px;
  margin: 0;
}

/* Hero Image Section */
.hero-image-section {
  padding: 24px 0 0;
  background: var(--color-bg);
}

.hero-image-container {
  border: 1px solid #32C89E;
  border-radius: 16px;
  /* remove inner padding to enforce exact 900x472 */
  padding: 0;
  overflow: hidden;
  background: #81DBC2;
  cursor: default;
  max-width: 900px;
  width: 100%;
  aspect-ratio: 900 / 472;
  margin-left: auto;
  margin-right: auto;
}

.hero-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: transparent;
}

/* Safari-safe cover behavior for hero thumbnails without changing container */
.hero-image.jumbocode-cover,
.hero-image.cargurus-cover {
  /* Allow the image to exceed natural height to fill frame on Safari */
  height: auto;
  min-height: 100%;
  object-position: center;
}

/* CarGurus hero padding helper: 48px at 900px => 5.333% */
.hero-image-container.cargurus-pad {
  padding: 5.333% 5.333% 0 5.333%;
  box-sizing: border-box;
}

/* Ensure image anchors bottom if needed by per-project class */
.hero-image.cargurus-cover {
  object-position: center bottom;
}

/* JumboCode hero proportional padding: 96px sides (10.666%), 48px top (5.333%) */
.hero-image-container.jumbocode-pad {
  padding: 5.333% 10.666% 0 10.666%;
  box-sizing: border-box;
}

.hero-image.jumbocode-cover {
  object-position: center bottom;
}

/* Summary Section */
.summary-section {
  padding: 36px 0;
  background: var(--color-bg);
}

.summary-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  max-width: 900px;
}

.summary-text {
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  font-size: var(--type-size-body);
  line-height: 1.5em;
  color: var(--jumbo-text-dark);
  max-width: 600px;
  margin: 0;
}

/* Visit Site Link */
.visit-site-link {
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: var(--type-size-body);
  line-height: 1.5em;
  letter-spacing: 0.01em;
  color: #2DB48F;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.3s ease;
}

.visit-site-link:hover {
  color: #238C6F;
}

.visit-site-link .arrow {
  display: inline-block;
  transition: transform 0.3s ease;
}

.visit-site-link:hover .arrow {
  transform: translateX(4px);
}

/* Process Link */
.process-link {
  text-decoration: none;
}

.process-link-text {
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  color: #2DB48F;
  transition: color 0.3s ease;
}

.process-link:hover .process-link-text {
  color: #238C6F;
}

/* Impact Section */
.impact-section {
  padding: 0;
  background: var(--color-bg);
}

/* Impact wrapper background and padding for JumboCode */
.impact-frame-jumbo {
  background: #DBEEE9;
  border-radius: 16px;
  padding: 32px clamp(16px, 4vw, 48px);
  border: 1px solid var(--jumbo-primary);
}

/* Spaced impact container with auto-width cards for JumboCode */
.impact-spaced {
  justify-content: space-between;
  gap: 32px;
}

.impact-spaced .impact-card {
  width: auto;
  flex: 0 0 auto;
  min-width: 0;
}

.impact-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  max-width: 900px;
}

.impact-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 275px;
  padding: 0;
}

.impact-number {
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: var(--type-size-heading);
  line-height: 1.5em;
  color: var(--jumbo-primary);
  margin: 0;
}

.impact-description {
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size: var(--type-size-body);
  line-height: 1.5em;
  color: #000000;
  margin: 0;
}

.impact-detail {
  color: #727272;
  font-weight: 200;
}
/* Impact cards responsive breakpoint */
@media (max-width: 850px) {
  .impact-frame-jumbo {
    width: fit-content;
    margin: 0;
  }
  
  .impact-spaced {
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
  }
  
  .impact-spaced .impact-card {
    width: auto;
    text-align: left;
  }
}


/* Product Comparison Section */
.product-comparison-section {
  padding: var(--spacing-xlarge) 0 0;
  background: var(--color-bg);
}

.comparison-container {
  display: flex;
  justify-content: center;
  gap: clamp(16px, 4vw, 64px); /* Responsive gap */
  width: 100%;
  margin: 0;
  padding: clamp(16px, 3vw, 32px) clamp(16px, 4vw, 64px) 0; /* Responsive padding */
  background: var(--jumbo-bg-light);
  border-radius: 16px;
}

.comparison-column {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(12px, 2vw, 16px); /* Responsive gap */
  flex: 1; /* Equal width columns */
  min-width: 0; /* Allow shrinking */
}

.comparison-title {
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: var(--type-size-meta);
  line-height: 1.21em;
  color: var(--jumbo-text-dark);
  margin: 0;
}

.comparison-image {
  width: 100%;
  max-width: 350px;
  aspect-ratio: 350 / 568; /* Fixed aspect ratio */
}

.comparison-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 8px 8px 0 0;
}

/* Section Titles and Text */
.section-title {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: var(--type-size-meta);
  line-height: 1.5em;
  letter-spacing: 0.01em;
  color: var(--jumbo-text-light);
  margin: 0 0 24px 0;
}

.section-text {
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  font-size: var(--type-size-body);
  line-height: 1.5em;
  color: var(--jumbo-text-dark);
  max-width: 600px;
  margin: 0;
}

/* Problem Section */
.problem-section {
  padding-bottom: var(--spacing-medium);
  background: var(--color-bg);
}

/* Problems Grid */
.problems-grid-section {
  padding: 0 0 var(--spacing-large);
  background: var(--color-bg);
}

.problems-grid {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  max-width: 900px;
}

.problem-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 275px;
  padding: 0;
}

.problem-icon {
  width: 23.25px;
  height: 23.25px;
  color: var(--jumbo-text-dark);
  margin-bottom: 12px;
}

.problem-title {
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size: var(--type-size-meta);
  line-height: 1.21em;
  color: var(--jumbo-text-dark);
  margin: 0;
}

.problem-description {
  font-family: 'Inter', serif;
  font-weight: 300;
  font-size: var(--type-size-meta);
  line-height: 1.5em;
  color: var(--jumbo-text-light);
  margin: 0;
}

/* Problem Showcase */
.problem-showcase-section {
  padding: 0;
  background: var(--color-bg);
}

.showcase-grid {
  display: flex;
  justify-content: space-between;
  gap: clamp(24px, 6vw, 64px); /* Responsive gap starting at 64px */
  max-width: 900px;
}

.showcase-item {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-small);
  flex: 1; /* Equal width items */
  min-width: 0; /* Allow shrinking */
}

.showcase-image {
  display: flex;
  flex-direction: column;
}

.showcase-img {
  width: 100%;
  height: auto;
  aspect-ratio: 418 / 225; /* Maintain original aspect ratio */
  object-fit: cover;
  border-radius: 8px;
  display: block;
}


.showcase-description {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.description-card {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 16px 16.89px 16px 20px;
  background: rgba(237, 76, 92, 0.05);
  border: 0.5px solid #ED4C5C;
  border-radius: 8px;
}

.description-card.positive {
  background: var(--jumbo-bg-light);
  border: 0.5px solid var(--jumbo-accent);
}

.description-card.positive.black-thumbs {
  background: var(--jumbo-bg-light);
  border: none;
}

.description-icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--type-size-body);
  flex-shrink: 0; /* Prevent icon from shrinking */
}

.description-text {
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  font-size: var(--type-size-meta);
  line-height: 1.45em;
  color: var(--jumbo-text-dark);
  margin: 0;
}

/* Goal Section */
.goal-section {
  padding-bottom: var(--spacing-medium);
  background: var(--color-bg);
}

/* Goals Grid */
.goals-section {
  padding: 0;
  background: var(--color-bg);
}

.goals-grid {
  display: flex;
  align-items: center;
  gap: var(--spacing-large);
  max-width: 900px;
}

.goal-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-small);
  padding: var(--spacing-small) 16px;
  width: 257.33px;
  background: var(--color-bg);
  border: 1.5px solid var(--jumbo-primary);
  border-radius: 8px;
}

.goal-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 2px solid var(--jumbo-primary);
  border-radius: 50%;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: var(--type-size-heading);
  line-height: 1em;
  color: var(--jumbo-primary);
}

.goal-title {
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size: var(--type-size-meta);
  line-height: 1.5em;
  color: var(--jumbo-text-dark);
  text-align: center;
  margin: 0;
}

/* Solution Section */
.solution-section {
  padding-bottom: var(--spacing-large);
  background: var(--color-bg);
}

/* Solution Showcase */
.solution-showcase-section {
  background: var(--color-bg);
}

.solution-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 40px clamp(16px, 4vw, 48px) 0 clamp(16px, 4vw, 48px); /* Responsive side padding, no bottom */
  background: var(--jumbo-bg-light);
  border-radius: 16px;
  max-width: 900px;
}

.solution-title {
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  font-size: var(--type-size-meta);
  line-height: 1.5em;
  letter-spacing: 0.01em;
  color: var(--jumbo-text-dark);
  margin: 0;
  padding-bottom: 8px;
}

.solution-content {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.solution-subtitle {
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size: var(--type-size-heading);
  line-height: 1.5em;
  color: var(--jumbo-text-dark);
  margin: 0;
}

.solution-description {
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  font-size: var(--type-size-body);
  line-height: 1.5em;
  color: var(--jumbo-text-light);
  margin: 0;
  padding-bottom: 8px;
}

.solution-image {
  padding: 8px 0 0;
}

.solution-img {
  width: 100%;
  height: 400px;
  object-fit: cover;
  border-radius: 16px;
  display: block;
}

.solution-video {
  width: 100%;
  aspect-ratio: 16 / 9; /* Lock to 16:9 aspect ratio */
  object-fit: cover;
  border-radius: clamp(8px, 2vw, 16px) clamp(8px, 2vw, 16px) 0px 0px; /* Responsive rounded corners */
  display: block;
}

/* Process Section */
.process-section {
  padding-bottom: var(--spacing-medium);
  background: var(--color-bg);
}

.process-content {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.process-header {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  gap: 8px;
  max-width: 600px;
  width: 100%;
}

.process-subtitle {
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size: var(--type-size-heading);
  line-height: 1.4em;
  color: var(--jumbo-text-dark);
  margin: 0;
  flex: 0 0 auto;
}

.process-tag {
  font-family: 'Inter', sans-serif;
  font-weight: 200;
  font-size: var(--type-size-meta);
  line-height: 1.6em;
  color: var(--jumbo-text-dark);
  margin: 0;
  flex-shrink: 0;
}

.process-description {
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  font-size: var(--type-size-body);
  line-height: 1.5em;
  color: var(--jumbo-text-light);
  max-width: 600px;
  margin: 0;
}

/* Research Images */
.research-images-section {
  padding: 0 0 var(--spacing-xlarge);
  background: var(--color-bg);
}

.research-grid {
  display: flex;
  justify-content: space-between;
  gap: clamp(24px, 6vw, 64px); /* Responsive gap starting at 64px */
  max-width: 900px;
}

.research-item {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-small);
  flex: 1; /* Equal width items */
  min-width: 0; /* Allow shrinking */
}

.research-image {
  display: flex;
  flex-direction: column;
}

.research-img {
  width: 100%;
  height: auto;
  aspect-ratio: 418 / 225; /* Maintain original aspect ratio */
  object-fit: cover;
  border-radius: 8px;
  display: block;
  border: 1px solid #cccccc;
}

.research-description {
  display: flex;
  flex-direction: column;
  gap: 16.89px;
  width: 100%;
}

/* Info Architecture */
.info-arch-section {
  padding: 0 0 var(--spacing-medium);
  background: var(--color-bg);
}

.info-arch-image {
  display: flex;
  justify-content: center;
  margin-top: var(--spacing-medium);
}

.info-arch-img {
  width: 100%;
  max-width: 900px;
  height: 225px;
  object-fit: cover;
  border-radius: 8px;
  display: block;
}

/* Prototypes */
.prototypes-section {
  background: var(--color-bg);
}

.prototypes-content {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Prototypes Grid */
.prototypes-grid-section {
  padding: 0 0 var(--spacing-xlarge);
  background: var(--color-bg);
}

.prototypes-grid {
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  gap: clamp(16px, 4vw, 32px);
  max-width: 900px;
  width: 100%;
  overflow: hidden;
}

.prototype-item {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  max-width: 100%;
}

.prototype-img {
  width: 100%;
  height: auto;
  aspect-ratio: 452 / 576;
  object-fit: cover;
  object-position: top;
  border-radius: 4px;
  display: block;
}

/* Iterations */
.iterations-section {
  padding-top: var(--spacing-section);
  background: var(--color-bg);
}

.iterations-grid {
  display: flex;
  gap: clamp(8px, 2vw, 16px);
  max-width: 900px;
  padding-top: var(--spacing-medium);
}

.iteration-column {
  display: flex;
  flex-direction: column;
  gap: clamp(8px, 2vw, 16px);
  flex: 1;
}

.iteration-item {
  width: 100%;
}

.iteration-img {
  width: 100%;
  height: auto;
  max-height: 240px;
  object-fit: contain;
  border-radius: 4px;
  display: block;
}

/* Ensure 8-graveyard fills full column width */
.iteration-column:nth-child(1) .iteration-item:nth-child(2) .iteration-img {
  width: 100%;
  object-fit: cover;
}

/* Specific heights for 5-graveyard and 6-graveyard */
.iteration-column:nth-child(2) .iteration-item:nth-child(3) .iteration-img {
  max-height: 127px;
  width: 100%;
  object-fit: cover;
}

.iteration-column:nth-child(3) .iteration-item:nth-child(3) .iteration-img {
  max-height: 138px;
  width: 100%;
  object-fit: cover;
}

/* Design Section */
.design-section {
  background: var(--color-bg);
}

.design-content {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Design Showcase */
.design-showcase-section {
  padding: 0 0 var(--spacing-xlarge);
  background: var(--color-bg);
}

.design-system-grid {
  display: flex;
  align-items: center;
  gap: 33.39px;
  max-width: 900px;
}

.design-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 122.17px;
}

.color-swatch {
  width: 122.17px;
  height: 122.17px;
  border: 0.81px solid #000000;
  border-radius: 16.29px;
  margin-bottom: 8px;
}

.design-label {
  font-family: 'Proxima Nova', sans-serif;
  font-weight: 300;
  font-size: var(--type-size-meta);
  line-height: 1em;
  color: var(--jumbo-text-dark);
  margin: 0;
  text-align: center;
}

.color-code {
  font-family: 'Proxima Nova', sans-serif;
  font-weight: 500;
  font-size: var(--type-size-meta);
  line-height: 1em;
  color: #FFFFFF;
  margin: 0;
  text-align: center;
}

/* Figma Structure */
.figma-structure-section {
  background: var(--color-bg);
  padding-top: var(--spacing-section);
}

.figma-structure-image {
  display: flex;
  flex-direction: column;
  align-items: left;
  margin-top: var(--spacing-medium);
}

.figma-structure-img {
  width: 100%;
  max-width: 900px;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  display: block;
}

/* Takeaways */


/* Page Layout Wrapper */
.page-layout-wrapper {
  position: relative;
  min-height: 100vh;
}

/* Sidebar Navigation */
.sidebar-nav {
  position: fixed;
  top: 0;
  /* Fluid calculation: 
     - 50% centers the main content
     - 474px is half the main content width (948px/2)
     - 74px is sidebar width
     - The gap calculation changes based on viewport:
       * 1440px+ to 1224px: gap stays 40px, only left margin shrinks
       * 1224px to 1160px: gap shrinks from 40px to 8px
       * <1160px: sidebar disappears */
  left: calc(50% - 474px - 74px - clamp(8px, calc(40px - (1224px - 100vw) * 0.5), 40px));
  width: 74px;
  padding-top: 130px; /* Align with main header */
  z-index: 100;
  height: fit-content;
}

.sidebar-content {
  display: flex;
  flex-direction: column;
  gap: 36px;
}

.back-link {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  font-size: var(--type-size-meta);
  color: var(--jumbo-text-light);
  text-decoration: none;
  transition: color 0.3s ease;
}

.back-link:hover {
  color: var(--jumbo-text-dark);
  font-weight: 400;
}

.back-arrow {
  font-size: var(--type-size-body);
}

.page-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.nav-link {
  font-family: 'Inter', sans-serif;
  font-weight: 200;
  font-size: var(--type-size-meta);
  color: var(--jumbo-text-light);
  text-decoration: none;
  transition: color 0.3s ease;
  display: block;
  padding: 0;
}

.nav-link:hover {
  color: var(--jumbo-text-dark);
  font-weight: 400;
}

.nav-link.active {
  font-weight: 400;
  color: var(--jumbo-text-dark);
}

/* Main content */
.main-content {
  max-width: 948px;
  margin: 0 auto; /* Center the main content */
  width: 100%;
}

/* Responsive adjustments - simplified to just handle the breakpoint where sidebar disappears */
@media (max-width: 1159px) {
  .sidebar-nav {
    display: none; /* Hide sidebar on smaller screens */
  }
  
  .main-content {
    max-width: 948px;
    margin: 0 auto; /* Center the content */
  }
}
@media (max-width: 700px) {
  .hero-image-container {
    padding: var(--spacing-small) var(--spacing-medium);
  }
  
  .summary-content {
    flex-direction: column;
    gap: 16px;
  }
  
  .impact-container {
    flex-direction: column;
    gap: var(--spacing-small);
  }
  
  .impact-card {
    width: 100%;
  }
  
  .comparison-container {
    flex-direction: column;
    gap: var(--spacing-medium);
    padding: var(--spacing-small) var(--spacing-medium);
    padding-bottom: 0px;
  }
  
  .comparison-image {
    width: 100%;
  }
  
  .problems-grid {
    flex-direction: column;
    gap: var(--spacing-small);
  }
  
  .problem-card {
    width: 100%;
  }
  
  .showcase-grid {
    flex-direction: column;
    gap: var(--spacing-large);
    max-width: 400px;
  }
  
  .showcase-item {
    width: 100%;
  }
  
  .showcase-img,
  .showcase-description {
    width: 100%;
  }
  
  .goals-grid {
    flex-direction: column;
    gap: var(--spacing-small);
  }
  
  .goal-card {
    width: 100%;
  }
  
  .research-grid {
    flex-direction: column;
    gap: var(--spacing-large);
    max-width: 400px;
  }
  
  .research-item {
    width: 100%;
  }
  
  .research-img,
  .research-description {
    width: 100%;
  }
  
  .prototypes-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(8px, 2vw, 16px);
    max-width: 100%;
    width: 100%;
    overflow: hidden;
  }
  
  .iteration-row {
    flex-direction: column;
    gap: 16px;
  }
  
  .design-system-grid {
    flex-wrap: wrap;
    gap: var(--spacing-small);
  }
  
  .design-item {
    width: calc(50% - 12px);
  }
}

@media (max-width: 480px) {
  .hero-image-container {
    padding: 16px var(--spacing-small);
  }
  
  .comparison-container {
    padding: 16px var(--spacing-small);
    padding-bottom: 0px;
  }
  
  .solution-card {
    padding: var(--spacing-small) var(--spacing-medium) 0 var(--spacing-medium); /* Remove bottom padding */
  }
  
  .design-system-grid {
    flex-direction: column;
    gap: var(--spacing-small);
  }
  
  .design-item {
    width: 100%;
  }
}

