/* =========================================
   CASE STUDIES PAGE
   ========================================= */

.cs-page {
  overflow-x: hidden;
}

/* Transparent header on Case Studies only */
.page-template-page-case-studies .site-header {
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-bottom-color: transparent;
  box-shadow: none;
}

.page-template-page-case-studies .site-header.is-scrolled,
.page-template-page-case-studies .site-header.is-mega-open {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom-color: var(--border);
  box-shadow: var(--shadow-sm);
}

@media (max-width: 768px) {
  .page-template-page-case-studies .site-header:has(.header-nav.is-open) {
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
  }
}

/* ----- Hero (full-screen background) ----- */
.cs-hero {
  position: relative;
  isolation: isolate;
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  margin-top: 0;
  padding: calc(var(--header-height) + 48px) 24px 64px;
  overflow: hidden;
  background: #FAFBFC;
  display: flex;
  align-items: center;
}

.admin-bar .cs-hero {
  min-height: calc(100vh - 32px);
  min-height: calc(100dvh - 32px);
}

.cs-hero__media {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.cs-hero__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  transform-origin: center center;
}

.cs-hero__scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(
      105deg,
      rgba(250, 251, 252, 0.88) 0%,
      rgba(250, 251, 252, 0.72) 28%,
      rgba(250, 251, 252, 0.28) 52%,
      rgba(250, 251, 252, 0.08) 72%,
      transparent 100%
    ),
    linear-gradient(
      180deg,
      rgba(250, 251, 252, 0.25) 0%,
      transparent 22%,
      transparent 78%,
      rgba(250, 251, 252, 0.35) 100%
    );
}

.cs-hero__inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
}

.cs-hero__content {
  max-width: 34rem;
}

.cs-hero__eyebrow {
  margin: 0 0 14px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--orange);
}

.cs-hero__title {
  margin: 0 0 20px;
  font-size: clamp(2.25rem, 4.2vw, 3.5rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.03em;
  color: var(--navy);
}

.cs-hero__title-accent {
  color: var(--orange);
}

.cs-hero__copy {
  margin: 0 0 28px;
  max-width: 34rem;
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--text-muted);
}

.cs-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* Hero: no animations / no zoom */

/* ----- Intro / highlights ----- */
.cs-intro {
  padding: 80px 24px 40px;
  background: var(--white);
}

.cs-intro__inner,
.cs-featured__inner,
.cs-compare__inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.cs-intro__header {
  max-width: 42rem;
  margin: 0 auto 48px;
  text-align: center;
}

.cs-intro__title,
.cs-featured__title,
.cs-compare__title {
  margin: 0 0 14px;
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--navy);
  line-height: 1.2;
}

.cs-intro__copy,
.cs-featured__sub {
  margin: 0;
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--text-muted);
}

.cs-highlights {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.cs-highlight {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 28px 24px;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease,
    border-color 0.3s ease;
}

.cs-highlight:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: rgba(255, 138, 0, 0.25);
}

.cs-highlight__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-bottom: 16px;
  border-radius: 10px;
  background: rgba(255, 138, 0, 0.12);
  color: var(--orange);
  font-size: 1.125rem;
  transition: background 0.3s ease, color 0.3s ease;
}

.cs-highlight__icon--navy {
  background: rgba(6, 43, 79, 0.08);
  color: var(--navy);
}

.cs-highlight:hover .cs-highlight__icon {
  background: var(--orange);
  color: var(--white);
}

.cs-highlight:hover .cs-highlight__icon--navy {
  background: var(--navy);
  color: var(--white);
}

.cs-highlight__title {
  margin: 0 0 8px;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--navy);
}

.cs-highlight__text {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--text-muted);
}

/* ----- Featured cards ----- */
.cs-featured {
  padding: 56px 24px 88px;
  background: var(--soft-bg);
}

.cs-featured__header {
  max-width: 40rem;
  margin: 0 auto 40px;
  text-align: center;
}

.cs-featured__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
}

.cs-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 4px);
  box-shadow: var(--shadow-sm);
  padding: 32px 28px 28px;
  overflow: hidden;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.cs-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.cs-card__accent {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--orange);
  transform-origin: left center;
  transition: transform 0.3s ease;
}

.cs-card--navy .cs-card__accent {
  background: var(--navy);
}

.cs-card:hover .cs-card__accent {
  transform: scaleX(1.02);
}

.cs-card__category {
  margin: 0 0 12px;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--orange);
}

.cs-card--navy .cs-card__category {
  color: var(--navy);
}

.cs-card__title {
  margin: 0 0 12px;
  font-size: clamp(1.35rem, 2.2vw, 1.65rem);
  font-weight: 800;
  line-height: 1.25;
  color: var(--navy);
}

.cs-card__desc {
  margin: 0 0 22px;
  font-size: 0.975rem;
  line-height: 1.65;
  color: var(--text-muted);
  flex: 1;
}

.cs-card__results {
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
  display: grid;
  gap: 10px;
}

.cs-card__results li {
  position: relative;
  padding: 10px 14px 10px 36px;
  border-radius: 8px;
  background: rgba(6, 43, 79, 0.04);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--navy);
}

.cs-card__results li::before {
  content: '';
  position: absolute;
  left: 14px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  transform: translateY(-50%);
  background: var(--orange);
}

.cs-card--navy .cs-card__results li::before {
  background: var(--navy);
}

.cs-card__link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--orange);
  text-decoration: none;
  transition: gap 0.3s ease, color 0.3s ease;
}

.cs-card__link:hover {
  gap: 0.6rem;
  color: var(--orange-hover);
}

.cs-card--navy .cs-card__link {
  color: var(--navy);
}

.cs-card--navy .cs-card__link:hover {
  color: var(--orange);
}

/* ----- SEO vs AEO ----- */
.cs-compare {
  padding: 88px 24px;
  background: var(--white);
}

.cs-compare__header {
  max-width: 36rem;
  margin: 0 auto 40px;
  text-align: center;
}

.cs-compare__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
}

.cs-compare-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 4px);
  box-shadow: var(--shadow-sm);
  padding: 32px 28px;
  position: relative;
  overflow: hidden;
}

.cs-compare-card--seo {
  border-top: 4px solid var(--orange);
}

.cs-compare-card--aeo {
  border-top: 4px solid var(--navy);
}

.cs-compare-card__eyebrow {
  margin: 0 0 8px;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--orange);
}

.cs-compare-card--aeo .cs-compare-card__eyebrow {
  color: var(--navy);
}

.cs-compare-card__title {
  margin: 0 0 20px;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--navy);
}

.cs-compare-card__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.cs-compare-card__list li {
  position: relative;
  padding-left: 22px;
  font-size: 0.975rem;
  line-height: 1.5;
  color: var(--text-muted);
}

.cs-compare-card__list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: rgba(255, 138, 0, 0.85);
}

.cs-compare-card--aeo .cs-compare-card__list li::before {
  background: rgba(6, 43, 79, 0.75);
}

/* ----- CTA tweak ----- */
.cs-cta {
  margin-top: 0;
}

/* ----- Scroll reveal ----- */
.cs-reveal {
  opacity: 0;
  transform: translateY(22px);
  transition:
    opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}

.cs-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ----- Reduced motion ----- */
@media (prefers-reduced-motion: reduce) {
  .cs-reveal,
  .cs-highlight,
  .cs-card,
  .cs-card__link,
  .cs-card__accent {
    transition: none !important;
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }

  html {
    scroll-behavior: auto;
  }
}

/* ----- Responsive ----- */
@media (max-width: 1024px) {
  .cs-hero {
    padding: calc(var(--header-height) + 40px) 20px 56px;
  }
}

@media (max-width: 900px) {
  .cs-hero__content {
    max-width: 40rem;
  }

  .cs-hero__scrim {
    background:
      linear-gradient(
        180deg,
        rgba(250, 251, 252, 0.78) 0%,
        rgba(250, 251, 252, 0.7) 45%,
        rgba(250, 251, 252, 0.82) 100%
      );
  }

  .cs-hero__media img {
    object-position: center 40%;
  }

  .cs-highlights {
    grid-template-columns: 1fr;
  }

  .cs-featured__grid,
  .cs-compare__grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .cs-intro,
  .cs-compare {
    padding: 64px 20px;
  }

  .cs-featured {
    padding: 48px 20px 72px;
  }

  .cs-hero__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .cs-hero__actions .btn {
    justify-content: center;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .cs-hero {
    padding: calc(var(--header-height) + 28px) 16px 44px;
  }

  .cs-card,
  .cs-compare-card,
  .cs-highlight {
    padding: 24px 20px;
  }
}
