/* =============================================================================
   Sjølappen Nettkurs — Platform Cinematic Layer
   -----------------------------------------------------------------------------
   Lastes ETTER `kurs.css` (og evt. gamification.css / ai-instruktor.css).
   Gir hele plattformen samme cinematiske følelse som modul-sidene:
     • Glassmorphism frosted nav + cards
     • Cinematic gradient backgrounds + radial light spots
     • Brand-typografi (Source Serif headlines)
     • Smooth scroll-fade IntersectionObserver-pattern (.cin-fade)
     • Modul-kort med ekte hero-bilde som bakgrunn + gradient overlay
     • Hover-microinteractions (lift, scale, shimmer)
     • Tilgjengelig: respekterer prefers-reduced-motion
   =========================================================================== */

/* ----- 0 / Tokens-tillegg ----- */
:root {
  --cin-glass-bg:        rgba(255, 253, 247, 0.78);
  --cin-glass-border:    rgba(13, 33, 55, 0.08);
  --cin-glass-shadow:    0 18px 40px rgba(13, 33, 55, 0.10), 0 4px 12px rgba(13, 33, 55, 0.06);
  --cin-gradient-gold:   linear-gradient(135deg, #FFD93D 0%, #FFB347 60%, #E89B2C 100%);
  --cin-gradient-teal:   linear-gradient(135deg, #4ECDC4 0%, #2a9d8f 60%, #1f7268 100%);
  --cin-gradient-coral:  linear-gradient(135deg, #FF8A8A 0%, #FF6B6B 60%, #E63946 100%);
  --cin-gradient-plum:   linear-gradient(135deg, #4ECDC4 0%, #2a9d8f 60%, #1f7268 100%); /* var lilla (off-brand) — nå teal */
  --cin-gradient-sky:    linear-gradient(135deg, #A4D4F2 0%, #7CB6E0 60%, #4F8AB5 100%);
  --cin-gradient-navy:   linear-gradient(160deg, #1e4a73 0%, #163350 50%, #0d2137 100%);
  --cin-bg-warm:         radial-gradient(ellipse 1400px 900px at 20% -10%, #FFF5E0 0%, transparent 60%),
                         radial-gradient(ellipse 1100px 700px at 100% 100%, #E8F4F2 0%, transparent 55%),
                         linear-gradient(180deg, #FFFDF7 0%, #F8F3E8 100%);
  --cin-bg-deep:         radial-gradient(ellipse 1200px 800px at 30% 0%, #1e4a73 0%, transparent 60%),
                         radial-gradient(ellipse 900px 600px at 100% 100%, #0d2137 0%, transparent 50%),
                         linear-gradient(180deg, #163350 0%, #0d2137 100%);
}

/* ----- 1 / Body backgrounds per page-class ----- */
body.page-dashboard,
body.page-profil,
body.page-leaderboard,
body.page-premier,
body.page-pakker,
body.page-daglig,
body.page-duell,
body.page-eksamen,
body.page-sertifikat,
body.page-ai-instruktor,
body.page-kurs-index,
body.page-login,
body.page-registrer,
body.page-glemt-passord {
  background: var(--cin-bg-warm) fixed;
  min-height: 100vh;
  min-height: 100dvh;
}

/* ----- 2 / Frosted sticky header ----- */
body.page-dashboard .k-header,
body.page-profil .k-header,
body.page-leaderboard .k-header,
body.page-premier .k-header,
body.page-pakker .k-header,
body.page-daglig .k-header,
body.page-duell .k-header,
body.page-eksamen .k-header,
body.page-ai-instruktor .k-header,
body.page-kurs-index .k-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--cin-glass-bg);
  backdrop-filter: blur(18px) saturate(180%);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  border-bottom: 1px solid var(--cin-glass-border);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.6) inset, 0 4px 14px rgba(13, 33, 55, 0.04);
  transition: box-shadow 0.3s ease;
}

.k-header__inner { padding-top: 14px; padding-bottom: 14px; }

.k-logo {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 600;
  letter-spacing: -0.01em;
}

/* ----- 3 / Scroll-fade primitive ----- */
.cin-fade {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.cin-fade.is-visible {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .cin-fade { opacity: 1; transform: none; transition: none; }
}

/* ----- 4 / Cinematic hero (dash-welcome variant) ----- */
.dash-welcome.cin-hero,
.cin-hero {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  padding: clamp(28px, 5vw, 56px);
  /* Lys editorial (brand): krem-fallback + bildet naturlig, ingen mørkt overlay */
  background: linear-gradient(135deg, #FFF6E9 0%, #FCEEDD 100%);
  color: var(--navy);
  box-shadow: 0 22px 60px rgba(13, 33, 55, 0.12), 0 6px 18px rgba(13, 33, 55, 0.08);
  margin-bottom: 36px;
  isolation: isolate;
}
.cin-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url('img/fjord-vista.jpg');
  background-size: cover;
  background-position: center 30%;
  opacity: 1;
  z-index: -1;
}
/* Mykt lyst slør nederst-venstre der teksten ligger — holder editorial lyst,
   ikke et mørkt overlay (brand). */
.cin-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, rgba(255,250,243,0.92) 0%, rgba(255,250,243,0.62) 40%, rgba(255,250,243,0) 72%);
  z-index: -1;
}
.cin-hero h1 {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 700;
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--navy);
  margin: 0 0 12px;
  text-shadow: 0 2px 16px rgba(255, 250, 243, 0.85);
}
.cin-hero h1 span { color: var(--coral-dark); }
.cin-hero .cin-hero__lede,
.cin-hero .dash-welcome__lede {
  color: var(--navy);
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  line-height: 1.55;
  max-width: 56ch;
  margin: 0;
  text-shadow: 0 1px 10px rgba(255, 250, 243, 0.9);
}
.cin-hero .dash-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 28px;
}
.cin-hero .dash-stat {
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(13, 33, 55, 0.08);
  border-radius: 16px;
  padding: 16px 14px;
  text-align: left;
  box-shadow: 0 6px 18px rgba(13, 33, 55, 0.08);
  transition: transform 0.3s var(--bounce), background 0.3s ease;
}
.cin-hero .dash-stat:hover {
  transform: translateY(-3px);
  background: rgba(255, 255, 255, 0.96);
}
.cin-hero .dash-stat__num {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  color: var(--coral-dark);
  line-height: 1.05;
  margin-bottom: 4px;
}
.cin-hero .dash-stat__label {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: rgba(13, 33, 55, 0.70);
}

/* ----- 5 / Quick actions — elevated tiles ----- */
.dash-actions.cin-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
  gap: 16px;
  margin-bottom: 44px;
}
.dash-actions.cin-actions .dash-action {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  border-radius: 18px;
  background: var(--surface);
  border: 1px solid var(--cin-glass-border);
  box-shadow: var(--shadow-card);
  text-decoration: none;
  color: var(--ink);
  transition: transform 0.3s var(--bounce), box-shadow 0.3s ease, border-color 0.3s ease;
  overflow: hidden;
}
.dash-actions.cin-actions .dash-action::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.3s ease;
  background: linear-gradient(135deg, transparent 0%, rgba(255, 217, 61, 0.06) 100%);
  pointer-events: none;
}
.dash-actions.cin-actions .dash-action:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-pop);
  border-color: rgba(255, 179, 71, 0.4);
}
.dash-actions.cin-actions .dash-action:hover::before { opacity: 1; }

.dash-actions.cin-actions .dash-action__icon {
  width: 48px; height: 48px;
  border-radius: 14px;
  display: grid; place-items: center;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 6px 14px rgba(13, 33, 55, 0.15);
}
.dash-action--coral .dash-action__icon { background: var(--cin-gradient-coral); }
.dash-action--gold  .dash-action__icon { background: var(--cin-gradient-gold); color: var(--navy); }
.dash-action--mint  .dash-action__icon { background: var(--cin-gradient-teal); }
.dash-action--plum  .dash-action__icon { background: var(--cin-gradient-plum); }
.dash-action--sky   .dash-action__icon { background: var(--cin-gradient-sky); }

.dash-actions.cin-actions .dash-action__title {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 2px;
}
.dash-actions.cin-actions .dash-action__sub {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ----- 6 / Modul cards — full cinematic ----- */
.dash-modules .dash-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}
.dash-modules h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 600;
  font-size: clamp(1.6rem, 3.2vw, 2.2rem);
  margin: 0;
  letter-spacing: -0.01em;
}
.dash-section-sub {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}

.modul-grid.cin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr));
  gap: 20px;
}

.modul-card.cin-card {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: 22px;
  overflow: hidden;
  background: var(--navy);
  color: #fff;
  text-decoration: none;
  box-shadow: 0 10px 28px rgba(13, 33, 55, 0.18), 0 2px 8px rgba(13, 33, 55, 0.10);
  transition: transform 0.4s var(--bounce), box-shadow 0.3s ease;
  isolation: isolate;
  min-height: 260px;
}
.modul-card.cin-card:hover {
  transform: translateY(-6px) scale(1.01);
  box-shadow: 0 22px 50px rgba(13, 33, 55, 0.28), 0 6px 18px rgba(13, 33, 55, 0.14);
}
.modul-card.cin-card .cin-card__bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  background-size: cover;
  background-position: center 30%;
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.modul-card.cin-card:hover .cin-card__bg { transform: scale(1.06); }
.modul-card.cin-card .cin-card__overlay {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg,
    rgba(13, 33, 55, 0.10) 0%,
    rgba(13, 33, 55, 0.35) 45%,
    rgba(13, 33, 55, 0.88) 100%);
}

.modul-card.cin-card .cin-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 0;
}
.modul-card.cin-card .modul-card__num {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--sunshine);
  background: rgba(13, 33, 55, 0.45);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 217, 61, 0.35);
}
.modul-card.cin-card .cin-card__badge {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.25);
}
.modul-card.cin-card .cin-card__badge--locked {
  background: rgba(13, 33, 55, 0.6);
  color: rgba(255, 255, 255, 0.75);
  border-color: rgba(255, 255, 255, 0.10);
}
.modul-card.cin-card .cin-card__badge--ferdig {
  background: linear-gradient(135deg, rgba(78, 205, 196, 0.95), rgba(42, 157, 143, 0.95));
  border-color: rgba(255, 255, 255, 0.30);
}
.modul-card.cin-card .cin-card__badge--gang {
  background: linear-gradient(135deg, rgba(255, 217, 61, 0.95), rgba(255, 179, 71, 0.95));
  color: var(--navy);
  border-color: rgba(13, 33, 55, 0.18);
}

.modul-card.cin-card .cin-card__body {
  margin-top: auto;
  padding: 18px 20px 22px;
}
.modul-card.cin-card .modul-card__title {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 600;
  font-size: 1.4rem;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 6px;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.45);
}
.modul-card.cin-card .modul-card__sub {
  font-size: 0.92rem;
  color: rgba(255, 255, 255, 0.85);
  margin: 0 0 12px;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.45);
}
.modul-card.cin-card .cin-card__meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.78);
}
.modul-card.cin-card .cin-card__meta svg { width: 14px; height: 14px; }
.modul-card.cin-card .cin-card__progress {
  position: relative;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
  margin-top: 14px;
  overflow: hidden;
}
.modul-card.cin-card .cin-card__progress > span {
  position: absolute; inset: 0;
  width: var(--progress, 0%);
  background: linear-gradient(90deg, var(--sunshine), var(--mint));
  border-radius: 999px;
  transition: width 0.6s ease;
}

.modul-card.cin-card[aria-disabled="true"] {
  cursor: not-allowed;
  filter: saturate(0.6) brightness(0.95);
}
.modul-card.cin-card[aria-disabled="true"] .cin-card__bg { opacity: 0.55; }

/* ----- 7 / Section heading ornament ----- */
.cin-section-eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--coral-dark);
  margin-bottom: 8px;
}

/* ----- 8 / Info banner (cinematic) ----- */
.dash-info-banner.cin-banner,
.cin-banner {
  position: relative;
  padding: 18px 22px 18px 64px;
  border-radius: 18px;
  background: linear-gradient(135deg, #FFF8E7 0%, #FFFDF7 100%);
  border: 1px solid rgba(255, 217, 61, 0.45);
  box-shadow: 0 6px 16px rgba(255, 179, 71, 0.10);
  margin: 0 0 28px;
  color: var(--ink);
}
.cin-banner::before {
  content: "";
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px; height: 36px;
  background: rgba(18,138,122,.08);
  border-radius: 50%;
  border: 2px solid var(--sunshine);
  background-color: #fff;
}

/* ----- 9 / Glass card — generic ----- */
.cin-glass {
  background: var(--cin-glass-bg);
  backdrop-filter: blur(18px) saturate(180%);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  border: 1px solid var(--cin-glass-border);
  border-radius: 22px;
  box-shadow: var(--cin-glass-shadow);
}

/* ----- 10 / Auth pages (login/registrer/glemt) ----- */
body.page-login main,
body.page-registrer main,
body.page-glemt-passord main {
  display: grid;
  place-items: center;
  min-height: calc(100vh - 80px);
  min-height: calc(100dvh - 80px);
  padding: 48px 20px;
  position: relative;
  isolation: isolate;
}
body.page-login main::before,
body.page-registrer main::before,
body.page-glemt-passord main::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url('img/fjord-vista.jpg');
  background-size: cover;
  background-position: center;
  opacity: 0.16;
  z-index: -2;
  filter: saturate(1.05);
}
body.page-login main::after,
body.page-registrer main::after,
body.page-glemt-passord main::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 0%, rgba(255, 253, 247, 0.85) 80%);
  z-index: -1;
}
body.page-login .auth-card,
body.page-registrer .auth-card,
body.page-glemt-passord .auth-card,
body.page-login .container > div,
body.page-registrer .container > div,
body.page-glemt-passord .container > div {
  background: var(--cin-glass-bg);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--cin-glass-border);
  border-radius: 22px;
  box-shadow: 0 22px 50px rgba(13, 33, 55, 0.16), 0 4px 14px rgba(13, 33, 55, 0.08);
  padding: clamp(28px, 5vw, 44px);
  max-width: 460px;
  width: 100%;
}

/* ----- 11 / Page heading pattern ----- */
.cin-page-head {
  position: relative;
  padding: clamp(28px, 5vw, 56px) clamp(24px, 4vw, 44px);
  border-radius: 22px;
  margin-bottom: 36px;
  color: var(--navy);
  overflow: hidden;
  isolation: isolate;
  border: 1px solid rgba(13, 33, 55, 0.07);
  box-shadow: 0 16px 44px -22px rgba(8, 24, 38, 0.4);
}
/* Lys editorial — aldri mettet/mørk blokk bak tekst (brand). Hver variant beholder en svak aksent-tone. */
.cin-page-head--gold  { background: linear-gradient(135deg, #FFF7E2 0%, #FFFCF2 100%); }
.cin-page-head--coral { background: linear-gradient(135deg, #FFF1EC 0%, #FFF8F5 100%); }
.cin-page-head--teal  { background: linear-gradient(135deg, #E8F6F2 0%, #F4FBF9 100%); }
.cin-page-head--plum  { background: linear-gradient(135deg, #E8F6F2 0%, #F4FBF9 100%); }
.cin-page-head--sky   { background: linear-gradient(135deg, #E9F3FB 0%, #F4F9FD 100%); }
.cin-page-head--navy  { background: linear-gradient(135deg, #FFF6E9 0%, #FCEEDD 100%); }

.cin-page-head h1 {
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 600;
  font-size: clamp(2rem, 4.6vw, 3.3rem);
  line-height: 1.02;
  letter-spacing: -0.025em;
  margin: 0 0 12px;
  text-shadow: none;
  font-optical-sizing: auto;
  text-wrap: balance;
}
.cin-page-head h1 em { font-style: italic; color: var(--teal-dark, #1f7268); font-weight: 600; }
.cin-page-head .cin-page-head__lede,
.cin-page-head p {
  font-size: clamp(0.95rem, 1.5vw, 1.1rem);
  margin: 0;
  max-width: 60ch;
  color: rgba(13, 33, 55, 0.72) !important;
  opacity: 1;
  line-height: 1.5;
  text-shadow: none;
}
/* Kaptein Måken utfaset: maskot-bildet på .cin-page-head + desktop-plassreservasjonen
   (padding-right) er fjernet, så overskriftene bruker full bredde uten dødt tomrom. */

/* ════════════════════════════════════════════════════════════════════════
   AWARD-NIVÅ — peiling-signatur på delte banner (matcher landingssiden)
   Sjøkart-isobather + koordinat-eyebrow + kinetisk Playfair.
   ════════════════════════════════════════════════════════════════════════ */
/* Hårfine konsentriske dybdekurver (isobather) — maskert til maskot-hjørnet */
.cin-page-head::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: repeating-radial-gradient(circle at 88% 20%, transparent 0 33px, rgba(18,138,122,.06) 33px 34px);
  -webkit-mask-image: radial-gradient(circle at 88% 20%, #000 0 46%, transparent 74%);
  mask-image: radial-gradient(circle at 88% 20%, #000 0 46%, transparent 74%);
}
/* Eyebrow som sjøkart-koordinat: gradtall (mono, tabular) foran labelen */
.cin-page-head .cin-section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--teal-dark, #1f7268);
}
.cin-page-head .cin-section-eyebrow[data-bearing]::before {
  content: attr(data-bearing);
  font: 600 0.72rem/1 ui-monospace, "SFMono-Regular", Menlo, monospace;
  letter-spacing: 0.04em;
  text-transform: none;
  color: var(--teal, #128a7a);
  font-variant-numeric: tabular-nums;
}
@media (prefers-reduced-motion: reduce) {
  .cin-page-head::before { background: none; }
}

/* ----- 12 / Daglig (daily challenge) ----- */
body.page-daglig .daily-card,
body.page-daglig .question-card {
  background: var(--cin-glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--cin-glass-border);
  border-radius: 22px;
  box-shadow: var(--cin-glass-shadow);
  padding: clamp(24px, 4vw, 36px);
}

/* ----- 13 / Duell rooms ----- */
body.page-duell .duel-room,
body.page-duell .duel-card,
body.page-duell .lobby-card {
  background: var(--cin-glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--cin-glass-border);
  border-radius: 22px;
  box-shadow: var(--cin-glass-shadow);
}

/* ----- 14 / Leaderboard rows ----- */
body.page-leaderboard .lb-row,
body.page-leaderboard .leaderboard-row {
  background: var(--surface);
  border: 1px solid var(--cin-glass-border);
  border-radius: 14px;
  padding: 12px 16px;
  display: grid;
  grid-template-columns: 48px 1fr auto;
  align-items: center;
  gap: 14px;
  margin-bottom: 8px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
body.page-leaderboard .lb-row:hover { transform: translateY(-2px); box-shadow: var(--shadow-card); }

/* ----- 15 / AI-instruktør chat — frosted bubble feel ----- */
body.page-ai-instruktor .chat-shell,
body.page-ai-instruktor .ai-chat,
body.page-ai-instruktor .chat-window {
  background: var(--cin-glass-bg);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--cin-glass-border);
  border-radius: 22px;
  box-shadow: var(--cin-glass-shadow);
}
body.page-ai-instruktor .msg--ai {
  border-left: 3px solid var(--sunshine);
}

/* ----- 16 / Premier (badge gallery) ----- */
body.page-premier .badge,
body.page-premier .premie {
  background: var(--surface);
  border: 1px solid var(--cin-glass-border);
  border-radius: 18px;
  padding: 18px;
  text-align: center;
  box-shadow: var(--shadow-card);
  transition: transform 0.3s var(--bounce), box-shadow 0.3s ease;
}
body.page-premier .badge:hover { transform: translateY(-4px); box-shadow: var(--shadow-pop); }

/* ----- 17 / Profil ----- */
body.page-profil .profil-card,
body.page-profil .stat-card {
  background: var(--cin-glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--cin-glass-border);
  border-radius: 18px;
  box-shadow: var(--cin-glass-shadow);
  padding: 22px;
}

/* ----- 18 / Pakker (kjøp) ----- */
body.page-pakker .pakke,
body.page-pakker .package-card {
  background: var(--surface);
  border: 1px solid var(--cin-glass-border);
  border-radius: 22px;
  box-shadow: var(--shadow-card);
  padding: clamp(24px, 4vw, 36px);
  transition: transform 0.3s var(--bounce), box-shadow 0.3s ease;
}
body.page-pakker .pakke:hover { transform: translateY(-4px); box-shadow: var(--shadow-pop); }
body.page-pakker .pakke--featured,
body.page-pakker .package-card--featured {
  /* Lys editorial: aldri mørk flate/gradient bak tekst (merkevareregel). Det
     «mest populære»-løftet bæres av aksent-ramme + dybdeskygge, ikke en navy fyll.
     Tidligere navy-gradient + hero-bilde-overlay er fjernet. */
  background: var(--paper);
  color: var(--text);
  border: 2px solid var(--sunshine);
  box-shadow: var(--shadow-pop);
  position: relative;
  overflow: hidden;
}
body.page-pakker .pakke--featured > * { position: relative; z-index: 1; }

/* ----- 19 / Sertifikat — keep print-friendly, only screen embellishment ----- */
@media screen {
  body.page-sertifikat main {
    padding: 32px 20px;
  }
}

/* ----- 20 / Eksamen ----- */
body.page-eksamen .exam-shell,
body.page-eksamen .question {
  background: var(--cin-glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--cin-glass-border);
  border-radius: 22px;
  box-shadow: var(--cin-glass-shadow);
}

/* ----- 21 / Buttons cinematic upgrade ----- */
.btn.cin-btn,
.btn--cinematic {
  position: relative;
  border-radius: 999px;
  padding: 14px 28px;
  font-weight: 700;
  font-size: 0.96rem;
  letter-spacing: 0.01em;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: transform 0.25s var(--bounce), box-shadow 0.25s ease, filter 0.2s ease;
}
.btn.cin-btn--primary,
.btn--cinematic.btn--primary {
  background: var(--cin-gradient-coral);
  color: #fff;
  box-shadow: 0 8px 22px rgba(255, 107, 107, 0.32);
}
.btn.cin-btn--primary:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(255, 107, 107, 0.42); }
.btn.cin-btn--gold {
  background: var(--cin-gradient-gold);
  color: var(--navy);
  box-shadow: 0 8px 22px rgba(255, 179, 71, 0.36);
}
.btn.cin-btn--ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--cin-glass-border);
}

/* ----- 22 / Empty/loading skeleton ----- */
.cin-skeleton {
  background: linear-gradient(90deg, #eee 0%, #f5f5f5 50%, #eee 100%);
  background-size: 200% 100%;
  animation: cin-shimmer 1.4s ease-in-out infinite;
  border-radius: 12px;
}
@keyframes cin-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ----- 23 / Mobile polish ----- */
@media (max-width: 720px) {
  .cin-hero { padding: 22px; border-radius: 22px; }
  .cin-hero .dash-stats { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .cin-hero .dash-stat { padding: 12px 10px; }
  .cin-hero .dash-stat__num { font-size: 1.4rem; }
  .cin-hero .dash-stat__label { font-size: 0.65rem; }
  .modul-grid.cin-grid { grid-template-columns: 1fr; gap: 14px; }
  .modul-card.cin-card { min-height: 220px; }
  .dash-actions.cin-actions { grid-template-columns: 1fr; }
}

/* ----- 23b / GLOBAL BUTTON UPGRADE — gjelder alle .btn på platform-sidene ----- */
body.page-dashboard .btn,
body.page-profil .btn,
body.page-leaderboard .btn,
body.page-premier .btn,
body.page-pakker .btn,
body.page-daglig .btn,
body.page-duell .btn,
body.page-eksamen .btn,
body.page-sertifikat .btn,
body.page-ai-instruktor .btn,
body.page-kurs-index .btn,
body.page-login .btn,
body.page-registrer .btn,
body.page-glemt-passord .btn {
  position: relative;
  border-radius: 999px;
  font-weight: 700;
  letter-spacing: 0.005em;
  transition: transform 0.25s var(--bounce), box-shadow 0.25s ease, filter 0.2s ease, background 0.25s ease;
  overflow: hidden;
  isolation: isolate;
}
body.page-dashboard .btn::after,
body.page-profil .btn::after,
body.page-leaderboard .btn::after,
body.page-premier .btn::after,
body.page-pakker .btn::after,
body.page-daglig .btn::after,
body.page-duell .btn::after,
body.page-eksamen .btn::after,
body.page-sertifikat .btn::after,
body.page-ai-instruktor .btn::after,
body.page-kurs-index .btn::after,
body.page-login .btn::after,
body.page-registrer .btn::after,
body.page-glemt-passord .btn::after {
  content: "";
  position: absolute;
  top: 0; left: -120%;
  width: 60%; height: 100%;
  background: linear-gradient(110deg,
    transparent 0%,
    rgba(255, 255, 255, 0.35) 50%,
    transparent 100%);
  transition: left 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
  z-index: 1;
}
body.page-dashboard .btn:hover::after,
body.page-profil .btn:hover::after,
body.page-leaderboard .btn:hover::after,
body.page-premier .btn:hover::after,
body.page-pakker .btn:hover::after,
body.page-daglig .btn:hover::after,
body.page-duell .btn:hover::after,
body.page-eksamen .btn:hover::after,
body.page-sertifikat .btn:hover::after,
body.page-ai-instruktor .btn:hover::after,
body.page-kurs-index .btn:hover::after,
body.page-login .btn:hover::after,
body.page-registrer .btn:hover::after,
body.page-glemt-passord .btn:hover::after {
  left: 130%;
}
body.page-dashboard .btn--primary,
body.page-profil .btn--primary,
body.page-leaderboard .btn--primary,
body.page-premier .btn--primary,
body.page-pakker .btn--primary,
body.page-daglig .btn--primary,
body.page-duell .btn--primary,
body.page-eksamen .btn--primary,
body.page-sertifikat .btn--primary,
body.page-ai-instruktor .btn--primary,
body.page-kurs-index .btn--primary,
body.page-login .btn--primary,
body.page-registrer .btn--primary,
body.page-glemt-passord .btn--primary {
  /* dypere coral så hvit knappetekst møter WCAG (stor tekst ≥3:1); jf. pakker-knappen */
  background: linear-gradient(135deg, #E0502E 0%, #D63A29 55%, #C62A28 100%);
  color: #fff;
  box-shadow: 0 8px 22px rgba(198, 42, 40, 0.32), 0 2px 4px rgba(160, 30, 40, 0.20);
  border: none;
}
body.page-dashboard .btn--primary:hover,
body.page-profil .btn--primary:hover,
body.page-leaderboard .btn--primary:hover,
body.page-premier .btn--primary:hover,
body.page-pakker .btn--primary:hover,
body.page-daglig .btn--primary:hover,
body.page-duell .btn--primary:hover,
body.page-eksamen .btn--primary:hover,
body.page-sertifikat .btn--primary:hover,
body.page-ai-instruktor .btn--primary:hover,
body.page-kurs-index .btn--primary:hover,
body.page-login .btn--primary:hover,
body.page-registrer .btn--primary:hover,
body.page-glemt-passord .btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(255, 107, 107, 0.42), 0 4px 8px rgba(230, 57, 70, 0.24);
}
body.page-dashboard .btn--primary:active,
body.page-profil .btn--primary:active,
body.page-leaderboard .btn--primary:active,
body.page-premier .btn--primary:active,
body.page-pakker .btn--primary:active,
body.page-daglig .btn--primary:active,
body.page-duell .btn--primary:active,
body.page-eksamen .btn--primary:active,
body.page-sertifikat .btn--primary:active,
body.page-ai-instruktor .btn--primary:active,
body.page-kurs-index .btn--primary:active,
body.page-login .btn--primary:active,
body.page-registrer .btn--primary:active,
body.page-glemt-passord .btn--primary:active {
  transform: translateY(0);
  box-shadow: 0 4px 12px rgba(255, 107, 107, 0.28);
}
body.page-dashboard .btn--ghost,
body.page-profil .btn--ghost,
body.page-leaderboard .btn--ghost,
body.page-premier .btn--ghost,
body.page-pakker .btn--ghost,
body.page-daglig .btn--ghost,
body.page-duell .btn--ghost,
body.page-eksamen .btn--ghost,
body.page-sertifikat .btn--ghost,
body.page-ai-instruktor .btn--ghost,
body.page-kurs-index .btn--ghost,
body.page-login .btn--ghost,
body.page-registrer .btn--ghost,
body.page-glemt-passord .btn--ghost {
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--ink);
  border: 1px solid var(--cin-glass-border);
}
body.page-dashboard .btn--ghost:hover,
body.page-profil .btn--ghost:hover,
body.page-leaderboard .btn--ghost:hover,
body.page-premier .btn--ghost:hover,
body.page-pakker .btn--ghost:hover,
body.page-daglig .btn--ghost:hover,
body.page-duell .btn--ghost:hover,
body.page-eksamen .btn--ghost:hover,
body.page-sertifikat .btn--ghost:hover,
body.page-ai-instruktor .btn--ghost:hover,
body.page-kurs-index .btn--ghost:hover,
body.page-login .btn--ghost:hover,
body.page-registrer .btn--ghost:hover,
body.page-glemt-passord .btn--ghost:hover {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(255, 179, 71, 0.5);
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(13, 33, 55, 0.08);
}
body.page-dashboard .btn--lg,
body.page-profil .btn--lg,
body.page-pakker .btn--lg,
body.page-daglig .btn--lg,
body.page-duell .btn--lg,
body.page-eksamen .btn--lg,
body.page-ai-instruktor .btn--lg,
body.page-kurs-index .btn--lg,
body.page-login .btn--lg,
body.page-registrer .btn--lg,
body.page-glemt-passord .btn--lg {
  padding: 16px 32px;
  font-size: 1.02rem;
}

/* ----- 23c / GLOBAL FORM/INPUT UPGRADE ----- */
body.page-dashboard input[type="text"],
body.page-dashboard input[type="email"],
body.page-dashboard input[type="password"],
body.page-dashboard input[type="tel"],
body.page-dashboard input[type="number"],
body.page-dashboard textarea,
body.page-dashboard select,
body.page-profil input,
body.page-profil textarea,
body.page-profil select,
body.page-login input,
body.page-registrer input,
body.page-glemt-passord input,
body.page-pakker input,
body.page-pakker select,
body.page-daglig input,
body.page-duell input,
body.page-eksamen input,
body.page-ai-instruktor input,
body.page-ai-instruktor textarea {
  background: rgba(255, 255, 255, 0.85);
  border: 1.5px solid rgba(13, 33, 55, 0.10);
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 1rem;
  font-family: inherit;
  color: var(--ink);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
}
body.page-dashboard input:focus,
body.page-dashboard textarea:focus,
body.page-dashboard select:focus,
body.page-profil input:focus,
body.page-profil textarea:focus,
body.page-profil select:focus,
body.page-login input:focus,
body.page-registrer input:focus,
body.page-glemt-passord input:focus,
body.page-pakker input:focus,
body.page-daglig input:focus,
body.page-duell input:focus,
body.page-eksamen input:focus,
body.page-ai-instruktor input:focus,
body.page-ai-instruktor textarea:focus {
  border-color: var(--teal);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(42, 157, 143, 0.15), 0 4px 12px rgba(42, 157, 143, 0.08);
  /* outline håndteres av a11y.css :focus-visible */
}
body.page-dashboard input::placeholder,
body.page-profil input::placeholder,
body.page-login input::placeholder,
body.page-registrer input::placeholder,
body.page-glemt-passord input::placeholder,
body.page-pakker input::placeholder,
body.page-daglig input::placeholder,
body.page-duell input::placeholder,
body.page-ai-instruktor input::placeholder,
body.page-ai-instruktor textarea::placeholder {
  color: rgba(13, 33, 55, 0.58);
}
body.page-dashboard label,
body.page-profil label,
body.page-login label,
body.page-registrer label,
body.page-glemt-passord label,
body.page-pakker label,
body.page-daglig label,
body.page-duell label,
body.page-ai-instruktor label {
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--ink);
  margin-bottom: 6px;
  display: block;
}

/* ----- 23d / Page enter animation (alle platform-sider) ----- */
@keyframes cin-page-enter {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: none; }
}
body.page-dashboard main,
body.page-profil main,
body.page-leaderboard main,
body.page-premier main,
body.page-pakker main,
body.page-daglig main,
body.page-duell main,
body.page-eksamen main,
body.page-ai-instruktor main,
body.page-kurs-index main,
body.page-login main,
body.page-registrer main,
body.page-glemt-passord main {
  animation: cin-page-enter 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@media (prefers-reduced-motion: reduce) {
  body main { animation: none !important; }
}

/* ----- 23e / Microinteractions: link underline hover ----- */
body.page-dashboard a:not(.btn):not(.k-logo):not(.dash-action):not(.modul-card):not(.cin-card),
body.page-profil a:not(.btn):not(.k-logo),
body.page-leaderboard a:not(.btn):not(.k-logo),
body.page-pakker a:not(.btn):not(.k-logo),
body.page-daglig a:not(.btn):not(.k-logo):not(.gami-back),
body.page-duell a:not(.btn):not(.k-logo):not(.gami-back),
body.page-ai-instruktor a:not(.btn):not(.k-logo) {
  background-image: linear-gradient(var(--coral-dark), var(--coral-dark));
  background-size: 0 1.5px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  transition: background-size 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
body.page-dashboard a:hover:not(.btn):not(.k-logo):not(.dash-action):not(.modul-card):not(.cin-card),
body.page-profil a:hover:not(.btn):not(.k-logo),
body.page-leaderboard a:hover:not(.btn):not(.k-logo),
body.page-pakker a:hover:not(.btn):not(.k-logo),
body.page-daglig a:hover:not(.btn):not(.k-logo):not(.gami-back),
body.page-duell a:hover:not(.btn):not(.k-logo):not(.gami-back),
body.page-ai-instruktor a:hover:not(.btn):not(.k-logo) {
  background-size: 100% 1.5px;
}

/* ----- 23f / Back-link microanimation ----- */
.gami-back {
  transition: transform 0.2s ease, color 0.2s ease;
}
.gami-back:hover { transform: translateX(-3px); color: var(--coral-dark); }

/* ----- 23g / Section heading rhythm ----- */
body.page-dashboard h2,
body.page-profil h2,
body.page-leaderboard h2,
body.page-premier h2,
body.page-pakker h2,
body.page-daglig h2,
body.page-duell h2,
body.page-eksamen h2,
body.page-ai-instruktor h2,
body.page-kurs-index h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 600;
  letter-spacing: -0.01em;
}

/* ----- 23h / Loader cinematic ----- */
.gami-loader {
  position: relative;
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
  font-size: 0.95rem;
}
.gami-loader::before {
  content: "";
  display: block;
  width: 36px; height: 36px;
  margin: 0 auto 16px;
  border-radius: 50%;
  border: 3px solid rgba(42, 157, 143, 0.18);
  border-top-color: var(--teal);
  animation: cin-spin 0.9s linear infinite;
}
@keyframes cin-spin { to { transform: rotate(360deg); } }

/* ----- 24 / Footer cinematic ----- */
body.page-dashboard .k-footer,
body.page-profil .k-footer,
body.page-leaderboard .k-footer,
body.page-pakker .k-footer,
body.page-premier .k-footer,
body.page-daglig .k-footer,
body.page-duell .k-footer,
body.page-eksamen .k-footer,
body.page-ai-instruktor .k-footer {
  margin-top: 64px;
  padding: 28px 20px;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-on-dark);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: var(--navy);
}

/* ============================================================================
   AWARD-LAG · cinematic-sider (dashboard, leaderboard, daglig …) · 2026-05-30
   Fraunces-display + atmosfærisk papir-kanvas, i tråd med leksjons-designet.
   ============================================================================ */
body[class*="page-"] {
  background: radial-gradient(135% 80% at 50% -15%, #FFFEFC 0%, #FBF4E8 44%, #EFE2CD 100%) fixed;
}
.cin-hero h1,
.cin-page-head h1,
.cin-section__title,
.cin-greeting h1,
.dash-welcome h1 {
  /* Merkevare-display = Playfair Display (lastet på sidene). Fraunces ble aldri
     importert → headingene falt før til Georgia. Tallene er flyttet ut under
     (merkevareregel: aldri serif på tall). */
  font-family: "Playfair Display", Georgia, serif !important;
  letter-spacing: -0.02em;
}
.cin-hero h1, .cin-page-head h1 { font-weight: 600; }
.cin-hero .dash-stat__num,
.dash-stat__num {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif !important;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}
