/* Bunkz AI Studio – Verkstedet. Farger og fart styres herfra. */
:root { --gold:#f3c877; --gold2:#c59a48; --night:#0d1a33; --deep:#050b1c; --ink:#fff7e8; --ease:cubic-bezier(.7,0,.15,1); --hopp:1.25s; }
* { box-sizing:border-box; margin:0; padding:0; }
html,body { height:100%; background:var(--night); color:var(--ink); overflow:hidden;
  font-family:"Avenir Next","Helvetica Neue",Arial,sans-serif; -webkit-font-smoothing:antialiased; }
.serif { font-family:"Baskerville","Hoefler Text","Iowan Old Style","Palatino",Georgia,serif; }
a { color:inherit; }

/* ---------- Rommet ---------- */
.view { position:fixed; inset:0; perspective:1600px; overflow:hidden; }
.room { position:absolute; left:50%; top:50%; width:max(100vw,177.78vh); aspect-ratio:16/9; display:block;
  translate:-50% -50%; transform-style:preserve-3d; will-change:transform; }
.room.hopp { transition:transform var(--hopp) var(--ease); }
.room.inne { transform:scale(5) !important; }
.room.borte { visibility:hidden; }  /* inne i en app-verden: rommet tegnes ikke */
.room .bg { position:absolute; inset:-3%; width:106%; height:106%; object-fit:cover; }
.lamp { position:absolute; inset:0; pointer-events:none; mix-blend-mode:screen;
  background:radial-gradient(ellipse 38% 46% at 50% 38%, #ffcf7d55, transparent 70%); animation:flicker 5s ease-in-out infinite; }
@keyframes flicker { 0%,100%{opacity:.75} 43%{opacity:1} 47%{opacity:.82} 52%{opacity:.98} }

/* ---------- Levende bilder på veggen ---------- */
.pic { position:absolute; top:19%; width:15%; aspect-ratio:4/5; display:block; text-decoration:none; outline:none;
  transform:translateZ(18px) rotate(var(--r)); transition:transform .5s var(--ease), filter .5s; }
.pic.mf { left:31%; --r:-1.2deg; }
.pic.bp { left:54%; --r:1deg; }
.pic::before { content:""; position:absolute; inset:-7%; border-radius:6px;
  background:linear-gradient(135deg,#fbe3a6 0%,#b98a3c 22%,#6e4a16 48%,#e6bd6c 74%,#8b6224 100%);
  box-shadow:0 30px 50px #04091aa8, 0 4px 0 #3a2508, inset 0 0 0 2px #fff3cf66, inset 0 0 14px #2b1a04; }
.pic::after { content:""; position:absolute; inset:-30%; z-index:-1; border-radius:50%;
  background:radial-gradient(closest-side,#ffd58a66,transparent); opacity:.55; transition:opacity .5s; animation:breathe 4s ease-in-out infinite; }
@keyframes breathe { 50% { scale:1.08; } }
.win { position:absolute; inset:0; overflow:hidden; border-radius:2px; box-shadow:inset 0 0 22px #000c, inset 0 0 0 1px #2b1a04; background:var(--night); }
.win img { position:absolute; left:-25%; top:-12%; width:150%; height:124%; object-fit:cover; will-change:transform; }
.win::after { content:""; position:absolute; inset:0; background:linear-gradient(115deg,#fff3 0%,transparent 28%,transparent 70%,#fff1 100%); }
.plate { position:absolute; left:50%; top:113%; translate:-50% 0; white-space:nowrap; padding:.35em 1.1em; border-radius:3px;
  font-size:clamp(11px,1.05vw,17px); letter-spacing:.22em; text-transform:uppercase; color:#2b1a04;
  background:linear-gradient(180deg,#f8dfa2,var(--gold2)); box-shadow:0 6px 14px #0008, inset 0 1px 0 #fff8; }
.pic:hover, .pic:focus-visible { transform:translateZ(60px) rotate(0deg) scale(1.06); filter:brightness(1.12); }
.pic:hover::after, .pic:focus-visible::after { opacity:1; }
.room.vis .pic { animation:vink 1.1s var(--ease) 2; }
.room.vis .pic.bp { animation-delay:.15s; }
@keyframes vink { 50% { transform:translateZ(70px) rotate(0deg) scale(1.09); filter:brightness(1.3); } }

/* Glasskula på benken: «Om Bunk» */
.spot { position:absolute; left:60%; top:58.5%; width:6%; aspect-ratio:1; border-radius:50%; text-decoration:none; transform:translateZ(30px); }
.spot::before { content:""; position:absolute; inset:-10%; border-radius:50%; border:1.5px solid #ffe2a0cc; box-shadow:0 0 26px #ffd58aaa, inset 0 0 18px #ffd58a66; animation:ring 2.6s ease-out infinite; }
@keyframes ring { 0% { scale:.7; opacity:0; } 30% { opacity:1; } 100% { scale:1.35; opacity:0; } }
.spot span { position:absolute; left:50%; top:112%; translate:-50% 0; white-space:nowrap; font-size:clamp(10px,.85vw,14px); letter-spacing:.2em; text-transform:uppercase;
  color:var(--gold); text-shadow:0 2px 10px #000; opacity:0; transition:opacity .3s; }
.spot:hover span, .spot:focus-visible span { opacity:1; }

/* ---------- Tekst over rommet ---------- */
.shade { position:fixed; inset:0; z-index:5; pointer-events:none; transition:opacity .8s;
  background:linear-gradient(180deg,#050b1c88 0%,transparent 22%,transparent 55%,#050b1cd0 100%), radial-gradient(ellipse at 50% 45%,transparent 45%,#050b1c99 100%); }
.ui { position:fixed; inset:0; z-index:10; pointer-events:none; transition:opacity .6s; }
.ui a, .ui button { pointer-events:auto; }
.brand { position:absolute; left:40px; top:24px; display:flex; align-items:center; gap:12px; text-decoration:none; font-size:13px; letter-spacing:.34em; text-transform:uppercase; }
.brand img { width:38px; height:38px; border-radius:50%; object-fit:cover; box-shadow:0 0 0 1px #f3c87788, 0 0 18px #f3c87755; }
.brand b { color:var(--gold); font-weight:600; }
.menu { position:absolute; right:40px; top:30px; display:flex; align-items:center; gap:26px; font-size:13px; letter-spacing:.14em; text-transform:uppercase; }
.menu a { text-decoration:none; opacity:.85; }
.menu a:hover { color:var(--gold); opacity:1; }
.menu button { background:none; color:inherit; font:inherit; letter-spacing:inherit; border:1px solid #fff7e866; border-radius:999px; padding:6px 14px; cursor:pointer; }
.menu button:hover { border-color:var(--gold); color:var(--gold); }
.intro { position:absolute; left:40px; bottom:64px; max-width:min(520px,calc(100vw - 80px)); text-shadow:0 2px 24px #050b1ccc; }
.intro h1 { font-weight:400; font-size:clamp(32px,4.6vw,68px); line-height:1.02; letter-spacing:-.01em; }
.intro h1 i { color:var(--gold); }
.intro p { margin-top:14px; font-size:clamp(15px,1.3vw,17px); line-height:1.55; opacity:.9; }
.intro .linje2 { margin-top:8px; font-style:italic; font-size:clamp(17px,1.5vw,20px); color:var(--gold); opacity:1; }
.hint { position:absolute; right:40px; bottom:68px; font-size:12px; letter-spacing:.26em; text-transform:uppercase; color:var(--gold); animation:pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity:.35; } }
.legal { position:absolute; left:40px; right:40px; bottom:18px; font-size:11px; letter-spacing:.08em; opacity:.6; }
.legal a { text-decoration:none; }
body.in .ui, body.in .shade { opacity:0; }
body.in .ui a, body.in .ui button { pointer-events:none; }

/* ---------- Portalen ---------- */
/* Bildet dekker alltid hele skjermen og flyttes bare med transform og clip-path – lett for skjermkortet, også i 4K. */
.portal { position:fixed; inset:0; z-index:20; overflow:hidden; background:var(--night); transform-origin:0 0; will-change:transform,clip-path; }
.portal.hopp { transition:transform var(--hopp) var(--ease), clip-path var(--hopp) var(--ease), opacity .6s; }
.portal.lander { transition:opacity .3s ease-out; }
.portal img { position:absolute; inset:-4%; width:108%; height:108%; object-fit:cover; animation:drift 26s ease-in-out infinite alternate; }
@keyframes drift { to { scale:1.12; translate:-1.5% -1%; } }
.flash { position:fixed; inset:0; z-index:25; pointer-events:none; opacity:0;
  background:radial-gradient(circle at var(--fx,50%) var(--fy,50%),#fff6d8,#ffd58a 30%,transparent 70%); }
.flash.go { animation:flash var(--hopp) ease-out; }
@keyframes flash { 35% { opacity:.85; } 100% { opacity:0; } }

/* ---------- Verdenen bak bildet (produktsiden) ---------- */
.world { position:fixed; inset:0; z-index:30; overflow-y:auto; overscroll-behavior:contain; visibility:hidden; opacity:0; transition:opacity .3s, visibility 0s .3s; }
.world:not(.on) .more, .world:not(.on) .back { backdrop-filter:none; }  /* ingen tung uskarphet mens vi flyr ut */
.world.on { visibility:visible; opacity:1; transition:opacity .7s .5s; }
.back { position:fixed; left:40px; top:26px; z-index:2; text-decoration:none; border:1px solid #fff7e866; border-radius:999px; padding:10px 20px; font-size:13px; letter-spacing:.12em; backdrop-filter:blur(8px); background:#050b1c55; }
.back:hover { border-color:var(--gold); color:var(--gold); }
.hero { position:relative; min-height:100vh; min-height:100svh; display:flex; align-items:center;
  background:linear-gradient(90deg,#050b1ce0 0%,#050b1c88 38%,transparent 70%), linear-gradient(0deg,#050b1ccc,transparent 40%); }
.box { margin-left:7vw; max-width:min(540px,86vw); }
.k { font-size:12px; letter-spacing:.3em; text-transform:uppercase; color:var(--gold); }
.box h2 { font-weight:400; font-size:clamp(54px,8vw,128px); line-height:.95; margin-top:14px; letter-spacing:-.02em; }
.box p { margin-top:22px; font-size:clamp(17px,1.5vw,19px); line-height:1.55; opacity:.92; }
.badge { display:inline-flex; margin-top:30px; padding:14px 26px; border-radius:999px; font-size:13px; letter-spacing:.16em; text-transform:uppercase;
  color:#2b1a04; background:linear-gradient(180deg,#f8dfa2,var(--gold2)); box-shadow:0 14px 34px #0007, inset 0 1px 0 #fff8; }
.ned { position:absolute; left:50%; bottom:26px; translate:-50% 0; font-size:11px; letter-spacing:.3em; text-transform:uppercase; opacity:.7; animation:pulse 2.4s ease-in-out infinite; }
.box > * { opacity:0; translate:0 26px; transition:opacity .8s, translate .8s var(--ease); }
.world.on .box > * { opacity:1; translate:0 0; }
.world.on .box > :nth-child(1){transition-delay:.7s} .world.on .box > :nth-child(2){transition-delay:.82s}
.world.on .box > :nth-child(3){transition-delay:.94s} .world.on .box > :nth-child(4){transition-delay:1.06s}
.more { position:relative; padding:70px 7vw 40px; background:linear-gradient(180deg,#050b1ccc,#070e1ff2 30%); backdrop-filter:blur(14px); }
.cards { display:grid; grid-template-columns:repeat(auto-fit,minmax(240px,1fr)); gap:20px; max-width:1100px; }
.card { padding:28px; border-radius:18px; border:1px solid #f3c87740; background:linear-gradient(160deg,#ffffff12,#ffffff05); }
.card h3 { font-family:"Baskerville","Hoefler Text",Georgia,serif; font-weight:400; font-size:26px; color:var(--gold); }
.card p { margin-top:10px; line-height:1.6; opacity:.9; }
.links { display:flex; flex-wrap:wrap; gap:14px 30px; margin-top:44px; font-size:14px; letter-spacing:.06em; }
.links a { color:var(--gold); }
.fot { margin-top:30px; font-size:12px; opacity:.6; }

/* ---------- Om Bunk: et ark som glir opp fra benken ---------- */
.om { position:fixed; inset:0; z-index:35; display:grid; place-items:center; padding:20px; background:#050b1caa; backdrop-filter:blur(6px);
  visibility:hidden; opacity:0; transition:opacity .5s, visibility 0s .5s; }
.om.on { visibility:visible; opacity:1; transition:opacity .5s; }
.ark { position:relative; width:min(620px,100%); max-height:calc(100vh - 40px); overflow-y:auto; padding:44px 46px; border-radius:6px; color:#2b1a04;
  background:linear-gradient(170deg,#fbf1d9,#ecd9ae); box-shadow:0 40px 90px #000b, inset 0 0 60px #b98a3c33;
  transform:translateY(60px) rotate(-1.5deg); transition:transform .7s var(--ease); }
.om.on .ark { transform:translateY(0) rotate(-.6deg); }
.ark .k { color:#8b6224; }
.ark h2 { font-weight:400; font-size:clamp(34px,5vw,52px); line-height:1.05; margin:10px 0 18px; }
.ark p { line-height:1.65; margin-bottom:14px; font-size:17px; }
.ark .kontakt { margin-top:24px; padding-top:18px; border-top:1px solid #8b622455; font-size:14px; }
.ark a { color:#6e4a16; }
.portrett { float:right; width:120px; height:120px; margin:0 0 14px 20px; border-radius:50%; object-fit:cover; box-shadow:0 10px 24px #2b1a0466, 0 0 0 4px #fbf1d9, 0 0 0 5px #b98a3c; }
.lukk { position:absolute; right:16px; top:10px; font-size:30px; text-decoration:none; line-height:1; padding:6px 10px; }

canvas#dust { position:fixed; inset:0; z-index:40; width:100%; height:100%; pointer-events:none; mix-blend-mode:screen; }
.noscript { position:fixed; inset:0; z-index:99; display:grid; place-content:center; gap:14px; padding:30px; text-align:center; background:var(--night); }

/* ---------- Mobil (stående) ---------- */
@media (orientation:portrait) {
  .pic { width:10.6%; top:15%; }
  .pic.mf { left:38.4%; } .pic.bp { left:51%; }
  .plate { font-size:10px; letter-spacing:.12em; padding:.3em .7em; }
  .spot { display:none; }
  .brand { left:18px; top:18px; letter-spacing:.2em; font-size:11px; } .brand img { width:30px; height:30px; }
  .menu { right:16px; top:20px; gap:14px; font-size:11px; } #visProdukter { display:none; }
  .intro { left:20px; bottom:74px; max-width:calc(100vw - 40px); }
  .hint { right:auto; left:20px; bottom:46px; }
  .legal { left:20px; right:20px; bottom:14px; font-size:10px; }
  .back { left:16px; top:16px; }
  .hero { align-items:flex-end; padding-bottom:90px; background:linear-gradient(0deg,#050b1cf0 0%,#050b1c99 45%,transparent 75%); }
  .ark { padding:34px 26px; } .portrett { width:84px; height:84px; }
}
@media (prefers-reduced-motion:reduce) {
  :root { --hopp:.01s; }
  *, *::before, *::after { animation:none !important; }
}

/* ---------- Firmanavnet, i samme stil som banneret ---------- */
.firma { font-family:"Montserrat","Avenir Next","Century Gothic","Segoe UI",Arial,sans-serif; font-weight:500; text-transform:uppercase; letter-spacing:.24em; font-size:inherit; text-decoration:none; }
.legal, .fot, .kontakt { display:flex; flex-wrap:wrap; align-items:baseline; gap:6px 26px; font-size:12px; opacity:.9; }
.ark .kontakt { color:#2b1a04; opacity:1; }
a.firma:hover { color:var(--gold); }
.ark a.firma { color:inherit; }
.ark a.firma:hover { color:#8b6224; }
@media (orientation:portrait) { .legal { gap:2px 14px; font-size:9px; } .ark .kontakt { font-size:10px; } }

/* ---------- Om meg: oppbygging av arket ---------- */
.ark { width:min(700px,100%); padding:48px 54px 40px; }
.hode { display:flex; align-items:center; gap:26px; margin-bottom:26px; padding-bottom:26px; border-bottom:1px solid #8b622455; }
.portrett { float:none; flex:none; width:132px; height:132px; margin:0; }
.ark h2 { margin:8px 0 0; }
.ark p { font-size:17px; line-height:1.7; margin-bottom:16px; max-width:58ch; }
.ark .lead { font-size:clamp(22px,2.6vw,27px); line-height:1.3; margin-bottom:18px; color:#2b1a04; }
.ark blockquote { margin:26px 0; padding:4px 0 4px 22px; border-left:3px solid #b98a3c; font-style:italic; font-size:clamp(20px,2.3vw,24px); line-height:1.4; color:#5a3d12; max-width:30em; }
.ark h3 { margin:0 0 8px; font-size:12px; letter-spacing:.28em; text-transform:uppercase; color:#8b6224; font-weight:600; }
.ark .kontakt { margin-top:30px; max-width:none; }
@media (orientation:portrait) { .ark { padding:36px 26px 30px; } .hode { gap:16px; } .portrett { width:84px; height:84px; } }

/* ---------- Skiltet under bildet: type-merke og hjelpetekst ---------- */
.plate { display:flex; align-items:center; gap:.7em; }
.merke { font-family:"Avenir Next","Helvetica Neue",Arial,sans-serif; font-weight:700; font-size:.62em; letter-spacing:.16em; padding:.25em .6em; border-radius:999px; color:#fbe9bd; background:#2b1a04; }
.tips { position:absolute; left:50%; top:132%; translate:-50% 8px; width:170%; padding:12px 16px; border-radius:12px; text-align:center;
  font-size:clamp(12px,1vw,15px); line-height:1.45; color:var(--ink); background:#0b142bee; border:1px solid #f3c87788; box-shadow:0 18px 40px #000a;
  opacity:0; pointer-events:none; transition:opacity .3s, translate .3s var(--ease); }
.tips::before { content:""; position:absolute; left:50%; top:-6px; width:10px; height:10px; translate:-50% 0; rotate:45deg; background:#0b142b; border-left:1px solid #f3c87788; border-top:1px solid #f3c87788; }
.pic:hover .tips, .pic:focus-visible .tips { opacity:1; translate:-50% 0; }
@media (hover:none) { .tips { display:none; } }

/* ---------- Filmer på app-siden ---------- */
.film { max-width:1100px; margin-top:54px; display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,460px),1fr)); gap:26px; }
.film:empty { display:none; }
.film .k { grid-column:1/-1; }
.film figure { margin:0; }
.film figure:first-of-type:last-of-type { grid-column:1/-1; }
.film video { display:block; width:100%; aspect-ratio:16/9; border-radius:14px; background:#000; border:1px solid #f3c87766;
  box-shadow:0 0 0 5px #0b142b, 0 0 0 6px #c59a4866, 0 30px 70px #000a; }
.film figcaption { margin-top:14px; font-family:"Baskerville","Hoefler Text",Georgia,serif; font-size:22px; color:var(--gold); }
