:root{
  --fourma-slide-padding:clamp(64px,7vw,96px);
  --fourma-hero-padding:clamp(120px,10vw,144px);
  --fourma-slide-gutter:32px;
  --fourma-slide-gap:clamp(32px,5vw,64px);
  --fourma-opening-background:#fbfbfd;
  --fourma-opening-glow:radial-gradient(ellipse 60% 55% at 50% 30%,rgba(215,155,175,0),transparent 70%);
}

body section.fourma-opening-slide{
  background:var(--fourma-opening-background)!important;
  color:var(--ink);
}

body .dd-hero.fourma-opening-slide,
body[data-slide-layout="ecosystem"] .hero.fourma-opening-slide{
  background:var(--fourma-opening-glow) center -120px / 900px 520px no-repeat,var(--fourma-opening-background)!important;
}

body .dd-stack-card.fourma-opening-slide{
  position:relative;
  min-height:auto;
  border-radius:0;
  box-shadow:none;
}

body .dd-hero.fourma-opening-slide::before,
body[data-slide-layout="ecosystem"] .hero.fourma-opening-slide::before{
  content:none;
}

body[data-slide-layout="ecosystem"] .fourma-opening-slide .eyebrow,
body[data-slide-layout="ecosystem"] .fourma-opening-slide .node small{
  color:var(--green);
}

body[data-slide-layout="ecosystem"] .fourma-opening-slide .hero-copy p{
  color:#4b4841;
}

body[data-slide-layout="ecosystem"] .fourma-opening-slide .ring,
body[data-slide-layout="ecosystem"] .fourma-opening-slide .node,
body[data-slide-layout="ecosystem"] .fourma-opening-slide .cta i{
  border-color:var(--line);
}

body[data-slide-layout="ecosystem"] .fourma-opening-slide .node{
  background:rgba(106,41,63,.06);
}

body .dd-hero{
  padding:var(--fourma-hero-padding) var(--fourma-slide-gutter) var(--fourma-slide-padding);
  scroll-margin-top:96px;
}

body .bs-slide,body .bs-journey-sec{
  padding-block:var(--fourma-slide-padding);
  scroll-margin-top:96px;
}

body .bs-slide>.wrap,body .bs-journey-sec>.wrap{
  padding-inline:var(--fourma-slide-gutter);
}

body .dd-stack-card{
  align-items:flex-start;
}

body .dd-eyebrow{
  flex-wrap:wrap;
  align-items:baseline;
  line-height:1.5;
}

body .dd-hero-top{
  margin-top:24px;
  gap:var(--fourma-slide-gap);
}

body .dd-hero-inner>.dd-hero-h1{
  margin-top:24px;
}

body .dd-hero-cta-wrap{
  margin-top:32px;
}

body .dd-split,body .zz-row,body .zz-row.rev{
  align-items:flex-start;
  gap:var(--fourma-slide-gap);
}

body[data-slide-layout="home"] .hero{
  scroll-margin-top:96px;
}

body[data-slide-layout="home"] section.sec-pad,body[data-slide-layout="home"] section.fp2{
  padding-block:var(--fourma-slide-padding);
  scroll-margin-top:96px;
}

body[data-slide-layout="home"] section.sec-pad>.wrap,body[data-slide-layout="home"] section.fp2>.wrap{
  max-width:1180px;
  margin-inline:auto;
  padding-inline:var(--fourma-slide-gutter);
}

body[data-slide-layout="home"] .combine .fx-grid{
  margin-top:0;
  align-items:start;
}

body[data-slide-layout="ecosystem"] .hero{
  padding:var(--fourma-hero-padding) var(--fourma-slide-gutter) var(--fourma-slide-padding);
  place-items:start center;
  scroll-margin-top:96px;
}

body[data-slide-layout="ecosystem"] .hero-grid{
  max-width:1180px;
  align-items:start;
  gap:var(--fourma-slide-gap);
}

body[data-slide-layout="ecosystem"] section:not(.hero){
  padding:var(--fourma-slide-padding) 0;
  scroll-margin-top:96px;
}

body[data-slide-layout="ecosystem"] section>.wrap{
  width:100%;
  max-width:1180px;
  padding-inline:var(--fourma-slide-gutter);
}

body[data-slide-layout="ecosystem"] .cycle .stage:first-child{
  padding-top:0;
}

@media(max-width:900px){
  :root{
    --fourma-slide-gutter:24px;
    --fourma-slide-gap:40px;
  }

  body .dd-hero-top{
    gap:24px;
  }

  body .dd-hero-sub{
    padding:0;
  }

  body .dd-stack-card{
    position:relative;
    min-height:auto;
  }

  body .dd-split-visual>*,body .zz-visual>*{
    margin-top:0!important;
  }
}

@media(max-width:640px){
  :root{
    --fourma-hero-padding:112px;
    --fourma-slide-gap:32px;
  }

  body .dd-hero-top,body .dd-hero-inner>.dd-hero-h1{
    margin-top:20px;
  }

  body .dd-hero-visual{
    margin-top:36px;
  }

  body .dd-stack-card{
    border-radius:24px 24px 0 0;
  }

  body .bs-journey-track{
    margin-top:36px;
  }
}

/* Calmer desktop scale for page openers */
@media(min-width:901px){
  body .dd-hero-inner .dd-hero-h1,
  body .dd-hero .dd-hero-h1{
    font-size:clamp(32px,3.5vw,46px)!important;
  }
}

/* Slides follow each other — no sticky slide-over-slide stacking */
body .dd-stack-card{
  position:relative!important;
  top:auto!important;
  min-height:auto!important;
  border-radius:0!important;
  box-shadow:none!important;
}

/* Mobile menu feature cards (Discover Fourma, Explore the cycle): neutral, no pink/burgundy */
html body .mobile-submenu .mm-feature,
html body .menu-theme-light .mobile-submenu .mm-feature{background:rgba(128,128,128,.08)!important}
html body .mobile-submenu .mm-feature .mm-sub-title,
html body .menu-theme-light .mobile-submenu .mm-feature .mm-sub-title{color:inherit!important}

/* Nov 2026: compact mobile pages, left-aligned heads and one type scale (harvey.ai pattern) */
@media(max-width:640px){
  :root{
    --fourma-slide-padding:48px;
    --fourma-hero-padding:100px;
  }
  html body .dd-hero .dd-eyebrow{justify-content:flex-start!important;text-align:left!important}
  html body .dd-hero .dd-hero-top,
  html body .dd-hero .dd-hero-sub,
  html body .dd-hero .dd-hero-sub p,
  html body .dd-shead,
  html body .dd-shead p,
  html body .bs-journey-sec .bs-journey-lede{text-align:left!important;text-align-last:auto!important;margin-left:0!important;margin-right:0!important;max-width:none!important}
  html body .dd-hero .dd-hero-h1{font-size:clamp(34px,10vw,40px)!important;line-height:1.06!important;text-align:left!important;text-wrap:pretty}
  html body .dd-shead h2,
  html body .bs-journey-sec .bs-journey-h2{font-size:28px!important;line-height:1.1!important;text-align:left!important}
  html body .dd-shead .dd-shead-cta{justify-content:flex-start!important;text-align:left!important}
}

/* Nov 2026: mobile CTAs line up with the left-aligned text */
@media(max-width:640px){
  html body .dd-hero .dd-hero-top{align-items:flex-start!important}
  html body .dd-hero .dd-hero-top>.dd-hero-h1{align-self:stretch!important;width:auto!important}
  html body .dd-hero .dd-hero-cta-wrap,
  html body .dd-hero .srch-hero-cta-below,
  html body .dd-shead-cta,
  html body .bs-journey-sec .wrap:has(>.bs-journey-cta),
  html body .bs-journey-sec .wrap>div:has(>.bs-journey-cta){text-align:left!important;justify-content:flex-start!important;align-items:flex-start!important}
  html body .dd-hero-cta,
  html body .bs-journey-cta{margin-left:0!important;margin-right:auto!important}
  html body .zz-text .dd-shead,
  html body .dd-shead.reveal,
  html body .dd-shead.reveal h2,
  html body .dd-shead.reveal p{text-align:left!important;text-align-last:auto!important}
}

/* Nov 2026: on mobile the CTA text itself starts on the text edge; the pink marker stretches with it.
   :is(...,#fm-x) lifts specificity above page rules like "#rm-hero .dd-hero-cta" */
@media(max-width:640px){
  html body :is(.dd-hero-cta,.bs-journey-cta,.section-cta,.fp-cta,.t-cta,#fm-x):is(a,button,#fm-x){padding-left:12px!important;padding-right:12px!important;margin-left:-12px!important}
  html body :is(.dd-hero-cta,.bs-journey-cta,.section-cta,.fp-cta,.t-cta,#fm-x):is(a,button,#fm-x)::before,
  html body :is(.dd-hero-cta,.bs-journey-cta,.section-cta,.fp-cta,.t-cta,#fm-x):is(a,button,#fm-x)::after{left:-4px!important;right:-4px!important;width:auto!important}
}
@media(max-width:640px){
  html body :is(.dd-shead,#fm-x),
  html body :is(.dd-shead,#fm-x) :is(h2,p,#fm-x),
  html body :is(.dd-hero-punch,.bs-journey-punch,#fm-x){text-align:left!important;text-align-last:auto!important;margin-left:0!important;margin-right:0!important}
}
