/* Hem: page classes only (.home-*). */

/* ---------- 1. hero: the film is the scene (bleeds right, feathered left edge); the copy on a clean cream plane;
   the terracotta folder (the signature's own prop) is a near plane over the film's lower-left edge ---------- */
.home-hero {
  position: relative; container-type: inline-size;
  background:
    radial-gradient(ellipse 60% 70% at 78% 30%, rgba(230,237,245,.85), rgba(230,237,245,0) 70%),
    radial-gradient(ellipse 40% 50% at 8% 90%, rgba(220,229,239,.55), rgba(220,229,239,0) 70%),
    var(--cream);
}
.home-hero__in { position: relative; }
.home-hero__frame { position: relative; overflow: hidden; background: var(--sun); }
.home-hero__pic { position: absolute; inset: 0; }
.home-hero__pic img, .home-hero__film { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 25% 50%; }
.home-hero__film { position: absolute; inset: 0; opacity: 0; transition: opacity 600ms var(--ease); }
.home-hero__film.is-on { opacity: 1; }
.home-hero__film-ctl {
  position: absolute; right: 14px; bottom: 14px; z-index: 2; min-height: 44px; padding: 0 16px; border-radius: var(--r-pill);
  border: 0; background: rgba(26,40,56,.72); color: #fff; font: 600 .875rem/1 var(--f-text); cursor: pointer;
}
.home-hero__film-ctl:hover { background: rgba(26,40,56,.9); }
.home-hero__film-ctl:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.home-hero__folder {
  position: absolute; z-index: 3; height: auto; pointer-events: none;
  transform: translateY(var(--fy, 0px)) rotate(var(--fr, -12.2deg)); transform-origin: 50% 50%;
  filter: drop-shadow(0 2px 2px rgba(18,32,52,.28)) drop-shadow(0 18px 22px rgba(18,32,52,.30));
}
.home-hero__copy { position: relative; z-index: 4; }
.home-hero__lede { margin-top: var(--s-5); font-size: clamp(1.0625rem, .98rem + .3vw, 1.1875rem); line-height: 1.55; max-width: 34rem; }
.home-hero__actions { margin-top: var(--s-5); }
.home-hero__meet { margin-top: var(--s-3); font-size: var(--small); color: var(--mute); max-width: 30rem; }

@media (min-width: 1024px) {
  .home-hero__in {
    /* L = the column's left edge, Wr = the column width, F = where the film starts, W = the folder's width */
    --wr: min(100cqw - 2 * var(--gut), var(--wrap));
    --L: max(var(--gut), (100cqw - var(--wrap)) / 2);
    --F: calc(var(--L) + .47 * var(--wr));
    --W: calc(.3 * var(--wr));
    height: max(600px, calc(100svh - 96px - 76px));
  }
  .home-hero__frame {
    position: absolute; top: 0; bottom: 0; right: 0; left: var(--F);
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 96px); mask-image: linear-gradient(90deg, transparent 0, #000 96px);
  }
  .home-hero__copy { margin-left: var(--L); width: calc(var(--F) - var(--L) - 24px); padding-top: clamp(24px, (100svh - 172px - 560px) / 2, 200px); }
  .home-hero__h1 { font-size: clamp(4rem, .8rem + 5.4vw, 7rem); line-height: .94; }
  .home-hero__lede { max-width: none; }
  /* the meeting line (the lowest copy) stays left of the folder's leftmost point */
  .home-hero__meet { max-width: calc(var(--F) - .65 * var(--W) - var(--L) - 40px); }
  .home-hero__folder { width: var(--W); left: calc(var(--F) - .6 * var(--W)); bottom: -36px; }
}
@media (max-width: 1023.98px) {
  .home-hero__frame { aspect-ratio: 16 / 10; }
  .home-hero__folder { width: 36%; left: 3%; top: calc(62.5cqw - .45 * 36cqw * 872 / 1195); }
  .home-hero__copy { padding: calc(.6 * 36cqw * 872 / 1195 + 8px) var(--gut) var(--s-8); max-width: 44rem; }
  .home-hero__h1 { font-size: clamp(3rem, 1.8rem + 5vw, 5rem); }
}
@media (max-width: 759.98px) {
  .home-hero__frame { aspect-ratio: 4 / 4.2; }
  .home-hero__pic img, .home-hero__film { object-position: 44% 30%; }
  .home-hero__folder { width: 48%; left: 1%; top: calc(105cqw - .45 * 48cqw * 872 / 1195); }
  .home-hero__copy { padding: calc(.6 * 48cqw * 872 / 1195 + 6px) var(--gut) var(--s-7); }
  .home-hero__h1 { font-size: clamp(2.75rem, 1.4rem + 7vw, 3.5rem); line-height: .98; }
  .home-hero__lede { margin-top: var(--s-4); }
  .home-hero__actions { margin-top: var(--s-4); }
}

/* ---------- 2. "Arvodet delas": the highlighter on the page, then the bar splitting ---------- */
.home-split { padding: calc(var(--s-8) + 24px) 0 var(--s-7); }
.home-split__head { margin-bottom: var(--s-6); }
.home-split__head h2 { max-width: 16em; }
.home-split__head p { margin-top: var(--s-4); max-width: 40rem; }
.home-split__band { position: relative; aspect-ratio: 2 / 1; max-height: 78svh; width: 100%; overflow: hidden; background: #DDE3EA; }
.home-split__pic { position: absolute; inset: 0; }
.home-split__pic img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%; }
.home-split__hl { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.home-split__hl--m { display: none; }
.home-split__stroke { fill: none; stroke: #9BB3CF; stroke-opacity: .6; stroke-width: 13; stroke-linecap: butt; stroke-linejoin: round; mix-blend-mode: multiply; }
.home-split__low {
  display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: var(--s-7) var(--s-8); align-items: end;
  margin-top: var(--s-7);
}
.home-bar { margin: 0; --p: 1; }
.home-bar__label { font: 500 var(--h3)/1.2 var(--f-head); margin-bottom: var(--s-4); }
.home-bar__track { position: relative; height: clamp(72px, 7vw, 104px); border-radius: 14px; background: var(--sea); overflow: hidden; }
/* lead 2026-11-14 (QA r1 #5): both parts grow together at 24:76, so the insurer's part is the larger in every frame */
/* v2-3 (lead 11-23): the client's part is 24 % from the start; the insurer's part fills the rest with the scroll */
.home-bar__own { position: absolute; top: 0; bottom: 0; left: 0; width: 20%; background: var(--ochre); }
.home-bar__ins {
  position: absolute; top: 0; bottom: 0; right: 0; width: calc(80% * var(--p)); background: var(--teal);
  box-shadow: -4px 0 0 var(--cream); border-radius: 0 14px 14px 0;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.home-bar__word {
  font: italic 450 clamp(1.5rem, 1.1rem + 1.4vw, 2.25rem)/1 var(--f-head); color: #fff; white-space: nowrap;
  opacity: clamp(0, calc((var(--p) - .8) * 5), 1);
}
.home-bar__keys { position: relative; height: 2.2em; margin-top: 10px; font: 600 1rem/1.2 var(--f-text); }
.home-bar__k { position: absolute; top: 0; white-space: nowrap; padding-top: 10px; }
.home-bar__k::before { content: ""; position: absolute; top: 0; width: 2px; height: 8px; border-radius: 1px; }
.home-bar__k--own { left: 0; color: #2E4A6B; }
.home-bar__k--own::before { left: 0; background: var(--ochre); }
.home-bar__k--ins { right: 0; color: var(--teal); opacity: clamp(0, calc(var(--p) * 2 - .6), 1); }
.home-bar__k--ins::before { right: 0; background: var(--teal); }
.home-bar__cap { margin-top: var(--s-4); font-size: clamp(1.0625rem, 1rem + .3vw, 1.25rem); line-height: 1.5; max-width: 40rem; }
.home-bar__note { margin-top: var(--s-3); font-size: var(--small); color: var(--mute); }
.home-split__handle p { font: 450 var(--h3)/1.3 var(--f-head); margin-bottom: var(--s-5); }
@media (max-width: 899.98px) { .home-split__low { grid-template-columns: 1fr; gap: var(--s-6); } }
@media (max-width: 720px) {
  .home-hero__pic img, .home-hero__film { object-position: 50% 70%; }   /* picture and film: the same 4:5 crop; more table under the hands for the folder */
  .home-hero__film-ctl { right: auto; bottom: auto; left: 12px; top: 12px; }   /* over the wall, never her hands */
}
@media (max-width: 720px) {
  .home-split__band { aspect-ratio: 4 / 5; max-height: none; }
  .home-split__hl--d { display: none; }
  .home-split__hl--m { display: block; }
}
@media (max-width: 759.98px) {
  .home-split { padding: var(--s-7) 0 var(--s-5); }
  .home-check { padding-bottom: var(--s-6); }
  .home-sides { padding-top: var(--s-6); padding-bottom: var(--s-6); }
  .home-steps { padding-bottom: var(--s-7); }
  .home-bar__track { height: 60px; }
}

/* ---------- 3. the check ---------- */
.home-check { background: linear-gradient(180deg, var(--cream), #EFF3F8 40%, var(--cream)); padding-bottom: var(--s-7); }
.home-check__more { margin-top: var(--s-5); }
@media (min-width: 900px) { .home-check__more { margin-left: calc((100% - var(--s-7)) * 5 / 12 + var(--s-7)); } }

/* ---------- 4. two sides: not a card row; the heading over the wide picture, the tall one beside both ---------- */
.home-sides__pair { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); grid-template-areas: "head claim" "owed claim";
  column-gap: var(--s-8); row-gap: var(--s-6); align-items: start; }
.home-sides__h { grid-area: head; max-width: 14em; align-self: end; }
.home-side--owed { grid-area: owed; }
.home-side--claim { grid-area: claim; margin-top: var(--s-6); }
.home-side h3 { margin-top: var(--s-5); }
.home-side p { margin-top: var(--s-2); max-width: 30rem; }
.home-side--owed .home-side__pic { aspect-ratio: 3 / 2; }
.home-side--claim .home-side__pic { aspect-ratio: 4 / 5; }
.home-side__pic img { object-position: 55% 40%; }
.home-side--claim .home-side__pic img { object-position: 62% 30%; }
@media (max-width: 759.98px) {
  .home-sides__pair { grid-template-columns: 1fr; grid-template-areas: "head" "owed" "claim"; row-gap: var(--s-7); }
  .home-sides__h { margin-bottom: calc(-1 * var(--s-4)); }
  .home-side--claim { margin-top: 0; }
  .home-side--claim .home-side__pic { aspect-ratio: 4 / 3; }
}

/* ---------- 5. steps: a stepped diagonal, the numeral apart from the heading ---------- */
.home-steps { background: linear-gradient(180deg, var(--cream) 0%, #EEF3F8 100%); padding-bottom: var(--s-8); }
.home-sides { padding-top: var(--s-7); padding-bottom: var(--s-7); }
.home-steps__h { margin-bottom: var(--s-6); }
.home-steps__list { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-6); align-items: start; }
.home-step--2 { margin-top: var(--s-7); }
.home-step--3 { margin-top: calc(2 * var(--s-7)); }
.home-step--1 .home-step__pic { aspect-ratio: 4 / 3; }
.home-step--2 .home-step__pic { aspect-ratio: 1 / 1; }
.home-step--3 .home-step__pic { aspect-ratio: 5 / 4; }
.home-step__txt { display: grid; grid-template-columns: auto 1fr; column-gap: var(--s-4); margin-top: var(--s-5); }
.home-step__n { grid-row: 1 / span 2; font: 300 clamp(3.5rem, 2.4rem + 3vw, 5.5rem)/.8 var(--f-head); color: var(--terra); font-optical-sizing: auto; }
.home-step__txt h3 { align-self: end; }
.home-step__txt p { margin-top: var(--s-2); font-size: 1rem; }
@media (max-width: 899.98px) {
  .home-steps__list { grid-template-columns: 1fr; gap: var(--s-7); }
  .home-step--2, .home-step--3 { margin-top: 0; }
  .home-step--2 { padding-left: 8%; }
  .home-step--3 { padding-left: 16%; }
}
@media (max-width: 479.98px) { .home-step--2, .home-step--3 { padding-left: 0; } .home-step__pic { aspect-ratio: 3 / 2 !important; } }

/* ---------- 6. the jurister slot ---------- */
.home-team { padding: var(--s-7) 0; }
.home-team .bl-slot { max-width: 920px; }

/* ---------- 7. close: a warm sun band ---------- */
.home-close {
  padding: var(--s-8) 0;
  background: radial-gradient(ellipse 70% 90% at 20% 40%, #DCE6F2, rgba(220,230,242,0) 70%), #E3EAF3;
}
.home-close__in { display: grid; grid-template-columns: 5fr 7fr; gap: var(--s-8); align-items: center; }
.home-close__pic { aspect-ratio: 4 / 5; max-width: 440px; }
.home-close__txt h2 { font-size: clamp(2.25rem, 1.4rem + 3vw, 4rem); }
.home-close__txt .bl-lede { margin-top: var(--s-4); }
.home-close__txt .bl-actions { margin-top: var(--s-6); }
.home-close__addr { margin-top: var(--s-5); color: var(--mute); font-size: var(--small); }
@media (max-width: 759.98px) {
  .home-close { padding: var(--s-8) 0; }
  .home-close__in { grid-template-columns: 1fr; gap: var(--s-6); }
  .home-close__pic { max-width: 100%; aspect-ratio: 1 / 1; }
}
/* lead 2026-11-14 (QA r1 #3, #4): standalone links and the footer nav reach 44 px */
.home-check__more a { display: inline-flex; align-items: center; min-height: 44px; }

/* ---------- light pass 2026-11-14: the hero has no folder plane any more; on phones the whole lede (the condition and
   the självrisk) sits above the dock at scroll 0 ---------- */
@media (max-width: 1023.98px) {
  .home-hero__copy { padding-top: var(--s-6); }
}
@media (max-width: 759.98px) {
  .home-hero__frame { aspect-ratio: 4 / 3.1; }
  .home-hero__pic img, .home-hero__film { object-position: 46% 30%; }
  .home-hero__copy { padding-top: var(--s-5); }
}

/* ---------- v2-6: steps in one level row; the fee bar static and labelled inside ---------- */
.home-step--2, .home-step--3 { margin-top: 0; padding-left: 0; }
.home-step--1 .home-step__pic, .home-step--2 .home-step__pic, .home-step--3 .home-step__pic { aspect-ratio: 4 / 3; }
@media (max-width: 899.98px) { .home-step--2, .home-step--3 { padding-left: 0; } }
.home-bar { --p: 1; }
.home-bar__own { display: flex; align-items: center; justify-content: center; overflow: hidden; }
