/* ==========================================================
   CASE STUDY — casestudy.css
   ========================================================== */



/* Right column wrapper */
.cs-right {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.cs-right__text {
  height: auto;
  padding: var(--space-8) var(--section-x);
  border-left: 2px solid #131313;
  display: flex;
  align-items: flex-start;
}

.cs-right__text p {
  font-family: var(--font-body);
  font-size: 1.25rem;
  font-weight: 400;
  line-height: 1.75;
  color: #131313;
  text-align: left;
  width: 100%;
}


/* Text block inside div4 */
.cs-text-block {
  justify-content: flex-start !important;
  align-items: flex-start !important;
}

.cs-text-center {
  justify-content: center !important;
  align-items: flex-start !important;
  text-align: left;
}

.cs-text-block p {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 400;
  line-height: 1.75;
  color: #131313;
}

/* Right column wrapper for s2 on case study */
.cs-right-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.cs-right-col .s2__div5 {
  flex: none;
  aspect-ratio: 1440 / 940;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem;
}

.cs-dark-block {
  background-color: #131313;
  border: 2px solid #131313;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cs-dark-img {
  max-width: 80%;
  max-height: 80%;
  object-fit: contain;
}

/* v4 image div */
.cs-v4 {
  background-color: transparent !important;
  background-image: url('../assets/images/v1.png');
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  background-clip: content-box;
  background-origin: content-box;
  flex: 1;
}


/* Inverted row — image on left */
.cs-row-inverted {
  flex-direction: row-reverse;
}

/* Left image column (for inverted layout) */
.cs-left-col {
  border-right: 2px solid #131313;
  border-left: none !important;
}

/* v3 image */
.cs-v3 {
  background-color: transparent !important;
  background-image: url('../assets/images/v2.png');
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  background-clip: content-box;
  background-origin: content-box;
  width: 100%;
  flex: 1;
  padding: 3rem;
}

/* Font label block */
.cs-font-label-block {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.cs-font-label {
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: var(--text-sm);
  font-weight: 400;
  color: #131313;
  line-height: 1.3;
}

.cs-font-label--medium {
  font-weight: 500;
}

.cs-font-body {
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif !important;
  font-size: var(--text-base) !important;
  font-weight: 400;
  color: #131313;
  line-height: 1.75;
}

/* Helvetica Neue text */
.cs-text-helvetica p,
.cs-text-block.cs-text-helvetica p {
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif !important;
  font-size: var(--text-base);
  font-weight: 400;
  line-height: 1.75;
  color: #131313;
}




/* v2 image */
.cs-v2 {
  background-color: transparent !important;
  background-image: url('../assets/images/v3.png');
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  background-clip: content-box;
  background-origin: content-box;
  width: 100%;
  flex: 1;
  padding: 3rem;
}

/* Pattern div */
.cs-pattern {
  background-color: transparent !important;
  background-image: url('../assets/images/Distort_pattern_blue.jpg');
  background-size: cover;
  background-position: center;
}

/* Spinning disc on hover */
@keyframes spinCW {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.s2__disc {
  transition: none;
}

.s2__div4:hover .s2__disc {
  animation: spinCW 1.2s linear infinite;
}

.cs-ext-link {
  color: #131313;
  text-decoration: underline;
  transition: opacity 0.15s ease;
}

.cs-ext-link:hover {
  opacity: 0.5;
}

/* --- Hero Section --- */
.cs-hero {
  width: 100%;
  height: 100svh;
  background-color: transparent;
}

.cs-hero__main {
  max-width: 1920px;
  margin: 0 auto;
  height: 100%;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  background-color: #eaeaea;
}

/* Left column: project info */
.cs-hero__left {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 40%;
  flex-shrink: 0;
  border-right: 2px solid #131313;
}

/* Title row */
.cs-info--title {
  padding: var(--space-8) var(--section-x) var(--space-6);
  border-bottom: 2px solid #131313;
  flex-shrink: 0;
}

.cs-hero__title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(3rem, 8vw, 8rem);
  font-weight: 400;
  color: #131313;
  line-height: 0.9;
  letter-spacing: 0.02em;
  white-space: nowrap;
  animation: slideFromLeft 1.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  opacity: 0;
}

/* Info rows */
.cs-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: var(--space-5) var(--section-x);
  border-bottom: 2px solid #131313;
  flex-shrink: 0;
}

.cs-info__label {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 500;
  color: #131313;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.cs-info__value {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 400;
  color: #131313;
}

.cs-info__link {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 400;
  color: #131313;
  text-decoration: none;
  transition: opacity 0.15s ease;
}

.cs-info__link:hover {
  opacity: 0.5;
}

/* Right column */
.cs-hero__right {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.cs-hero__desc {
  flex: 1;
  padding: var(--space-8) var(--section-x);
  border-bottom: 2px solid #131313;
  display: flex;
  align-items: flex-start;
}

.cs-hero__desc-text {
  font-family: var(--font-body);
  font-size: var(--text-lg);
  font-weight: 400;
  line-height: 1.75;
  color: #131313;
  max-width: 680px;
}

.cs-hero__dark {
  background-color: #131313;
  border: 2px solid #131313;
  height: var(--hero-role-h);
  flex-shrink: 0;
}


.cs-gallery-col {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  overflow: hidden;
}

.cs-gallery-img {
  flex: 1;
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  background-clip: content-box;
  background-origin: content-box;
  padding: 1.5rem;
  border-bottom: 2px solid #131313;
}

.cs-gallery-img:last-child {
  border-bottom: none;
}

.cs-v5 {
  background-color: transparent !important;
  background-image: url('../assets/images/v5.png');
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  background-clip: content-box;
  background-origin: content-box;
  aspect-ratio: 1440 / 1053;
  width: 100%;
  flex: none;
  padding: 3rem;
}

.cs-v6 {
  background-image: url('../assets/images/v6.png');
}

.cs-v7 {
  background-image: url('../assets/images/v7.png');
}

/* About page — CV blocks */
.about-cv-block {
  display: flex;
  flex-direction: column;
  border-top: 2px solid #131313;
}

.about-cv-row {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  padding: var(--space-4) var(--section-x);
  border-bottom: 2px solid #131313;
}

.about-cv-company {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  color: #131313;
  min-width: 140px;
  flex-shrink: 0;
}

.about-cv-role {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 400;
  color: #131313;
  flex: 1;
}

.about-cv-date {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 400;
  color: #131313;
  opacity: 0.45;
  white-space: nowrap;
}

/* About page — Toolkit */
.about-toolkit-row {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: var(--space-4) var(--section-x);
  border-bottom: 2px solid #131313;
}

.about-toolkit-label {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  color: #131313;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.about-toolkit-value {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 400;
  color: #131313;
  opacity: 0.65;
}

/* About hero heading — dark background */
.about-hero__heading {
  background-color: #131313 !important;
  border-color: #131313 !important;
}

.about-hero__heading .s2__number,
.about-hero__heading .s2__project-title {
  color: #eaeaea !important;
}

/* About section 2 — column divider */
.about-col-divider {
  flex: 0 0 20px;
  align-self: stretch;
  background-color: #FF3F1A;
}

/* ==========================================================
   MOBILE RESPONSIVE — ≤ 768px
   ========================================================== */
@media (max-width: 768px) {

  /* --- Section layout: stack left + right --- */
  .s2__row2 {
    flex-direction: column;
    flex: none;
  }

  .s2__left {
    width: 100% !important;
    border-right: none !important;
    border-bottom: 2px solid #131313;
    flex-shrink: 0;
  }

  /* --- Text blocks --- */
  .s2__div2 {
    padding: var(--space-5) var(--space-4);
  }

  .cs-text-block {
    padding: var(--space-4) var(--space-4) !important;
    flex: none !important;
  }

  .cs-results-block {
    padding: var(--space-4) var(--space-4);
    flex: none;
    max-height: 320px;
    overflow-y: auto;
  }

  /* --- Image columns --- */
  .cs-col-img {
    height: 240px;
    flex: none;
  }

  .cs-col-imgs {
    flex: none;
    height: auto;
  }

  .cs-img-inline-wrap {
    height: 200px;
    flex: none;
  }

  .cs-img-wrap {
    height: 240px;
    flex: none;
  }

  .cs-siq-early-wrap {
    height: 240px;
    flex: none;
  }

  /* --- Case study columns --- */
  .cs-right,
  .cs-right-col,
  .cs-left-col {
    width: 100%;
    border-right: none;
    border-left: none;
    border-bottom: 2px solid #131313;
  }

  .cs-row-inverted {
    flex-direction: column;
  }

  /* --- Right text block --- */
  .cs-right__text {
    padding: var(--space-5) var(--space-4);
  }

  /* --- Gallery --- */
  .cs-gallery-col {
    flex-direction: row;
  }

  .cs-gallery-img {
    height: 200px;
    flex: 1;
  }

  /* --- About page: stack CV and Toolkit columns --- */
  .about-col-divider {
    flex: none;
    width: 100%;
    height: 2px;
    align-self: unset;
    border-bottom: 2px solid #131313;
  }

  .about-cv-block {
    padding: var(--space-4) var(--space-4);
  }

  .about-cv-row {
    flex-wrap: wrap;
    gap: 0.25rem;
    padding: var(--space-3) 0;
  }

  .about-cv-company {
    min-width: unset;
    width: 100%;
  }

  .about-cv-date {
    width: 100%;
  }

  .about-toolkit-row {
    flex-direction: column;
    gap: 0.25rem;
    padding: var(--space-3) 0;
  }

  /* --- Pattern div on hero sections --- */
  .cs-pattern {
    height: 160px;
    flex: none;
  }

  /* --- Hero right side --- */
  .cs-right {
    flex: none;
  }

  .cs-siq-login {
    height: 200px;
    flex: none;
  }
}

/* --- New section layout (sections 2–4) --- */
.cs-full-heading {
  width: 100%;
  flex-shrink: 0;
  border-bottom: 2px solid #131313;
  border-right: none;
}

.cs-content-row {
  flex: 1;
  min-height: 0;
}

.cs-full-dark {
  width: 100%;
  flex: none;
  height: 80px;
  border-top: 2px solid #131313;
}


/* Prevent s2__div4 from growing when content follows below it */
.cs-text-auto {
  flex: none !important;
}

/* StructureIQ images */
.cs-siq-1 {
  background-image: url('../assets/images/s1.png');
  background-color: #eaeaea;
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  width: 100%;
  flex: 1;
}

/* StructureIQ warn + alert */
.cs-siq-warn {
  background-image: url('../assets/images/s-warn.png');
  background-color: #131313;
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  background-clip: content-box;
  background-origin: content-box;
  padding: 1.5rem;
}

.cs-siq-alert {
  background-image: url('../assets/images/s-alert.png');
  background-color: #131313;
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  background-clip: content-box;
  background-origin: content-box;
  padding: 1.5rem;
}

/* StructureIQ design system */
.cs-siq-ds {
  background-image: url('../assets/images/s-design-system.png');
  background-color: #131313;
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  background-clip: content-box;
  background-origin: content-box;
  padding: 1.5rem;
}

/* StructureIQ sensor image */
.cs-siq-sensor {
  background-image: url('../assets/images/s-sensor.png');
  background-color: #131313;
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  background-clip: content-box;
  background-origin: content-box;
  width: 100%;
  flex: 1;
  padding: 2rem;
}

/* StructureIQ raw data dashboard */
.cs-siq-raw {
  background-image: url('../assets/images/s-raw-data.png');
  background-color: #131313;
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  background-clip: content-box;
  background-origin: content-box;
  width: 100%;
  flex: 1;
  padding: 2rem;
}

/* StructureIQ login */
.cs-siq-login {
  background-image: url('../assets/images/s-login.png');
  background-color: #131313;
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  background-clip: content-box;
  background-origin: content-box;
  padding: 1.5rem;
}

/* StructureIQ assets-2 */
.cs-siq-assets-2 {
  background-image: url('../assets/images/s-assets-2.png');
  background-color: #131313;
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  background-clip: content-box;
  background-origin: content-box;
  padding: 1.5rem;
}

/* StructureIQ assets */
.cs-siq-assets {
  background-image: url('../assets/images/s-assets.png');
  background-color: #131313;
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  background-clip: content-box;
  background-origin: content-box;
  padding: 1.5rem;
}

/* StructureIQ raw-2 (reused slot) */
.cs-siq-raw-2 {
  background-image: url('../assets/images/s-login.png');
  background-color: #131313;
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  background-clip: content-box;
  background-origin: content-box;
  padding: 1.5rem;
}

/* Multi-image right column */
.cs-col-imgs {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  overflow: hidden;
  border: 2px solid #131313;
}

/* Full-height image column (right side, when text is in left column) */
.cs-col-img {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  overflow: hidden;
  background-color: #eaeaea;
  border: 2px solid #131313;
}

.cs-col-img img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}

/* Generic image wrappers for case study sections */
.cs-img-wrap {
  flex: 1;
  border: 2px solid #131313;
  border-top: none;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background-color: #eaeaea;
}

.cs-img-wrap img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}

/* Inline image wrap — for stacked images inside a column */
.cs-img-inline-wrap {
  flex: 1;
  border-bottom: 2px solid #131313;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background-color: #eaeaea;
}

.cs-img-inline-wrap:last-of-type {
  border-bottom: none;
}

.cs-img-inline-wrap img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}

/* StructureIQ early designs */
.cs-siq-early-wrap {
  flex: 1;
  border: 2px solid #131313;
  border-top: none;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #eaeaea;
  padding: 2rem;
}

.cs-siq-early-wrap img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}

/* StructureIQ demo screenshots */
.cs-siq-img-1 { background-image: url('../assets/images/s-img-1.png'); background-color: #f0f0f0; }
.cs-siq-img-2 { background-image: url('../assets/images/s-img-2.png'); background-color: #f0f0f0; }
.cs-siq-img-3 { background-image: url('../assets/images/s-img-3.png'); background-color: #f0f0f0; }
.cs-siq-img-4 { background-image: url('../assets/images/s-img-4.png'); background-color: #f0f0f0; }

/* Old process image */
.cs-old-process {
  background-image: url('../assets/images/old-process.png');
  background-color: #eaeaea;
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  background-clip: content-box;
  background-origin: content-box;
  width: 100%;
  flex: 1;
  padding: 2rem;
}

/* ---- Early explorations images ---- */
.cs-early-1 {
  background-image: url('../assets/images/early-1.png');
  background-color: #1a1a1a;
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  background-clip: content-box;
  background-origin: content-box;
  padding: 2rem;
  flex: 1 !important;
  aspect-ratio: unset !important;
}

.cs-early-2-block {
  background-image: url('../assets/images/early-2.png');
  background-color: #1a1a1a;
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  background-clip: content-box;
  background-origin: content-box;
  padding: 2rem;
  flex: 1;
  min-height: 200px;
  border-bottom: 2px solid #131313;
}

/* ---- Before flow diagram ---- */
.cs-before-diagram {
  padding: var(--space-6) var(--section-x);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  border: 2px solid #131313;
  border-top: none;
  flex: 1;
}

.cs-before-label-title {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #131313;
  opacity: 0.45;
}

.cs-before-flow {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0.5rem;
  row-gap: 1.5rem;
}

.cs-before-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
}

.cs-before-box {
  border: 1.5px solid #131313;
  padding: 0.5rem 0.85rem;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 500;
  color: #131313;
  white-space: nowrap;
}

.cs-before-sublabel {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 400;
  color: #131313;
  opacity: 0.4;
  text-align: center;
}

.cs-before-arrow {
  font-size: 1rem;
  color: #131313;
  opacity: 0.35;
  padding-top: 0.65rem;
  flex-shrink: 0;
}

.cs-pain-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding-top: var(--space-4);
  border-top: 1px solid rgba(19,19,19,0.15);
  margin-top: auto;
}

.cs-pain-item {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 400;
  color: #131313;
  opacity: 0.6;
  padding-left: 1.2rem;
  position: relative;
  line-height: 1.5;
}

.cs-pain-item::before {
  content: '—';
  position: absolute;
  left: 0;
}

/* ---- Results list ---- */
.cs-results-block {
  padding: var(--space-6) var(--section-x);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  border: 2px solid #131313;
  border-top: none;
  flex: 1;
}

.cs-results-eyebrow {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #131313;
  opacity: 0.45;
}

.cs-results-list {
  display: flex;
  flex-direction: column;
}

.cs-results-item {
  display: grid;
  grid-template-columns: 2rem 1fr;
  gap: 0.75rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid rgba(19,19,19,0.12);
  align-items: baseline;
}

.cs-results-item:first-child {
  border-top: 1px solid rgba(19,19,19,0.12);
}

.cs-results-marker {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 700;
  color: #131313;
  opacity: 0.35;
}

.cs-results-text {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 400;
  color: #131313;
  line-height: 1.55;
}

.cs-results-text strong {
  font-weight: 600;
}

/* Mobile additions */
@media (max-width: 768px) {
  .cs-early-1 {
    height: 240px;
    flex: none !important;
    aspect-ratio: unset !important;
  }

  .cs-early-2-block {
    height: 240px;
    flex: none;
  }

  .cs-before-box {
    font-size: 0.75rem;
    padding: 0.4rem 0.6rem;
    white-space: normal;
  }

  /* Results scrollable on mobile */
  .cs-results-block {
    max-height: 320px;
    overflow-y: auto;
    flex: none;
  }

  /* Section title font scale */
  .s2__project-title {
    font-size: clamp(2rem, 8vw, 3rem);
  }
}
