/* Sections 2–4: 60vh; pattern is global (w3s-page-background.css). Section 4 = image + parallax */

.w3s-section {
  position: relative;
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.w3s-section__inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding: 48px 24px;
}

/* ---------- SECTION 2: Market (concept tag, title, blocks) ---------- */
/*
 * Cropping causes (Section 2):
 * - Fixed navbar (68px): without scroll-margin-top, the section can sit under the nav and the PROBLEM/title look cut off. Fix: scroll-margin-top + sufficient padding-top on __inner.
 * - Hero ::after (blur band): extends translateY(50%) over the section; section has z-index 21 so it paints on top; overflow: visible so no clip from section.
 * - Card-unit reveal clip-path: clip uses the unit’s border box; block icons are position:absolute above it. Fix: padding-top on card-unit so the clip box includes the icons, then negative margin on the card.
 */
#vision {
  scroll-margin-top: 5rem;
}

.w3s-section--market {
  align-items: flex-start;
  /* Stack above hero's blur band (hero ::after has z-index: 20) */
  position: relative;
  z-index: 21;
  overflow: visible;
}

.w3s-section--market .w3s-section__inner {
  padding-top: 0;
  /* Clear space below fixed nav so PROBLEM tag and title aren’t under navbar */
  padding-top: 5rem;
  /* Triple the gap between blocks and section 3 tag (was 48px, now 3 × 48px) */
  padding-bottom: 144px;
}

.w3s-section__inner--centered {
  text-align: center;
}

.concept__tag {
  font-family: "PixelCaps", system-ui, sans-serif;
  font-size: var(--fs-small);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #39d091;
  border: 2px solid #39d091;
  padding: 0.35rem 1rem;
  display: inline-block;
  margin: 0 auto 1rem;
}

/* Section 2 PROBLEM tag: red, visible above hero blur */
.w3s-section--market .concept__tag {
  color: #C23519;
  border-color: #C23519;
  margin-bottom: 2rem;
}

.w3s-blocks-container {
  display: flex;
  justify-content: center;
  width: 100%;
  margin-top: 3rem;
}

/* Section 2: space below title so images don't collide; then room for images sticking up */
.w3s-section--market .w3s-blocks-container {
  margin-top: 3rem;
}

/* Vision blocks: reveal wrapper has top:-45px so we add 45px back so title-to-blocks gap is unchanged */
.w3s-section--market .w3s-blocks-container:has(.js-vision-blocks) {
  margin-top: calc(3rem + 45px);
}

.w3s-section--market .w3s-blocks__row {
  padding-top: 3rem; /* room for images (75% above block) so they don't hit title */
  gap: 56px;
}

@media (max-width: 600px) {
  /* Section 2: container + grid → block so row isn't shrunk by flex/grid */
  .w3s-section--market .w3s-blocks-container {
    display: block;
  }

  .w3s-section--market .w3s-blocks {
    display: block;
    width: 100%;
  }

  .w3s-section--market .w3s-section__inner {
    padding-top: clamp(2.25rem, 7vw, 3.25rem);
    padding-bottom: 64px;
  }

  .w3s-section--market .w3s-blocks__row {
    flex-direction: column;
    align-items: stretch;
    gap: clamp(0.5rem, 2vw, 1rem);
    padding-top: clamp(1rem, 3vw, 2rem);
    max-width: clamp(260px, 82vw, 340px); /* slightly narrower than Section 3 */
    margin-inline: auto;
  }

  /* Force the three-problem row to fill the same width as ecosystem cards */
  .w3s-section--market .w3s-blocks__row.w3s-blocks__row--three {
    width: 100% !important;
  }

  .w3s-section--market .w3s-blocks__card-unit {
    align-self: stretch;
    width: 100%;
    align-items: stretch; /* so vision-reveal (flex item) fills card-unit width */
  }

  /* Section 2 wraps card in .w3s-vision-reveal; force full width so card can fill */
  .w3s-section--market .w3s-vision-reveal {
    width: 100%;
    box-sizing: border-box;
  }

  .w3s-section--market .w3s-blocks__card {
    width: 100%;
    max-width: none;
    margin-inline: 0; /* override later rule that centers narrow card */
  }
}

/* Desktop 901–1600px: force 2+1 layout and cap title size so copy has room (clamp was scaling titles too big) */
@media (min-width: 901px) and (max-width: 1600px) {
  .w3s-section--market .w3s-blocks__row {
    flex-wrap: wrap;
    justify-content: center;
    gap: 48px;
  }

  .w3s-section--market .w3s-blocks__card-unit {
    flex: 0 1 45%;
    max-width: 520px;
  }

  .w3s-section--market .w3s-blocks__card {
    min-width: 0;
  }

  /* Desktop: fixed smaller title size so clamp never blows up */
  .w3s-section--market .w3s-blocks__tip {
    font-size: 1.05rem;
  }
}

/* Section 2 & 3 blocks: same width as navbar — desktop only (tablet/mobile use full width from base.css) */
@media (min-width: 901px) {
  .w3s-section--market .w3s-blocks-container,
  .w3s-section--ecosystem .w3s-blocks-container {
    width: calc(100% - 160px);
    max-width: 1400px;
    margin-inline: auto;
  }

  .w3s-section--market .w3s-blocks__card {
    min-width: 280px;
  }
}

.w3s-section--market .w3s-blocks__row,
.w3s-section--ecosystem .w3s-blocks__row {
  justify-content: center;
}

/* Section 2: one container per block+image; flex/sizing for desktop only */
.w3s-section--market .w3s-blocks__card-unit {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  align-self: stretch;
}

@media (min-width: 901px) {
  .w3s-section--market .w3s-blocks__card-unit {
    flex: 1 1 0;
    min-width: 280px;
  }
}

/* Section 2 blocks: static (no zoom/blur on hover) */
.w3s-section--market .w3s-blocks__row:has(.w3s-blocks__card-unit:hover) .w3s-blocks__card-unit:not(:hover) .w3s-blocks__card {
  filter: none;
  transform: none;
  box-shadow: inset 0 0 0 1px #39d091;
}

.w3s-section--market .w3s-blocks__card:hover {
  transform: none;
  box-shadow: inset 0 0 0 1px #39d091;
}

/* Card: nav-pill fill, white stroke 40%, green 1px; top padding for 25% image overlap */
.w3s-section--market .w3s-blocks__card {
  flex: 0 1 auto;
  width: 100%;
  min-height: 220px;
  padding: 1.75rem 1.5rem;
  padding-top: 2.25rem; /* 25% of image over the block: reserve space so block isn't compressed */
  background: linear-gradient(to bottom, #3c3c3c 0%, #000000 100%);
  border: 5px solid rgba(255, 255, 255, 0.4);
  box-shadow: inset 0 0 0 1px #39d091;
  border-radius: 10px;
  color: rgba(226, 232, 240, 0.95);
  opacity: 0.8;
}

@media (max-width: 600px) {
  .w3s-section--market .w3s-blocks__card {
    max-width: clamp(280px, 88vw, 380px);
    min-height: auto;
    padding: clamp(1.1rem, 3vw, 1.4rem);
    padding-top: clamp(1.5rem, 3vw, 2.1rem);
    margin-inline: auto;
  }
}

/* Section 2 mobile: row already capped; card must fill row (override centering above) */
@media (max-width: 600px) {
  .w3s-section--market .w3s-blocks__card {
    width: 100%;
    max-width: none;
    margin-inline: 0;
  }
}

@media (max-width: 430px) {
  .w3s-section--market .w3s-blocks__card-unit {
    margin-top: 0 !important;
  }

  .w3s-section--market .w3s-blocks__row {
    gap: 24px;
  }

  .w3s-section--market .w3s-blocks__cta-link {
    width: 100%;
    display: flex;
    justify-content: center;
  }

  .w3s-section--market .w3s-blocks__cta-link .w3s-button {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

/* Tablet portrait (home PROBLEM): pull section closer to hero */
@media (min-width: 601px) and (max-width: 1024px) and (orientation: portrait) {
  .w3s-section--market .w3s-section__inner {
    padding-top: clamp(2.5rem, 6vh, 3.5rem); /* was 5rem */
  }

  .w3s-section--market .w3s-blocks-container {
    margin-top: 2.5rem;
  }

  .w3s-section--market .w3s-blocks-container:has(.js-vision-blocks) {
    margin-top: calc(2.5rem + 45px);
  }
}

  .w3s-section--market .w3s-blocks__card {
    overflow: hidden;
  }
}

/* Block image: on top of card, bottom 25% over the block, 75% above, centered; half size */
.w3s-section--market .w3s-blocks__card-img-wrap {
  position: absolute;
  left: 50%;
  bottom: 100%;
  transform: translate(-50%, 25%);
  width: 70px;
  max-width: 80%;
  z-index: 1;
  pointer-events: none;
}

.w3s-section--market .w3s-blocks__card-img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

.w3s-section--market .w3s-blocks__card:hover {
  padding: 1.75rem 1.5rem;
  padding-top: 2.25rem;
  background: linear-gradient(to bottom, #3c3c3c 0%, #000000 100%);
  color: rgba(226, 232, 240, 0.95);
  opacity: 1;
}

/* Block titles: PixelCaps; keep smaller than --fs-h3 so they don’t dominate the card */
.w3s-section--market .w3s-blocks__tip {
  font-family: "PixelCaps", system-ui, sans-serif;
  font-size: clamp(0.95rem, 0.95rem + 0.2vw, 1.15rem);
  line-height: 1.2;
  margin: 0 0 0.5rem;
}

.w3s-section--market .w3s-blocks__tip-line {
  display: block;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.w3s-section--market .w3s-blocks__card--problem-1 .w3s-blocks__tip-line {
  background-image: linear-gradient(to bottom, #ffffff 0%, #ef0735 100%);
}

.w3s-section--market .w3s-blocks__card--problem-2 .w3s-blocks__tip-line {
  background-image: linear-gradient(to bottom, #ffffff 0%, #5eadf3 100%);
}

.w3s-section--market .w3s-blocks__card--problem-3 .w3s-blocks__tip-line {
  background-image: linear-gradient(to bottom, #ffffff 0%, #4407fb 100%);
}

/* Block 3 title: tighter line-height so 3-line matches others */
.w3s-section--market .w3s-blocks__card--problem-3 .w3s-blocks__tip-line {
  line-height: 1.05;
}

.w3s-section--market .w3s-blocks__text {
  font-size: var(--fs-body);
  line-height: 1.5;
  margin: 0;
}

/* Section 2: scroll-direction reveal (top-to-bottom when scrolling down, bottom-to-top when scrolling up) */
@keyframes w3s-reveal-down {
  from { clip-path: inset(0 0 100% 0); }
  to { clip-path: inset(0 0 0 0); }
}

@keyframes w3s-reveal-up {
  from { clip-path: inset(100% 0 0 0); }
  to { clip-path: inset(0 0 0 0); }
}

/*
 * Icons must be 75% above block, 25% on block. With bottom:100% the icon extends above the
 * spacer, so it was outside the wrapper border box and got clipped. Lesson: the clipped
 * element’s border box must contain the full icon. So add padding-top on the wrapper so the
 * clip region extends above the spacer by the icon height; then spacer + card margin so
 * the icon’s bottom 25% still lands on the card.
 */
.w3s-section--market .js-vision-blocks .w3s-vision-reveal {
  position: relative;
  top: -45px;
  margin-bottom: -45px;
  padding-top: 60px; /* room for full icon above spacer so clip-path includes it */
  clip-path: inset(0 0 100% 0);
}

.w3s-section--market .js-vision-blocks .w3s-vision-reveal__spacer {
  position: relative;
  height: 45px; /* 75% of ~60px icon; card will start below so 25% overlaps */
  flex-shrink: 0;
}

/* Icon bottom at spacer top; translateY(25%) so bottom 25% sits on the card */
.w3s-section--market .js-vision-blocks .w3s-vision-reveal__spacer .w3s-blocks__card-img-wrap {
  bottom: 100%;
  top: auto;
  transform: translate(-50%, 25%);
}

.w3s-section--market .js-vision-blocks .w3s-vision-reveal .w3s-blocks__card {
  margin-top: -60px; /* pull card up so its top is under icon’s bottom 25% */
}

/* Slightly raise the center block */
.w3s-section--market .js-vision-blocks .w3s-blocks__card-unit:nth-child(2) {
  margin-top: -4rem;
}

.w3s-section--market .js-vision-blocks.reveal-down .w3s-vision-reveal {
  animation: w3s-reveal-down 0.6s ease-out forwards;
}

.w3s-section--market .js-vision-blocks.reveal-down .w3s-blocks__card-unit:nth-child(1) .w3s-vision-reveal { animation-delay: 0s; }
.w3s-section--market .js-vision-blocks.reveal-down .w3s-blocks__card-unit:nth-child(2) .w3s-vision-reveal { animation-delay: 0.08s; }
.w3s-section--market .js-vision-blocks.reveal-down .w3s-blocks__card-unit:nth-child(3) .w3s-vision-reveal { animation-delay: 0.16s; }

.w3s-section--market .js-vision-blocks.reveal-up .w3s-vision-reveal {
  animation: w3s-reveal-up 0.6s ease-out forwards;
}

.w3s-section--market .js-vision-blocks.reveal-up .w3s-blocks__card-unit:nth-child(1) .w3s-vision-reveal { animation-delay: 0s; }
.w3s-section--market .js-vision-blocks.reveal-up .w3s-blocks__card-unit:nth-child(2) .w3s-vision-reveal { animation-delay: 0.08s; }
.w3s-section--market .js-vision-blocks.reveal-up .w3s-blocks__card-unit:nth-child(3) .w3s-vision-reveal { animation-delay: 0.16s; }

/* ---------- SECTION 3: Ecosystem (SOLUTIONS tag, title, blocks) ---------- */
.w3s-section--ecosystem {
  align-items: flex-start;
}

.w3s-section--ecosystem .w3s-section__inner {
  padding-top: 0;
  /* Double the gap from section 3 blocks to section 4 (was 48+48=96px, now 144+48=192px) */
  padding-bottom: 144px;
}

.w3s-section--ecosystem .concept__tag {
  margin-bottom: 2rem;
}

.w3s-section--ecosystem .w3s-blocks__row {
  gap: 56px;
}

/* Section 3: no blur when cursor is between blocks; only blur the other card when one card is hovered */
.w3s-section--ecosystem .w3s-blocks__row > .w3s-blocks__card:not(:hover) {
  filter: none;
  transform: none;
  box-shadow: inset 0 0 0 1px #ffffff;
}

.w3s-section--ecosystem .w3s-blocks__row:has(.w3s-blocks__card:hover) > .w3s-blocks__card:not(:hover) {
  filter: blur(10px);
  transform: scale(0.9);
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
}

/* Card: nav-pill fill, green stroke 40%, white 1px on top */
.w3s-section--ecosystem .w3s-blocks__card {
  flex: 1 1 0;
  min-width: 360px; /* wide enough for "Zero-trust vault for cryptographic credentials" on one line */
  min-height: 140px;
  height: auto;
  padding: 1.25rem 1.5rem;
  background: linear-gradient(to bottom, #3c3c3c 0%, #000000 100%);
  border: 5px solid rgba(57, 208, 145, 0.4);
  box-shadow: inset 0 0 0 1px #ffffff;
  border-radius: 10px;
  color: rgba(226, 232, 240, 0.95);
  opacity: 0.8;
}

.w3s-section--ecosystem .w3s-blocks__card:hover {
  padding: 1.25rem 1.5rem;
  background: linear-gradient(to bottom, #3c3c3c 0%, #000000 100%);
  color: rgba(226, 232, 240, 0.95);
  box-shadow: inset 0 0 0 1px #ffffff;
  opacity: 1;
}

/* Block visual (image on top) */
.w3s-section--ecosystem .w3s-blocks__visual {
  display: block;
  width: auto;
  max-width: 90%;
  height: auto;
  max-height: 144px; /* 160 * 0.9 */
  margin: 0 auto 0;
  object-fit: contain;
}

/* Block titles: same structure/size as nav (RBM + Protocol, Locker + App) */
.w3s-section--ecosystem .w3s-blocks__tip {
  font-family: "PixelCaps", system-ui, sans-serif;
  font-size: var(--fs-h2);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  line-height: 1.2;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  margin: 0 0 0.25rem;
}

.w3s-section--ecosystem .w3s-blocks__tip-sub {
  display: inline-block;
  font-size: 0.6em;
  letter-spacing: 0.12em;
  margin-left: 0.12em;
}

.w3s-section--ecosystem .w3s-blocks__card--solution-1 .w3s-blocks__tip {
  background-image: linear-gradient(to bottom, #ffffff 0%, #39d091 100%);
}

.w3s-section--ecosystem .w3s-blocks__card--solution-2 .w3s-blocks__tip {
  background-image: linear-gradient(to bottom, #e0e0e0 0%, #d1b838 100%);
}

.w3s-section--ecosystem .w3s-blocks__text {
  font-size: var(--fs-body);
  line-height: 1.5;
  margin: 0;
  min-height: 3em; /* 2 lines so both cards align */
}

.w3s-section--ecosystem .w3s-blocks__text-line {
  display: block;
}

/* Keep first line on one line so we get exactly 2 lines (credentials + and sensitive secrets.) */
.w3s-section--ecosystem .w3s-blocks__text-line:first-child {
  white-space: nowrap;
}

.w3s-section--ecosystem .w3s-blocks__cta-link {
  display: inline-block;
  margin-top: 1rem;
  text-decoration: none;
}

/* Tablet portrait (home SOLUTIONS): reduce huge bottom band under cards */
@media (min-width: 601px) and (max-width: 1024px) and (orientation: portrait) {
  .w3s-section--ecosystem {
    min-height: auto;
    align-items: flex-start;
  }

  .w3s-section--ecosystem .w3s-section__inner {
    padding-bottom: clamp(72px, 10vh, 96px);
  }
}

/* Tablet (601px–1024px): Section 3 side-by-side but smaller, centered, not stuck to edges */
@media (min-width: 601px) and (max-width: 1024px) {
  .w3s-section--ecosystem .w3s-blocks-container {
    width: 100%;
  }

  .w3s-section--ecosystem .w3s-blocks__row {
    flex-direction: row;
    max-width: 720px;
    margin-inline: auto;
    gap: 2rem;
  }

  .w3s-section--ecosystem .w3s-blocks__card {
    min-width: 0;
    flex: 1 1 0;
    max-width: clamp(300px, 45vw, 480px);
    padding: clamp(1rem, 3vw, 1.75rem);
    padding-inline: clamp(1.25rem, 4vw, 2rem);
    overflow: visible;
  }

  .w3s-section--ecosystem .w3s-blocks__visual {
    max-height: clamp(120px, 15vw, 200px);
  }

  .w3s-section--ecosystem .w3s-blocks__tip {
    font-size: clamp(1.25rem, 3vw, 2rem);
  }
}

/* Mobile (≤600px): Section 3 – clean gaps + CTAs fully inside cards */
@media (max-width: 600px) {
  /* One spacing token for tag→title, title→card1, card1→card2 */
  .w3s-section--ecosystem .w3s-section__inner {
    --eco-gap-mobile: clamp(3.5rem, 8vw, 4.5rem);
    /* reduce huge empty band under cards on mobile vs desktop 144px */
    padding-bottom: clamp(80px, 16vw, 120px);
  }

  /* Tag → gap → Title */
  .w3s-section--ecosystem .concept__tag {
    margin-bottom: var(--eco-gap-mobile);
  }

  /* Title → gap → first card unit (image+panel+CTA) */
  .w3s-section--ecosystem .w3s-blocks-container {
    width: 100%;
    margin-top: var(--eco-gap-mobile);
  }

  /* Card 1 ↔ Card 2 spacing – between whole units */
  .w3s-section--ecosystem .w3s-blocks__row {
    flex-direction: column;
    align-items: center;
    gap: calc(var(--eco-gap-mobile) * 2);
    max-width: clamp(280px, 88vw, 380px);
    margin-inline: auto;
  }

  .w3s-section--ecosystem .w3s-blocks__card {
    min-width: 0;
    width: 100%;
    padding: clamp(1.35rem, 4.5vw, 1.9rem);
    padding-inline: clamp(1.35rem, 5.5vw, 2.1rem);
    /* more room under CTA so pill is clearly inside card */
    padding-bottom: clamp(2.75rem, 7vw, 3.5rem);
    overflow: visible;
  }

  .w3s-section--ecosystem .w3s-blocks__visual {
    max-height: clamp(80px, 18vw, 140px);
  }

  .w3s-section--ecosystem .w3s-blocks__tip {
    font-size: clamp(1rem, 5vw, 1.5rem);
  }

  /* CTA wrapper: full width of card, pill inset, pulled up from bottom */
  .w3s-section--ecosystem .w3s-blocks__cta-link {
    display: block;
    width: 100%;
    padding-inline: clamp(0.5rem, 3vw, 1rem);
    margin-top: clamp(0.25rem, 1.5vw, 0.5rem);
  }

  .w3s-section--ecosystem .w3s-blocks__cta-link .w3s-button {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding-inline: clamp(0.75rem, 3vw, 1.25rem);
    padding-block: clamp(0.4rem, 2vw, 0.8rem);
    margin: 0 auto;
  }
}

/* Roadmap page: tighter gaps + more padding inside Product blocks on mobile */
@media (max-width: 600px) {
  /* Title → block1 gap: smaller margin under section title */
  .roadmap-section--blocks.w3s-section--ecosystem .section-title {
    margin-bottom: clamp(0.125rem, 0.5vw, 0.3rem);
  }

  /* Block1 ↔ Block2 gap: smaller row gap just for roadmap */
  .roadmap-section--blocks.w3s-section--ecosystem .w3s-blocks__row {
    gap: clamp(1.5rem, 5vw, 2.5rem);
  }

  /* Extra bottom padding inside the two roadmap cards only */
  .roadmap-section--blocks.w3s-section--ecosystem .w3s-blocks__card {
    padding-bottom: clamp(4.5rem, 7vw, 4.75rem);
  }
}

/* Vertical tablet only: contained zoom/blur so effect doesn’t overflow */
@media (min-width: 601px) and (max-width: 1024px) {
  .w3s-section--ecosystem .w3s-blocks__card:hover {
    transform: scale(1.03);
  }

  .w3s-section--ecosystem .w3s-blocks__row:has(.w3s-blocks__card:hover) > .w3s-blocks__card:not(:hover) {
    transform: scale(0.97);
    filter: blur(6px);
  }
}

/* Mobile: no zoom/blur; static boxes, user taps button inside */
@media (max-width: 600px) {
  .w3s-section--ecosystem .w3s-blocks__card:hover {
    transform: none;
  }

  .w3s-section--ecosystem .w3s-blocks__row:has(.w3s-blocks__card:hover) > .w3s-blocks__card:not(:hover) {
    filter: none;
    transform: none;
    box-shadow: inset 0 0 0 1px #ffffff;
  }
}

/* Sections 2 & 3: no local background – global animated pattern shows through */

/* Section 4: image background + parallax (fixed attachment) */
.w3s-section--updates {
  background-color: #020617;
  background-image: url("../../assets/Homepage/section-4-bg.jpg");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  background-repeat: no-repeat;
}

.w3s-section--updates::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    to bottom,
    rgba(2, 6, 23, 0.75) 0%,
    rgba(2, 6, 23, 0.6) 100%
  );
  pointer-events: none;
}

/* Section 4: inner fills section; form centered in remaining height (same space above/below) */
.w3s-section--updates {
  align-items: stretch;
}

.w3s-section__inner--updates {
  position: relative;
  z-index: 3;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  overflow: visible;
}

.w3s-section--updates__header {
  width: 100%;
  text-align: center;
  flex-shrink: 0;
  padding-bottom: 0.5rem;
}

.w3s-section--updates__subtitle {
  font-size: var(--fs-body);
  opacity: 0.85;
  text-align: center;
  max-width: 360px;
  margin: 0.5rem auto 0;
}

/* Row: extra space below header (100% fix); min-height in rem so row doesn't collapse when zoomed; overflow visible so rotated form isn't cropped */
.w3s-section--updates__row {
  flex: 1;
  min-height: 17.5rem;
  margin-top: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
  width: 100%;
  max-width: 900px;
  overflow: visible;
}

.w3s-section--updates__stack {
  position: relative;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 22rem;
  max-width: 36rem;
}

/* Envelop: lives inside stack with form; slides in from behind on scroll */
.w3s-section--updates__envelop {
  position: absolute;
  inset: -12%;
  z-index: 0;
  background-image: url("../../assets/Homepage/section-4-envelop.png");
  background-size: contain;
  background-position: center center;
  background-repeat: no-repeat;
  pointer-events: none;
  opacity: 1; /* always solid; only movement is animated */
  /* Start mostly hidden behind the right-side form, slightly larger than final */
  transform: translate(80px, 0) scale(1.4);
  transition: transform 600ms cubic-bezier(0.22, 0.61, 0.36, 1);
}

.w3s-section--updates.w3s-section--updates--in-view .w3s-section--updates__envelop {
  /* Slide left into a position where ~15% is still behind the form */
  transform: translate(0, 0) scale(1.4);
}

/* Form wrap: no shrink; min size in rem so form keeps proportions at 75% zoom */
.w3s-section--updates__form-wrap {
  flex: 0 0 auto;
  flex-shrink: 0;
  min-height: 14rem;
  min-width: 20rem;
  margin-left: 0;
  margin-right: 0;
  transform: rotate(4deg) translateX(40px);
  position: relative;
  z-index: 2; /* ensure form stays above envelope */
}

/* Section 4 form: inside at 80% opacity, frame stays solid */
.w3s-section--updates .w3s-form__card {
  background-color: rgba(13, 13, 13, 0.8);
}

/* -------- Responsive adjustments for updates section (email form) -------- */

/* Tablet: avoid huge top/bottom empty space (row no longer flex: 1) */
@media (max-width: 1024px) {
  .w3s-section--updates {
    background-attachment: scroll; /* safer on mobile/tablets */
    align-items: center;
    min-height: auto; /* override base 60vh so tablet section height hugs content */
  }

  .w3s-section--updates .w3s-section__inner--updates {
    flex: 0 0 auto;
    padding-block: 2rem 3rem;
  }

  .w3s-section--updates__row {
    flex: 0 0 auto;
    min-height: auto;
    max-width: 720px;
    gap: 2rem;
  }

  .w3s-section--updates__form-wrap {
    margin-right: 0;
    transform: rotate(3deg) translateX(32px);
    min-width: 18rem;
  }
}

@media (max-width: 768px) {
  .w3s-section--updates__row {
    justify-content: center;
    margin-top: 1.25rem;
    min-height: 15rem;
  }

  .w3s-section--updates__form-wrap {
    margin-right: 0;
    transform: rotate(3deg) translateX(24px);
  }
}

@media (max-width: 600px) {
  .w3s-section--updates__row {
    flex: 0 0 auto;
    min-height: auto;
  }

  .w3s-section--updates__form-wrap {
    min-width: 18rem;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    transform: rotate(2deg);
  }

  .w3s-section--updates__envelop {
    inset: -8% -4%;
    background-size: 100%;
  }
}

/* Narrow mobile: ditch envelope, compact form so it fits */
@media (max-width: 480px) {
  .w3s-section--updates__envelop {
    display: none;
  }

  .w3s-section--updates__stack {
    min-width: 0;
    max-width: 100%;
  }

  .w3s-section--updates__form-wrap {
    min-width: 0;
    width: 100%;
    max-width: 100%;
    min-height: 12rem;
  }

  .w3s-section--updates .w3s-form__card {
    margin: 0.5rem;
    max-width: 100%;
  }
}
