/* 1. Hero Section */

.case-hero {
  padding: 38px 50px;
  background-image: linear-gradient(120deg, #eccaff 14%, #c7bbff 56%, #afb1ff 89%);
}
 
.case-hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  max-width: 1340px;
  margin: 0 auto;
}
 
.case-hero-text {
  width: 100%;
}
 
.case-hero h1 {
  margin: 0;
  font-size: 40px;
  font-weight: 600;
  font-style: normal;
}
 
.case-hero-text p {
  margin: 4px 0 0;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.5;
}
 
/* Role / Lab / Timeline layout */
.case-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  box-sizing: border-box;
  width: 100%;
  margin: 0;
  padding: 10px 0;
  overflow: hidden;
  font-weight: 500;
}
 
.case-meta div {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 10px;
}
 
.case-meta div:last-child {
  padding-left: 40px;
  padding-right: 40px;
}
 
.case-meta dt {
  font-size: 18px;
  text-transform: uppercase;
  color: #404040;
}
 
.case-meta dd {
  margin: 0;
  font-size: 16px;
}
 
/* Second line in each group is the smaller gray detail */
.case-meta dd + dd {
  font-size: 14px;
  color: #404040;
}

/* Glass style from https://css.glass */
.project-info {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 16px;
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  border: 1px solid rgba(207, 154, 252, 0.5);
}

.prototype-buttons-container {
  display: flex;
  justify-content: center;
  gap: 20px;
}


/* 2. Prototype Button Style */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 200px;
  height: 50px;
  padding: 5px;
  gap: 10px;
  border-radius: 10px;
  background-color: #5b0095;
  font-family: var(--font-main);
  font-size: 20px;
  color: #fff;
  text-align: center;
  text-decoration: none;
}

.btn:hover {
  background-color: #38005C;
}

/* 3. Process Timeline */
.case-content {
  box-sizing: border-box;
  max-width: 1440px;
  margin: 0 auto;
  padding: 24px;
}

.phase-list {
  --marker: 66px;

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

/* vertical gradient line */
.phase-list::before {
  content: '';
  position: absolute;
  top: calc(var(--marker) / 2);
  left: calc(var(--marker) / 2);
  width: 2px;
  height: var(--line-height, calc(100% - var(--marker) / 2));
  border-radius: 3px;
  background: linear-gradient(#C07BFF, #9D67E1, #CABBFA, #FFD8A8);
  transform: translateX(-50%);
}

.phase-item {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 40px;
}

.phase-item:last-child {
  margin-bottom: 0;
}

.phase-marker {
  width: var(--marker);
  height: var(--marker);
  
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  padding: 0px;
  gap: 4px;
  box-sizing: border-box;
  border-radius: 50%;
  border: 4px solid var(--color-accent);
  background-color: white;
  z-index: 1;
  color: var(--color-accent);
  box-shadow: 0 4px 6px rgb(112 18 199 / 25%);
}

.phase-label {
  font-size: 12px;
  font-weight: 700;
  color: #666655;
  line-height: 10px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.phase-number {
  font-size: 18px;
  font-weight: 800;
  line-height: 18px;
}

.phase-card {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: 20px;
  gap: 24px;
  background-color: #f9f9f9;
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.phase-card h2 {
  margin: 0;
  margin-bottom: 16px;
  font-size: 24px;
  font-weight: 700;
}

.phase-card h3 {
  margin: 0;
  margin-bottom: 12px;
  font-size: 14px;
  font-weight: 700;
  color: #C56C00;
}

.phase-card p {
  margin: 0;
  font-size: 16px;
  font-weight: 500;
  line-height: 25px;
}

.phase-findings {
  margin: 0 0 16px;
  padding: 16px 20px 16px 40px;
  border-left: 4px solid var(--color-accent);
  border-radius: 8px;
  background-color: #f3ecfb;
}

.phase-findings li {
  margin-bottom: 8px;
}

.phase-findings li:last-child {
  margin-bottom: 0;
}

.phase-images {
  display: grid;
  gap: 12px;
  align-items: center;
  justify-items: center;
  width: 100%;
  max-width: 700px;
  margin: 0 auto;
}

.phase-content .phase-images {
  margin-top: 24px;
}

.phase-figure {
  margin: 0;
}

.phase-image {
  display: block;
  width: 100%;
  height: auto; 
  border-radius: 10px;
}

.user-story {
  position: relative;
  margin: 24px 0;
  padding: 28px 32px 24px 72px;
  border-radius: 16px;
  background: linear-gradient(120deg, rgba(236, 202, 255, 0.4), rgba(175, 177, 255, 0.4));
  border: 1px solid rgba(207, 154, 252, 0.5);
}

.user-story::before {
  content: "\201C";
  content: "\201C" / ""; 
  position: absolute;
  top: 8px;
  left: 20px;
  font-size: 80px;
  font-weight: 800;
  line-height: 1;
  color: var(--color-accent);
}

.user-story blockquote {
  margin: 0;
}

.highlight {
  padding: 0 2px;
  background: linear-gradient(transparent 55%, #FFC663 55%);
  color: inherit;
}

/* Previous / Next projects Button */
.case-pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 126px;
  margin: 55px;
  padding: 0 11px;
  overflow: hidden;
  border-radius: 50px;
  background-image: linear-gradient(to right, #eac9ff, #b0b1ff);
}
 
.pager-link {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
  min-width: 0;
  padding: 16px 18px;
  color: inherit;
  text-decoration: none;
}
 
.pager-link--next {
  align-items: flex-end;
  text-align: right;
}
 
.pager-direction {
  font-size: 18px;
  font-weight: 600;
  line-height: 18px;
  color: #404040;
}
 
.pager-name {
  display: flex;
  align-items: center;
  gap: 5px;
  min-height: 46px;
  padding: 0 6px;
  font-size: 18px;
  font-weight: 600;
  color: black;
}
 
/* Long project names get an ellipsis instead of wrapping */
.pager-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
 
.pager-arrow {
  font-size: 24px;
  transition: transform 180ms ease;
}
 
.pager-link--prev:hover .pager-arrow {
  transform: translateX(-4px);
}
 
.pager-link--next:hover .pager-arrow {
  transform: translateX(4px);
}

/* JavaScript Animations */
/* Phases start hidden only when JavaScript is running */
.js .phase-item {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 600ms ease, transform 600ms ease;
}

.js .phase-item.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .js .phase-item {
    opacity: 1;
    transform: none;
    transition: none;
  }
}