/* 1. overflow:hidden trên #cs-portfolio phá sticky → dùng clip */
#cs-portfolio {
  overflow-x: clip;
}

/* 2. Wrapper phải full-width, không có max-width/margin
      Chỉ .cs__process-inner mới giới hạn max-width */
#cs-process-wrap {
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  /* height được set bằng JS: N × 100vh */
}

/* 3. Sticky panel */
.cs__process-sticky {
  position: sticky;
  top: 80px;
  height: 100vh;
  display: flex;
  align-items: center;
  overflow: visible; /* không được là hidden */
}

/* 4. Step mờ mặc định, sáng khi is-active */
.cs__step {
  opacity: 0.2;
  transform: translateY(10px);
  transition:
    opacity 0.45s ease,
    transform 0.45s ease;
}
.cs__step.is-active {
  opacity: 1 !important;
  transform: none !important;
}

/* >-----> */

#cs-portfolio {
  --cs-ivory: #fff;
  --cs-ivory-deep: #fff;
  --cs-burgundy: #6b1a1a;
  --cs-burgundy-lt: #6b1a1a;
  --cs-gold: #6b1a1a;
  --cs-dark: #0e0a08;
  --cs-glass: rgba(255, 255, 255, 0.07);
  --cs-glass-border: rgba(255, 255, 255, 0.14);

  font-family: "Courier Prime", monospace;
  background: transparent;
  color: var(--cs-dark);
  overflow-x: clip; /* clip không phá sticky context, khác hidden */
}

/* ─── HEADER — full-screen centered ─── */
#cs-portfolio .cs__header {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 40px;
  gap: 72px;
  text-align: center;
}

#cs-portfolio .cs__hdr-title {
  font-family: "Courier Prime", monospace;
  font-size: 64px;
  font-weight: 200;
  color: #6b1a1a;
  letter-spacing: 0.12em;
  white-space: nowrap;
  line-height: 1;
  margin-bottom: 16px;
}

#cs-portfolio .cs__hdr-body {
  max-width: 620px;
  width: 100%;
  padding: 0;
  text-align: justify;
}

#cs-portfolio .cs__hdr-line {
  display: inline;
  font-family: "Courier Prime", monospace;
  font-size: 15px;
  line-height: 2.4;
  color: rgba(255, 255, 255, 0.12);
  transition: color 0.4s ease;
  will-change: color;
}

#cs-portfolio .cs__hdr-line.cs-revealed {
  color: rgba(255, 255, 255, 0.85);
}

#cs-portfolio .cs__hdr-spacer {
  display: block;
  height: 24px;
}

/* ─── STATS STRIP ─── */
.cs__stats-strip {
  width: 100%;
  max-width: 700px;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 0;
  justify-content: space-between;
  align-items: center;
}
.cs__stat-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  opacity: 0;
}
.cs__stat-number {
  font-family: "Courier Prime", monospace;
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--cs-burgundy);
  line-height: 1;
}
.cs__stat-label {
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
}
.cs__stat-divider {
  width: 1px;
  height: 56px;
  background: linear-gradient(
    to bottom,
    transparent,
    rgba(107, 26, 26, 0.45),
    transparent
  );
  align-self: center;
}

/* ─── PROCESS ─── */
.cs__process-wrap {
  max-width: 1100px;
  margin: 0 auto 80px;
  padding: 0 32px;
  position: relative;
}
.cs__process-sticky {
  display: flex;
  align-items: center;
}
.cs__process-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
  width: 100%;
}
.cs__process-left {
  position: relative;
}
.cs__process-eyebrow {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--cs-ivory);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.cs__process-eyebrow::after {
  content: "";
  flex: 0 0 40px;
  height: 1px;
  background: var(--cs-ivory);
  opacity: 0.4;
}
.cs__process-heading {
  font-family: "Courier Prime", monospace;
  font-size: clamp(2rem, 3.6vw, 3.4rem);
  font-weight: 900;
  line-height: 1.08;
  color: #e8e2d8;
  margin-bottom: 28px;
}
.cs__process-heading em {
  font-style: italic;
  color: var(--cs-burgundy);
}
.cs__process-desc {
  font-size: 0.98rem;
  font-weight: 300;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.65);
  max-width: 380px;
}

/* steps: shown one by one as user scrolls */
.cs__steps {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.cs__step {
  padding: 28px 0;
  border-bottom: 1px solid rgba(123, 29, 46, 0.1);
  display: flex;
  gap: 24px;
  align-items: flex-start;
  opacity: 0.2;
  transition: opacity 0.4s ease;
}
.cs__step.is-active {
  opacity: 1;
}
.cs__step:first-child {
  border-top: 1px solid rgba(123, 29, 46, 0.1);
}
.cs__step-num {
  font-family: "Courier Prime", monospace;
  font-size: 2.8rem;
  font-weight: 900;
  color: var(--cs-ivory);
  line-height: 1;
  flex-shrink: 0;
  width: 48px;
  text-align: right;
}
.cs__step-body {
  flex: 1;
}
.cs__step-title {
  font-family: "Courier Prime", monospace;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--cs-dark);
  margin-bottom: 6px;
}
.cs__step-text {
  font-size: 0.88rem;
  font-weight: 300;
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.6);
}
/* ─── ZOOM FRAMES (proof placeholders – zoom on scroll) ─── */
.cs__zoom-wrap {
  width: 100%;
  padding: 0 0 40px;
  overflow: hidden;
  margin-bottom: 72px;
}
.cs__zoom-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.cs__zoom-slot {
  border-radius: 14px;
  background: rgba(99, 39, 39, 0.116);
  border: 1.5px dashed rgba(123, 29, 46, 0.18);
  min-height: 280px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transform: scale(0.84);
  opacity: 0;
  transition: box-shadow 0.4s ease;
}
.cs__zoom-slot:hover {
  box-shadow: 0 16px 48px rgba(123, 29, 46, 0.14);
}
.cs__zoom-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--cs-burgundy));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}
.cs__zoom-lbl {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cs-burgundy);
  text-align: center;
}
.cs__zoom-hint {
  font-size: 0.78rem;
  color: #d4d4d4;
  text-align: center;
  white-space: nowrap;
  line-height: 1.6;
}
.cs__zoom-cap {
  position: absolute;
  bottom: 12px;
  left: 12px;
  background: var(--cs-burgundy);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 4px 12px;
  border-radius: 100px;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}
.cs__zoom-slot:hover .cs__zoom-cap {
  opacity: 1;
}
.cs__zoom-slot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* section divider */
.cs__zoom-header {
  margin: 0 0 48px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.cs__zoom-eyebrow {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--cs-burgundy);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.cs__zoom-eyebrow::before {
  content: "";
  width: 28px;
  height: 2px;
  background: var(--cs-burgundy);
}
.cs__zoom-section-title {
  font-family: "Courier Prime", monospace;
  font-size: clamp(1.6rem, 2.8vw, 2.6rem);
  font-weight: 900;
  color: var(--cs-dark);
}
.cs__zoom-section-title em {
  font-style: italic;
  color: var(--cs-burgundy);
}

/* ─── DARK ZONE (cards) ─── */
.cs__dark-zone {
  position: relative;
  padding: 100px 0 120px;
  overflow: hidden;
}
.cs__dark-bg {
  position: absolute;
  inset: 0;
  background-image: url("https://images.unsplash.com/photo-1551288049-bebda4e38f71?w=1800&q=80");
  background-size: cover;
  background-position: center;
}
.cs__dark-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(10, 5, 3, 0.88) 0%,
    rgba(30, 10, 15, 0.82) 50%,
    rgba(10, 5, 3, 0.9) 100%
  );
}
.cs__dark-zone::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--cs-ivory), transparent);
  z-index: 2;
}
.cs__dark-inner {
  position: relative;
  z-index: 3;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 32px;
}
.cs__dark-label {
  font-size: 0.7rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--cs-ivory);
  margin-bottom: 56px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.cs__dark-label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(107, 26, 26, 0.45);
}

/* ─── CARDS ─── */
.cs__cards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
.cs__card--featured {
  grid-column: 1 / -1;
}
.cs__proof-card {
  background: var(--cs-glass);
  border: 1px solid var(--cs-glass-border);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-radius: 16px;
  overflow: hidden;
  transition:
    transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.4s ease;
  opacity: 0;
  cursor: pointer;
  /* zoom-from-small start */
  transform: scale(0.88);
}
.cs__proof-card:hover {
  transform: translateY(-6px) scale(1);
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(107, 26, 26, 0.4);
}
.cs__card-image-wrap {
  position: relative;
  overflow: hidden;
  display: block;
  cursor: zoom-in;
}
.cs__card-image {
  width: 100%;
  aspect-ratio: 16/7;
  object-fit: cover;
  display: block;
  filter: brightness(0.82) saturate(1.1);
  transition:
    filter 0.5s ease,
    transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
}
.cs__card--featured .cs__card-image-wrap .cs__card-image {
  aspect-ratio: 16/5;
}
.cs__card-image-wrap:hover .cs__card-image {
  filter: brightness(1.05) saturate(1.25);
  transform: scale(1.04);
}
.cs__card-image-wrap::after {
  /* content: "Xem ảnh proof ↗"; */
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 28px 20px 16px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.72) 0%, transparent 100%);
  color: var(--cs-ivory);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(8px);
  transition:
    opacity 0.35s ease,
    transform 0.35s ease;
  pointer-events: none;
}
.cs__card-image-wrap:hover::after {
  opacity: 1;
  transform: translateY(0);
}
.cs__card-image-wrap::before {
  content: "";
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #6b1a1a;
  backdrop-filter: blur(4px);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23fff' stroke-width='2.2' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M21 21l-4.35-4.35M11 8v6M8 11h6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  opacity: 0;
  transform: scale(0.6);
  transition:
    opacity 0.3s ease,
    transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 2;
}
.cs__card-image-wrap:hover::before {
  opacity: 1;
  transform: scale(1);
}

.cs__card-image-placeholder {
  width: 100%;
  aspect-ratio: 16/7;
  background: linear-gradient(135deg, #1a0a10 0%, #2d1020 50%, #0e0508 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
  border-bottom: 1px solid var(--cs-glass-border);
}
.cs__card--featured .cs__card-image-placeholder {
  aspect-ratio: 16/5;
}
.cs__card-body {
  padding: 28px 32px 32px;
}
.cs__card-tag {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cs-ivory);
  background: rgba(107, 26, 26, 0.15);
  border: 1px solid rgba(107, 26, 26, 0.35);
  border-radius: 4px;
  padding: 3px 10px;
  margin-bottom: 14px;
}
.cs__card-title {
  font-family: "Courier Prime", monospace;
  font-size: 1.35rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
  margin-bottom: 12px;
}
.cs__card--featured .cs__card-title {
  font-size: 1.65rem;
}
.cs__card-desc {
  font-size: 0.9rem;
  font-weight: 300;
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 24px;
}
.cs__card-metrics {
  display: flex;
  gap: 24px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  flex-wrap: wrap;
}
.cs__metric {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.cs__metric-val {
  font-size: 1.25rem;
  font-weight: 700;
  font-family: "Courier Prime", monospace;
  color: var(--cs-ivory);
}
.cs__metric-key {
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.35);
}
.cs__card-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cs-ivory);
  text-decoration: none;
  margin-top: 20px;
  transition: gap 0.3s ease;
}
.cs__card-link:hover {
  gap: 14px;
}
.cs__card-link svg {
  transition: transform 0.3s ease;
}
.cs__card-link:hover svg {
  transform: translateX(4px);
}

/* ─── CTA STRIP ─── */
.cs__cta-strip {
  background: var(--cs-ivory-deep);
  padding: 80px 32px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cs__cta-strip::before {
  content: "SEO";
  position: absolute;
  font-family: "Courier Prime", monospace;
  font-size: clamp(8rem, 20vw, 18rem);
  font-weight: 900;
  color: rgba(123, 29, 46, 0.04);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  user-select: none;
  white-space: nowrap;
}
.cs__cta-inner {
  position: relative;
  z-index: 1;
}
.cs__cta-text {
  font-family: "Courier Prime", monospace;
  font-size: clamp(1.6rem, 3.5vw, 2.8rem);
  font-weight: 700;
  color: var(--cs-burgundy);
  margin-bottom: 20px;
}
.cs__cta-sub {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 36px;
  font-weight: 300;
}
.cs__cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--cs-burgundy);
  color: #fff;
  padding: 16px 36px;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  transition:
    background 0.3s,
    transform 0.3s;
  box-shadow: 0 8px 32px rgba(123, 29, 46, 0.28);
}
.cs__cta-btn:hover {
  background: var(--cs-burgundy);
  transform: translateY(-2px);
}

/* ─── LIGHTBOX ─── */
#cs-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
}
#cs-lightbox.is-open {
  pointer-events: all;
}
#cs-lb-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 3, 2, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
#cs-lb-panel {
  position: relative;
  z-index: 2;
  max-width: min(90vw, 1080px);
  width: 100%;
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  overflow: hidden;
  box-shadow:
    0 40px 100px rgba(0, 0, 0, 0.7),
    0 0 0 1px rgba(107, 26, 26, 0.3);
  transform: scale(0.88) translateY(40px);
}
#cs-lb-img {
  width: 100%;
  max-height: 72vh;
  object-fit: contain;
  background: #0a0507;
  display: block;
}
#cs-lb-caption {
  background: rgba(14, 10, 8, 0.97);
  border-top: 1px solid rgba(107, 26, 26, 0.3);
  padding: 20px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
#cs-lb-caption-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
#cs-lb-caption-title {
  font-family: "Courier Prime", monospace;
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
}
#cs-lb-caption-tag {
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cs-ivory);
}
#cs-lb-close {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    background 0.2s,
    border-color 0.2s;
  flex-shrink: 0;
}
#cs-lb-close:hover {
  background: rgba(107, 26, 26, 0.25);
  border-color: rgba(107, 26, 26, 0.5);
}
.cs-lb-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(10, 5, 3, 0.7);
  backdrop-filter: blur(8px);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    background 0.2s,
    border-color 0.2s,
    transform 0.2s;
}
.cs-lb-nav:hover {
  background: var(--cs-burgundy);
  border-color: var(--cs-burgundy);
  transform: translateY(-50%) scale(1.08);
}
#cs-lb-prev {
  left: -64px;
}
#cs-lb-next {
  right: -64px;
}
@media (max-width: 900px) {
  #cs-lb-prev {
    left: 8px;
  }
  #cs-lb-next {
    right: 8px;
  }
}

/* ─── RESPONSIVE ─── */
@media (max-width: 768px) {
  .cs__header {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  #cs-portfolio .cs__header {
    gap: 40px;
    padding: 40px 24px;
  }
  #cs-portfolio .cs__hdr-title {
    white-space: normal;
    font-size: clamp(2rem, 10vw, 3rem);
  }
  .cs__stats-strip {
    flex-wrap: wrap;
    gap: 24px;
    justify-content: center;
  }
  .cs__stat-divider {
    display: none;
  }
  .cs__cards-grid {
    grid-template-columns: 1fr;
  }
  .cs__card--featured {
    grid-column: 1;
  }
  .cs__zoom-grid {
    grid-template-columns: 1fr;
  }
  .cs__process-inner {
    grid-template-columns: 1fr;
  }
  .cs__process-progress {
    display: none;
  }
}

/* ── DARK THEME ── */
.section.s2 {
  background: #000;
}
#cs-portfolio {
  background: #000;
  color: #e8e2d8;
  --cs-ivory: rgba(255, 255, 255, 0.82);
  --cs-ivory-deep: #161616;
  --cs-dark: #e8e2d8;
  --cs-glass: rgba(255, 255, 255, 0.06);
  --cs-glass-border: rgba(255, 255, 255, 0.12);
}
#cs-portfolio .cs__desc {
  color: rgba(232, 226, 216, 0.62);
}
#cs-portfolio .cs__stat-label {
  color: rgba(232, 226, 216, 0.48);
}
#cs-portfolio .cs__cta-sub {
  color: rgba(232, 226, 216, 0.58);
}
#cs-portfolio .cs__cta-strip::before {
  color: rgba(212, 137, 154, 0.035);
}

/* ── SCROLL LIGHT — zoom heading + dark-label ── */
#cs-portfolio .cs__zoom-eyebrow[data-sl],
#cs-portfolio .cs__zoom-section-title[data-sl],
#cs-portfolio .cs__dark-label[data-sl] {
  transition: color 0.65s ease;
}
#cs-portfolio .cs__zoom-eyebrow[data-sl] {
  color: rgba(107, 26, 26, 0.2);
}
#cs-portfolio .cs__zoom-section-title[data-sl] {
  color: rgba(232, 226, 216, 0.1);
}
#cs-portfolio .cs__zoom-section-title[data-sl] em {
  color: rgba(107, 26, 26, 0.15);
  transition: color 0.65s ease;
}
#cs-portfolio .cs__dark-label[data-sl] {
  color: rgba(255, 255, 255, 0.1);
}
#cs-portfolio .cs__zoom-eyebrow[data-sl].sl-lit {
  color: var(--cs-burgundy);
}
#cs-portfolio .cs__zoom-section-title[data-sl].sl-lit {
  color: #e8e2d8;
}
#cs-portfolio .cs__zoom-section-title[data-sl].sl-lit em {
  color: var(--cs-burgundy);
}
#cs-portfolio .cs__dark-label[data-sl].sl-lit {
  color: rgba(255, 255, 255, 0.65);
}
