/* ==========================================================================
   Success Story page
   ========================================================================== */

.ss-page {
  background: linear-gradient(180deg, #f8f9fc 0%, #f5f8ff 100%);
}

/* ----- HERO ----- */
.ss-hero {
  padding-top: 0;
  padding-bottom: 0;
  background: #fff;
}

.ss-hero-frame {
  position: relative;
  background: #fff;
  padding-top: 4rem;
}

/* Side vertical rails (decorative) */
.ss-hero-frame::before,
.ss-hero-frame::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: #eef0f7;
  pointer-events: none;
}
.ss-hero-frame::before { left: 0; }
.ss-hero-frame::after { right: 0; }

/* Big customer name row */
.ss-hero-name-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 20px;
  border-bottom: 1px solid #eef0f7;
}
.ss-hero-customer {
  font-family: 'Instrument Sans', 'Inter', sans-serif;
  font-weight: 600;
  font-size: 72px;
  line-height: 1.5;
  letter-spacing: -1.44px;
  color: #2d3044;
  margin: 0;
  text-align: left;
}

/* Main two-column row: logo card + headline */
.ss-hero-main {
  display: grid;
  grid-template-columns: minmax(0, 537px) minmax(0, 1fr);
  align-items: stretch;
}
.ss-hero-logo-col {
  padding: 20px;
  border-right: 1px solid #eef0f7;
}
.ss-hero-logo-card {
  position: relative;
  border: 1px solid #eef0f7;
  background: linear-gradient(158.27deg, #ffffff 0%, #f5f8ff 99.08%);
}
.ss-hero-logo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}
.ss-hero-logo-cell {
  height: 80px;
  border: 1px solid #eef0f7;
}
.ss-hero-logo-inner {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 165.67px;
  height: 80px;
  background: #fff;
  border: 3px solid #eef0f7;
  border-radius: 4px;
  box-shadow: 0 12px 6px rgba(122, 122, 122, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 21px 10px;
}
.ss-hero-logo-inner img {
  max-width: 100%;
  max-height: 100%;
  display: block;
}

.ss-hero-headline-col {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 20px;
}
.ss-hero-headline {
  font-family: 'Instrument Sans', 'Inter', sans-serif;
  font-weight: 500;
  font-size: 40px;
  line-height: 1.2;
  color: #1f212e;
  margin: 0;
}
.ss-hero-headline strong {
  font-family: 'Instrument Sans', 'Inter', sans-serif;
  font-weight: 600;
  color: inherit;
}
.ss-hero-headline strong.ss-accent {
  color: #3661ed;
}

/* Stats row */
.ss-hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid #eef0f7;
  border-bottom: none;
}
.ss-stat {
  padding: 16px 24px;
  border-right: 1px solid #eef0f7;
  background: #fff;
}
.ss-stat:last-child { border-right: none; }
.ss-stat-num {
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 32px;
  line-height: 1.2;
  color: #3661ed;
  margin-bottom: 10px;
}
.ss-stat-label {
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size: 14px;
  line-height: 22px;
  color: #52577a;
}

/* ----- BODY (TOC + content) ----- */
.ss-body { padding-top: 0; padding-bottom: 0; background: #f1f5f9; }
.ss-body-grid {
  position: relative;
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  column-gap: 2.5rem;
  align-items: start;
  padding-top: 4rem;
  padding-bottom: 0;
}
.ss-body-grid::before,
.ss-body-grid::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: #d4d9ea;
  pointer-events: none;
  z-index: 2;
}
.ss-body-grid::before { left: 0; }
.ss-body-grid::after { right: 0; }

#overview { padding-top: 0; padding-bottom: 0; }

/* TOC */
.ss-toc {
  position: sticky;
  top: 100px;
  align-self: start;
  background: #fff;
  padding: 16px 24px;
  border-radius: 0 12px 12px 0;
  z-index: 1;
}
.ss-toc-inner {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.ss-toc-title {
  font-family: 'Geist Mono', monospace;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #757a97;
}
.ss-toc-links {
  display: flex;
  flex-direction: column;
  border-left: 1px solid #e1e4ee;
}
.ss-toc-link {
  position: relative;
  display: block;
  padding: 10px 16px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  color: #757a97;
  text-decoration: none;
  transition: color 0.15s ease;
}
.ss-toc-link::before {
  content: "";
  position: absolute;
  left: -1px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: transparent;
  transition: background 0.15s ease;
}
.ss-toc-link:hover { color: #2D3044; }
.ss-toc-link.is-active { color: #3661ed; }
.ss-toc-link.is-active::before { background: #3661ed; }

/* Content */
.ss-content {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  min-width: 0;
}
.ss-section {
  scroll-margin-top: 100px;
  padding-top: 0;
  padding-bottom: 0;
}
.ss-section + .ss-section {
  border-top: 1px solid #d4d9ea;
  padding-top: 2rem;
}

/* Lottie scene inside The Petavue Process */
.ss-lottie-wrap {
  width: 100%;
  margin: 32px 0 0;
  display: block;
}
.ss-lottie {
  width: 100%;
  height: auto;
  display: block;
}
.ss-lottie--mobile { display: none; }
@media (max-width: 767px) {
  .ss-lottie--desktop { display: none; }
  .ss-lottie--mobile { display: block; }
}
.ss-section-title {
  font-family: 'Instrument Sans', 'Inter', sans-serif;
  font-size: 38px;
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -0.76px;
  color: #2D3044;
  margin-bottom: 28px;
  padding-bottom: 0;
}

.ss-prose {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  line-height: 1.75;
  color: #52577a;
}
.ss-prose p { margin: 0 0 20px; }
.ss-prose p:last-child { margin-bottom: 0; }
.ss-prose strong { color: #2D3044; font-weight: 600; }
.ss-prose em { color: #2D3044; font-style: italic; }

.ss-step {
  font-family: 'Instrument Sans', 'Inter', sans-serif;
  font-size: 22px;
  font-weight: 500;
  line-height: 1.3;
  color: #2D3044;
  margin: 32px 0 16px;
  letter-spacing: -0.22px;
}
.ss-step:first-child { margin-top: 0; }

.ss-list {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
}
.ss-list li {
  position: relative;
  padding-left: 24px;
  margin-bottom: 10px;
  line-height: 1.7;
}
.ss-list li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 12px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #3661ed;
}
.ss-list li:last-child { margin-bottom: 0; }

/* Overview grid: about card + body prose */
.ss-overview-grid {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  column-gap: 1.5rem;
  align-items: start;
}
.ss-about {
  background: #f8f9fc;
  padding: 1rem 1.5rem;
  display: flex;
  flex-direction: column;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(15, 21, 50, 0.06), 0 1px 2px rgba(15, 21, 50, 0.04);
  position: sticky;
  top: 100px;
  align-self: start;
}
.ss-about-logo {
  display: flex;
  align-items: center;
  margin-bottom: 16px;
}
.ss-about-logo img {
  display: block;
  max-width: 160px;
  height: auto;
}
.ss-about-desc {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  line-height: 1.7;
  color: #757a97;
  margin: 0 0 16px;
}
.ss-about-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: #3661ed;
  text-decoration: none;
  width: fit-content;
}
.ss-about-link::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.3s ease;
}
.ss-about-link:hover::after { transform: scaleX(1); }
.ss-about-divider {
  height: 1px;
  background: #eef0f7;
  margin: 16px 0;
}
.ss-about-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.ss-about-key {
  font-family: 'Geist Mono', monospace;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #2D3044;
}
.ss-about-val {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  color: #52577a;
}

/* Pull-quote */
.ss-quote {
  position: relative;
  background: #f5f8ff;
  border-radius: 1rem;
  padding: 24px 28px;
  margin: 28px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ss-quote::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 0 0 0 4px;
  background: linear-gradient(to bottom, rgba(54, 97, 237, 1), rgba(151, 71, 255, 0.8));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
          mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
}
.ss-quote-mark {
  display: block;
  width: 28px;
  height: 28px;
  font-size: 0;
  color: transparent;
  background: url('../assets/customers/quote.svg') no-repeat center / contain;
  pointer-events: none;
}
.ss-quote blockquote {
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.6;
  letter-spacing: -0.16px;
  margin: 0;
}
.ss-quote-word {
  color: #adb2ce;
  transition: color 0.25s ease;
}
.ss-quote-word.is-on {
  color: #52577a;
}
.ss-quote figcaption {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: #757a97;
}

/* TL;DR card — full width, dashed border, illustration on right */
.ss-tldr {
  position: relative;
  margin-top: 32px;
  background: #f8f9fc;
  border-radius: 16px;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 32px;
}
.ss-tldr::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100%25' height='100%25'%3E%3Crect width='100%25' height='100%25' fill='none' stroke='%2390a6ee' stroke-width='4' stroke-dasharray='8 8' rx='16' ry='16'/%3E%3C/svg%3E");
}
.ss-tldr-content {
  flex: 1 0 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.ss-tldr-title {
  font-family: 'Inter', sans-serif;
  font-size: 24px;
  font-weight: 500;
  color: #232532;
  line-height: normal;
}
.ss-tldr-list {
  list-style: disc;
  padding-left: 24px;
  margin: 0;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  color: #52577a;
}
.ss-tldr-list li {
  line-height: 28px;
  margin: 0;
}
.ss-tldr-illustration {
  width: 150px;
  height: 150px;
  flex-shrink: 0;
}
.ss-tldr-illustration img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

/* Impact cards — thumbnail alternates right / left / right */
.ss-impact-card {
  display: flex;
  flex-direction: row-reverse; /* default: thumb on the right */
  align-items: center;
  gap: 32px;
  padding: 32px 0;
  border-top: 1px solid #eef0f7;
}
.ss-impact-card:nth-of-type(2n) {
  flex-direction: row; /* every 2nd card: thumb on the left */
}
.ss-impact-card:first-of-type {
  border-top: 0;
  padding-top: 0;
}
.ss-impact-thumb {
  flex-shrink: 0;
  width: 180px;
  height: 180px;
  border-radius: 16px;
  overflow: hidden;
}
.ss-impact-thumb img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}
.ss-impact-body {
  flex: 1 0 0;
  min-width: 0;
}
.ss-impact-body .ss-step { margin-top: 0; }

/* Big closing quote — light, horizontal layout from Figma */
.ss-bigquote {
  display: flex;
  align-items: flex-start;
  gap: 40px;
  padding: 120px 100px;
}
.ss-bigquote-photo {
  width: 98px;
  height: 98px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  background: #f5f8ff;
}
.ss-bigquote-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.ss-bigquote-content {
  flex: 1 0 0;
  min-width: 0;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.ss-bigquote-text {
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  font-weight: 500;
  line-height: 28px;
  color: #52577a;
  margin: 0;
  position: relative;
  z-index: 1;
}
.ss-bigquote-author {
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: relative;
  z-index: 1;
}
.ss-bigquote-name {
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  font-weight: 500;
  color: #1f212e;
  line-height: normal;
}
.ss-bigquote-role-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.ss-bigquote-role {
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  color: #757a97;
  line-height: normal;
}
.ss-bigquote-logo {
  display: inline-flex;
  align-items: center;
  height: 26px;
}
.ss-bigquote-logo img {
  height: 26px;
  width: auto;
  display: block;
}
.ss-bigquote-decoration {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 150px;
  height: 100px;
  background: url('../assets/customers/quote-large.svg') no-repeat right bottom / contain;
  pointer-events: none;
  opacity: 0.5;
  z-index: 0;
}

/* ----- TABLET ----- */
@media (max-width: 991px) {
  .ss-body-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .ss-toc {
    position: static;
    background: #fff;
    border: 1px solid #eef0f7;
    border-radius: 12px;
    padding: 20px 24px;
  }
  .ss-toc-links { border-left: 0; flex-direction: row; flex-wrap: wrap; gap: 6px; }
  .ss-toc-link { padding: 6px 12px; border-radius: 60px; background: #f5f8ff; }
  .ss-toc-link::before { display: none; }
  .ss-toc-link.is-active { background: #3661ed; color: #fff; }
  .ss-overview-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .ss-hero-main {
    grid-template-columns: 1fr;
  }
  .ss-hero-logo-col {
    border-right: none;
    border-bottom: 1px solid #eef0f7;
  }
  .ss-hero-stats {
    grid-template-columns: 1fr;
  }
  .ss-stat {
    border-right: none;
    border-bottom: 1px solid #eef0f7;
  }
  .ss-stat:last-child { border-bottom: none; }
  .ss-hero-customer { font-size: 56px; letter-spacing: -1.12px; }
  .ss-hero-headline { font-size: 32px; }
  .ss-section-title { font-size: 28px; }
}

/* ----- MOBILE ----- */
@media (max-width: 640px) {
  .ss-hero-customer { font-size: 40px; letter-spacing: -0.8px; }
  .ss-hero-headline { font-size: 24px; }
  .ss-hero-logo-inner { width: 140px; height: 64px; padding: 12px; }
  .ss-hero-logo-cell { height: 64px; }
  .ss-stat-num { font-size: 28px; }
  .ss-section-title { font-size: 24px; }
  .ss-step { font-size: 19px; }
  .ss-quote { padding: 24px 20px; gap: 12px; }
  .ss-quote blockquote { font-size: 15px; }
  .ss-tldr { flex-direction: column; align-items: flex-start; gap: 20px; padding: 20px; }
  .ss-tldr-illustration { width: 120px; height: 120px; align-self: center; }
  .ss-tldr-title { font-size: 20px; }
  .ss-tldr-list { font-size: 14px; }
  .ss-bigquote { flex-direction: column; gap: 20px; padding: 32px 0; }
  .ss-bigquote-text { font-size: 15px; line-height: 26px; }
  .ss-bigquote-decoration { width: 100px; height: 70px; opacity: 0.35; }
  .ss-impact-card,
  .ss-impact-card:nth-of-type(2n) {
    flex-direction: column;
    gap: 16px;
    align-items: flex-start;
  }
  .ss-impact-thumb { width: 100%; height: auto; aspect-ratio: 1; max-width: 180px; }
  .ss-content { gap: 1.5rem; }
  .ss-section + .ss-section { padding-top: 1.5rem; }
  /* Edge-to-edge: drop container side padding + body-grid rails on mobile */
  .ss-page .container-large { padding-left: 0; padding-right: 0; }
  .ss-body-grid::before,
  .ss-body-grid::after { display: none; }
  /* Drop sticky on the about card so it scrolls with content on mobile */
  .ss-about { position: static; top: auto; }
}
