/* ═══════════════════════════════════════════════════════
   TUFTEBYE AI — Dashboard stilark
   Gjelder alle sider under dashboard.tuftebyeai.com
   Samme designspråk som tuftebyeai.com (public/styles.css)
   men tillater tettere informasjonslayout.
   ═══════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Playfair+Display:wght@400;600;700&display=swap');

/* ─── DESIGN TOKENS ──────────────────────────────────── */
:root {
  --navy:      #141c2e;
  --navy-mid:  #1a2540;
  --navy-card: #1e2d45;
  --gold:      #C4A060;
  --gold-light:#D8BC84;
  --gold-dark: #A08448;
  --platinum:  #C0CDD8;
  --text:      #EAE2D4;
  --text-muted:#9AA8B5;
  --divider:   rgba(196,160,96,0.25);
  --card-bg:   rgba(30,45,69,0.7);
  --radius:    6px;
  --transition:0.3s ease;
  /* Status colours (badges, charts) */
  --green:     #34d399;
  --orange:    #fb923c;
  --red:       #f87171;
  --yellow:    #fbbf24;
  --pink:      #f472b6;
  /* Nav */
  --nav-h:     64px;
  /* Backward-compat aliases — all old var() refs update automatically */
  --bg:        var(--navy);
  --bg2:       var(--navy-mid);
  --card:      var(--card-bg);
  --border:    var(--divider);
  --border2:   rgba(196,160,96,0.15);
  --muted:     var(--text-muted);
  --muted2:    #6B7F8E;
  --purple:    var(--gold);
  --purple-light: var(--gold-light);
  --blue:      var(--platinum);
}

/* ─── RESET ──────────────────────────────────────────── */
*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', sans-serif;
  background: var(--navy);
  color: var(--text);
  font-weight: 400;
  line-height: 1.65;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ─── TYPOGRAPHY ─────────────────────────────────────── */
h1,h2,h3,h4 { font-family: 'Playfair Display', serif; line-height: 1.2; }
h1 { font-size: clamp(1.8rem,4vw,2.8rem); font-weight: 700; }
h2 { font-size: clamp(1.4rem,2.5vw,2rem); font-weight: 600; }
h3 { font-size: clamp(1.1rem,1.8vw,1.35rem); font-weight: 500; }
p  { line-height: 1.75; }
a  { color: inherit; text-decoration: none; }
.eyebrow {
  font-family: 'Inter', sans-serif; font-size: .7rem; font-weight: 600;
  letter-spacing: .18em; text-transform: uppercase; color: var(--gold);
  margin-bottom: .75rem; display: block;
}
.gold        { color: var(--gold); }
.gold-light  { color: var(--gold-light); }
.platinum    { color: var(--platinum); }
.muted       { color: var(--text-muted); }

/* ─── LAYOUT ─────────────────────────────────────────── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 2rem; }
main {
  padding-top: calc(var(--nav-h) + 2.5rem);
  padding-bottom: 5rem;
  max-width: 1200px;
  margin: 0 auto;
  padding-left: 2rem;
  padding-right: 2rem;
}
.gold-divider {
  width: 60px; height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  margin: 1rem 0;
}
.section { padding: 3rem 0; }
.section-sm { padding: 1.5rem 0; }
.section-dark {
  background: rgba(10,14,24,.5);
  border-top: 1px solid var(--divider);
  border-bottom: 1px solid var(--divider);
}

/* ─── NAVIGATION ─────────────────────────────────────── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  height: var(--nav-h);
  background: rgba(20,28,46,.96);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--divider);
  display: flex; align-items: center;
  padding: 0 2rem;
}
.nav-inner {
  max-width: 1200px; margin: 0 auto; width: 100%;
  position: relative;
  display: flex; align-items: center;
}
.nav-brand {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--text); flex-shrink: 0;
}
.nav-brand img { height: 36px; width: auto; object-fit: contain; display: block; }
.nav-intern-badge {
  font-size: 9px; font-weight: 700; letter-spacing: 1.5px;
  text-transform: uppercase; color: var(--gold);
  background: rgba(196,160,96,.1); border: 1px solid rgba(196,160,96,.3);
  padding: 2px 7px; border-radius: 3px;
}
.nav-links {
  /* Flex centering — scales correctly regardless of number of links */
  flex: 1;
  display: flex; align-items: center; justify-content: center;
  gap: 0px; list-style: none; white-space: nowrap;
}
.nav-link {
  font-size: .75rem; font-weight: 500; letter-spacing: .03em;
  color: var(--text-muted); padding: 5px 9px;
  border-radius: var(--radius); transition: var(--transition);
  text-decoration: none; display: block; border: none;
  background: none; cursor: pointer; white-space: nowrap;
  position: relative;
}
.nav-link:hover { color: var(--text); background: rgba(196,160,96,.08); }
.nav-link.active { color: var(--gold); }
.nav-link.active::after {
  content: ''; position: absolute; bottom: 0; left: 10px; right: 10px;
  height: 2px; background: linear-gradient(90deg,transparent,var(--gold),transparent);
}
.nav-cta {
  font-size: .75rem; font-weight: 600; letter-spacing: .08em;
  color: var(--navy); background: linear-gradient(135deg,var(--gold-light),var(--gold));
  border: none; padding: 6px 16px; border-radius: var(--radius);
  cursor: pointer; transition: var(--transition); text-transform: uppercase;
  text-decoration: none; display: inline-block; white-space: nowrap;
}
.nav-cta:hover {
  background: linear-gradient(135deg,var(--gold),var(--gold-dark));
  transform: translateY(-1px); box-shadow: 0 4px 12px rgba(196,160,96,.3);
}
/* ── Hamburger ── */
.nav-hamburger {
  display: none; flex-direction: column; justify-content: space-between;
  width: 26px; height: 18px; cursor: pointer;
  background: none; border: none; padding: 0; flex-shrink: 0;
  margin-left: auto; /* push to right when visible on mobile */
}
.nav-hamburger span {
  display: block; width: 100%; height: 2px;
  background: var(--text); border-radius: 2px; transition: var(--transition);
}
.nav-hamburger.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ─── PAGE HEADER ─────────────────────────────────────── */
.page-header {
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--divider);
}
.page-header h1 { margin-bottom: .4rem; }
.page-header .page-desc { color: var(--text-muted); font-size: .9rem; }

/* ─── CARDS ───────────────────────────────────────────── */
.card {
  background: var(--card-bg); border: 1px solid var(--divider);
  border-radius: var(--radius); padding: 20px;
  transition: var(--transition);
}
.card:hover { border-color: rgba(196,160,96,.5); box-shadow: 0 4px 20px rgba(0,0,0,.25); }
.card-title {
  font-family: 'Playfair Display', serif; font-size: 1rem;
  font-weight: 600; margin-bottom: .5rem; color: var(--text);
}

/* ─── GRID HELPERS ────────────────────────────────────── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; }

/* ─── SECTION LABEL ───────────────────────────────────── */
.section-label {
  font-size: .65rem; font-weight: 700; letter-spacing: .2em;
  text-transform: uppercase; color: var(--gold);
  margin-bottom: 1rem; display: block;
}

/* ─── BUTTONS ─────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 18px; border-radius: var(--radius); font-size: .85rem; font-weight: 600;
  cursor: pointer; border: none; transition: var(--transition);
  text-decoration: none; font-family: 'Inter', sans-serif;
}
.btn-primary {
  background: linear-gradient(135deg,var(--gold-light),var(--gold));
  color: var(--navy);
}
.btn-primary:hover {
  background: linear-gradient(135deg,var(--gold),var(--gold-dark));
  transform: translateY(-1px); box-shadow: 0 4px 16px rgba(196,160,96,.3);
}
.btn-outline {
  background: transparent; color: var(--gold);
  border: 1px solid var(--gold);
}
.btn-outline:hover { background: rgba(196,160,96,.1); transform: translateY(-1px); }
.btn-sm { padding: 5px 12px; font-size: .75rem; }

/* ─── BADGES ──────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.5px;
}
.badge-live  { background: rgba(52,211,153,.12); color: var(--green); border: 1px solid rgba(52,211,153,.25); }
.badge-soon  { background: rgba(196,160,96,.1);  color: var(--gold-light); border: 1px solid rgba(196,160,96,.25); }
.badge-warn  { background: rgba(251,146,60,.12); color: var(--orange); border: 1px solid rgba(251,146,60,.25); }
.badge-red   { background: rgba(248,113,113,.12);color: var(--red);    border: 1px solid rgba(248,113,113,.25); }
.badge-green { background: rgba(52,211,153,.12); color: var(--green);  border: 1px solid rgba(52,211,153,.25); }
.badge-dot   { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.dot-sm      { width: 6px; height: 6px; border-radius: 50%; display: inline-block; }

/* ─── TAGS ────────────────────────────────────────────── */
.tag {
  display: inline-block; padding: 2px 8px; border-radius: 4px;
  font-size: .65rem; font-weight: 600; text-transform: uppercase; letter-spacing: .5px;
  background: rgba(196,160,96,.1); color: var(--text-muted);
  border: 1px solid var(--divider); margin: 2px 2px 2px 0;
}

/* ─── DATA TABLE ──────────────────────────────────────── */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
  text-align: left; font-size: .65rem; font-weight: 700;
  letter-spacing: .15em; text-transform: uppercase; color: var(--gold);
  padding: 10px 12px; border-bottom: 1px solid var(--divider);
}
.data-table td {
  padding: 10px 12px; font-size: .85rem; color: var(--text-muted);
  border-bottom: 1px solid rgba(196,160,96,.08);
}
.data-table tr:hover td { background: rgba(196,160,96,.04); color: var(--text); }

/* ─── STAT CARDS (KPI) ────────────────────────────────── */
.stat-card {
  background: var(--card-bg); border: 1px solid var(--divider);
  border-radius: var(--radius); padding: 16px 20px;
}
.stat-value {
  font-family: 'Playfair Display', serif; font-size: 1.8rem;
  font-weight: 700; color: var(--gold); line-height: 1; margin-bottom: .25rem;
}
.stat-label {
  font-size: .65rem; font-weight: 600; letter-spacing: .1em;
  text-transform: uppercase; color: var(--text-muted);
}
.stat-change {
  font-size: .75rem; font-weight: 500; margin-top: .3rem;
}
.stat-change.up   { color: var(--green); }
.stat-change.down { color: var(--red); }

/* ─── TIMELINE ────────────────────────────────────────── */
.timeline-item {
  display: flex; gap: 1rem; padding-bottom: 1.5rem;
  border-left: 2px solid var(--divider); padding-left: 1.25rem;
  position: relative;
}
.timeline-item::before {
  content: ''; position: absolute; left: -5px; top: 4px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--gold); border: 2px solid var(--navy);
}
.timeline-date { font-size: .7rem; color: var(--gold); font-weight: 600; white-space: nowrap; margin-top: 2px; }
.timeline-content h4 { font-family: 'Inter', sans-serif; font-size: .9rem; font-weight: 600; margin-bottom: .25rem; }
.timeline-content p  { font-size: .82rem; color: var(--text-muted); }

/* ─── PROMISE POINT (feature rows) ───────────────────── */
.promise-point {
  display: flex; align-items: flex-start; gap: 1rem; padding: 1rem;
  background: rgba(30,45,69,.5); border-left: 3px solid var(--gold);
  border-radius: 0 var(--radius) var(--radius) 0; margin-bottom: .75rem;
}
.promise-point-icon { font-size: 1.1rem; flex-shrink: 0; margin-top: .1rem; }
.promise-point-content h4 {
  font-family: 'Inter', sans-serif; font-weight: 600; font-size: .9rem;
  color: var(--text); margin-bottom: .15rem;
}
.promise-point-content p { color: var(--text-muted); font-size: .82rem; margin: 0; }

/* ─── PAGE FOOTER ─────────────────────────────────────── */
.page-footer {
  margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--divider);
  display: flex; justify-content: space-between; align-items: center;
  font-size: .72rem; color: var(--text-muted);
}

/* ─── RESPONSIVE ──────────────────────────────────────── */
@media (max-width: 768px) {
  /* Nav: hamburger drawer */
  .nav-hamburger { display: flex; }
  .nav-links {
    /* Override desktop absolute centering → fixed dropdown */
    position: fixed; top: var(--nav-h); left: 0; right: 0;
    transform: none;
    display: none;
    background: rgba(20,28,46,.98); backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--divider);
    flex-direction: column; align-items: flex-start;
    padding: 1rem; gap: 4px; z-index: 999;
  }
  .nav-links.open { display: flex; }
  .nav-link { width: 100%; font-size: .9rem; padding: 10px 12px; }
  .nav-cta, .nav-intern-badge { display: none; }
  /* Layout */
  main { padding-left: 1rem; padding-right: 1rem; padding-top: calc(var(--nav-h) + 1.5rem); }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  h1 { font-size: 1.8rem; }
  h2 { font-size: 1.4rem; }
}
@media (max-width: 480px) {
  nav { padding: 0 1rem; }
  .nav-brand img { height: 28px; }
}

/* ─── HAMBURGER LOCK ─────────────────────────────────────
   Overrider evt. page-spesifikk CSS som forstyrrer menyen.
   !important her vinner over ikke-!important inline CSS.
   ─────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .nav-hamburger { display: flex !important; }

  /* Skjult tilstand */
  .nav-links:not(.open) {
    display:         none       !important;
    position:        fixed      !important;
    top:             var(--nav-h) !important;
    left:            0          !important;
    right:           0          !important;
    transform:       none       !important;
    flex:            unset      !important;
    overflow-x:      visible    !important;
    overflow-y:      visible    !important;
    flex-direction:  column     !important;
    flex-wrap:       nowrap     !important;
  }

  /* Åpen tilstand */
  .nav-links.open {
    display:         flex       !important;
    position:        fixed      !important;
    top:             var(--nav-h) !important;
    left:            0          !important;
    right:           0          !important;
    transform:       none       !important;
    flex-direction:  column     !important;
    align-items:     flex-start !important;
    padding:         1rem       !important;
    gap:             4px        !important;
    z-index:         999        !important;
    background:      rgba(20,28,46,.98) !important;
    backdrop-filter: blur(16px) !important;
    border-bottom:   1px solid var(--divider) !important;
    flex:            unset      !important;
    overflow-x:      visible    !important;
  }
}

/* ─── LEGACY: CSS kept for any page-specific overrides ── */
/* (pages may add a <style> block after the <link> for     */
/*  page-specific rules that don't belong in this file)    */
