/* ===========================
   RESET & BASE
=========================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --blue-light: #eff6ff;
  --blue-mid: #dbeafe;
  --text: #1e293b;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --bg: #f8fafc;
  --white: #ffffff;
  --success: #16a34a;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 4px 16px rgba(37,99,235,0.07);
  --shadow-hover: 0 4px 12px rgba(0,0,0,0.12), 0 8px 24px rgba(37,99,235,0.12);
}

/* 🌙 DARK MODE VARIABLER */
:root.dark {
  --bg: #0d1117;          /* GitHub-style mørk baggrund */
  --white: #161b22;       /* Bokse, kort, header, footer */
  --text: #e6edf3;        /* Lys tekst */
  --text-muted: #9ba3af;  /* Blød grå tekst */
  --border: #30363d;      /* Diskret kant */
  --blue-light: #1f6feb;  /* Flot blå highlight */
  --blue-mid: #388bfd;    /* Accent blå */
  --shadow: none;
  --shadow-hover: none;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

/* ===========================
   TYPOGRAPHY
=========================== */
h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); font-weight: 800; line-height: 1.2; }
h2 { font-size: clamp(1.25rem, 3vw, 1.75rem); font-weight: 700; line-height: 1.3; }
h3 { font-size: 1.1rem; font-weight: 600; }
p  { color: var(--text-muted); }

a {
  color: var(--blue);
  text-decoration: none;
}
a:hover { text-decoration: underline; }

/* ===========================
   LAYOUT
=========================== */
.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ===========================
   HEADER / NAV
=========================== */
header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  max-width: 1000px;
  margin: 0 auto;
}

.nav-logo {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--blue);
  letter-spacing: -0.5px;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}

.nav-links a {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--blue);
  text-decoration: none;
}

/* ===========================
   HERO (forside)
=========================== */
.hero {
  background: linear-gradient(135deg, var(--blue) 0%, #1d4ed8 100%);
  color: var(--white);
  padding: 4rem 1.25rem 3.5rem;
  text-align: center;
}

.hero h1 {
  color: var(--white);
  margin-bottom: 1rem;
}

.hero p {
  color: rgba(255,255,255,0.85);
  font-size: 1.1rem;
  max-width: 560px;
  margin: 0 auto 2rem;
}

.hero-badge {
  display: inline-block;
  background: rgba(255,255,255,0.18);
  border: 1px solid rgba(255,255,255,0.3);
  color: white;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.3rem 0.9rem;
  border-radius: 999px;
  letter-spacing: 0.5px;
  margin-bottom: 1.25rem;
  text-transform: uppercase;
}

/* ===========================
   CALCULATOR CARDS (forside)
=========================== */
.cards-section {
  padding: 3rem 1.25rem 4rem;
}

.section-label {
  text-align: center;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 0.5rem;
}

.section-title {
  text-align: center;
  margin-bottom: 0.75rem;
}

.section-sub {
  text-align: center;
  margin-bottom: 2.5rem;
  font-size: 1rem;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  max-width: 1000px;
  margin: 0 auto;
}

.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow);
  transition: box-shadow 0.25s, transform 0.2s;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-3px);
}

.card-icon {
  width: 48px;
  height: 48px;
  background: var(--blue-light);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.card h3 {
  font-size: 1.15rem;
  color: var(--text);
}

.card p {
  font-size: 0.9rem;
  flex: 1;
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--blue);
  font-weight: 600;
  font-size: 0.9rem;
  margin-top: 0.5rem;
  transition: gap 0.2s;
}

.card-link:hover {
  gap: 0.7rem;
  text-decoration: none;
}

/* ===========================
   CALCULATOR PAGE LAYOUT
=========================== */
.calc-hero {
  background: linear-gradient(135deg, var(--blue) 0%, #1d4ed8 100%);
  padding: 2.5rem 1.25rem 2rem;
  color: white;
  text-align: center;
}

.calc-hero h1 {
  color: white;
  margin-bottom: 0.5rem;
}

.calc-hero p {
  color: rgba(255,255,255,0.85);
  max-width: 520px;
  margin: 0 auto;
}

.calc-section {
  padding: 2.5rem 1.25rem 4rem;
  max-width: 640px;
  margin: 0 auto;
}

/* ===========================
   CALCULATOR FORM
=========================== */
.calc-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
}

.form-group {
  margin-bottom: 1.25rem;
}

label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.4rem;
}

input[type="number"],
select {
  width: 100%;
  padding: 0.65rem 0.9rem;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  color: var(--text);
  background: var(--white);
  transition: border-color 0.2s, box-shadow 0.2s;
  appearance: none;
  -webkit-appearance: none;
}

input[type="number"]:focus,
select:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.12);
}

/* Radio group (køn) */
.radio-group {
  display: flex;
  gap: 0.75rem;
}

.radio-option {
  flex: 1;
  position: relative;
}

.radio-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
}

.radio-option label {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.875rem;
  transition: all 0.15s;
  background: var(--white);
  text-align: center;
}

.radio-option input[type="radio"]:checked + label {
  border-color: var(--blue);
  background: var(--blue-light);
  color: var(--blue);
}

/* ===========================
   BUTTON
=========================== */
.btn {
  display: inline-block;
  width: 100%;
  padding: 0.8rem 1.5rem;
  background: var(--blue);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  margin-top: 0.5rem;
}

.btn:hover {
  background: var(--blue-dark);
}

.btn:active {
  transform: scale(0.98);
}

/* ===========================
   RESULT BOX
=========================== */
.result-box {
  margin-top: 1.5rem;
  padding: 1.5rem;
  background: var(--blue-light);
  border: 1.5px solid var(--blue-mid);
  border-radius: var(--radius);
  display: none;
}

.result-box.visible {
  display: block;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.result-label {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--blue);
  margin-bottom: 0.4rem;
}

.result-value {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.1;
  margin-bottom: 0.5rem;
}

.result-category {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.cat-underweight  { background: #fef9c3; color: #854d0e; }
.cat-normal       { background: #dcfce7; color: #166534; }
.cat-overweight   { background: #ffedd5; color: #9a3412; }
.cat-obese        { background: #fee2e2; color: #991b1b; }

.result-description {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Salary specific result */
.salary-breakdown {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-top: 1rem;
}

.salary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--blue-mid);
}

.salary-row:last-child { border-bottom: none; }
.salary-row .row-label { color: var(--text-muted); }
.salary-row .row-value { font-weight: 700; color: var(--text); }
.salary-row.total .row-label { font-weight: 700; color: var(--text); font-size: 1rem; }
.salary-row.total .row-value { color: var(--success); font-size: 1.1rem; }

/* Calorie activity pills */
.calorie-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-top: 1rem;
}

.calorie-item {
  background: white;
  border: 1px solid var(--blue-mid);
  border-radius: 8px;
  padding: 0.75rem;
  text-align: center;
}

.calorie-item .ci-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.2rem;
}

.calorie-item .ci-value {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
}

/* ===========================
   BACK LINK
=========================== */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: rgba(255,255,255,0.85);
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 1.25rem;
  transition: color 0.2s;
}

.back-link:hover {
  color: white;
  text-decoration: none;
}

/* ===========================
   INFO BOX
=========================== */
.info-box {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  margin-top: 1.5rem;
  box-shadow: var(--shadow);
}

.info-box h2 {
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
  color: var(--text);
}

.info-box p {
  font-size: 0.9rem;
  line-height: 1.65;
}

.info-box p + p {
  margin-top: 0.75rem;
}

/* ===========================
   FOOTER
=========================== */
footer {
  background: var(--text);
  color: rgba(0,0,0);
  text-align: center;
  padding: 2rem 1.25rem;
  font-size: 0.85rem;
  margin-top: auto;
}

footer a {
  color: rgba(255,255,255,0.65);
}

footer a:hover {
  color: black;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  list-style: none;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

/* ===========================
   RESPONSIVE
=========================== */
@media (max-width: 600px) {
  nav { padding: 0.9rem 1rem; }

  .nav-links {
    display: none;
  }

  .hero { padding: 3rem 1rem 2.5rem; }

  .cards-grid {
    grid-template-columns: 1fr;
  }

  .calc-card { padding: 1.5rem 1.25rem; }

  .calorie-detail { grid-template-columns: 1fr 1fr; }

  .result-value { font-size: 1.8rem; }
}

/* ===========================
   PAGE TRANSITIONS (GLOBAL)
=========================== */

.page-exit {
  animation: pageExit 0.45s forwards ease;
}

@keyframes pageExit {
  0% {
    opacity: 1;
    transform: translateX(0);
  }
  100% {
    opacity: 0;
    transform: translateX(-40px);
  }
}

.page-enter {
  animation: pageEnter 0.45s forwards ease;
}

@keyframes pageEnter {
  0% {
    opacity: 0;
    transform: translateX(40px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }

.theme-btn {
  background: none;
  border: none;
  font-size: 1.4rem;
  cursor: pointer;
  color: var(--text-muted);
  transition: color 0.2s, transform 0.2s;
}

.theme-btn:hover {
  color: var(--blue);
  transform: scale(1.15);
}

body, header, footer, .card, .calc-card, .info-box {
  transition: background 0.25s, color 0.25s, border-color 0.25s;
}

nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

* {
  transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}


}
