/* ---------- CASE STUDY PAGE ---------- */
/* Builds on tokens from style.css and the .project-hero / .nav rules
   already defined in style.css / projects.css */

:root {
  --pyra-primary: #e63958;
  --pyra-secondary: #f2a93b;
  --pyra-disabled: #b9b9c2;
}

.case-study {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 48px 40px;
}

.case-back {
  display: inline-block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-purple);
  margin: 44px 0 28px;
}

.case-back:hover {
  color: var(--purple-btn);
}

/* --- header --- */

.case-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 40px;
}

.case-title h1 {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.3;
}

.case-subtitle {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.3;
}

.case-meta {
  text-align: right;
  color: var(--ink);
}

.case-date {
  font-weight: 600;
  margin-bottom: 6px;
}

.case-focus {
  font-size: 0.95rem;
  color: #47405d;
}

/* --- hero image --- */

.case-hero {
  border-radius: 24px;
  margin-bottom: 48px;
  display: flex;
  justify-content: center;
}

.case-hero img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* --- about paragraph --- */

.case-about-wrap{
  margin-bottom: 60px;
  
}

.case-about-wrap .case-about {
  margin: 0;
}
.case-about-wrap .btn-primary {
  margin-bottom: 3rem;
}



.case-about {
  max-width: 720px;
  margin: 0 auto 72px;
  color: #47405d;
  line-height: 1.75;
}

.case-about strong {
  color: var(--ink);
}

/* --- process row --- */

.case-process {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-bottom: 90px;
  max-width: 1180px;
}

.case-process img {
  width: 100%;
}

.process-sketch {
  flex: 0 1 200px;
}

.process-midfi {
  flex: 0 1 250px;
}

.process-final {
  flex: 1 1 320px;
}

/* --- problem / goal / approach / result --- */

.case-summary {
  max-width: 760px;
  margin: 0 auto 100px;
}

.summary-row {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 32px;
  margin-bottom: 36px;
}

.summary-row:last-child {
  margin-bottom: 0;
}

.summary-label {
  text-align: right;
  font-weight: 700;
  color: var(--ink);
}

.summary-text {
  color: #47405d;
  line-height: 1.75;
  max-width: 600px;
}

/* --- story: image + text --- */

.case-story {
  display: flex;
  align-items: center;
  gap: 56px;
  margin-bottom: 90px;
}

.case-story img {
  flex: 0 0 300px;
  max-width: 400px;

  display: block;
}

.case-story-text {
  flex: 1;
  color: #47405d;
  line-height: 1.75;
}

.case-story-text p {
  margin-bottom: 20px;
}

.case-story-text p:last-child {
  margin-bottom: 0;
}

/* --- centered narrative paragraph --- */

.case-quote {
  max-width: 640px;
  margin: 8rem auto ;
  text-align: center;
  color: #47405d;
  line-height: 1.75;
}

/* --- moodboard --- */

.case-moodboard {
  max-width: 900px;
  margin: 0 auto 14px;
}

.case-moodboard img {
  width: 100%;
  
  display: block;
}

.case-caption {
  text-align: center;
  font-size: 0.85rem;
  color: var(--faded-purple);
  margin-bottom: 10px;
}

/* --- improvements + button states --- */

.case-improvements {
  display: flex;
  flex-wrap: wrap;
  gap: 60px;
  max-width: 1000px;
  margin: 0 auto 24px;
}

.improve-notes {
  flex: 1 1 320px;
  color: #47405d;
  line-height: 1.75;
}

.improve-notes p {
  margin-bottom: 22px;
}

.discover-demo {
  display: inline-block;
  font-family: 'Poppins', sans-serif;
  text-transform: uppercase;
  font-weight: 600;
  font-size: 1.7rem;
  letter-spacing: 0.02em;
  color: white;
 text-shadow:
    0 0 5px #e63958,
    0 0 10px #e63958,
    0 0 20px #e63958;

}

.discover-demo::after {
  content: "";
  display: block;
  width: 56px;
  height: 4px;
  margin-top: 8px;
  background: var(--pyra-primary);
  border-radius: 2px;
}

.button-states {
  flex: 1 1 320px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.state-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 24px;
}

.state-label {
  flex: 0 0 140px;
  text-align: right;
  font-weight: 600;
  color: var(--ink);
  font-size: 0.95rem;
}

.btn-preview {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 130px;
  padding: 11px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.btn-preview-primary {
  background: var(--pyra-primary);
  color: #fff;
}

.btn-preview-hover {
  background: #fff;
  color: var(--pyra-primary);
  border: 1.5px solid var(--pyra-primary);
}

.btn-preview-secondary {
  background: var(--pyra-secondary);
  color: #fff;
}

.btn-preview-disabled {
  background: var(--pyra-disabled);
  color: #fff;
}

/* --- full-width supporting images --- */

.case-fullimage {
  max-width: 1000px;
  margin: 0 auto 90px;
}

.case-fullimage img {
  width: 100%;
  display: block;
}



.card-case-study-gallery {
    display: grid;
    grid-template-columns: repeat(2, 400px);
    gap: 1.5rem;
    justify-content: center;
}



.card-case-study-gallery img {
    display: block;
    width: 100%;

}


.case-study-gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}


.case-study-gallery__item {
    overflow: hidden;
    border-radius: 12px;
}

.case-study-gallery__item img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition: transform .4s ease;
}

.case-study-gallery__item:hover img {
    transform: scale(1.05);
}

.case-study-gallery__item--featured {
    grid-column: 1 / -1;
    height: 550px;
}

.case-study-gallery__item:not(.case-study-gallery__item--featured) {
    height: 500px;
}


.figma-embed {
  display: block;
  width: 100%;
  max-width: 800px;
  aspect-ratio: 4 / 3;
  margin: 0 auto;
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: 24px;
}


@media (max-width: 768px) {

  .case-study {
    padding: 0 20px 30px;
  }

  /* Header */
  .case-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 32px;
  }

  .case-title h1,
  .case-subtitle {
    font-size: 1.25rem;
  }

  .case-meta {
    text-align: left;
  }


  /* Hero */
  .case-hero {
    border-radius: 16px;
    margin-bottom: 32px;
  }


  /* About */
  .case-about {
    margin-bottom: 40px;
    line-height: 1.6;
  }


  /* Process images */
  .case-process {
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 60px;
  }


  /* Summary */
  .case-summary {
    margin-bottom: 60px;
  }

  .summary-row {
    grid-template-columns: 1fr;
    gap: 8px;
    margin-bottom: 28px;
  }

  .summary-label {
    text-align: left;
  }


  /* Story */
  .case-story {
    flex-direction: column;
    gap: 24px;
    margin-bottom: 60px;
  }

  .case-story img {
    width: 100%;
    max-width: 100%;
    flex: none;
  }


  /* Quote */
  .case-quote {
    margin: 4rem auto;
    padding: 0 10px;
  }


  /* Improvements */
  .case-improvements {
    flex-direction: column;
    gap: 32px;
  }


  /* Button states */
  .state-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .state-label {
    text-align: left;
    flex: none;
  }

  .btn-preview {
    width: 100%;
  }


  /* Gallery */
  .card-case-study-gallery,
  .case-study-gallery {
    grid-template-columns: 1fr;
    gap: 1rem;
  }


  .case-study-gallery__item--featured,
  .case-study-gallery__item:not(.case-study-gallery__item--featured) {
    height: auto;
    aspect-ratio: 4 / 3;
  }


  /* Typography */
  .discover-demo {
    font-size: 1.3rem;
  }

    .case-fullimage {
    width: 100%;
    max-width: 100%;
    margin-bottom: 50px;
  }


  .case-fullimage img {
    width: 100%;
    height: auto;
  }


  .figma-embed {
    width: 100%;
    max-width: 100%;
    height: 400px;
    aspect-ratio: auto;
    border-radius: 16px;
  }

}




/* Smaller phones */
@media (max-width: 480px) {

  .case-study {
    padding: 0 16px 24px;
  }

  .case-title h1,
  .case-subtitle {
    font-size: 1.1rem;
  }

  .case-about,
  .summary-text,
  .case-story-text {
    font-size: 0.95rem;
  }

  .case-study-gallery__item--featured,
  .case-study-gallery__item:not(.case-study-gallery__item--featured) {
    aspect-ratio: 1 / 1;
  }

}