:root {
  --primary: #222222;
  --secondary: #5f5f5f;
  --tertiary: #f8f8f8;
  --white: #ffffff;
  --border-soft: rgba(0, 0, 0, 0.06);
  --border: rgba(0, 0, 0, 0.08);
  --shadow-soft: 0 10px 35px rgba(0, 0, 0, 0.035);
  --shadow-card: 0 18px 50px rgba(0, 0, 0, 0.045);
  --font-main: "Outfit", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--tertiary);
  color: var(--primary);
  font-family: var(--font-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
}

.case-page {
  position: relative;
  max-width: 1440px;
  margin: 0 auto;
  padding: 8rem 4rem 6rem;
}

.case-page > .case-hero,
.case-page > .case-grid,
.case-page > .case-two-col {
  padding: 0;
}

.case-page::before {
  content: "CASE";
  position: fixed;
  top: 18vh;
  left: 50%;
  z-index: -1;
  transform: translateX(-50%);
  color: rgba(0, 0, 0, 0.018);
  font-size: clamp(9rem, 26vw, 25rem);
  font-weight: 600;
  line-height: 0.8;
  letter-spacing: -0.06em;
  pointer-events: none;
  user-select: none;
}

.case-back,
.back-link {
  position: sticky;
  top: 6.75rem;
  z-index: 90;
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-bottom: 3rem;
  padding: 0.75rem 1rem;
  color: var(--secondary);
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.06);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: color 0.3s ease, background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.case-back:hover,
.back-link:hover {
  color: var(--primary);
  background: var(--white);
  transform: translateY(-1px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.08);
}

.case-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.96fr) minmax(0, 1.04fr);
  gap: 3rem;
  align-items: stretch;
  margin-bottom: 4rem;
}

.case-hero-copy,
.case-hero__content,
.case-hero-image,
.case-hero__image,
.case-card,
.case-section-block,
.case-results,
.case-tools,
.case-insight,
.process-section,
.visual-proof,
.results-section,
.insight-section {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--border-soft);
  border-radius: 2rem;
  box-shadow: var(--shadow-card);
}

.case-hero-copy,
.case-hero__content {
  width: 100%;
  min-width: 0;
  min-height: 620px;
  padding: 4rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.case-label,
.eyebrow {
  display: inline-block;
  margin-bottom: 1.35rem;
  color: var(--secondary);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.case-hero h1 {
  max-width: 800px;
  margin: 0 0 1.5rem;
  font-size: clamp(3.2rem, 5.8vw, 5.7rem);
  font-weight: 300;
  line-height: 0.92;
  letter-spacing: -0.06em;
  overflow-wrap: break-word;
  word-break: normal;
}

.case-hero p,
.case-hero-copy > div > p,
.case-hero__content > p {
  max-width: 640px;
  color: var(--secondary);
  font-size: 1.25rem;
  font-weight: 300;
  line-height: 1.7;
}

.case-hero-image,
.case-hero__image {
  width: 100%;
  min-width: 0;
  min-height: 620px;
  overflow: hidden;
}

.case-hero-image img,
.case-hero__image img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  filter: grayscale(20%);
  transition: filter 0.5s ease, transform 0.5s ease;
}

.case-hero:hover .case-hero-image img,
.case-hero:hover .case-hero__image img {
  filter: grayscale(0%);
  transform: scale(1.015);
}

.dashboard-hero .case-hero-image img {
  object-fit: cover;
  object-position: left center;
  padding: 0;
  background: var(--white);
}

.concept-hero .case-hero-image img {
  object-position: 32% center;
  filter: grayscale(35%);
}

.concept-hero:hover .case-hero-image img {
  filter: grayscale(0%);
}

.case-stats,
.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 4rem;
}

.case-stat,
.hero-stats div,
.result-item,
.results-grid > div,
.process-step {
  background: var(--tertiary);
  border: 1px solid var(--border-soft);
  border-radius: 1.25rem;
}

.case-stat,
.hero-stats div {
  padding: 1.35rem;
}

.case-stat strong,
.hero-stats strong {
  display: block;
  margin-bottom: 0.5rem;
  font-size: clamp(1.25rem, 2vw, 1.8rem);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.04em;
}

.case-stat span,
.hero-stats span {
  display: block;
  color: var(--secondary);
  font-size: 0.9rem;
  line-height: 1.45;
}

.case-two-col,
.case-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.case-card {
  padding: 3rem;
}

.case-card.dark {
  background: var(--primary);
  color: var(--white);
}

.card-number {
  display: inline-flex;
  width: 50px;
  height: 50px;
  align-items: center;
  justify-content: center;
  margin-bottom: 2rem;
  border-radius: 50%;
  background: var(--tertiary);
  color: var(--secondary);
  font-weight: 500;
}

.case-card.dark .card-number {
  background: rgba(255, 255, 255, 0.12);
  color: var(--white);
}

.case-card h2,
.case-section-block h2,
.case-results h2,
.case-tools h2,
.case-insight h2,
.section-heading h2,
.visual-proof h2,
.narrative-section h2,
.insight-section h2 {
  margin: 0 0 1.25rem;
  font-size: clamp(2rem, 4vw, 3.35rem);
  font-weight: 300;
  line-height: 1;
  letter-spacing: -0.04em;
}

.case-card p,
.case-section-block p,
.case-insight p,
.case-tools p,
.process-step p,
.visual-proof p,
.narrative-section p,
.insight-section p {
  color: var(--secondary);
  font-size: 1.05rem;
  font-weight: 300;
  line-height: 1.8;
}

.case-card.dark p {
  color: rgba(255, 255, 255, 0.72);
}

.case-section-block,
.case-insight,
.visual-proof {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
  gap: 3rem;
  align-items: center;
  margin-bottom: 2rem;
  padding: 3rem;
  overflow: hidden;
}

.case-section-block.reverse {
  grid-template-columns: minmax(0, 1.16fr) minmax(0, 0.84fr);
}

.case-section-block img,
.case-card img,
.case-insight img,
.tools-wrap img,
.visual-proof img {
  width: 100%;
  display: block;
  border: 1px solid var(--border-soft);
  border-radius: 1.4rem;
  background: var(--tertiary);
  box-shadow: var(--shadow-soft);
}

.case-section-block img,
.case-insight img,
.tools-wrap img {
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.visual-proof img {
  aspect-ratio: 16 / 9;
  object-fit: contain;
  padding: 0.5rem;
}

.case-list {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.case-list li {
  position: relative;
  padding-left: 2rem;
  color: var(--secondary);
  font-size: 1.05rem;
  font-weight: 300;
  line-height: 1.7;
}

.case-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.67rem;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--primary);
}

.case-list strong {
  color: var(--primary);
  font-weight: 500;
}

.case-results,
.case-tools,
.process-section,
.results-section,
.insight-section {
  margin-bottom: 2rem;
  padding: 4rem;
}

.process-section,
.results-section,
.insight-section {
  margin-top: 2rem;
}

.section-heading {
  max-width: 780px;
  margin-bottom: 2.5rem;
}

.section-heading.center,
.case-results {
  text-align: center;
}

.section-heading.center {
  margin-left: auto;
  margin-right: auto;
}

.process-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.25rem;
}

.process-step {
  min-height: 230px;
  padding: 1.5rem;
}

.process-step span {
  display: inline-block;
  margin-bottom: 1.5rem;
  color: var(--secondary);
  font-weight: 500;
}

.process-step h3 {
  margin: 0 0 0.65rem;
  font-size: 1.15rem;
  font-weight: 500;
  line-height: 1.2;
}

.results-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 2.5rem;
}

.results-section .results-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.result-item,
.results-grid > div {
  padding: 2rem 1.5rem;
  text-align: left;
}

.results-section .results-grid > div {
  text-align: center;
}

.result-item strong,
.results-grid strong {
  display: block;
  margin-bottom: 0.8rem;
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.055em;
}

.result-item span,
.results-grid p {
  display: block;
  color: var(--secondary);
  font-size: 0.95rem;
  line-height: 1.5;
}

.tools-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 3rem;
  align-items: center;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.75rem;
}

.insight-section .tags {
  justify-content: center;
}

.tags span {
  padding: 0.65rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--white);
  color: var(--secondary);
  font-size: 0.9rem;
  font-weight: 500;
}

.case-cta {
  padding: 6rem 2rem 2rem;
  text-align: center;
}

.case-cta h2 {
  margin: 0 0 1.5rem;
  font-size: clamp(2.5rem, 5vw, 5rem);
  font-weight: 300;
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.case-cta p {
  margin-bottom: 2rem;
  color: var(--secondary);
  font-size: 1.15rem;
  font-weight: 300;
}

.narrative-section {
  margin-bottom: 2rem;
  padding: 4rem;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--border-soft);
  border-radius: 2rem;
  box-shadow: var(--shadow-card);
}

.narrative-section p {
  max-width: 940px;
}

.question-card {
  margin: 1.5rem 0 2rem;
  padding: 2rem;
  border-radius: 1.5rem;
  background: var(--primary);
  color: var(--white);
}

.question-card p {
  margin: 0;
  color: var(--white);
  font-size: clamp(1.6rem, 2.6vw, 2.35rem);
  line-height: 1.15;
  letter-spacing: -0.035em;
}

.dashboard-proof .dashboard-preview {
  width: 100%;
  height: auto;
  border-radius: 1.4rem;
  background: var(--white);
}

.dashboard-proof img {
  aspect-ratio: 16 / 9;
  object-fit: contain;
  padding: 0.6rem;
  background: var(--white);
}

.workflow-proof .workflow-preview {
  width: 100%;
  height: auto;
  border-radius: 1.4rem;
  background: var(--white);
}

.workflow-proof .workflow-preview .clickable-image {
  aspect-ratio: 16 / 9;
  object-fit: contain;
  padding: 0.6rem;
  background: var(--white);
}

.script-note {
  max-width: 920px;
  margin: 0 auto;
  color: var(--secondary);
  font-size: 1.15rem;
  font-weight: 300;
  line-height: 1.85;
  text-align: center;
}

.insight-section {
  text-align: center;
}

.insight-section p {
  max-width: 780px;
  margin: 0 auto;
  font-size: 1.2rem;
}

@media (max-width: 1024px) {
  .case-page {
    padding: 7rem 2rem 5rem;
  }

  .case-hero,
  .case-two-col,
  .case-grid,
  .case-section-block,
  .case-section-block.reverse,
  .case-insight,
  .tools-wrap,
  .visual-proof {
    grid-template-columns: 1fr;
  }

  .case-hero-copy,
  .case-hero__content,
  .case-hero-image,
  .case-hero__image {
    min-height: auto;
  }

  .case-hero-image,
  .case-hero__image {
    aspect-ratio: 16 / 11;
  }

  .case-stats,
  .hero-stats,
  .results-grid,
  .results-section .results-grid,
  .process-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  html,
  body {
    max-width: 100%;
    overflow-x: hidden;
  }

  .header {
    width: 100vw;
    max-width: 100vw;
    padding: 1.25rem 1rem;
    overflow: hidden;
  }

  .case-page {
    width: 100vw;
    max-width: 100vw;
    padding: 6rem 1rem 4rem;
    overflow: hidden;
  }

  .case-page::before {
    top: 28vh;
  }

  .case-back,
  .back-link {
    position: static;
    margin-bottom: 2rem;
    padding: 0;
    border: 0;
    border-bottom: 1px solid var(--primary);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .case-hero {
    width: 100%;
    gap: 1rem;
    margin-bottom: 2rem;
  }

  .case-hero-copy,
  .case-hero__content,
  .case-card,
  .case-section-block,
  .case-results,
  .case-insight,
  .case-tools,
  .narrative-section,
  .process-section,
    .visual-proof,
    .results-section,
    .insight-section {
    max-width: calc(100vw - 2rem);
    justify-self: stretch;
    padding: 2rem;
    border-radius: 1.5rem;
  }

  .case-hero h1 {
    font-size: clamp(2.25rem, 10.8vw, 3.4rem);
    letter-spacing: -0.045em;
  }

  .header .btn {
    display: none;
  }

  .case-hero p,
  .case-hero-copy > div > p,
  .case-hero__content > p {
    font-size: 1.05rem;
  }

  .narrative-section p,
  .script-note {
    font-size: 1.02rem;
  }

  .case-stats,
  .hero-stats,
  .results-grid,
  .results-section .results-grid,
  .process-grid {
    grid-template-columns: 1fr;
  }

  .process-step {
    min-height: auto;
  }

  .footer {
    padding: 4rem 2rem;
  }
}
