/* MLI Analytics – styles
   Farver og skrift samlet her, så hele siden kan justeres ét sted. */

:root {
  --paper: #F4F6F3;      /* baggrund – kølig, let grønlig hvid */
  --ink: #17232B;        /* tekst */
  --spruce: #1E4D47;     /* primær – dyb granfarve */
  --spruce-soft: #D7E3DF;/* flader og linjer */
  --signal: #E2A33A;     /* signal – den ene farve der fremhæver */
  --muted: #56646B;      /* sekundær tekst */
  --white: #FFFFFF;

  --font-display: "Bricolage Grotesque", system-ui, sans-serif;
  --font-body: "IBM Plex Sans", system-ui, sans-serif;

  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.3125rem;
  --step-2: 1.75rem;
  --step-3: 2.5rem;
  --step-4: clamp(2.6rem, 6vw, 4.6rem);

  --wrap: 72rem;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
figure { margin: 0; }

a { color: var(--spruce); text-underline-offset: 0.2em; }
a:hover { color: var(--ink); }

:focus-visible {
  outline: 3px solid var(--signal);
  outline-offset: 3px;
  border-radius: 2px;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0;
}

h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); letter-spacing: -0.01em; }

p { margin: 0 0 1em; max-width: 62ch; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* Pladsholdere – markerer tekst der skal udskiftes. Fjern klassen når teksten er rigtig. */
.ph {
  background: rgba(226, 163, 58, 0.22);
  outline: 1px dashed var(--signal);
  outline-offset: 1px;
  border-radius: 2px;
  padding: 0 0.15em;
}

/* ---------- Header ---------- */

.site-header {
  padding: 1.25rem 0;
}

.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  white-space: nowrap;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.logo-mark {
  display: inline-flex;
  align-items: flex-end;
  gap: 3px;
  height: 20px;
}
.logo-mark span {
  width: 5px;
  background: var(--spruce);
  border-radius: 1px;
}
.logo-mark span:nth-child(1) { height: 45%; }
.logo-mark span:nth-child(2) { height: 75%; }
.logo-mark span:nth-child(3) { height: 100%; background: var(--signal); }

.site-nav {
  display: flex;
  gap: clamp(0.9rem, 2.5vw, 1.75rem);
  font-size: var(--step--1);
}
.site-nav a {
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
  padding: 0.7rem 0;   /* større trykflade på mobil */
}
.site-nav a:hover { text-decoration: underline; }

@media (max-width: 560px) {
  .site-nav .nav-optional { display: none; }
}
@media (max-width: 380px) {
  .site-header .wrap { gap: 0.5rem; }
  .site-nav { gap: 0.7rem; font-size: 0.8125rem; }
  .logo { font-size: 1rem; gap: 0.4rem; }
}

/* ---------- Hero ---------- */

.hero {
  padding: clamp(2.5rem, 7vw, 5.5rem) 0 clamp(3rem, 8vw, 6rem);
}

.hero .wrap {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; }
}

.hero h1 {
  font-size: var(--step-4);
  font-weight: 800;
  letter-spacing: -0.035em;
  margin-bottom: 1.5rem;
  max-width: 14ch;
}

.hero-intro {
  font-size: var(--step-1);
  line-height: 1.5;
  color: var(--muted);
  max-width: 34ch;
}

.hero-who {
  font-size: var(--step--1);
  color: var(--muted);
  margin-top: 1.75rem;
}
.hero-who strong { color: var(--ink); font-weight: 600; }

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--step-0);
  padding: 0.8rem 1.4rem;
  border-radius: 6px;
  text-decoration: none;
  border: 2px solid var(--spruce);
  transition: background-color 0.15s, color 0.15s;
}
.btn-primary { background: var(--spruce); color: var(--white); }
.btn-primary:hover { background: var(--ink); border-color: var(--ink); color: var(--white); }
.btn-secondary { background: transparent; color: var(--spruce); }
.btn-secondary:hover { background: var(--spruce); color: var(--white); }

/* Hero-diagrammet: det ene sted siden bruger bevægelse */

.hero-chart {
  background: var(--white);
  border-radius: 14px;
  padding: 1.5rem 1.5rem 1rem;
  box-shadow: 0 1px 0 var(--spruce-soft), 0 24px 48px -28px rgba(30, 77, 71, 0.45);
}

.hero-chart figcaption {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 1rem;
}
.hero-chart .chart-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
}
.hero-chart .chart-legend {
  font-size: 0.8rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
}
.chart-legend .swatch {
  width: 18px;
  border-top: 2px dashed var(--signal);
}

.hero-chart svg { width: 100%; height: auto; display: block; overflow: visible; }

.bar { fill: var(--spruce); transform-box: fill-box; transform-origin: bottom; }
.bar.is-highlight { fill: var(--signal); }
.bar-label { font-family: var(--font-body); font-size: 15px; fill: var(--muted); }
.bar-value { font-family: var(--font-display); font-weight: 700; font-size: 16px; fill: var(--ink); }
.axis { stroke: var(--spruce-soft); stroke-width: 1; }
.target { stroke: var(--signal); stroke-width: 2; stroke-dasharray: 5 5; }

@media (prefers-reduced-motion: no-preference) {
  .bar { animation: grow 0.9s cubic-bezier(.2, .8, .2, 1) both; }
  .bar:nth-of-type(2) { animation-delay: 0.08s; }
  .bar:nth-of-type(3) { animation-delay: 0.16s; }
  .bar:nth-of-type(4) { animation-delay: 0.24s; }
  .bar-value { animation: fade 0.4s ease-out 0.85s both; }
  .target { animation: fade 0.4s ease-out 1s both; }
}
@keyframes grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* ---------- Sektioner ---------- */

section { padding: clamp(3.5rem, 8vw, 6rem) 0; }

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-bottom: 2.25rem;
}
.section-head p { color: var(--muted); margin: 0; max-width: 40ch; }

/* ---------- Cases ---------- */

.cases { background: var(--white); }

.case-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1.25rem;
}

.case {
  grid-column: span 3;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  border-radius: 12px;
  background: var(--paper);
  overflow: hidden;
}
.case:first-child { grid-column: span 6; flex-direction: row; }
.case:first-child .case-thumb { flex: 1.3; min-height: 300px; }
.case:first-child .case-body { flex: 1; align-self: center; }

@media (max-width: 760px) {
  .case, .case:first-child { grid-column: span 6; flex-direction: column; }
  .case:first-child .case-thumb { min-height: 200px; }
}

.case:hover h3 { text-decoration: underline; text-underline-offset: 0.15em; }

.case-thumb {
  background: var(--spruce);
  min-height: 210px;
  position: relative;
  overflow: hidden;
}
.case-thumb img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }

/* Skitse af et dashboard – bruges indtil der er et rigtigt skærmbillede */
.mock {
  position: absolute;
  inset: 1.25rem;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  grid-template-rows: auto 1fr;
  gap: 0.6rem;
}
.mock .kpi {
  background: rgba(255,255,255,0.1);
  border-radius: 6px;
  height: 3rem;
  position: relative;
}
.mock .kpi::after {
  content: "";
  position: absolute;
  left: 0.6rem; bottom: 0.6rem;
  width: 45%; height: 0.55rem;
  background: rgba(255,255,255,0.55);
  border-radius: 2px;
}
.mock .kpi:nth-child(2)::after { background: var(--signal); width: 35%; }
.mock .plot {
  grid-column: span 3;
  background: rgba(255,255,255,0.08);
  border-radius: 6px;
  display: flex;
  align-items: flex-end;
  gap: 6%;
  padding: 0.75rem;
}
.mock .plot i {
  flex: 1;
  background: rgba(255,255,255,0.5);
  border-radius: 2px 2px 0 0;
}
.mock .plot i.hi { background: var(--signal); }

.case-body { padding: 1.5rem 1.5rem 1.75rem; }
.case-meta {
  font-size: var(--step--1);
  color: var(--muted);
  margin-bottom: 0.4rem;
}
.case-body h3 { margin-bottom: 0.6rem; }
.case-body p { font-size: 0.975rem; color: var(--muted); margin: 0; }

.tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 1rem; padding: 0; list-style: none; }
.tags li {
  font-size: 0.8rem;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  background: var(--spruce-soft);
  color: var(--spruce);
}

/* ---------- Arbejdsgang (rigtig rækkefølge, derfor nummereret) ---------- */

.process-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  counter-reset: step;
  border-top: 2px solid var(--ink);
}
@media (max-width: 860px) { .process-list { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .process-list { grid-template-columns: 1fr; } }

.process-list li {
  counter-increment: step;
  padding: 1.25rem 1.5rem 0 0;
}
.process-list li::before {
  content: counter(step);
  display: block;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 2.25rem;
  color: var(--spruce);
  line-height: 1;
  margin-bottom: 0.75rem;
}
.process-list h3 { font-size: 1.15rem; margin-bottom: 0.4rem; }
.process-list p { font-size: 0.95rem; color: var(--muted); }

/* ---------- Om ---------- */

.about { background: var(--spruce); color: var(--paper); }
.about a { color: var(--paper); }
.about .wrap {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
}
@media (max-width: 760px) {
  .about .wrap { grid-template-columns: 1fr; }
  .portrait { max-width: 16rem; }
}

.portrait {
  aspect-ratio: 4 / 5;
  border-radius: 12px;
  background: rgba(255,255,255,0.08);
  border: 1px dashed rgba(255,255,255,0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1.5rem;
  font-size: var(--step--1);
  color: rgba(244,246,243,0.75);
  overflow: hidden;
}
.portrait img { width: 100%; height: 100%; object-fit: cover; object-position: 40% 30%; }
.portrait:has(img) { padding: 0; border: 0; }
@media (min-width: 761px) { .portrait { position: sticky; top: 2rem; } }

.about h2 { margin-bottom: 1.25rem; }
.about .lead { font-size: var(--step-1); line-height: 1.5; }
.about .ph { background: rgba(226,163,58,0.3); }

.cv { margin-top: 2.5rem; }
.cv h3 { font-size: 1.15rem; margin-bottom: 1rem; }
.cv dl { margin: 0; display: grid; grid-template-columns: 8.5rem 1fr; }
.cv dt, .cv dd {
  margin: 0;
  padding: 0.85rem 0;
  border-top: 1px solid rgba(244,246,243,0.2);
}
.cv dt { color: rgba(244,246,243,0.7); font-size: var(--step--1); padding-top: 1rem; }
.cv dd strong { display: block; font-weight: 600; }
.cv dd span { color: rgba(244,246,243,0.75); font-size: 0.95rem; }
@media (max-width: 480px) {
  .cv dl { grid-template-columns: 1fr; }
  .cv dd { border-top: 0; padding-top: 0; }
}

.skills { display: flex; flex-wrap: wrap; gap: 0.4rem; list-style: none; padding: 0; margin: 1rem 0 0; }
.skills li {
  font-size: 0.85rem;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(244,246,243,0.35);
}

/* ---------- Kontakt ---------- */

.contact .wrap { max-width: 48rem; }
.contact h2 { font-size: var(--step-4); font-weight: 800; letter-spacing: -0.035em; margin-bottom: 1.25rem; }
.contact p { font-size: var(--step-1); color: var(--muted); }
.contact-lines { margin-top: 2rem; font-size: var(--step-1); }
.contact-lines a { font-weight: 600; }
.contact-lines div { padding: 0.6rem 0; border-top: 1px solid var(--spruce-soft); display: flex; gap: 1rem; flex-wrap: wrap; }
.contact-lines div span { color: var(--muted); min-width: 6rem; font-size: var(--step-0); padding-top: 0.2rem; }

/* ---------- Footer ---------- */

.site-footer {
  padding: 2rem 0 3rem;
  font-size: var(--step--1);
  color: var(--muted);
}
.site-footer .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.75rem; }

/* ---------- Case-side ---------- */

.case-page .back { font-size: var(--step--1); display: inline-block; padding: 0.7rem 0; margin-bottom: 0.75rem; }
.case-hero { padding: clamp(2rem, 5vw, 3.5rem) 0 2rem; }
.case-hero h1 { font-size: var(--step-4); font-weight: 800; letter-spacing: -0.035em; max-width: 18ch; margin-bottom: 1.25rem; }
.case-hero .summary { font-size: var(--step-1); color: var(--muted); max-width: 46ch; }

.facts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin: 2rem 0 0;
  border-top: 2px solid var(--ink);
}
@media (max-width: 700px) { .facts { grid-template-columns: 1fr 1fr; } }
.facts div { padding: 1rem 1rem 0 0; }
.facts dt { font-size: var(--step--1); color: var(--muted); }
.facts dd { margin: 0.2rem 0 0; font-weight: 600; }

.report {
  margin: 2.5rem 0;
}
.report-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9.6;
  background: var(--white);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 0 var(--spruce-soft), 0 24px 48px -30px rgba(30, 77, 71, 0.5);
}
.report-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.report-empty {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
  color: var(--muted);
  border: 2px dashed var(--spruce-soft);
  border-radius: 12px;
}
.report-empty strong { color: var(--ink); font-family: var(--font-display); font-size: var(--step-1); margin-bottom: 0.5rem; }
.report figcaption { font-size: var(--step--1); color: var(--muted); margin-top: 0.75rem; }

.case-content { padding-top: 1rem; }
.case-content .wrap {
  display: grid;
  grid-template-columns: 14rem 1fr;
  gap: 1rem 3rem;
}
@media (max-width: 760px) { .case-content .wrap { grid-template-columns: 1fr; } }
.case-content h2 { font-size: var(--step-1); padding-top: 0.2rem; }
.case-content .block { margin-bottom: 2.5rem; }
.case-content ul { padding-left: 1.2rem; max-width: 62ch; }
.case-content li { margin-bottom: 0.4rem; }

.next-step {
  background: var(--spruce);
  color: var(--paper);
  border-radius: 14px;
  padding: clamp(1.75rem, 4vw, 3rem);
  margin: 2rem 0 4rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.next-step h2 { font-size: var(--step-2); }
.next-step .btn { background: var(--paper); color: var(--spruce); border-color: var(--paper); }
.next-step .btn:hover { background: var(--signal); border-color: var(--signal); color: var(--ink); }
