/* Forsiden når man ikke er logget ind, og skærmene der står tændt rundt omkring (kiosk.js).
   Ydelse: skal køre jævnt på Intel UHD 630 i 1440p. Derfor INGEN backdrop-filter, blur eller store skygger,
   og det eneste der animeres er små elementer med transform og opacity. Kortet er et stillbillede (canvas). */
.kiosk { position: fixed; inset: 0; overflow: hidden; background: #0a1424; color: #e8eef8; }
.kiosk canvas#kchart, .kiosk .k-marks, .kiosk .k-shade { position: absolute; inset: 0; width: 100%; height: 100%; }
.kiosk .k-marks { pointer-events: none; }
/* mørk kant mod kolonnerne, så teksten kan læses uden blur */
.kiosk .k-shade { pointer-events: none; background: linear-gradient(90deg, rgba(7, 13, 24, .88) 0, rgba(7, 13, 24, .55) 30%, rgba(7, 13, 24, 0) 46%, rgba(7, 13, 24, 0) 62%, rgba(7, 13, 24, .6) 78%, rgba(7, 13, 24, .9) 100%); }

.k-ui { position: relative; z-index: 1; height: 100%; display: grid; grid-template-columns: minmax(340px, 420px) 1fr minmax(340px, 440px); gap: 32px; padding: clamp(24px, 3vw, 56px); transition: transform 2s ease; }
.k-left { grid-column: 1; display: flex; flex-direction: column; min-height: 0; }
.k-right { grid-column: 3; display: flex; flex-direction: column; gap: 14px; min-height: 0; overflow: hidden; }

.k-brand { display: flex; align-items: center; gap: 14px; }
.k-brand img { width: 44px; height: 44px; }
.k-brand b { display: block; font-size: 22px; letter-spacing: -.01em; }
.k-brand span { display: block; font-size: 13px; color: #94a3bd; }

.k-card { background: rgba(16, 24, 42, .92); border: 1px solid rgba(170, 195, 235, .13); border-radius: 18px; }
.k-signin { margin: auto 0; padding: 32px; }
.k-signin .k-dtu { color: #e8eef8; margin-bottom: 18px; }
.k-signin h1 { font-size: clamp(26px, 2.1vw, 36px); line-height: 1.12; letter-spacing: -.02em; margin: 0 0 10px; }
.k-signin p { color: #94a3bd; font-size: 15px; margin: 0 0 24px; }
.k-signin .btn-main { background: #7cc4ff; color: #06182c; }
.k-signin .links { margin-top: 14px; }
.k-signin .link-row { color: #cbd5e1; }
.k-signin .fine { color: #8091ab; }
.k-foot { margin-top: auto; padding-top: 16px; font-size: 13px; color: #8091ab; }

.k-clock { text-align: right; }
.k-time { font-size: clamp(64px, 6.4vw, 124px); font-weight: 300; line-height: .95; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.k-date { margin-top: 8px; display: flex; justify-content: flex-end; gap: 14px; font-size: 17px; color: #cbd5e1; }
.k-utc { color: #7cc4ff; font-variant-numeric: tabular-nums; }

.k-ships { display: flex; flex-direction: column; gap: 10px; }
.k-ship { padding: 14px 16px; border-left: 3px solid var(--c); }
.k-ship-h { display: flex; align-items: center; gap: 8px; }
.k-ship-h b { font-size: 18px; }
.k-ship-ic { color: var(--c); display: inline-flex; }
.k-ship-ic svg { width: 20px; height: 20px; }
.k-state { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: #94a3bd; }
.k-state.sea { color: #3ccf8e; }
.k-heard { margin-left: auto; font-size: 12px; color: #8091ab; display: inline-flex; align-items: center; gap: 6px; }
.k-ship-what { margin-top: 6px; font-size: 15px; color: #dbe4f0; }
.k-ship-sub { margin-top: 4px; font-size: 13px; color: #94a3bd; }
.k-bar { margin-top: 10px; height: 5px; border-radius: 3px; background: rgba(148, 163, 184, .18); overflow: hidden; }
.k-bar i { display: block; height: 100%; background: var(--c); border-radius: 3px; }
.k-pos { margin-top: 8px; font-size: 13px; color: #94a3bd; display: flex; align-items: center; gap: 6px; font-variant-numeric: tabular-nums; }
.k-pos svg { width: 15px; height: 15px; }

.k-next { padding: 14px 16px; }
.k-next h2, .k-photo figcaption span { margin: 0 0 8px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: #7cc4ff; }
.k-nrow { display: flex; align-items: center; gap: 12px; padding: 7px 0; }
.k-nrow + .k-nrow { border-top: 1px solid rgba(170, 195, 235, .09); }
.k-ndot { width: 9px; height: 9px; border-radius: 50%; background: var(--c); flex: none; }
.k-nt { flex: 1; min-width: 0; }
.k-nt b { display: block; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.k-nt span { font-size: 13px; color: #94a3bd; }
.k-nd { text-align: right; font-size: 12px; color: #94a3bd; }
.k-nd b { display: block; font-size: 20px; color: #e8eef8; font-variant-numeric: tabular-nums; }

.k-photo { margin: 0; overflow: hidden; display: flex; flex-direction: column; min-height: 120px; flex: 1 1 0; max-height: 360px; }
.k-ph { flex: 1; min-height: 0; overflow: hidden; background: #0d1a2c; }
.k-ph img { width: 100%; height: 100%; object-fit: cover; display: block; transition: opacity .6s ease; }
.k-ph img.out { opacity: 0; }
.k-photo figcaption { padding: 10px 16px 12px; }
.k-photo figcaption span { display: block; margin-bottom: 2px; }
.k-photo figcaption b { font-size: 15px; font-weight: 600; }

/* Skibene på kortet. Pulsen er kun transform + opacity på en lille cirkel. */
.k-mark { position: absolute; width: 0; height: 0; }
.k-dot, .k-pulse { position: absolute; left: -7px; top: -7px; width: 14px; height: 14px; border-radius: 50%; }
.k-dot { background: var(--c); border: 2px solid #0a1424; }
.k-pulse { border: 2px solid var(--c); animation: k-pulse 2.6s ease-out infinite; }
@keyframes k-pulse { from { transform: scale(1); opacity: .9; } to { transform: scale(4.2); opacity: 0; } }
.k-tag { position: absolute; left: 16px; top: -14px; white-space: nowrap; padding: 4px 9px; border-radius: 8px; background: rgba(7, 13, 24, .85); border: 1px solid rgba(170, 195, 235, .16); font-size: 12px; color: #cbd5e1; }
.k-tag b { display: block; color: var(--c); font-size: 12px; letter-spacing: .08em; }

/* Ren skærm (?display=1, kun logget ind): ingen fliser, venstre kolonne bliver smal */
.kiosk.display .k-ui, .kiosk.home.display .k-ui { grid-template-columns: minmax(260px, 340px) 1fr minmax(340px, 440px); }

@media (prefers-reduced-motion: reduce) { .k-pulse { animation: none; opacity: .5; transform: scale(2); } .k-ui { transition: none; } }

/* Mellemstore skærme: to kolonner, kortet bag det hele */
@media (max-width: 1100px) {
  .k-ui { grid-template-columns: 1fr 1fr; }
  .k-right { grid-column: 2; }
  .kiosk .k-shade { background: rgba(7, 13, 24, .55); }
}
/* Telefon: én kolonne der kan rulles, login først */
@media (max-width: 720px) {
  .kiosk { position: relative; min-height: 100vh; }
  .kiosk canvas#kchart, .kiosk .k-marks, .kiosk .k-shade { position: fixed; }
  .k-ui { display: flex; flex-direction: column; height: auto; padding: 20px; gap: 18px; }
  .k-left, .k-right { overflow: visible; }
  .k-signin { margin: 20px 0 0; padding: 24px; }
  .k-clock { text-align: left; order: -1; }
  .k-date { justify-content: flex-start; }
  .k-time { font-size: 64px; }
  .k-photo { max-height: 260px; min-height: 220px; }
  .k-foot { order: 9; }
}

/* Store skærme (1440p og op) ses ofte på afstand: alt i kolonnerne bliver større */
@media (min-width: 1900px) and (min-height: 1150px) { .k-ui { zoom: 1.2; } }
@media (min-width: 2400px) and (min-height: 1300px) { .k-ui { zoom: 1.4; } }

/* ---------- Startsiden når man er logget ind (samme kort, flisser i stedet for login) ---------- */
.kiosk.home .k-ui { grid-template-columns: minmax(460px, 640px) 1fr minmax(340px, 420px); }
.kiosk.home .k-shade { background: linear-gradient(90deg, rgba(7, 13, 24, .92) 0, rgba(7, 13, 24, .7) 34%, rgba(7, 13, 24, 0) 52%, rgba(7, 13, 24, 0) 64%, rgba(7, 13, 24, .6) 80%, rgba(7, 13, 24, .9) 100%); }
.kiosk.home .k-left { overflow-y: auto; scrollbar-width: none; }
.kiosk.home.display .k-ui { grid-template-columns: minmax(260px, 340px) 1fr minmax(340px, 440px); }
/* Logget ud: kun login, ur og fotos. Fotoet får lov at fylde mere, når skibene ikke står der */
.k-brand { position: relative; }
.k-me { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.k-me .avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: #1b2440; color: #7cc4ff; font-size: 13px; font-weight: 700; }
.k-who b { display: block; font-size: 14px; }
.k-who span { display: block; font-size: 12px; color: #94a3bd; }
.k-btn { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; color: #94a3bd; }
.k-btn:hover { background: rgba(124, 196, 255, .12); color: #e8eef8; }
.k-btn svg { width: 20px; height: 20px; }

.k-hello { margin: auto 0; padding: 24px 0; }
.k-hello h1 { font-size: clamp(34px, 3vw, 52px); line-height: 1.05; letter-spacing: -.025em; margin: 0 0 10px; }
.k-hello > p { color: #cbd5e1; font-size: 17px; margin: 0 0 26px; }
.k-apps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.k-tile { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px; border-radius: 16px; color: inherit; text-decoration: none;
  background: rgba(16, 24, 42, .92); border: 1px solid rgba(170, 195, 235, .13); border-top: 3px solid var(--c);
  transition: transform .15s ease, border-color .15s ease, background-color .15s ease; }
.k-tile:hover { transform: translateY(-2px); border-color: var(--c); background: rgba(22, 32, 54, .96); }
.k-tile:focus-visible { outline: 2px solid var(--c); outline-offset: 3px; }
.k-tile-h { display: flex; align-items: center; gap: 9px; }
.k-tile-h b { font-size: 16px; }
.k-tile-h em { font-style: normal; font-size: 11px; font-weight: 700; letter-spacing: .04em; color: #94a3bd; border: 1px solid rgba(170, 195, 235, .2); border-radius: 6px; padding: 1px 6px; white-space: nowrap; }
.k-tile-ic { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; color: var(--c); background: color-mix(in srgb, var(--c) 16%, transparent); flex: none; }
.k-tile-ic svg { width: 20px; height: 20px; }
.k-tile-go { margin-left: auto; color: #64728c; display: inline-flex; }
.k-tile-go svg { width: 17px; height: 17px; }
.k-tile:hover .k-tile-go { color: var(--c); }
.k-tile-n { font-size: 34px; font-weight: 700; letter-spacing: -.03em; line-height: 1.1; font-variant-numeric: tabular-nums; margin-top: 4px; }
.k-tile-n small { font-size: 14px; font-weight: 500; color: #94a3bd; margin-left: 6px; letter-spacing: 0; }
.k-tile.warn .k-tile-n { color: #ffb547; }
.k-tile.bad .k-tile-n { color: #ff6b6b; }
.k-tile-s { font-size: 13px; color: #94a3bd; display: flex; align-items: center; gap: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.k-note, .k-tip { display: flex; gap: 12px; align-items: flex-start; font-size: 13px; line-height: 1.5; color: #94a3bd; margin: 16px 0 0; }
.k-note svg, .k-tip svg { width: 17px; height: 17px; flex: none; margin-top: 1px; }
.k-tip { color: #64728c; }
@media (max-width: 1100px) { .kiosk.home .k-ui { grid-template-columns: 1.2fr 1fr; } }
@media (max-width: 720px) {
  .k-apps { grid-template-columns: 1fr 1fr; gap: 10px; }
  .k-tile { padding: 13px 14px; }
  .k-tile-n { font-size: 26px; }
  .k-who { display: none; }
  .k-hello { padding: 8px 0 0; }
}
@media (max-width: 420px) { .k-apps { grid-template-columns: 1fr; } }

/* ---------- Wow uden at koste: kun éngangs-animationer og små elementer ---------- */
.k-eyebrow { font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #7cc4ff; margin-bottom: 12px; }
.k-grad { background: linear-gradient(100deg, #e8eef8 0%, #7cc4ff 55%, #22d3ee 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.k-hello h1 { font-size: clamp(40px, 3.6vw, 64px); }
.k-tile { position: relative; overflow: hidden; }
/* Farvet lys i flisens hjørne ved hover (en lille gradient, ingen blur) */
.k-tile::after { content: ''; position: absolute; inset: auto -30% -60% auto; width: 70%; height: 120%; border-radius: 50%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--c) 22%, transparent), transparent); opacity: 0; transition: opacity .2s ease; pointer-events: none; }
.k-tile:hover::after { opacity: 1; }
.k-tile > * { position: relative; z-index: 1; }
.k-enter .k-hello > *, .k-enter .k-right > * { animation: k-up .7s cubic-bezier(.2, .7, .2, 1) both; }
.k-enter .k-hello h1 { animation-delay: .05s; }
.k-enter .k-hello > p { animation-delay: .12s; }
.k-enter .k-tile { animation: k-up .6s cubic-bezier(.2, .7, .2, 1) both; animation-delay: calc(.18s + var(--i) * .06s); }
.k-enter .k-apps { animation: none; }
.k-enter .k-right > :nth-child(2) { animation-delay: .1s; }
.k-enter .k-right > :nth-child(3) { animation-delay: .18s; }
.k-enter .k-right > :nth-child(4) { animation-delay: .26s; }
@keyframes k-up { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
/* Fotoet glider langsomt (Ken Burns): kun transform på ét lille billede */
.k-ph img { animation: k-burns 24s ease-in-out infinite alternate; transform-origin: 60% 40%; }
@keyframes k-burns { from { transform: scale(1); } to { transform: scale(1.08); } }
@media (prefers-reduced-motion: reduce) { .k-enter * { animation: none !important; } .k-ph img { animation: none; } }
