/* ===========================
   LAYOUT
=========================== */

.cs-container {
  margin: 0 auto;
  padding: 0 100px;
  max-width: var(--max-width);
}

.cs-header {
  padding: 80px 0 60px;
  border-bottom: 1px solid var(--grey-light);
  color: var(--black);
}

.cs-body {
  padding: 80px 0 120px;
}

.cs-content {
  display: flex;
  flex-direction: column;
}

.cs-section {
  margin: 0 100px;
  margin-bottom: 72px;
}

.iframe-section {
  display: block;
  justify-content: center;
  align-items: center;  
}

/* ===========================
   TYPOGRAPHY
=========================== */

.cs-header .tag {
  font-size: 14px;
  font-weight: 600;
  color: var(--black);
  opacity: .7;
}

.cs-header h1 {
  font-family: var(--font-serif);
  font-size: clamp(36px, 5vw, 60px);
  font-weight: 400;
  line-height: 1.1;
  margin-bottom: 16px;
  text-transform: uppercase;
}

.cs-subtitle {
  font-size: 18px;
  line-height: 1.5;
  max-width: 55ch;
  margin-bottom: 48px;
    opacity: .7;
}

.cs-meta-label {
  font-size: 18px;
  font-weight: 500;
  text-transform: uppercase;
  font-family: var(--font-serif);
}

.cs-section h2 {
  margin-bottom: 20px;
}

.cs-section p {
  color: var(--grey-text);
  line-height: 1.6;
  margin-bottom: 16px;
  max-width: 65ch;
}

.cs-section p:last-child {
  margin-bottom: 0;
}

.cs-list {
  color: var(--grey-text);
  line-height: 1.8;
  margin: 12px 0 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: 65ch;
}

.cs-quote {
  border-left: 3px solid var(--green);
  padding: 16px 24px;
  margin: 32px 0;
  font-style: italic;
  font-size: 18px;
  color: var(--black);
  background: var(--grey-light);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.cs-stat-number {
  font-family: var(--font-serif);
  font-size: 40px;
  font-weight: 400;
  color: var(--black);
  line-height: 1;
}

.cs-stat-label {
  font-size: 13px;
  color: var(--grey-text);
  max-width: 16ch;
  line-height: 1.4;
}

.cs-three-col-item h3 {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 400;
  margin-bottom: 14px;
}

.cs-three-col-item p {
  font-size: 15px;
  color: var(--grey-text);
  line-height: 1.75;
}

.cs-ba-label {
  font-family: var(--font-accent);
  font-size: 11px;
  letter-spacing: 0.15em;
  color: var(--grey-text);
  display: block;
  margin-bottom: 20px;
}

.cs-caption {
  padding: 12px 20px;
  font-size: 13px;
  color: var(--grey-text);
  background: var(--grey-light);
    max-width: 100ch !important;
}

/* ===========================
   HEADER META
=========================== */

.cs-back {
  display: block;
  font-size: 14px;
  margin-bottom: 32px;
  transition: color 0.2s;
}

.cs-back:hover {
  color: var(--black);
}

.cs-meta {
  display: flex;
  gap: 48px;
  flex-wrap: wrap;
}

.cs-meta-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cs-meta-item span:last-child {
  font-size: 15px;
  font-weight: 400;
  opacity: .7;
}

/* ===========================
   PROJECT COLOR THEMES
=========================== */

.cs-header--purple { background: var(--purple); }
.cs-header--yellow { background: var(--yellow); }
.cs-header--orange { background: var(--orange); }
.cs-header--blue   { background: var(--blue); }
.cs-header--sage   { background: #D1DCA8; }

/* ===========================
   HERO LAYOUT
=========================== */

.cs-hero-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.cs-hero-layout .cs-header {
  order: 1;
  border-bottom: none;
}

.cs-hero-layout .cs-hero-image {
  order: 0;
  aspect-ratio: auto;
}

/* ===========================
   HERO IMAGE
=========================== */

.cs-hero-image {
  position: relative;
  background: var(--grey-light);
  aspect-ratio: 16/7;
  overflow: hidden;
}

.cs-hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cs-hero-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--grey-mid);
  font-size: 14px;
}

header .cs-container {
  padding: 40px;
}

/* ===========================
   IMAGES
=========================== */

.cs-image-full {
  margin-bottom: 72px;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--grey-light);
  position: relative;
}

.cs-image-no-bg {
  background: none !important;
}

.cs-image-full img {
  width: 120%;
  display: block;
}

.cs-image-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--grey-mid);
  font-size: 14px;
  min-height: 320px;
}

.cs-image-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 72px;
}

.cs-image-item {
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--grey-light);
  position: relative;
}

.cs-image-item img {
  width: 100%;
  display: block;
  aspect-ratio: 4/3;
  object-fit: cover;
}

.cs-image-item .cs-image-placeholder {
  min-height: 200px;
}

/* ===========================
   KPI TABLE
=========================== */

.cs-table-outer {
  position: relative;
  margin-bottom: 72px;
}

.cs-table-outer::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 80px;
  height: 100%;
  background: linear-gradient(to right, transparent, #FAFAF8);
  pointer-events: none;
  transition: opacity 0.3s;
  z-index: 1;
}

.cs-table-outer.is-scrolled-end::after {
  opacity: 0;
}

.cs-table-outer--fade-bottom::after {
  width: 100%;
  height: 100px;
  top: auto;
  bottom: 0;
  background: linear-gradient(to bottom, transparent, #FAFAF8);
  opacity: 1 !important;
}

.cs-table tbody tr.cs-row--faded td {
  color: var(--grey-mid);
}

.cs-table-wrap {
  border: 1px solid var(--grey-mid);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.cs-table {
  width: 100%;
  min-width: 600px;
  border-collapse: collapse;
  font-size: 15px;
}

.cs-table thead th {
  text-align: left;
  padding: 14px 20px;
  font-size: 12px;
  font-family: var(--font-accent);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--grey-text);
  background: var(--grey-light);
  border-bottom: 1px solid var(--grey-mid);
}

.cs-table tbody td {
  padding: 16px 20px;
  border-bottom: 1px solid var(--grey-mid);
  color: var(--black);
  vertical-align: middle;
}

.cs-table tbody tr:last-child td {
  border-bottom: none;
}

.cs-table tbody td:first-child {
  color: var(--black);
}

.cs-badge {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 8px;
  margin-left: 6px;
  vertical-align: middle;
}

.cs-badge--positive {
  background: #C3FF37;
  color: var(--black);
}

.cs-badge--negative {
  background: #F4A27A;
  color: var(--black);
}

.cs-badge--neutral {
  background: #D0CEC9;
  color: var(--black);
}


/* ===========================
   STATS
=========================== */

.cs-stats {
  display: flex;
  gap: 48px;
  flex-wrap: wrap;
  margin-top: 40px;
  padding: 40px;
  background: #F5F0DD;
  border-radius: var(--radius);
}

.cs-stat {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* ===========================
   PROJECT NAV
=========================== */

.cs-nav-projects {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 0 12px 12px;
}

.cs-nav-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 24px 28px;
  border-radius: var(--radius);
  transition: transform 0.2s, box-shadow 0.2s;
  text-decoration: none;
  color: var(--black);
}

.cs-nav-card--neutral {
  background: var(--grey-light);
}

.cs-nav-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.cs-nav-card--right {
  text-align: right;
}

.cs-nav-dir {
  font-size: 13px;
  color: var(--black);
  opacity: .7;
}

.cs-nav-title {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 400;
  text-transform: uppercase;
}

/* ===========================
   BEFORE / AFTER COMPARISON
=========================== */

.cs-before-after {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-bottom: 72px;
  border: 1px solid var(--grey-mid);
  border-radius: var(--radius);
  overflow: hidden;
}

.cs-before { background: var(--grey-light); padding: 28px; }
.cs-after  { background: var(--white); padding: 28px; border-left: 1px solid var(--grey-mid); }

.cs-ba-item {
  font-size: 14px;
  color: var(--grey-text);
  line-height: 1.6;
  padding: 12px 0;
  border-bottom: 1px solid var(--grey-mid);
}

.cs-ba-item:last-child { border-bottom: none; }

.cs-ba-item strong {
  display: block;
  color: var(--black);
  font-size: 13px;
  margin-bottom: 4px;
}

/* ===========================
   STICKY NOTE
=========================== */

.sticky-note {
  background: #C3FF37;
  border-radius: 8px;
  padding: 16px 20px;
  display: inline-block;
  transform: rotate(2deg);
  margin-top: 28px;
  max-width: 280px;
}

.cs-note-row {
  display: flex;
  align-items: flex-end;
  gap: 32px;
}

.cs-note-row p {
  flex: 1;
  min-width: 0;
  max-width: none;
  margin-bottom: 0;
}

.cs-note-row .sticky-note {
  flex-shrink: 0;
  margin-top: 0;
}

.sticky-note h4 {
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 10px;
  color: var(--black);
  line-height: 1.3;
}

.sticky-note ul {
  list-style: disc;
  padding-left: 18px;
  font-size: 14px;
  color: var(--black);
  line-height: 1.4;
}

.highlight {
  background: #C3FF37;
  padding: 0 3px;
  border-radius: 2px;
  color: var(--black);
}

/* ===========================
   THREE COLUMN LAYOUT
=========================== */

.cs-three-col {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--grey-mid);
  border: 1px solid var(--grey-mid);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 72px;
}

.cs-three-col-item {
  background: var(--white);
  padding: 32px 28px;
}

/* ===========================
   CALLOUT
=========================== */

.cs-callout {
  background: var(--grey-light);
  border-left: 3px solid var(--green);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 24px 28px;
  margin: 32px 0;
}

.cs-callout p {
  color: var(--black);
  font-size: 16px;
  line-height: 1.7;
  margin-bottom: 0;
}

/* ===========================
   IMAGE CAROUSEL
=========================== */

.cs-img-carousel {
  position: relative;
  margin-bottom: 72px;
  border-radius: var(--radius);
  overflow: hidden;
}

.cs-img-carousel-track {
  display: flex;
  transition: transform 0.4s ease;
}

.cs-img-carousel-slide {
  flex: 0 0 100%;
  min-width: 0;
    background: var(--orange);
}

.cs-img-carousel-slide img {
  width: 100%;
  display: block;
}

.cs-img-carousel .carousel-btn {
  top: 50%;
}

.cs-img-carousel .carousel-dots {
  bottom: 12px; 
}

/* ===========================
   PASSWORD GATE
=========================== */

#pw-gate {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.3s;
}

.pw-modal {
  text-align: center;
  max-width: 400px;
  width: 100%;
  padding: 0 24px;
}

.pw-modal .tag {
  display: block;
  margin-bottom: 16px;
}

.pw-modal h2 {
  font-family: var(--font-serif);
  font-weight: 400;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.pw-subtitle {
  font-size: 15px;
  color: var(--grey-text);
  margin-bottom: 32px;
}

.pw-form {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.pw-input {
  flex: 1;
  padding: 12px 20px;
  border: 1.5px solid var(--grey-mid);
  border-radius: 100px;
  font-size: 15px;
  font-family: var(--font-sans);
  outline: none;
  background: var(--white);
  color: var(--black);
  transition: border-color 0.2s;
}

.pw-input:focus {
  border-color: var(--black);
}

.pw-error {
  font-size: 14px;
  color: #b94040;
  margin-top: 14px;
  display: none;
}

/* ===========================
   RESPONSIVE
=========================== */


@media (max-width: 900px) {
  .cs-hero-layout {
    grid-template-columns: 1fr;
  }

  .cs-hero-layout .cs-header {
    order: 0;
    border-bottom: 1px solid var(--grey-light);
  }

  .cs-hero-layout .cs-hero-image {
    order: 1;
    aspect-ratio: 16/7;
  }

  .cs-section {
    padding: 0;
    margin: 0 20px;
    margin-bottom: 72px;
  }

  .cs-container {
    padding: 0 20px;
  }

  .cs-header {
    padding: 48px 0 40px;
  }

  .cs-meta {
    gap: 28px;
  }

  .cs-image-grid {
    grid-template-columns: 1fr;
  }

  .cs-stats {
    gap: 32px;
    padding: 28px;
  }

  .cs-before-after {
    grid-template-columns: 1fr;
  }

  .cs-after {
    border-left: none;
    border-top: 1px solid var(--grey-mid);
  }

  .cs-three-col {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .cs-note-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .cs-section {
    margin: 0;
    margin-bottom: 72px;
  }

  .cs-nav-projects {
    grid-template-columns: 1fr;
  }

  .cs-nav-card--right {
    text-align: left;
  }
}
