/* Test: «hodet som skrivebord». Lastes bare av index-hode.html. */
:root { --bg: #FFFFFF; }
html, body { background: #FFFFFF; }
.top { background: rgba(255, 255, 255, .82); }
.mobile-nav { background: #FFFFFF; }

.mind { position: relative; height: calc(100svh - 83px); min-height: 560px; max-height: 1100px; overflow: hidden; padding: 0; }
.mind-img { position: absolute; right: 0; bottom: 0; height: 84%; width: auto; max-width: none; -webkit-mask-image: linear-gradient(to right, transparent 0, #000 18%), linear-gradient(to bottom, transparent 0, #000 14%), linear-gradient(to top, transparent 0, #000 24%); -webkit-mask-composite: source-in, source-in; mask-image: linear-gradient(to right, transparent 0, #000 18%), linear-gradient(to bottom, transparent 0, #000 14%), linear-gradient(to top, transparent 0, #000 24%); mask-composite: intersect, intersect; }
.mind::before { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: radial-gradient(ellipse 58% 74% at 76% 44%, rgba(0, 0, 0, 0) 30%, rgba(0, 0, 0, .07) 64%, rgba(0, 0, 0, .2) 100%); -webkit-mask-image: linear-gradient(#000 58%, transparent 92%); mask-image: linear-gradient(#000 58%, transparent 92%); }
.mind::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 26%; background: linear-gradient(rgba(255, 255, 255, 0), #FFFFFF 92%); pointer-events: none; z-index: 1; }

/* Filer og mapper */
.mind-item { all: unset; position: absolute; z-index: 3; width: 92px; margin: -30px 0 0 -46px; display: flex; flex-direction: column; align-items: center; gap: 6px; cursor: pointer; text-decoration: none; transition: left .55s cubic-bezier(.6, 0, .25, 1), top .55s cubic-bezier(.6, 0, .25, 1), transform .55s cubic-bezier(.6, 0, .25, 1), opacity .22s ease .33s; }
.mind-item .ic { display: block; animation: drift var(--d, 7s) ease-in-out var(--dl, 0s) infinite alternate; }
@keyframes drift { from { transform: translate(0, 0) rotate(var(--r0, -2deg)) scale(var(--s, 1)); } to { transform: translate(var(--dx, 8px), var(--dy, -12px)) rotate(var(--r1, 3deg)) scale(var(--s, 1)); } }
.mind-item img { width: 60px; height: 60px; object-fit: cover; border-radius: 3px; box-shadow: 0 6px 18px rgba(28, 19, 16, .22); display: block; }
.mind-item svg { width: 62px; height: 52px; display: block; filter: drop-shadow(0 6px 12px rgba(28, 19, 16, .2)); }
.mind-item span { font: 500 10px/1.25 var(--sans); letter-spacing: .06em; text-transform: uppercase; text-align: center; color: var(--ink); text-shadow: 0 0 6px rgba(255, 255, 255, .9); max-width: 104px; }
.mind-item.in { transform: scale(.12); opacity: 0; pointer-events: none; }
.mind.open .mind-item { transition: left .8s cubic-bezier(.2, .8, .2, 1), top .8s cubic-bezier(.2, .8, .2, 1), transform .8s cubic-bezier(.2, .8, .2, 1), opacity .3s ease; }
.mind.open .mind-item .ic { animation: none; }
.mind-item:hover img, .mind-item:focus-visible img { outline: 2px solid #15120E; outline-offset: 2px; }

/* SNORRE-mappen i hodet */
.mind-brain { all: unset; position: absolute; z-index: 4; width: 110px; margin: -34px 0 0 -55px; display: flex; flex-direction: column; align-items: center; gap: 7px; cursor: pointer; transition: transform .25s cubic-bezier(.2, .8, .2, 1); }
.mind-brain svg { width: 76px; height: 64px; display: block; filter: drop-shadow(0 8px 16px rgba(28, 19, 16, .28)); }
.mind-brain span { font: 500 11px/1.2 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: #FFFFFF; text-shadow: 0 1px 3px rgba(21, 18, 14, .8); }
.mind-brain small { font: 400 10px/1 var(--sans); color: #FFFFFF; opacity: 0; transition: opacity .5s; text-shadow: 0 1px 2px rgba(28, 19, 16, .65); }
.mind.ready .mind-brain small { opacity: .9; }
.mind-brain.pop { transform: scale(1.14); }
.mind-brain:hover, .mind-brain:focus-visible { transform: scale(1.08); }

/* Tekst */
.mind-text { position: absolute; z-index: 2; left: max(20px, calc((100vw - 1104px) / 2)); bottom: 17%; max-width: 560px; }
.mind-text h1 { font-size: clamp(44px, 5.8vw, 82px); line-height: 1.02; letter-spacing: -.02em; min-height: 2.04em; white-space: nowrap; text-wrap: nowrap; }
.mind-text { max-width: 640px; }
.mind-text .caret { display: inline-block; width: 3px; height: .8em; margin-left: 4px; background: var(--ink); vertical-align: -.05em; animation: caret 1s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }
.mind-text .lead { font-size: 18px; line-height: 1.55; color: var(--muted); margin-top: 22px; max-width: 520px; }
.mind-text .cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; margin-top: 28px; }
.mind-text .price { font-size: 15px; color: var(--muted); }
.mind-text .kicker { display: flex; margin-bottom: 16px; }
.mind-text .kicker, .mind-text .lead, .mind-text .cta-row { opacity: 0; transform: translateY(8px); transition: opacity .7s ease, transform .7s ease; }
.mind.ready .mind-text .kicker, .mind.typed .mind-text .lead, .mind.typed .mind-text .cta-row { opacity: 1; transform: none; }
.mind.typed .mind-text .cta-row { transition-delay: .25s; }

/* Dokk */
.mind-dock { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 5; display: flex; align-items: flex-end; gap: 8px; padding: 8px 10px; background: rgba(255, 255, 255, .55); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); border: 1px solid rgba(21, 18, 14, .14); border-radius: 20px; }
.mind-dock a, .mind-dock i { position: relative; width: 44px; height: 44px; border-radius: 11px; display: grid; place-items: center; font-size: 23px; font-style: normal; text-decoration: none; background: linear-gradient(180deg, #FFFFFF, #E9E9EC); box-shadow: 0 2px 6px rgba(21, 18, 14, .22); transition: transform .18s ease; transform-origin: bottom center; }
.mind-dock a.d-mappe svg { width: 74%; height: auto; display: block; }
.mind-dock a:hover, .mind-dock a:focus-visible { transform: scale(1.25) translateY(-4px); }
.mind-dock a::after { content: attr(aria-label); position: absolute; bottom: 58px; left: 50%; transform: translateX(-50%); background: rgba(28, 19, 16, .85); color: #fff; font: 500 12px/1 var(--sans); padding: 6px 9px; border-radius: 6px; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .15s; }
.mind-dock a:hover::after, .mind-dock a:focus-visible::after { opacity: 1; }
.mind-dock .sep { width: 1px; height: 38px; background: rgba(28, 19, 16, .22); box-shadow: none; border-radius: 0; }

/* Hurtigvisning av video */
.ql { position: fixed; z-index: 80; left: 50%; top: 50%; transform: translate(-50%, -50%) scale(.96); width: min(340px, 84vw); background: #15120E; border-radius: 12px; overflow: hidden; box-shadow: 0 40px 120px rgba(0, 0, 0, .5); opacity: 0; transition: opacity .2s ease, transform .2s ease; }
.ql.on { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.ql-bar { height: 36px; display: flex; align-items: center; justify-content: center; position: relative; background: #15120E; color: #FFFFFF; font: 500 12px var(--sans); padding: 0 44px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ql-bar button { all: unset; position: absolute; left: 12px; top: 12px; width: 12px; height: 12px; border-radius: 50%; background: #FFFFFF; cursor: pointer; }
.ql video { display: block; width: 100%; max-height: 76svh; background: #000; }

#kunder { padding-top: 8px; }
#kunder .wrap { max-width: none; padding-left: 0; padding-right: 0; }
#kunder .logos { margin-top: 0; border-top: 0; -webkit-mask-image: none; mask-image: none; }

@media (max-width: 860px) {
  .mind-img { height: 60%; bottom: 33%; right: -14vw; }
  .mind::after { height: 52%; background: linear-gradient(rgba(255, 255, 255, 0), rgba(255, 255, 255, .94) 46%, #FFFFFF 80%); }
  .mind-text { left: 20px; right: 20px; bottom: 96px; }
  .mind-text { transition: opacity .3s ease; } .mind.open .mind-text { opacity: .12; pointer-events: none; }
  .mind-text .lead { font-size: 16px; margin-top: 14px; }
  .mind-text .cta-row { margin-top: 18px; }
  .mind-item { width: 78px; margin-left: -39px; } .mind-item img { width: 50px; height: 50px; } .mind-item svg { width: 52px; height: 44px; } .mind-item span { font-size: 9px; }
  .mind-dock { gap: 5px; padding: 6px 8px; } .mind-dock a, .mind-dock i { width: 36px; height: 36px; font-size: 19px; border-radius: 9px; }
}
@media (prefers-reduced-motion: reduce) { .mind-item, .mind-item .ic, .mind-text .caret { transition: none; animation: none; } }

/* Flere slags filer på skrivebordet */
.mind-item.deco { cursor: default; }
.mind-item .logo { width: 78px; height: 46px; display: grid; place-items: center; }
.mind-item .logo img { width: 78px; height: 44px; object-fit: contain; box-shadow: none; border-radius: 0; }
.mind-item .note { width: 50px; height: 62px; background: #fff; border-radius: 3px; box-shadow: 0 6px 18px rgba(28, 19, 16, .18); position: relative; overflow: hidden; }
.mind-item .note::before { content: ""; position: absolute; left: 8px; right: 8px; top: 12px; height: 34px; background: repeating-linear-gradient(#c9c2b8 0 2px, transparent 2px 8px); }
.mind-item .note::after { content: ""; position: absolute; right: 0; top: 0; border: 7px solid; border-color: #FFFFFF #FFFFFF #d8d2c9 #d8d2c9; }

/* Lydfiler og grafikkfiler */
.mind-item svg.aud { width: 58px; height: 58px; filter: drop-shadow(0 6px 12px rgba(28, 19, 16, .22)); }
.mind-item .gfx { width: 60px; height: 60px; border-radius: 4px; box-shadow: 0 6px 18px rgba(28, 19, 16, .2); }
.gfx.g1 { background: radial-gradient(circle at 50% 50%, #FFFFFF 0 22%, transparent 23%), #15120E; }
.gfx.g2 { background: linear-gradient(135deg, #EC762F 0 50%, #15120E 50%); }
.gfx.g3 { background: radial-gradient(circle at 30% 35%, #15120E 0 26%, transparent 27%), radial-gradient(circle at 68% 66%, #EC762F 0 30%, transparent 31%), #F3F1EE; }
.gfx.g4 { background: linear-gradient(90deg, #15120E 0 25%, #15120E 25% 50%, #EC762F 50% 75%, #F3F1EE 75%); }
.gfx.g5 { background: repeating-linear-gradient(0deg, #FFFFFF 0 5px, transparent 5px 13px) 12px 14px / 36px 32px no-repeat, #EC762F; }

/* Mørk topp: portrett med oransje sirkel på svart bakgrunn (media/hode-sol.jpg) */
.mind { background: #040203; color: #FFFFFF; --ink: #FFFFFF; --muted: rgba(255, 255, 255, .84); --line: rgba(255, 255, 255, .3); }
.mind::before, .mind::after { display: none; }
.mind-img { height: 100%; bottom: 0; -webkit-mask-image: linear-gradient(to right, transparent 0, #000 14%); -webkit-mask-composite: source-over; mask-image: linear-gradient(to right, transparent 0, #000 14%); mask-composite: add; }
.mind-text h1, .mind-text .cta-row { color: #FFFFFF; }
.mind-item span { color: #FFFFFF; text-shadow: 0 1px 3px rgba(0, 0, 0, .85); }
.mind-item .logo { background: #FFFFFF; border-radius: 8px; padding: 5px 7px; box-sizing: content-box; }
.mind-dock { background: rgba(255, 255, 255, .16); border-color: rgba(255, 255, 255, .28); }
.mind-dock .sep { background: rgba(255, 255, 255, .35); }
@media (max-width: 860px) {
  .mind-img { height: 58%; top: 0; bottom: auto; right: -6vw; -webkit-mask-image: linear-gradient(to top, transparent 0, #000 22%); mask-image: linear-gradient(to top, transparent 0, #000 22%); }
  .mind::after { display: block; height: 56%; background: linear-gradient(rgba(4, 2, 3, 0), rgba(4, 2, 3, .9) 30%, #040203 52%); }
}

/* Små knapper til landingssidene ved siden av «Book en prat» */
.mind-text .pill { display: inline-flex; align-items: center; padding: 13px 22px; border: 1px solid rgba(255, 255, 255, .45); border-radius: 999px; color: #FFFFFF; font: 500 16px/1.2 var(--sans); text-decoration: none; transition: background .2s ease, border-color .2s ease; }
.mind-text .pill:hover { background: rgba(255, 255, 255, .12); border-color: #FFFFFF; }
.mind-text .cta-row { gap: 12px; }
.mind-text .price { flex-basis: 100%; }

/* Snorre-mappen er litt mindre på mobil */
@media (max-width: 860px) {
  .mind-brain { width: 92px; margin: -27px 0 0 -46px; gap: 5px; }
  .mind-brain svg { width: 58px; height: 49px; }
  .mind-brain span { font-size: 10px; }
}

/* Toppen: loop av klipp foran den oransje sirkelen (i stedet for portrettet) */
.mind .mind-reel { right: max(5vw, calc((100vw - 1104px) / 2)); top: 50%; bottom: auto; transform: translateY(-50%); height: min(78%, 46vw); width: auto; aspect-ratio: 1; -webkit-mask-image: none; mask-image: none; }
.mind-reel .disc { position: absolute; inset: 0; border-radius: 50%; background: radial-gradient(circle at 50% 45%, #F79043 0%, #EC762F 58%, #C4561A 100%); box-shadow: 0 0 140px rgba(236, 118, 47, .35); }
.mind-reel .reel { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); height: 88%; aspect-ratio: 9 / 16; border-radius: 22px; overflow: hidden; background: #000; box-shadow: 0 26px 70px rgba(0, 0, 0, .6); }
.mind-reel video { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (max-width: 860px) {
  .mind .mind-reel { top: 3%; right: 50%; transform: translateX(50%); height: min(44%, 78vw); }
  .mind-reel .reel { border-radius: 16px; }
}

/* Snorre-mappen står ved siden av knappene i toppen: ikon med navn og hint til høyre */
.mind-brain { display: grid; grid-template-columns: 48px auto; gap: 0 10px; align-items: center; width: auto; margin: -21px 0 0 -24px; }
.mind-brain svg { width: 48px; height: 41px; grid-row: 1 / span 2; }
.mind-brain span { align-self: end; }
.mind-brain small { align-self: start; margin-top: 4px; }
@media (max-width: 860px) {
  .mind-brain { display: block; width: 44px; margin: -19px 0 0 -22px; }
  .mind-brain svg { width: 44px; height: 37px; }
  .mind-brain span, .mind-brain small { display: none; }
}
/* Når mappen er åpen, tones videoen ned så filene er lette å se */
.mind-reel { transition: opacity .35s ease; }
.mind.open .mind-reel { opacity: .22; }

/* Levende lys: hele toppen tar farge av klippet som spiller */
.mind-amb { position: absolute; left: -14%; top: -20%; width: 128%; height: 140%; z-index: 0; filter: blur(70px) saturate(2.1) brightness(.98); opacity: 0; transition: opacity 1.2s ease; pointer-events: none; }
.mind.lit .mind-amb { opacity: .95; }
.mind::before { display: block; -webkit-mask-image: none; mask-image: none; background: linear-gradient(90deg, rgba(4, 2, 3, .86) 0, rgba(4, 2, 3, .62) 36%, rgba(4, 2, 3, .14) 68%, rgba(4, 2, 3, .22) 100%); }
.mind .mind-reel { z-index: 2; }
.mind.open .mind-amb { opacity: .45; }
@media (max-width: 860px) {
  .mind::before { background: linear-gradient(180deg, rgba(4, 2, 3, .2) 0, rgba(4, 2, 3, .3) 38%, rgba(4, 2, 3, .82) 58%, rgba(4, 2, 3, .94) 100%); }
  .mind::after { display: none; }
  .mind-amb { filter: blur(48px) saturate(2.1) brightness(.98); }
}

/* Skrivebordet: oransje skrivebordsbakgrunn og tre åpne videovinduer (restaurant, treningssenter, event) */
.mind { background: radial-gradient(ellipse 60% 78% at 72% 46%, #F2853A 0, #DD6622 30%, #6A2A0B 62%, #0B0503 92%); }
.mind::before { display: block; -webkit-mask-image: none; mask-image: none; background: linear-gradient(90deg, rgba(4, 2, 3, .72) 0, rgba(4, 2, 3, .45) 34%, rgba(4, 2, 3, 0) 60%); }
.mind .mind-desk { z-index: 2; right: max(4vw, calc((100vw - 1104px) / 2)); top: 43%; bottom: auto; transform: translateY(-50%); height: min(72%, 37vw, 560px); width: auto; aspect-ratio: 1.02; -webkit-mask-image: none; mask-image: none; transition: opacity .35s ease; }
.mind.open .mind-desk { opacity: .2; }
.win { position: absolute; border-radius: 11px; overflow: hidden; background: #0d0b0a; box-shadow: 0 22px 54px rgba(0, 0, 0, .5), 0 0 0 1px rgba(255, 255, 255, .1); }
.win .bar { display: flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; background: #2A2725; }
.win .bar u { width: 9px; height: 9px; border-radius: 50%; background: #FF5F57; text-decoration: none; flex: none; }
.win .bar u:nth-child(2) { background: #FEBC2E; }
.win .bar u:nth-child(3) { background: #28C840; margin-right: 4px; }
.win .bar span { font: 500 11px/1 var(--sans); color: #D6D0C9; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.win video { display: block; width: 100%; aspect-ratio: 9 / 16; object-fit: cover; background: #000; }
.win.w1 { left: 0; top: 13%; width: 36%; }
.win.w2 { left: 30%; top: 0; width: 41%; z-index: 2; }
.win.w3 { right: 0; top: 27%; width: 34%; z-index: 3; }
@media (max-width: 860px) {
  .mind { background: radial-gradient(ellipse 95% 46% at 50% 26%, #F2853A 0, #DD6622 34%, #6A2A0B 66%, #0B0503 96%); }
  .mind::before { background: linear-gradient(180deg, rgba(4, 2, 3, 0) 40%, rgba(4, 2, 3, .78) 56%, rgba(4, 2, 3, .95) 100%); }
  .mind .mind-desk { top: 2%; right: 50%; transform: translateX(50%); height: min(41%, 80vw); }
  .win { border-radius: 8px; }
  .win .bar { height: 19px; padding: 0 7px; gap: 4px; }
  .win .bar u { width: 6px; height: 6px; }
  .win .bar span { font-size: 9px; }
}
/* Tekst og overskrift holdes smale nok til at de ikke går inn i vinduene */
section.mind .mind-text h1 { font-size: clamp(40px, 4.8vw, 68px); }
section.mind .mind-text .lead { max-width: 440px; }
@media (max-width: 860px) { section.mind .mind-text .lead { max-width: none; } }

/* Mappen står som et skrivebordsikon midt under videovinduene */
.mind-brain { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 120px; margin: -27px 0 0 -60px; }
.mind-brain svg { width: 64px; height: 54px; grid-row: auto; }
.mind-brain span, .mind-brain small { align-self: center; margin-top: 0; }
/* Vinduene ligger i mappen til filene er samlet, og spretter så opp ett og ett */
.mind-desk .win { transform: translate(var(--fx, 0px), var(--fy, 0px)) scale(.04); opacity: 0; transition: transform .8s cubic-bezier(.2, 1.15, .3, 1), opacity .25s ease; }
.mind.up .mind-desk .win { transform: none; opacity: 1; }
.mind.up .mind-desk .win.w2 { transition-delay: .14s; }
.mind.up .mind-desk .win.w3 { transition-delay: .28s; }
@media (prefers-reduced-motion: reduce) { .mind-desk .win { transition: none; } }
@media (max-width: 860px) {
  .mind-brain { display: flex; width: 96px; margin: -19px 0 0 -48px; gap: 4px; }
  .mind-brain svg { width: 46px; height: 39px; }
  .mind-brain span { display: block; font-size: 9px; }
  .mind-brain small { display: none; }
}

/* Mobil: toppen får nok høyde til at vinduene og teksten aldri går inn i hverandre, også på korte skjermer */
@media (max-width: 860px) {
  .mind { min-height: 840px; }
  .mind .mind-desk { height: min(38%, 76vw); }
}
@media (max-width: 430px) { .mind { min-height: 850px; } }

/* Etterordet som skrives inn under ingressen */
.mind-text .mind-ps { font-family: var(--serif); font-size: 19px; line-height: 1.25; color: #FFFFFF; margin: 14px 0 0; max-width: 440px; min-height: 2.5em; }
.mind-text .mind-ps .caret { width: 2px; height: .85em; margin-left: 3px; opacity: 0; }
.mind-text .mind-ps.on .caret { opacity: 1; }
.mind-text .mind-ps.done .caret { opacity: 0; transition: opacity .4s ease; }
@media (max-width: 860px) {
  .mind { min-height: 905px; }
  .mind-text .mind-ps { max-width: none; font-size: 18px; margin-top: 10px; }
}
@media (max-width: 430px) { .mind { min-height: 925px; } }
