/* ============================================
   PARTNER TEMPLATE — Component Styles
   ============================================
   Base styles (fonts, tokens, reset) are in:
   ../../shared/css/withings-base.css

   This file contains all shared components for
   partner/marketing landing pages (light theme).
   ============================================ */

/* Prevent rubber-band bounce on iOS/macOS */
html.theme-light {
  overscroll-behavior-y: none;
}

/* ============================================
   LAYOUT — Container & Main Content
   ============================================ */
.container {
  display: flex;
  width: 100%;
  max-width: 100vw;
  flex-direction: column;
  align-items: flex-start;
  background: var(--bg-page);
  min-height: 100vh;
  position: relative;
  padding-bottom: 80px;
  overflow-x: hidden;
}

.main-content {
  display: flex;
  width: 100%;
  max-width: 100%;
  min-height: 1138px;
  padding: 0px 16px 32px 16px;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  flex-shrink: 0;
  background: transparent;
  position: relative;
  z-index: 2;
  overflow-x: hidden;
}

@media (min-width: 768px) {
  .main-content {
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    padding: 0px 32px 40px 32px;
    gap: 32px;
  }
}

@media (min-width: 1024px) {
  .main-content {
    max-width: 900px;
    padding: 0px 40px 48px 40px;
    gap: 40px;
  }
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero-image-section {
  width: 100%;
  height: 61.8vh;
  min-height: 549px;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  background-color: #07131B;
}

@media (min-width: 768px) {
  .hero-image-section {
    height: 549px;
    min-height: 549px;
  }
}

.hero-image-container {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  overflow: hidden;
}

.hero-image-container img,
.hero-image-container video {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center center;
  border-radius: 0;
}

@media (min-width: 768px) {
  .hero-image-container img,
  .hero-image-container video {
    object-position: center 40%;
  }
}

/* Gradient overlay */
.header-blur-overlay {
  position: absolute;
  bottom: 0; left: 0;
  width: 100%; height: 100%;
  background: linear-gradient(180deg,
    rgba(0,0,0,0) 0%,
    rgba(0,0,0,0.01) 10%,
    rgba(0,0,0,0.02) 20%,
    rgba(0,0,0,0.04) 30%,
    rgba(0,0,0,0.07) 40%,
    rgba(0,0,0,0.12) 50%,
    rgba(0,0,0,0.18) 60%,
    rgba(0,0,0,0.28) 70%,
    rgba(0,0,0,0.5) 80%,
    rgba(0,0,0,0.72) 90%,
    rgba(0,0,0,0.88) 100%);
  z-index: 1;
  pointer-events: none;
}

/* Header title overlay */
.header-overlay-title {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  width: 100%;
  max-width: 1200px;
  padding: 16px;
  padding-bottom: 80px;
  background: transparent;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  z-index: 5;
  margin-top: auto;
  margin-bottom: 0;
  margin-left: auto;
  margin-right: auto;
}

@media (min-width: 768px) {
  .header-overlay-title {
    padding: 24px;
    padding-bottom: 90px;
  }
}

.header-overlay-title h1 {
  color: #FFFFFF;
  text-align: left;
  font-family: 'Aeonik', sans-serif;
  font-size: 34px;
  font-weight: 500;
  line-height: 48px;
  width: 100%;
  margin: 0;
}

@media (min-width: 768px) {
  .header-overlay-title h1 { font-size: 48px; line-height: 56px; }
}

@media (min-width: 1024px) {
  .header-overlay-title h1 { font-size: 52px; line-height: 60px; }
}

/* ============================================
   POWERED-BY BADGE
   ============================================ */
.powered-by-badge {
  display: flex;
  padding: 4px 8px;
  align-items: center;
  align-self: flex-start;
  gap: 5px;
  border-radius: 12px;
  background: rgba(82, 107, 246, 0.85);
  margin: 0;
}

.powered-by-badge img { border-radius: 0; }

/* ============================================
   HEADER DESCRIPTION
   ============================================ */
.header-description {
  color: #FFFFFF;
  text-align: left;
  font-family: 'Aeonik', sans-serif;
  font-size: 17.3px;
  font-weight: 400;
  line-height: 100%;
  width: 100%;
  margin: 0;
  margin-top: 8px;
}

@media (min-width: 768px) {
  .header-description { font-size: 18px; line-height: 120%; margin-top: 12px; }
}

/* ============================================
   TYPOGRAPHY
   ============================================ */
.section-title {
  color: var(--text-primary);
  font-family: 'Aeonik', sans-serif;
  font-size: 28px;
  font-weight: 500;
  line-height: 120%;
  align-self: stretch;
  margin: 0;
}

@media (min-width: 768px) { .section-title { font-size: 28px; line-height: 125%; } }
@media (min-width: 1024px) { .section-title { font-size: 32px; line-height: 130%; } }

.section-title-small {
  color: var(--text-primary);
  font-family: 'Aeonik', sans-serif;
  font-size: 18px;
  font-weight: 500;
  line-height: 120%;
  align-self: stretch;
  margin: 0;
}

.body-text {
  color: var(--text-secondary);
  font-family: 'Aeonik', sans-serif;
  font-size: 17.3px;
  font-weight: 400;
  line-height: 120%;
  margin: 0;
  align-self: stretch;
}

@media (min-width: 768px) { .body-text { font-size: 17px; line-height: 140%; } }
@media (min-width: 1024px) { .body-text { font-size: 18px; line-height: 150%; } }

/* ============================================
   CONTENT BOX
   ============================================ */
.content-box {
  display: flex;
  padding: 0;
  padding-top: 16px;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  align-self: stretch;
  margin-top: -10px;
}

.box-content {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-self: stretch;
}

/* ============================================
   CONTENT SECTION
   ============================================ */
.content-section {
  display: flex;
  padding: 0;
  padding-top: 48px;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  align-self: stretch;
}

/* ============================================
   BUTTONS
   ============================================ */
.primary-btn {
  display: flex;
  padding: 16px 24px;
  justify-content: center;
  align-items: center;
  border-radius: var(--radius-card);
  background: var(--brand-primary);
  color: #FFF;
  border: none;
  font-family: 'Aeonik', sans-serif;
  font-size: 16px;
  font-weight: 600;
  line-height: normal;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(81, 104, 204, 0.3);
}

.primary-btn:hover {
  background: var(--brand-primary-hover);
  box-shadow: 0 6px 16px rgba(81, 104, 204, 0.4);
  transform: translateY(-2px);
}

.hero-cta {
  margin-top: 12px;
  align-self: flex-start;
  padding: 0;
  font-size: 16px;
  border-radius: 0;
  background: transparent;
  color: #4F5CD0;
  border: none;
  font-weight: 600;
  box-shadow: none;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.hero-cta:hover {
  background: transparent;
  color: #3D4AB8;
  box-shadow: none;
  text-decoration: underline;
}

.secondary-btn {
  display: inline-flex;
  padding: 0;
  align-items: center;
  gap: 4px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-family: 'Aeonik', sans-serif;
  font-size: 14px;
  font-weight: 400;
  text-decoration: none;
  transition: all 0.2s ease;
  align-self: flex-start;
}

.secondary-btn::after {
  content: '\203A';
  font-size: 18px;
  font-weight: 400;
  line-height: 1;
}

.secondary-btn:hover {
  color: var(--text-primary);
  text-decoration: underline;
}

/* ============================================
   STICKY CTA
   ============================================ */
.sticky-cta {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  width: 100%;
  padding: 16px 24px;
  padding-bottom: calc(24px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.15) !important;
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border-top: 1px solid rgba(51, 53, 124, 0.20);
  z-index: 1000;
  box-shadow: 0px -2px 20px rgba(51, 53, 124, 0.15);
  display: flex;
  justify-content: center;
  align-items: center;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
}

.sticky-cta .primary-btn {
  width: auto;
  margin: 0;
  min-width: 200px;
}

/* ============================================
   SUPERCHARGE SECTION (gradient background)
   ============================================ */
.supercharge-section {
  display: flex;
  padding: 24px 16px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 24px;
  flex: 1 0 0;
  border-radius: var(--radius-card);
  border: none;
  background: linear-gradient(180deg, rgba(131, 114, 194, 0.15) 0%, rgba(228, 98, 135, 0.15) 100%);
}

/* ============================================
   COLLAPSIBLE STEPS
   ============================================ */
.collapsible-steps {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  align-self: stretch;
}

.step-pill {
  display: flex;
  flex-direction: column;
  align-self: stretch;
  border-radius: var(--radius-card);
  background: var(--bg-card);
  cursor: pointer;
  transition: all 0.3s ease;
  overflow: hidden;
}

.step-pill:hover {
  box-shadow: 0px 2px 6px 0px rgba(51, 53, 124, 0.12);
}

.step-header {
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.step-icon {
  display: flex;
  width: 32px; height: 32px;
  justify-content: center;
  align-items: center;
  border-radius: 8px;
  background: var(--icon-bg);
  flex-shrink: 0;
}

.step-icon svg {
  width: 18px; height: 18px;
  fill: var(--brand-primary);
}

.step-title {
  color: var(--text-primary);
  font-family: 'Aeonik', sans-serif;
  font-size: 16px;
  font-weight: 500;
  line-height: 120%;
  flex: 1;
  margin: 0;
}

.step-toggle {
  margin-left: 12px;
  transition: transform 0.3s ease;
  flex-shrink: 0;
  width: 24px; height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.step-content {
  padding: 0 16px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
}

.step-content p {
  color: var(--text-secondary);
  font-family: 'Aeonik', sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 120%;
  margin: 0;
}

.step-pill.expanded .step-toggle { transform: rotate(180deg); }
.step-pill.expanded .step-content { max-height: 200px; padding: 0px 16px 16px 16px; }

/* ============================================
   INFO PILLS
   ============================================ */
.info-pill {
  display: flex;
  padding: 12px;
  align-items: center;
  gap: 10px;
  align-self: stretch;
  border-radius: var(--radius-card);
  background: var(--bg-card);
}

.pill-icon {
  display: flex;
  width: 24px; height: 24px;
  justify-content: center;
  align-items: center;
  flex-shrink: 0;
}

.pill-icon img {
  width: 24px; height: 24px;
  object-fit: contain;
  border-radius: 0;
}

.pill-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.pill-title {
  color: #6366F1;
  font-family: 'Aeonik', sans-serif;
  font-size: 16px;
  font-weight: 600;
  line-height: 120%;
  margin: 0;
}

.pill-description {
  color: var(--text-secondary);
  font-family: 'Aeonik', sans-serif;
  font-size: 17.3px;
  font-weight: 400;
  line-height: 120%;
  margin: 0;
}

/* ============================================
   PRICING SECTION
   ============================================ */
.pricing-section {
  display: flex;
  padding: 0;
  padding-top: 48px;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  align-self: stretch;
}

/* ============================================
   LOGO GRID (Insurance logos)
   ============================================ */
.logo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(2, 1fr);
  width: calc(100% - 32px);
  justify-items: center;
  align-items: center;
  gap: 16px;
  margin: 0 16px;
  max-width: calc(500px - 32px);
  place-items: center;
}

.logo-item {
  width: 110px; height: 88px;
  object-fit: contain;
  background: transparent;
  border-radius: 8px;
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  transform-origin: center;
  /* Animation initial state */
  opacity: 0;
  transform: translateY(20px) scale(0.9);
  transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.logo-grid.animate .logo-item {
  opacity: 1;
  transform: scale(1.15);
}

.logo-grid.animate .logo-item:nth-child(1) { transition-delay: 0.1s; }
.logo-grid.animate .logo-item:nth-child(2) { transition-delay: 0.2s; }
.logo-grid.animate .logo-item:nth-child(3) { transition-delay: 0.3s; }
.logo-grid.animate .logo-item:nth-child(4) { transition-delay: 0.4s; }
.logo-grid.animate .logo-item:nth-child(5) { transition-delay: 0.5s; }
.logo-grid.animate .logo-item:nth-child(6) { transition-delay: 0.6s; }

/* Disable animation (e.g., when replacing logos dynamically) */
.logo-grid.no-animate .logo-item {
  opacity: 1;
  transform: none;
  transition: none;
}

@media (min-width: 768px) {
  .logo-grid { max-width: 700px; gap: 24px; }
  .logo-item { width: 160px; height: 128px; padding: 20px; }
}

@media (min-width: 1024px) {
  .logo-grid { max-width: 800px; gap: 32px; }
  .logo-item { width: 200px; height: 160px; padding: 24px; }
}

/* ============================================
   OUTCOMES IMAGE WITH STAT OVERLAYS
   ============================================ */
.outcomes-image-container {
  position: relative;
  width: 370px;
  max-width: 100%;
  height: 529px;
  flex-shrink: 0;
  border-radius: 16px;
  margin: 16px auto;
  align-self: center;
  overflow: hidden;
}

.outcomes-background-image {
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: 16px;
}

.outcomes-overlay-container {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  width: 366px;
  max-width: calc(100% - 8px);
  padding: 16px 12px;
  justify-content: center;
  align-items: center;
  align-content: center;
  gap: 16px;
  flex-wrap: wrap;
  z-index: 10;
}

.outcome-stat-card {
  display: flex;
  width: 161px;
  height: 125px;
  padding: 16px;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  gap: 4px;
  flex-shrink: 0;
  border-radius: 24px;
  border: 1px solid #FFF;
  background: rgba(255, 255, 255, 0.01);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  /* Animation */
  opacity: 0;
  transform: translateY(20px) scale(0.95);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.outcomes-image-container.animate .outcome-stat-card {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.outcomes-image-container.animate .outcome-stat-card:nth-child(1) { transition-delay: 0.2s; }
.outcomes-image-container.animate .outcome-stat-card:nth-child(2) { transition-delay: 0.4s; }
.outcomes-image-container.animate .outcome-stat-card:nth-child(3) { transition-delay: 0.6s; }
.outcomes-image-container.animate .outcome-stat-card:nth-child(4) { transition-delay: 0.8s; }

.stat-number-overlay {
  color: #FFF;
  font-family: 'Aeonik', sans-serif;
  font-size: 36px;
  font-weight: 700;
  line-height: 120%;
  margin: 0;
}

.stat-description-overlay {
  color: #FFF;
  font-family: 'Aeonik', sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 120%;
  margin: 0;
}

/* ============================================
   GRAPH OVERLAY — Animated trend graph on images
   ============================================
   A frosted-glass graph that floats over a feature
   image, with line-draw + data-point animations.

   CUSTOMIZE per partner:
   - SVG path coordinates → shape the trend line
   - SVG circles → match the path's data points
   - .graph-overlay-label text → e.g. "-20 lbs",
     "+15% VO2max", "-10 mmHg"
   - data-target on the counter span → end value
   - data-prefix / data-suffix → e.g. "-" / " lbs"
   ============================================ */
.graph-overlay {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 85%;
  max-width: 340px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border-radius: 20px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  z-index: 5;
}

/* Label (top-right counter, e.g. "-20 lbs") */
.graph-overlay-label {
  position: absolute;
  top: 8px;
  right: 12px;
  color: #FFFFFF;
  font-size: 20px;
  font-weight: 700;
  font-family: 'Aeonik', sans-serif;
  opacity: 0;
}

.graph-overlay.animate .graph-overlay-label {
  animation: graphFadeInLabel 0.5s ease-out 0.3s forwards;
}

@keyframes graphFadeInLabel {
  from { opacity: 0; transform: translateY(-5px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Line draw animation */
.graph-overlay svg path.graph-line {
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
}

.graph-overlay.animate svg path.graph-line {
  animation: graphDrawLine 3s ease-out forwards;
}

@keyframes graphDrawLine {
  to { stroke-dashoffset: 0; }
}

/* Data point pop-in */
.graph-overlay svg circle.graph-point {
  opacity: 0;
}

.graph-overlay.animate svg circle.graph-point {
  animation: graphPointPop 0.25s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes graphPointPop {
  0%   { opacity: 0; transform: scale(0); }
  50%  { transform: scale(1.2); }
  100% { opacity: 1; transform: scale(1); }
}

/* Stagger data points across the line duration (up to 12 points) */
.graph-overlay.animate svg circle.graph-point:nth-of-type(1)  { animation-delay: 0s; }
.graph-overlay.animate svg circle.graph-point:nth-of-type(2)  { animation-delay: 0.25s; }
.graph-overlay.animate svg circle.graph-point:nth-of-type(3)  { animation-delay: 0.5s; }
.graph-overlay.animate svg circle.graph-point:nth-of-type(4)  { animation-delay: 0.75s; }
.graph-overlay.animate svg circle.graph-point:nth-of-type(5)  { animation-delay: 1.0s; }
.graph-overlay.animate svg circle.graph-point:nth-of-type(6)  { animation-delay: 1.25s; }
.graph-overlay.animate svg circle.graph-point:nth-of-type(7)  { animation-delay: 1.5s; }
.graph-overlay.animate svg circle.graph-point:nth-of-type(8)  { animation-delay: 1.75s; }
.graph-overlay.animate svg circle.graph-point:nth-of-type(9)  { animation-delay: 2.0s; }
.graph-overlay.animate svg circle.graph-point:nth-of-type(10) { animation-delay: 2.25s; }
.graph-overlay.animate svg circle.graph-point:nth-of-type(11) { animation-delay: 2.5s; }
.graph-overlay.animate svg circle.graph-point:nth-of-type(12) { animation-delay: 2.75s; }

/* ============================================
   DATA TILES CONTAINER
   ============================================ */
.data-tiles-container {
  position: relative;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  background: var(--bg-page);
  padding: 52px 16px 40px 16px;
  display: flex;
  align-items: center;
  margin: 0 auto;
}

/* Edge fade effect */
.data-tiles-container::before,
.data-tiles-container::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 40px;
  z-index: 10;
  pointer-events: none;
}

.data-tiles-container::before {
  left: 0;
  background: linear-gradient(90deg,
    var(--bg-page) 0%,
    rgba(247, 245, 243, 0.8) 40%,
    rgba(247, 245, 243, 0) 100%);
}

.data-tiles-container::after {
  right: 0;
  background: linear-gradient(270deg,
    var(--bg-page) 0%,
    rgba(247, 245, 243, 0.8) 40%,
    rgba(247, 245, 243, 0) 100%);
}

@media (min-width: 768px) {
  .data-tiles-container {
    max-width: 800px;
    padding: 50px 32px;
  }
  .data-tiles-container::before,
  .data-tiles-container::after { width: 50px; }
}

@media (min-width: 1024px) {
  .data-tiles-container {
    max-width: 900px;
    padding: 60px 40px;
  }
  .data-tiles-container::before,
  .data-tiles-container::after { width: 60px; }
}

/* ============================================
   IMAGE DEFAULTS
   ============================================ */
img, video { border-radius: 16px; }

/* Exceptions: logos, badge images, hero images */
.powered-by-badge img,
.pill-icon img,
.step-icon img,
.hero-image-container video,
.hero-image-container img,
svg {
  border-radius: 0;
}
