/* V2 · SYSA: kapittel 03 «Slik bygger vi», fase A «VI FINNER MULIGHETER.» (punktfelt, former, mulighetsmotor).
   Alt er avgrenset til #system. Mål i designpiksler (--z); telefon (≤ 899 px) har egen komposisjon i tre bånd:
   tekst øverst, felt i midten, de fem koblingene som rader nederst (kortet åpner i raden). */

#system { position: relative; }
#system .hog { position: relative; height: 260svh; }
/* Sømmen inn: navnets kobolt går rett over i denne scenen (som.css gir -100svh og --som-bg). */
#system .stikk { position: sticky; top: 0; height: 100svh; overflow: hidden; background: var(--cob); color: var(--cream); touch-action: pan-y; }
#system .stikk canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
#system .meta { font-size: calc(11 * var(--z)); }
#system .big span { display: block; }
#system .big, #system .big span { transition: none !important; }

/* ---------- Tekstsonen ---------- */
#system .f1-kap { position: absolute; left: var(--g); right: var(--g); top: calc(66 * var(--z)); z-index: 4; }
#system .f1-tekst { position: absolute; left: var(--g); top: calc(108 * var(--z)); width: calc(700 * var(--z)); z-index: 3; pointer-events: none; }
#system .f1-h { font-size: calc(160 * var(--z)); }
#system .f1-h span { width: max-content; white-space: nowrap; }
#system .f1-p { margin-top: calc(24 * var(--z)); width: calc(680 * var(--z)); font-size: calc(31 * var(--z)); line-height: 1.3; font-weight: 450; letter-spacing: -.012em; }

/* ---------- Faseindeksen A · B · C (går igjen i hele kapittelet) ---------- */
#system .f-indeks { position: absolute; left: var(--g); bottom: calc(28 * var(--z)); width: calc(700 * var(--z)); z-index: 5; --ix-bg: var(--cob); font-family: var(--f-meta); font-size: calc(11 * var(--z)); letter-spacing: .08em; text-transform: uppercase; line-height: 1.2; }
#system .f-indeks ol { display: flex; justify-content: space-between; gap: calc(14 * var(--z)); }
#system .f-indeks li { position: relative; display: flex; align-items: center; gap: calc(9 * var(--z)); padding-top: calc(9 * var(--z)); opacity: .6; white-space: nowrap; }
#system .f-indeks li::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: currentColor; }
#system .f-indeks li.on { opacity: 1; }
#system .f-indeks li.on::before { height: calc(3 * var(--z)); }
#system .f-indeks .n { padding: calc(2 * var(--z)) calc(7 * var(--z)) calc(2 * var(--z)) 0; }
#system .f-indeks li.on .n { background: var(--cream); color: var(--ix-bg); padding: calc(2 * var(--z)) calc(10 * var(--z)) calc(2 * var(--z)) calc(7 * var(--z)); clip-path: polygon(0 0, 100% 0, calc(100% - 4px) 100%, 0 100%); }

/* ---------- Klyngenavn og MULIGHET ---------- */
#system .f1-kl { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
#system .f1-kl li { position: absolute; left: 0; top: 0; display: flex; align-items: center; gap: calc(7 * var(--z)); font-family: var(--f-meta); font-size: calc(15 * var(--z)); letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; will-change: transform; }
#system .f1-kl i { display: block; width: calc(12 * var(--z)); height: calc(7 * var(--z)); background: var(--cream); clip-path: polygon(30% 0, 100% 0, 70% 100%, 0 100%); flex: none; }
#system .f1-mul { display: block; position: absolute; left: 0; top: 0; z-index: 2; color: var(--ink); pointer-events: none; opacity: 0; will-change: transform, opacity; }
#system .f1-mul .big { display: block; white-space: nowrap; line-height: .84; }

/* Mulighetsmotoren er tatt ut av forsiden (17.11): #sy-ui er bare en skjult dataliste for feltets forbindelser. */
#system .sy-ui { display: none; }

/* feltet uten JS: overskrift og setning, uten festing */
html:not(.sy-js) #system .hog { height: auto; }
html:not(.sy-js) #system .stikk { position: static; height: auto; overflow: visible; padding: calc(100 * var(--z)) var(--g) calc(60 * var(--z)); }
html:not(.sy-js) #system .stikk canvas, html:not(.sy-js) #system .f1-kl, html:not(.sy-js) #system .f1-mul { display: none; }
html:not(.sy-js) #system .f1-kap, html:not(.sy-js) #system .f1-tekst, html:not(.sy-js) #system .f-indeks { position: static; width: auto; }
html:not(.sy-js) #system .f1-kap { margin-bottom: 20px; }
html:not(.sy-js) #system .f1-h { font-size: clamp(56px, 11vw, 150px); }
html:not(.sy-js) #system .f1-p { width: auto; margin: 16px 0 28px; }
html:not(.sy-js) #system .f-indeks ol { flex-wrap: wrap; }

/* ============ Telefon: tre atskilte bånd (tekst · felt · rader), aldri noe oppå tekst ============ */
@media (max-width: 899px) {
  #system .hog { height: 215svh; }
  #system .meta { font-size: 11px; }
  #system .f1-kap { top: 58px; }
  #system .f1-tekst { width: auto; right: var(--g); top: 82px; }
  #system .f1-p { width: auto; font-size: 18px; margin-top: 14px; line-height: 1.3; }
  #system .f1-kl li { font-size: 12.5px; gap: 6px; letter-spacing: .08em; }
  #system .f1-kl i { width: 9px; height: 5px; }
  #system .f-indeks { width: auto; right: var(--g); bottom: 12px; font-size: 11px; letter-spacing: .04em; }
  #system .f-indeks ol { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
  #system .f-indeks li { flex-direction: column; align-items: flex-start; gap: 4px; padding-top: 8px; white-space: normal; }
  #system .f-indeks li.on::before { height: 3px; }
  #system .f-indeks .n { padding: 2px 6px 2px 0; }
  #system .f-indeks li.on .n { padding: 2px 9px 2px 6px; }
  /* telefon: bare det aktive steget har navn; de to andre er bokstav og strek */
  #system .f-indeks li:not(.on) .t { display: none; }
  #system .f-indeks ol { display: flex; gap: 10px; }
  #system .f-indeks li { flex: 0 0 44px; }
  #system .f-indeks li.on { flex: 1 1 auto; }
}
@media (max-width: 899px) and (max-height: 700px) { #system .f1-p { font-size: 15.5px; margin-top: 8px; } }

@media (prefers-reduced-motion: reduce) {
  /* ferdig, stille tilstand: én skjerm, ikke festet */
  #system .hog { height: 100svh; }
  html.som #system #f1[data-som] { height: 100svh; margin-top: 0 !important; }
  html.som #system #f1[data-som].som-v > :first-child { opacity: 1 !important; }
}

