/* =========================================================================
   Manden Med Jernet — fælles stylesheet
   Fonts: Fraunces (overskrifter) · Hanken Grotesk (brødtekst)
   Palette: jordnære rust- og brunt-toner, antracit, terrakotta-accent
   ========================================================================= */

:root {
  /* --- Baggrunde --- */
  --cream:      #F4EEE4;   /* sidens varme off-white */
  --paper:      #FBF7F0;   /* let lysere kort/sektioner */
  --sand:       #ECE3D4;   /* subtil alternativ sektion */
  --ink:        #221F1C;   /* antracit / næsten-sort, varm */
  --ink-soft:   #2E2A26;

  /* --- Jern & jord --- */
  --iron:       #514B45;   /* stålgrå */
  --iron-light: #8A8178;
  --brown:      #6B513A;   /* (overskrives nedenfor) */
  --warm-brown: #715739;
  --rust-deep:  #7C3D22;

  /* --- Accent (terrakotta) — kan ændres via tweaks --- */
  --accent:        #B5512E;
  --accent-hover:  #9C4326;
  --accent-soft:   #E9D2C5;
  --accent-tint:   #F6E7DE;

  /* --- Tekst --- */
  --text:        #2A2521;
  --text-muted:  #6E645A;
  --text-faint:  #998E82;
  --on-dark:     #F3EBDD;
  --on-dark-mut: #B7AC9C;

  /* --- Linjer --- */
  --line:        #DCD1C0;
  --line-strong: #C6B8A2;

  /* --- Fonts --- */
  --font-display: 'Oswald', 'Arial Narrow', sans-serif;
  --font-body:    'Hanken Grotesk', system-ui, -apple-system, sans-serif;

  /* --- Tekstur-intensitet (tweakbar 0–1) --- */
  --grain: 0.05;
  /* --- Overskrifts-vægt (tweakbar) --- */
  --heading-weight: 600;

  /* --- Mål --- */
  --maxw: 1200px;
  --gutter: clamp(20px, 5vw, 48px);
  --radius:  4px;
  --radius-lg: 10px;

  --shadow-sm: 0 1px 3px rgba(40, 28, 16, .08), 0 1px 2px rgba(40, 28, 16, .06);
  --shadow-md: 0 6px 22px rgba(54, 36, 20, .12), 0 2px 6px rgba(54, 36, 20, .08);
  --shadow-lg: 0 22px 54px rgba(46, 30, 16, .22), 0 8px 18px rgba(46, 30, 16, .12);

  --ease: cubic-bezier(.22, .61, .36, 1);
}

/* =========================================================================
   Reset / base
   ========================================================================= */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--cream);
  font-size: 18px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* subtil korn-tekstur over hele siden — styres af --grain */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9000;
  opacity: var(--grain);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}

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

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: var(--heading-weight);
  line-height: 1.06;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--ink);
  text-wrap: balance;
}

p { text-wrap: pretty; }

::selection { background: var(--accent); color: #fff; }

/* =========================================================================
   Layout helpers
   ========================================================================= */
.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.wrap-wide { max-width: 1340px; }
.wrap-narrow { max-width: 820px; }

section { position: relative; }

.section-pad   { padding-block: clamp(64px, 9vw, 120px); }
.section-pad-s { padding-block: clamp(48px, 6vw, 80px); }

.bg-paper { background: var(--paper); }
.bg-sand  { background: var(--sand); }
.bg-dark  { background: var(--ink); color: var(--on-dark); }
.bg-dark h1, .bg-dark h2, .bg-dark h3, .bg-dark h4 { color: var(--on-dark); }

/* Eyebrow / lille overskrift */
.eyebrow {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 26px;
  height: 1.5px;
  background: var(--accent);
  display: inline-block;
}
.eyebrow.center::before { display: none; }

.bg-dark .eyebrow { color: var(--accent-soft); }
.bg-dark .eyebrow::before { background: var(--accent-soft); }

/* Section-titler */
.section-head { max-width: 720px; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head h2 {
  font-size: clamp(32px, 4.4vw, 52px);
  margin-top: 18px;
}
.section-head p {
  margin-top: 18px;
  font-size: 19px;
  color: var(--text-muted);
}

/* =========================================================================
   Knapper
   ========================================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.005em;
  padding: 15px 30px;
  border-radius: var(--radius);
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform .18s var(--ease), background .18s var(--ease),
              color .18s var(--ease), box-shadow .18s var(--ease), border-color .18s var(--ease);
  line-height: 1;
  white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; }
.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 8px 20px -8px color-mix(in oklab, var(--accent) 70%, #000);
}
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-2px); }
.btn-primary:active { transform: translateY(0) scale(.99); }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-strong);
}
.btn-ghost:hover { border-color: var(--ink); background: rgba(0,0,0,.03); transform: translateY(-2px); }

.bg-dark .btn-ghost { color: var(--on-dark); border-color: rgba(255,255,255,.28); }
.bg-dark .btn-ghost:hover { border-color: var(--on-dark); background: rgba(255,255,255,.07); }

.btn-lg { padding: 18px 36px; font-size: 17px; }

/* tekst-link med pil */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--accent);
  font-size: 16px;
}
.link-arrow svg { width: 17px; height: 17px; transition: transform .2s var(--ease); }
.link-arrow:hover svg { transform: translateX(4px); }

/* =========================================================================
   Header / navigation
   ========================================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 800;
  background: color-mix(in oklab, var(--cream) 88%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s, box-shadow .25s, background .25s;
}
.site-header.scrolled {
  border-bottom-color: var(--line);
  box-shadow: 0 2px 16px rgba(40, 28, 16, .06);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 78px;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  padding: 0;
}
.nav-links a {
  display: block;
  font-size: 15.5px;
  font-weight: 500;
  color: var(--text);
  padding: 9px 15px;
  border-radius: var(--radius);
  position: relative;
  transition: color .18s;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 15px; right: 15px;
  bottom: 4px;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .22s var(--ease);
}
.nav-links a:hover { color: var(--accent); }
.nav-links a:hover::after,
.nav-links a.active::after { transform: scaleX(1); }
.nav-links a.active { color: var(--ink); font-weight: 600; }

.nav-cta { display: flex; align-items: center; gap: 14px; }

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 8px;
  color: var(--ink);
}
.nav-toggle svg { width: 26px; height: 26px; }

/* =========================================================================
   Logo (ordmærke)
   ========================================================================= */
.logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.logo-mark { width: 40px; height: 40px; flex: none; color: var(--accent); }
.bg-dark .logo-mark, .site-footer .logo-mark { color: var(--accent); }
.logo-word {
  display: flex;
  flex-direction: column;
  line-height: 1;
}
.logo-word b {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 19px;
  letter-spacing: -0.01em;
  color: var(--ink);
  white-space: nowrap;
}
.logo-word span {
  font-family: var(--font-body);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 3px;
}
.site-footer .logo-word b { color: var(--on-dark); }
.site-footer .logo-word span { color: var(--on-dark-mut); }

/* =========================================================================
   Fastgjorte kontakt-ikoner (højre side)
   ========================================================================= */
.dock {
  position: fixed;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 700;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.dock a {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  background: var(--ink);
  color: var(--on-dark);
  border-radius: 8px 0 0 8px;
  transition: background .18s var(--ease), width .18s var(--ease), color .18s;
  position: relative;
}
.dock a:first-child { border-top-left-radius: 12px; }
.dock a:last-child  { border-bottom-left-radius: 12px; }
.dock a svg { width: 21px; height: 21px; }
.dock a:hover { background: var(--accent); width: 56px; }
.dock a .tip {
  position: absolute;
  right: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%) translateX(6px);
  background: var(--ink);
  color: var(--on-dark);
  font-size: 13px;
  font-weight: 500;
  padding: 6px 11px;
  border-radius: 6px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s, transform .18s var(--ease);
  box-shadow: var(--shadow-md);
}
.dock a:hover .tip { opacity: 1; transform: translateY(-50%) translateX(0); }

/* =========================================================================
   Kort / badges
   ========================================================================= */
.card {
  background: var(--paper);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  border: 1px solid var(--line);
  transition: transform .28s var(--ease), box-shadow .28s var(--ease);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--rust-deep);
  background: var(--accent-tint);
  border: 1px solid var(--accent-soft);
  padding: 7px 14px;
  border-radius: 999px;
}
.badge svg { width: 15px; height: 15px; }

/* =========================================================================
   Footer
   ========================================================================= */
.site-footer {
  background: var(--ink);
  color: var(--on-dark);
  padding-top: clamp(56px, 7vw, 88px);
}
.site-footer a { color: var(--on-dark); }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 56px;
}
.site-footer h4 {
  font-family: var(--font-body);
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--on-dark-mut);
  font-weight: 600;
  margin-bottom: 18px;
}
.footer-col p, .footer-col li { color: var(--on-dark-mut); font-size: 16px; }
.footer-col ul { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 11px; }
.footer-col a:hover { color: var(--accent-soft); }
.footer-tagline { margin-top: 18px; color: var(--on-dark-mut); max-width: 34ch; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.10);
  padding-block: 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 14px;
  color: var(--on-dark-mut);
}

/* =========================================================================
   Reveal-on-scroll
   ========================================================================= */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}
.reveal.in { opacity: 1; transform: none; }
.reveal.settled { transition: none !important; opacity: 1 !important; transform: none !important; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* =========================================================================
   Image-slot styling
   ========================================================================= */
image-slot {
  background: var(--sand);
  --is-placeholder-color: var(--text-faint);
}

/* =========================================================================
   Mobil-navigation
   ========================================================================= */
@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; }
  .nav-links {
    position: fixed;
    inset: 78px 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--cream);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md);
    padding: 10px var(--gutter) 20px;
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s, transform .2s var(--ease);
  }
  .nav-links.open { opacity: 1; transform: none; pointer-events: auto; }
  .nav-links a { padding: 14px 4px; font-size: 18px; border-bottom: 1px solid var(--line); }
  .nav-links a::after { display: none; }
  .nav .nav-cta .btn { display: none; }
  .footer-grid { grid-template-columns: 1fr; gap: 36px; }
}

@media (max-width: 560px) {
  body { font-size: 17px; }
  .dock a { width: 44px; height: 44px; }
  .dock a:hover { width: 48px; }
}
