/* hveruke.no. Same look as Napp (nettside/public/style.css): its colours, fonts and poster hues (--h, set per door).
   Each .luke is a square cell: .dor is the toggle button covering it, .blad the flap that swings open, .bak what is behind. */
@font-face { font-family: "Bricolage Grotesque"; src: url(fonts/bricolage.woff2) format("woff2"); font-weight: 200 800; font-display: swap }
@font-face { font-family: Inter; src: url(fonts/inter.woff2) format("woff2"); font-weight: 100 900; font-display: swap }
:root {
  --bg: #f3f5fb; --surface: #ffffff; --fg: #10162b; --muted: #566080; --line: #dfe4f0;
  --accent: #2b44e0; --sun: #ffcf3d;
  --shadow: 0 1px 2px rgba(16, 22, 43, .06), 0 10px 24px rgba(16, 22, 43, .12);
  --display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --body: Inter, "Segoe UI", system-ui, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root {
  --bg: #0c1122; --surface: #171e36; --fg: #f0f3fb; --muted: #9aa6c4; --line: #283154;
  --accent: #8fa2ff; --sun: #ffd65a;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 24px rgba(0, 0, 0, .45); color-scheme: dark } }

*, *::before, *::after { box-sizing: border-box }
body { margin: 0; color: var(--fg); font: 15px/1.5 var(--body); overflow-x: hidden;
  background:
    radial-gradient(60rem 30rem at 90% -10%, color-mix(in srgb, var(--accent) 15%, transparent), transparent 60%),
    radial-gradient(42rem 26rem at -10% 105%, color-mix(in srgb, var(--sun) 18%, transparent), transparent 60%),
    var(--bg);
  background-attachment: fixed }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none }
a { color: var(--accent); font-weight: 600; text-decoration: none }
a:hover { text-decoration: underline }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px }

.app { max-width: 920px; margin: 0 auto; display: flex; flex-direction: column; gap: 22px;
  padding: 18px max(16px, env(safe-area-inset-right, 0px)) 48px max(16px, env(safe-area-inset-left, 0px)) }
header { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap }
h1 { font: 800 28px/1 var(--display); margin: 0; letter-spacing: -.03em; display: flex; align-items: center }
h1::before { content: ""; width: 20px; height: 26px; border-radius: 6px; background: var(--accent); transform: rotate(-10deg); margin-right: 14px;
  box-shadow: 7px 3px 0 -1px var(--sun) }
h1 span { color: var(--accent) }
.note { margin: 0; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted) }
.hero { display: flex; flex-direction: column; gap: 10px }
.hero h2 { font: 800 clamp(38px, 9vw, 60px)/.98 var(--display); margin: 0; letter-spacing: -.025em; text-wrap: balance }
.hero h2 em { font-style: normal; text-decoration: underline; text-decoration-color: var(--sun); text-decoration-thickness: .16em; text-underline-offset: .08em }
.hero p { margin: 0; color: var(--muted); font-size: 16px; max-width: 40ch }

#luker { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)) }
.luke { position: relative; aspect-ratio: 1; perspective: 800px }
.dor { position: absolute; inset: 0; z-index: 1; padding: 0; border-radius: 20px }
.blad { position: absolute; inset: 0; border-radius: 20px; padding: 14px 16px; display: flex; flex-direction: column; justify-content: space-between;
  text-align: left; color: #fff; background: hsl(var(--h) 62% 44%); box-shadow: var(--shadow);
  background-image: radial-gradient(circle at 100% 0, hsl(calc(var(--h) + 40) 80% 60% / .55), transparent 55%);
  transform-origin: left; transition: transform .5s cubic-bezier(.3, .7, .2, 1), opacity .5s }
.blad b { font: 800 clamp(44px, 14vw, 60px)/1 var(--display); letter-spacing: -.04em }
.blad small { font-size: 13px; font-weight: 500; color: rgb(255 255 255 / .9) }
@media (hover: hover) { .dor:hover:not(:disabled) .blad { transform: rotateY(-14deg) } }
.dor[aria-expanded="true"] .blad, .dor[aria-expanded="true"]:hover .blad { transform: rotateY(-108deg); opacity: .5 }
.now .blad { box-shadow: 0 0 0 4px var(--bg), 0 0 0 7px var(--sun), var(--shadow) }

.dor:disabled { cursor: default }
.locked .blad { color: var(--muted); background: none; box-shadow: none; border: 2px dashed var(--line) }
.locked .blad b { opacity: .55 }
.locked .blad small { color: inherit }

.bak { position: absolute; inset: 0; border-radius: 20px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line);
  box-shadow: inset 0 3px 10px rgba(16, 22, 43, .12); display: flex; flex-direction: column; gap: 4px; overflow: hidden }
.bak[inert] { visibility: hidden; transition: visibility 0s .4s }
.bak h3 { font: 800 19px/1.1 var(--display); margin: 0; letter-spacing: -.02em; color: color-mix(in srgb, hsl(var(--h) 62% 44%) 70%, var(--fg)) }
.bak p { margin: 0; font-size: 12.5px; line-height: 1.35; color: var(--muted); flex: 1; min-height: 0; overflow: hidden;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; line-clamp: 4 }
.bak .tom { display: grid; place-items: center; text-align: center }
/* The link sits above the door button so it stays clickable; a click anywhere else in the cell closes the door. */
.bak a { position: relative; z-index: 2; align-self: flex-start; font-size: 13px; padding: 4px 12px; border-radius: 999px;
  background: var(--accent); color: var(--surface) }

@media (max-width: 360px) { #luker { grid-template-columns: repeat(2, 1fr) } }
@media (prefers-reduced-motion: reduce) { .blad { transition: none } }
