/* ==========================================================================
   TotalBPA – retning B: lys og menneskelig
   Hvit bunn, logoens blaa og oransje, bueformer fra figurene i logoen.
   ========================================================================== */
:root {
  --blue:      #003eb4;
  --blue-dk:   #002a7a;
  --blue-lys:  #eef3fc;
  --orange:    #f64f28;
  --orange-ink:#c93a17;   /* oransje til tekst paa hvitt */
  --orange-lys:#fff0ea;
  --ink:       #16203a;
  --muted:     #4f5870;
  --line:      #dfe5f1;
  --varm:      #faf6f0;   /* lys, varm bunn bak toppen */
  --white:     #ffffff;
  --font: 'Schibsted Grotesk', system-ui, sans-serif;
  --maxw: 1200px;
  --pad: clamp(1.15rem, 5vw, 3rem);
  --head: 80px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: var(--head); -webkit-text-size-adjust: 100%; }
body { font-family: var(--font); color: var(--ink); background: var(--white); font-size: 1.1rem; line-height: 1.65; overflow-x: hidden; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { color: var(--blue); line-height: 1.04; letter-spacing: -.025em; font-weight: 800; }
h2 { font-size: clamp(2rem, 4.2vw, 3.2rem); margin-bottom: 1.4rem; }
h3 { font-size: 1.45rem; letter-spacing: -.015em; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding-inline: var(--pad); }
.skip { position: absolute; left: -999px; top: 0; background: var(--blue); color: #fff; padding: .6rem 1rem; z-index: 999; }
.skip:focus { left: 1rem; top: 1rem; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; border-radius: 4px; }

/* knapper og lenker */
.knapp { display: inline-block; background: var(--blue); color: #fff; text-decoration: none; font-weight: 700; font-size: 1.05rem; padding: 1rem 1.6rem; border-radius: 10px; transition: background .2s, transform .2s; }
.knapp:hover { background: var(--blue-dk); transform: translateY(-1px); }
.knapp-liten { padding: .65rem 1.15rem; font-size: .98rem; }
.understrek { display: inline-block; color: var(--blue); font-weight: 700; text-decoration: underline; text-decoration-color: var(--orange); text-decoration-thickness: 3px; text-underline-offset: 7px; padding: .4rem 0; transition: text-underline-offset .2s; }
.understrek:hover { text-underline-offset: 4px; }

/* ---------- Topp ---------- */
header.site { position: sticky; top: 0; z-index: 100; background: rgba(255,255,255,.96); transition: box-shadow .25s; }
header.site.scrolled { box-shadow: 0 1px 0 var(--line), 0 6px 20px rgba(0,42,122,.06); }
header.site .wrap { height: var(--head); display: flex; align-items: center; gap: 2rem; }
.brand img { height: 32px; width: auto; }
header.site nav { margin-left: auto; display: flex; gap: 2rem; }
header.site nav a { text-decoration: none; font-weight: 500; color: var(--ink); font-size: 1rem; }
header.site nav a:hover { color: var(--blue); text-decoration: underline; text-decoration-color: var(--orange); text-decoration-thickness: 2px; text-underline-offset: 6px; }

/* ---------- Bildeplasser (buer fra logoens figurer) ---------- */
.bue { border-radius: 999px 999px 22px 22px; overflow: hidden; position: relative; }
.bue img { width: 100%; height: 100%; object-fit: cover; }
/* plassholder til Mats sender bilder */
.bilde:not(:has(img)) { background: var(--varm); border: 2px dashed var(--line); }
.bilde:not(:has(img))::after { content: 'Bilde: ' attr(data-bilde); position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 0 1.2rem; color: var(--muted); font-size: .9rem; font-weight: 600; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; background: var(--varm); padding-block: clamp(2.5rem, 6vw, 4.5rem) clamp(3rem, 7vw, 5rem); }
.hero-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.hero h1 { font-size: clamp(2.9rem, 6.4vw, 5.4rem); margin-bottom: 1.6rem; }
.ingress { font-size: clamp(1.1rem, 1.6vw, 1.25rem); color: var(--muted); max-width: 33rem; margin-bottom: 2.2rem; }
.hero-knapper { display: flex; align-items: center; gap: 1.6rem; flex-wrap: wrap; }
.buer { position: relative; aspect-ratio: 1 / .92; }
.bue-stor { position: absolute; left: 0; bottom: 0; width: 58%; height: 92%; }
.bue-liten { position: absolute; right: 0; top: 14%; width: 37%; height: 60%; }
.fakta { list-style: none; display: grid; gap: .55rem; margin-top: 2.2rem; }
.fakta li { display: flex; align-items: center; gap: .7rem; font-weight: 600; color: var(--ink); font-size: 1rem; }
.fakta li::before { content: '✓'; flex: none; display: grid; place-items: center; width: 1.5rem; height: 1.5rem; border-radius: 50%; background: var(--orange); color: #fff; font-size: .78rem; font-weight: 800; }

/* buene reiser seg ved lasting */
html.js .bue-stor, html.js .bue-liten { opacity: 0; transform: translateY(40px); animation: opp 1s cubic-bezier(.2,.75,.2,1) forwards; }
html.js .bue-liten { animation-delay: .15s; }
@keyframes opp { to { opacity: 1; transform: none; } }

/* ---------- Scrollytelling 1: teksten tennes mens den scroller forbi ---------- */
.tenn-fest { padding-block: clamp(3.5rem, 8vw, 6rem); }
.tenn-tekst { font-weight: 700; font-size: clamp(1.45rem, 2.6vw, 2.3rem); line-height: 1.25; letter-spacing: -.02em; max-width: 30ch; color: var(--blue); }
.tenn-tekst .o { color: var(--orange-ink); }
html.js .tenn-tekst .ord { color: #cdd6ea; transition: color .3s ease; }
html.js .tenn-tekst .ord.lys { color: var(--blue); }
html.js .tenn-tekst .o .ord.lys { color: var(--orange-ink); }

/* felles: seksjonene skilles med luft og en tynn linje, ikke fargeflater */
.bpa, .soknad, .bemanning, .praktisk, .kontakt { padding-block: clamp(4.5rem, 9vw, 7rem); }
.bpa > .wrap, .soknad > .wrap, .bemanning > .wrap, .praktisk > .wrap, .kontakt > .wrap { position: relative; }
.soknad > .wrap::before, .bemanning > .wrap::before, .praktisk > .wrap::before, .kontakt > .wrap::before { content: ''; position: absolute; left: var(--pad); right: var(--pad); top: calc(-1 * clamp(4.5rem, 9vw, 7rem)); height: 1px; background: var(--line); }

/* ---------- BPA hos TotalBPA ---------- */
.bpa-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(2rem, 6vw, 5.5rem); align-items: center; }
.bue-hoy { aspect-ratio: 3 / 4; width: 100%; }
.bpa-tekst p { color: var(--muted); margin-bottom: 1.1rem; }
.bpa-tekst .stor { font-size: clamp(1.25rem, 2vw, 1.5rem); line-height: 1.45; color: var(--ink); font-weight: 500; }
.sitat { margin-top: 1.8rem; padding: .2rem 0 .2rem 1.3rem; border-left: 4px solid var(--orange); color: var(--blue) !important; font-weight: 700; font-size: 1.2rem; line-height: 1.45; }

/* ---------- Slik soeker du: svingete sti ---------- */
.soknad-tittel { text-align: center; margin-bottom: clamp(2.5rem, 5vw, 3.5rem); }
.sti-wrap { position: relative; }
.sti { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; position: relative; }
.sti-linje { position: absolute; pointer-events: none; }
.sti-linje path { fill: none; stroke: var(--orange); stroke-width: 4; stroke-dasharray: 2 12; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.sti-h { left: 12.5%; width: 75%; top: 20px; height: 44px; }
.sti-v { display: none; }
.sti-steg { position: relative; text-align: center; }
/* tallene sitter i buer, som figurene i logoen */
.sti-bue { width: 72px; height: 80px; margin: 0 auto 1.4rem; border-radius: 999px 999px 14px 14px; display: grid; place-items: center; font-size: 1.8rem; font-weight: 900; color: #fff; background: var(--blue); position: relative; z-index: 1; }
.sti-steg:nth-child(even) .sti-bue { background: var(--orange); }
.sti-steg h3 { margin-bottom: .45rem; }
.sti-steg p { color: var(--muted); max-width: 16.5rem; margin: 0 auto; font-size: 1.02rem; }
.soknad-cta { text-align: center; margin-top: clamp(2.5rem, 5vw, 3.5rem); }

/* stien tegnes og buene spretter fram naar delen kommer inn */
html.js .sti-h { clip-path: inset(0 100% 0 0); transition: clip-path 1.8s cubic-bezier(.45,0,.2,1) .2s; }
html.js .sti-v { clip-path: inset(0 0 100% 0); transition: clip-path 1.8s cubic-bezier(.45,0,.2,1) .2s; }
html.js .sti-wrap.vis .sti-linje { clip-path: inset(0 0 0 0); }
html.js .sti-bue { opacity: 0; transform: scale(.4); transition: opacity .4s ease, transform .65s cubic-bezier(.3,1.6,.5,1); }
html.js .sti-wrap.vis .sti-bue { opacity: 1; transform: none; }
html.js .sti-steg:nth-child(1) .sti-bue { transition-delay: .15s; }
html.js .sti-steg:nth-child(2) .sti-bue { transition-delay: .6s; }
html.js .sti-steg:nth-child(3) .sti-bue { transition-delay: 1.05s; }
html.js .sti-steg:nth-child(4) .sti-bue { transition-delay: 1.5s; }

/* ---------- Bemanning ---------- */
.bem-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: clamp(2rem, 6vw, 5.5rem); align-items: start; }
.bem-godkjent { display: flex; gap: .8rem; align-items: flex-start; font-weight: 600; color: var(--blue); max-width: 28rem; font-size: 1rem; }
.bem-godkjent::before { content: '✓'; flex: none; display: grid; place-items: center; width: 1.5rem; height: 1.5rem; border-radius: 50%; background: var(--orange); color: #fff; font-size: .78rem; font-weight: 800; margin-top: .1rem; }
.bem-tekst p { color: var(--muted); margin-bottom: 1.1rem; }
.bem-sporsmal { font-size: 1.25rem; font-weight: 700; color: var(--ink) !important; margin-top: 1.8rem; }

/* ---------- Praktisk bistand ---------- */
.praktisk-boks { display: grid; grid-template-columns: 1.3fr .7fr; gap: clamp(1.5rem, 5vw, 4rem); align-items: center; }
.praktisk h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); margin-bottom: 1rem; }
.praktisk p { color: var(--muted); }
.praktisk p + p { margin-top: .8rem; }
.gjoremal { list-style: none; display: grid; gap: .1rem; }
.gjoremal li { padding: .75rem 0; font-weight: 700; color: var(--ink); display: flex; align-items: center; gap: .8rem; border-bottom: 1px solid var(--line); }
.gjoremal li:last-child { border-bottom: 0; }
.gjoremal li::before { content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--orange); flex: none; }

/* ---------- Kontakt ---------- */
.kontakt-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2.5rem, 6vw, 5rem); align-items: center; }
.kontakt-ingress { font-size: 1.2rem; color: var(--muted); max-width: 30rem; margin-bottom: 1.8rem; }
.kontakt-tlf { display: inline-block; font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 900; letter-spacing: -.02em; color: var(--blue); text-decoration: underline; text-decoration-color: var(--orange); text-decoration-thickness: 5px; text-underline-offset: 10px; }
.person { background: var(--varm); border-radius: 24px; padding: clamp(1.6rem, 3.5vw, 2.4rem); }
.person-navn { font-size: 1.6rem; font-weight: 800; color: var(--blue); letter-spacing: -.02em; line-height: 1.1; }
.person-rolle { color: var(--muted); font-size: 1rem; margin-bottom: 1rem; }
.kanal { display: block; font-weight: 700; color: var(--blue); text-decoration: none; padding: .35rem 0; font-size: 1.1rem; overflow-wrap: anywhere; }
.kanal:hover { text-decoration: underline; text-decoration-color: var(--orange); text-decoration-thickness: 2px; text-underline-offset: 5px; }
.person-post { margin-top: .8rem; padding-top: .8rem; border-top: 1px solid var(--line); font-size: .95rem; color: var(--muted); }
.person-post a { color: var(--blue); font-weight: 600; }

/* ---------- Bunn ---------- */
footer.site { border-top: 1px solid var(--line); color: var(--muted); }
.foot { padding-block: 2.5rem; display: flex; align-items: center; gap: 1.5rem 3rem; flex-wrap: wrap; font-size: .95rem; }
.foot img { height: 26px; width: auto; }
.foot .copy { margin-left: auto; }

/* ---------- Inngang ved scroll ---------- */
html.js .inn { opacity: 0; transform: translateY(24px); transition: opacity .8s ease, transform .8s cubic-bezier(.2,.75,.2,1); }
html.js .inn.vis { opacity: 1; transform: none; }

/* ==========================================================================
   Responsivt
   ========================================================================== */
@media (max-width: 960px) {
  header.site nav { display: none; }
  header.site .knapp-liten { margin-left: auto; }
  .hero-grid, .bpa-grid, .bem-grid, .kontakt-grid { grid-template-columns: 1fr; }
  .buer { max-width: 520px; width: 100%; margin: 0 auto; }
  .bue-hoy { aspect-ratio: 4 / 3; max-width: 520px; }
  .praktisk-boks { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .sti { grid-template-columns: 1fr; gap: 2.4rem; }
  .sti-steg { display: grid; grid-template-columns: 60px 1fr; gap: 1.2rem; text-align: left; }
  .sti-bue { width: 60px; height: 66px; margin: 0; font-size: 1.5rem; }
  .sti-steg p { max-width: none; margin: 0; }
  .sti-h { display: none; }
  .sti-v { display: block; left: 8px; width: 44px; top: 33px; bottom: 33px; height: auto; }
}
@media (max-width: 640px) {
  :root { --head: 66px; }
  body { font-size: 1.04rem; }
  .brand img { height: 26px; }
  .hero h1 { font-size: clamp(2.6rem, 12vw, 3.3rem); }
  .foot .copy { margin-left: 0; }
}

/* ---------- Redusert bevegelse ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html.js .bue-stor, html.js .bue-liten, html.js .inn { opacity: 1; transform: none; }
  html.js .tenn-tekst .ord { color: var(--blue); }
  html.js .tenn-tekst .o .ord { color: var(--orange-ink); }
  html.js .sti-linje { clip-path: none; }
  html.js .sti-bue { opacity: 1; transform: none; }
}
