/* ═══ DEMAIN — Scroll-driven image grow + card reveal ═══ */

.demain {
  position: relative;
  height: 180vh;
}

@media (min-width: 768px) {
  .demain {
    height: 180vh;
  }
}

/* ── Section header ── */

.demain__sticky {
  position: sticky;
  top: 108px;
  height: calc(100svh - 108px);
  height: calc(100vh - 108px);
  width: 100%;
  overflow: hidden;
}

/* mobile overrides moved to end of file */

.demain__image-wrap {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: var(--base-color-neutral--black);
  will-change: transform, border-radius;
  transform-origin: center center;
}

.demain__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

/* ═══ CARD — Two-column layout ═══ */

.demain__card {
  position: absolute;
  z-index: 10;
  left: 50%;
  top: 50%;
  transform: translate(-50%, 100%);
  background: var(--base-color-neutral--white);
  border-radius: var(--border-radius--large);
  max-width: 640px;
  width: calc(100% - 32px);
  max-height: calc(100vh - 100px - 32px);
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.04),
    0 8px 24px rgba(0, 0, 0, 0.06),
    0 24px 48px rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(0, 0, 0, 0.06);
  will-change: transform;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 28px 24px;
  overflow-y: auto;
}

/* ── Challenge card variant — landscape 2 columns ── */

.demain__card--challenge {
  background: linear-gradient(160deg, #ffffff 0%, #f8f6f2 50%, #f0ebe1 100%);
  border: 1.5px solid rgba(184, 150, 90, 0.2);
  box-shadow:
    0 1px 2px rgba(184, 150, 90, 0.06),
    0 8px 32px rgba(184, 150, 90, 0.1),
    0 24px 48px rgba(0, 0, 0, 0.04);
  flex-direction: row;
  gap: 0;
  padding: 0;
  max-width: 920px;
  align-items: stretch;
}

/* ── Left column ── */

.demain__challenge-left {
  flex: 1;
  padding: 32px 36px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-right: 1px solid rgba(0, 0, 0, 0.06);
}

/* ── Right column ── */

.demain__challenge-right {
  flex: 1;
  padding: 32px 36px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  position: relative;
  overflow: hidden;
}

.demain__challenge-right::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  pointer-events: none;
}

.demain__challenge-right-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.85;
  pointer-events: none;
}

/* ── Tag ── */

.demain__challenge-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--base-color-neutral--neutral-darker);
  margin-bottom: 20px;
}

/* ── Title ── */

.demain__challenge-title {
  font-family: var(--font-display);
  font-size: clamp(24px, 4vw, 36px);
  font-weight: 400;
  color: var(--base-color-neutral--black);
  line-height: 1.15;
  margin: 0 0 14px 0;
}

/* ── Description ── */

.demain__challenge-desc,
.demain__challenge-desc strong {
  font-weight: 300;
}

.demain__challenge-desc {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.65;
  color: var(--base-color-neutral--black);
  margin: 0 0 24px 0;
  max-width: 400px;
}

/* ── Countdown ── */

.demain__challenge-countdown-label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--base-color-neutral--white);
  display: block;
  margin-bottom: 16px;
  text-align: center;
  z-index: 1;
}

.demain__challenge-countdown-grid {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-bottom: auto;
  z-index: 1;
}

.demain__challenge-countdown-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 48px;
}

.demain__challenge-countdown-num {
  font-family: var(--font-display);
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 800;
  color: var(--base-color-neutral--white);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  z-index: 1;
}

.demain__challenge-countdown-sub {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
  margin-top: 6px;
  z-index: 1;
}

/* ── Stats row ── */

.demain__challenge-stats {
  display: flex;
  align-items: center;
  gap: 20px;
  width: 100%;
}

.demain__challenge-stat {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}

.demain__challenge-stat-num {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 800;
  color: var(--base-color-neutral--black);
  line-height: 1;
}

.demain__challenge-stat-label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--base-color-neutral--neutral-darker);
  margin-top: 4px;
}

.demain__challenge-stat-sep {
  width: 1px;
  height: 36px;
  background: rgba(0, 0, 0, 0.08);
}

/* ── Form + CTA ── */

.demain__challenge-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  z-index: 1;
}

.demain__challenge-form[hidden] {
  display: none;
}

.demain__challenge-email {
  width: 100%;
  padding: 14px 20px;
  border-radius: var(--border-radius--round);
  border: none;
  background: rgba(0, 0, 0, 0.45);
  color: var(--base-color-neutral--white);
  font-family: var(--font-body);
  font-size: 15px;
  outline: none;
  backdrop-filter: blur(8px);
  transition: background 0.2s ease;
}

.demain__challenge-email::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.demain__challenge-email:focus {
  background: rgba(0, 0, 0, 0.55);
}

.demain__challenge-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px 24px;
  border-radius: var(--border-radius--round);
  border: 1.5px solid rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.1);
  color: var(--base-color-neutral--white);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
  z-index: 1;
}

.demain__challenge-cta:hover {
  background: var(--base-color-neutral--white);
  border-color: var(--base-color-neutral--white);
  color: var(--base-color-neutral--black);
}

.demain__challenge-cta svg {
  flex-shrink: 0;
}

/* ── Success / Error messages ── */

.demain__challenge-success,
.demain__challenge-error {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  border-radius: var(--border-radius--round);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  position: relative;
  z-index: 2;
}

.demain__challenge-success[hidden],
.demain__challenge-error[hidden] {
  display: none;
}

.demain__challenge-success {
  background: rgba(255, 255, 255, 0.15);
  border: 1.5px solid rgba(255, 255, 255, 0.4);
  color: var(--base-color-neutral--white);
}

.demain__challenge-error {
  background: rgba(220, 53, 53, 0.25);
  border: 1.5px solid rgba(220, 53, 53, 0.5);
  color: var(--base-color-neutral--white);
}

/* ── Reassurance ── */

.demain__challenge-reassurance {
  font-family: var(--font-body);
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
  text-align: center;
  margin-top: 12px;
  z-index: 1;
}

/* ── Glow button ── */

.demain__engage-btn--glow {
  background: var(--base-color-neutral--black);
  font-weight: 800;
  box-shadow: 0 0 0 0 rgba(184, 150, 90, 0);
  animation: demain-btn-glow 3s ease-in-out infinite;
}

@keyframes demain-btn-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(184, 150, 90, 0); }
  50% { box-shadow: 0 0 20px 4px rgba(184, 150, 90, 0.25); }
}

/* ── Engage ── */

.demain__engage-actions {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
}

.demain__engage-btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: var(--border-radius--round);
  background: var(--base-color-neutral--black);
  color: var(--base-color-neutral--white);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.demain__engage-btn:hover {
  opacity: 0.85;
}

.demain__engage-link {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  color: var(--base-color-neutral--black);
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.demain__engage-link:hover {
  opacity: 0.7;
}

/* ═══ RIGHT — Product showcase ═══ */

/* ── Product card ── */

/* ── Product hero zone — gradient header ── */

.demain__product-hero--blue {
  background:
    radial-gradient(circle at 20% 80%, rgba(59, 130, 246, 0.08) 0%, transparent 50%),
    linear-gradient(135deg, #f7faff 0%, #eef4ff 100%);
  border-bottom-color: rgba(59, 130, 246, 0.08);
}

.demain__product-hero-bg {
  position: absolute;
  top: -30px;
  right: -20px;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.06) 0%, transparent 70%);
}

.demain__product-hero--blue .demain__product-hero-bg {
  background: radial-gradient(circle, rgba(59, 130, 246, 0.06) 0%, transparent 70%);
}

/* Header — logo + title + tag */

.demain__product-logo-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: rgba(124, 58, 237, 0.1);
  flex-shrink: 0;
  padding: 8px;
  box-shadow: 0 2px 8px rgba(124, 58, 237, 0.12);
}

.demain__product-logo-icon svg {
  width: 100%;
  height: 100%;
}

.demain__product-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1px;
  color: var(--bazalt-violet);
}

.demain__product-tag svg {
  flex-shrink: 0;
  color: var(--bazalt-violet);
}

/* ── Bazalt Prix variants (blue) ── */

.demain__product-tag--blue {
  color: var(--bazalt-bleu);
}

.demain__product-tag--blue svg {
  color: var(--bazalt-bleu);
}

/* ── Product body ── */

/* Separator */

/* Flow pipeline — with connecting track */

/* Footer — price + perks */

/* ═══ TABLET — Pill input ═══ */

@media (min-width: 480px) {
  .demain__input-group {
    flex-direction: row;
    align-items: center;
    border: 1.5px solid var(--base-color-neutral--neutral-light);
    border-radius: var(--border-radius--round);
    padding: 4px 4px 4px 16px;
    gap: 8px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
  }

  .demain__input-group:focus-within {
    border-color: var(--base-color-neutral--black);
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.06);
  }

  .demain__input-wrap {
    border: none;
    border-radius: 0;
    padding: 0;
    flex: 1;
  }

  .demain__input-wrap:focus-within {
    border-color: transparent;
    box-shadow: none;
  }

  .demain__cta {
    padding: 14px 32px;
    font-size: 15px;
    font-weight: 500;
  }
}

/* ═══ DESKTOP — Two-column ═══ */

@media (min-width: 768px) {
  .demain__card {
    max-width: 920px;
    padding: 0;
    gap: 0;
  }

  .demain__desc {
    font-size: 14px;
  }
}

@media (min-width: 1024px) {
  .demain__card {
    padding: 0;
  }

  .demain__challenge-left {
    padding: 40px 44px;
  }

  .demain__challenge-right {
    padding: 40px 44px;
  }

  .demain__headline {
    font-size: 32px;
  }

  .demain__desc {
    font-size: 15px;
  }
}

/* ═══ Reduced motion ═══ */

@media (prefers-reduced-motion: reduce) {
  .demain__engage-btn--glow {
    animation: none;
  }

  .demain__cta:hover {
    transform: none;
  }

  .demain__cta:hover svg {
    transform: none;
  }
}

/* ═══ MOBILE — Overrides (must be last to win cascade) ═══ */

@media (max-width: 767px) {
  .demain__sticky {
    top: 94px;
    height: calc(100svh - 94px);
    height: calc(100vh - 94px);
  }

  .demain__card {
    top: auto;
    bottom: 48px;
    transform: translate(-50%, 100%);
    max-height: none;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 24px 20px;
    gap: 14px;
  }

  .demain__headline {
    font-size: 22px;
  }

  .demain__desc {
    font-size: 14px;
    line-height: 1.5;
  }

  .demain__card--challenge {
    flex-direction: column;
  }

  .demain__challenge-left {
    padding: 24px 20px;
    border-right: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  }

  .demain__challenge-right {
    padding: 24px 20px;
  }

  .demain__challenge-stats {
    gap: 16px;
  }

  .demain__challenge-countdown-grid {
    gap: 12px;
  }
}
