/* Stack Rows — scroll-pin sticky cards (standalone CSS, no build required) */

.section-stack-rows .stack-rows {
  position: relative;
}

.section-stack-rows .stack-card {
  position: sticky;
  top: calc(150px + var(--i, 0) * 14px);
}
.section-stack-rows .stack-card + .stack-card {
  margin-top: 32px;
}

@media (max-width: 991.98px) {
  .section-stack-rows .stack-card {
    position: relative;
    top: auto;
  }
  .section-stack-rows .stack-card + .stack-card {
    margin-top: 48px;
  }
  .section-stack-rows .stack-inner {
    transform: none !important;
    opacity: 1 !important;
  }
}

.section-stack-rows .stack-inner {
  transform-origin: top center;
  transition: transform 0.18s ease, opacity 0.18s ease;
  will-change: transform, opacity;
}

/* Image bed (the full-bleed card) */
.stack-row-bed {
  position: relative;
  overflow: hidden;
  border-radius: 1.5rem;
  display: flex;
  align-items: stretch;
  min-height: 480px;
  isolation: isolate;
}

.stack-row-bed::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(45deg, transparent 0 24px, rgba(0, 0, 0, 0.025) 24px 25px);
  pointer-events: none;
  z-index: 1;
}

.stack-row-bed::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.6), transparent 60%),
    radial-gradient(circle at 80% 80%, rgba(0, 0, 0, 0.05), transparent 50%);
  pointer-events: none;
  z-index: 1;
}

/* Tone gradients */
.stack-row-bed--warm     { background: linear-gradient(135deg, #f5e9c6 0%, #e0c98a 100%); }
.stack-row-bed--sage     { background: linear-gradient(135deg, #dee9d6 0%, #b1c19f 100%); }
.stack-row-bed--cool     { background: linear-gradient(135deg, #dde6f3 0%, #aabbd3 100%); }
.stack-row-bed--dim      { background: linear-gradient(135deg, #ece8e0 0%, #d8d2c4 100%); }
.stack-row-bed--cream    { background: linear-gradient(135deg, #f5efe2 0%, #e6dec9 100%); }
.stack-row-bed--charcoal { background: linear-gradient(135deg, #2a2a31 0%, #15151b 100%); }
.stack-row-bed--charcoal::after {
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.08), transparent 60%);
}

/* Light text mode */
.stack-row-bed--light .stack-row-bed__eyebrow { color: rgba(255, 255, 255, 0.7); }
.stack-row-bed--light .stack-row-bed__title   { color: #fff; }
.stack-row-bed--light .stack-row-bed__body    { color: rgba(255, 255, 255, 0.78); }
.stack-row-bed--light .stack-row-bed__cta     { color: #fff; }
.stack-row-bed--light .stack-row-bed__label   { color: rgba(255, 255, 255, 0.55); }

/* Full-bleed image */
.stack-row-bed__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

/* Text zone */
.stack-row-bed__text {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50%;
  padding: 3.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  z-index: 2;
}
.stack-row-bed__text--right { right: 0; left: auto; }
.stack-row-bed__text--left  { left: 0; right: auto; }

@media (max-width: 991.98px) {
  .stack-row-bed__text {
    position: relative;
    width: 100%;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
  }
}

.stack-row-bed__eyebrow {
  font-family: inherit;
  font-weight: 500;
  font-size: 0.8125rem;
  color: rgba(10, 10, 15, 0.55);
  margin-bottom: 1.125rem;
}

.stack-row-bed__title {
  font-weight: 700;
  font-size: clamp(1.5rem, 2.6vw, 2.125rem);
  line-height: 1.1;
  letter-spacing: -0.022em;
  color: #101828;
  margin-bottom: 1.25rem;
  max-width: 440px;
}

.stack-row-bed__body {
  font-size: 1.0625rem;
  line-height: 1.55;
  color: #475467;
  max-width: 420px;
  margin-bottom: 1.75rem;
  margin-top: 0;
}

.stack-row-bed__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-weight: 500;
  font-size: 0.9375rem;
  color: #101828;
  text-decoration: none;
  letter-spacing: -0.005em;
  transition: color 0.15s ease;
}
.stack-row-bed__cta svg {
  transition: transform 0.18s ease;
}
.stack-row-bed__cta:hover {
  color: #1090E0;
}
.stack-row-bed__cta:hover svg {
  transform: translateX(3px);
}

.stack-row-bed__label {
  position: absolute;
  bottom: 1.125rem;
  left: 1.375rem;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.65625rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(0, 0, 0, 0.45);
  z-index: 3;
}

@media (max-width: 991.98px) {
  .stack-row-bed {
    min-height: auto;
    aspect-ratio: auto !important;
    flex-direction: column;
  }
}
