/* Freja vertical rhythm layer. Load after index inline CSS, content.css,
   legal.css and brand.css. Spacing only: no colors, type, copy or new UI.
   #proof (sticky desktop sequence, wrappers, slides, timings) is never
   targeted here. Only explicit top-level homepage scenes are selected. */
:root{
  --rh-top:clamp(92px,11vh,128px);     /* header clearance + optical air */
  --rh-bottom:clamp(64px,8vh,104px);
  --rh-scene-min:clamp(560px,84svh,940px);
  --rh-gap:clamp(64px,8vw,112px);      /* supporting pages section gap */
}

/* ---------- Homepage, desktop (fine pointer only) ---------- */
@media (min-width:900px) and (hover:hover) and (pointer:fine){
  /* Purposeful viewport scenes keep their full-screen presence,
     but may grow if translated copy is taller. */
  main > section.hero,
  main > section.cta{
    height:auto; min-height:100svh; overflow:visible;
    padding-top:var(--rh-top); padding-bottom:var(--rh-bottom);
  }
  main > section.slot{
    height:auto; min-height:100svh; overflow:visible;
    padding-top:var(--rh-top); padding-bottom:var(--rh-bottom);
  }

  /* Editorial scenes: content-driven height with a proportionate floor,
     centred, identical top/bottom rhythm, no internal scrollers. */
  main > .statwrap,
  main > section#resultat,
  main > section#act,
  main > section#kalkyl,
  main > section#team,
  main > section#fragor{
    height:auto;
    min-height:var(--rh-scene-min);
    max-height:none;
    overflow:visible;
    align-content:center;
    padding-top:var(--rh-top);
    padding-bottom:var(--rh-bottom);
  }
  /* FAQ grows downward when answers open; anchor to top so the heading stays. */
  main > section#fragor{align-content:start; min-height:0;
    padding-bottom:calc(var(--rh-bottom) + 16px)}
  /* Team follows directly into FAQ: avoid doubled gap. */
  main > section#team{padding-bottom:var(--rh-bottom)}
}
@media (min-width:900px) and (hover:hover) and (pointer:fine) and (max-height:820px){
  :root{--rh-top:84px; --rh-bottom:52px; --rh-scene-min:clamp(520px,92svh,760px)}
}
@media (min-width:900px) and (hover:hover) and (pointer:fine) and (max-height:680px){
  :root{--rh-top:76px; --rh-bottom:40px; --rh-scene-min:0px}
}

/* ---------- Homepage, mobile / coarse (document scroll) ---------- */
@media (max-width:899px), (hover:none) and (pointer:coarse){
  main > .statwrap,
  main > section#resultat,
  main > section#act,
  main > section#kalkyl,
  main > section#team,
  main > section#fragor{
    padding-top:clamp(80px,11svh,104px);
    padding-bottom:clamp(56px,8svh,80px);
  }
  main > section.slot{
    padding-top:clamp(84px,11svh,108px);
    padding-bottom:clamp(56px,8svh,80px);
  }
  main > section#resultat .res-cols{margin-top:clamp(30px,5svh,42px)}
}
@media (max-width:360px){
  main > .statwrap,
  main > section#resultat,
  main > section#act,
  main > section#kalkyl,
  main > section#team,
  main > section#fragor{padding-top:76px; padding-bottom:52px}
}

/* ---------- Content pages ---------- */
.cp-crumbs ol{margin-top:clamp(20px,3vw,36px)}
.cp-hero{padding:clamp(24px,3vw,36px) 0 var(--rh-gap)}
.cp-sec:not(.cp-formula){padding:var(--rh-gap) 0}
.cp-sec > h2 + *{margin-top:clamp(24px,3vw,36px)}
.cp-split__body p:last-child,
.cp-figsec__text p:last-child{margin-bottom:0!important}
.cp-faq details p{padding-bottom:22px}
.cp-faq > h2{margin-bottom:0}
.cp-formula{margin-bottom:0; padding:clamp(32px,4vw,56px) clamp(22px,4vw,48px)}
.cp-formula + .cp-sec,.cp-formula + section{border-top:0}
.cp-cta{margin-top:0; padding:var(--rh-gap) 0 calc(var(--rh-gap) + 8px)}
.cp-cta p{margin:20px 0 32px!important}

/* ---------- Legal pages ---------- */
.legal-page .hero{padding:clamp(28px,4vw,52px) 0 clamp(36px,5vw,60px)}
.legal-page .hero h1{margin-bottom:20px}
.legal-page .legal-layout{padding-block:clamp(44px,6vw,80px)}
.legal-page .document section{margin-bottom:clamp(36px,4vw,48px)}
.legal-page .document section:last-child{margin-bottom:0}
.legal-page .document section > :last-child{margin-bottom:0}
@media (max-width:760px){
  .legal-page .toc{padding-bottom:20px}
}
