/* ============================================================
   AutoFaktura — v4-1 style.css
   Som v4, men i logoets egne farver: rav #FCA43C (mærket) og
   teal #567070 (ordmærket). Rav = handling, teal = detaljer.
   ============================================================ */

:root {
  --bg: #ffffff;
  --tint: #f4f8f7;
  --ink: #1e3236;
  --muted: #5c6f6f;
  --line: #e2eae7;

  --accent: #fca43c;
  --accent-dark: #e8901f;
  --accent-soft: #fdf0dc;
  --teal: #4d6666;
  --teal-strong: #567070;
  --teal-soft: #e9f0ef;
  --success: #4d6666;
  --success-soft: #e9f0ef;

  --font-head: "Plus Jakarta Sans", "Avenir Next", sans-serif;
  --font-body: "Inter", "Helvetica Neue", sans-serif;

  --container: 1160px;
  --radius: 18px;
  --shadow: 0 14px 40px -18px rgba(15, 33, 55, 0.18);
  --nav-h: 76px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 16px); }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

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

.container {
  width: min(var(--container), calc(100% - 48px));
  margin-inline: auto;
}

h1, h2, h3 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.5rem, 5.4vw, 4rem); font-weight: 800; }
h2 { font-size: clamp(1.8rem, 3.2vw, 2.6rem); }
h3 { font-size: 1.15rem; }

.accent { color: var(--accent-dark); }

.eyebrow {
  font-family: var(--font-head);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 1rem;
}

/* ---------- Knapper ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.85rem 1.7rem;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.25s ease, background 0.2s ease, border-color 0.2s ease;
}

.btn--primary {
  background: var(--accent);
  color: #27393b;
  box-shadow: 0 10px 24px -12px rgba(232, 144, 31, 0.6);
}
.btn--primary:hover {
  background: var(--accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 16px 32px -12px rgba(232, 144, 31, 0.6);
}

.btn--ghost {
  border-color: rgba(15, 33, 55, 0.2);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(6px);
}
.btn--ghost:hover { border-color: var(--teal-strong); color: var(--teal); transform: translateY(-2px); }

.btn--sm { padding: 0.55rem 1.2rem; font-size: 0.85rem; }
.btn--lg { padding: 1rem 2.1rem; font-size: 1rem; }
.btn--wide { width: 100%; }

/* ---------- Navigation ---------- */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
  box-shadow: 0 8px 30px -22px rgba(15, 33, 55, 0.35);
}

.nav__inner {
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.nav__brand { display: inline-flex; align-items: center; gap: 0.6rem; flex-shrink: 0; }
.nav__mark { width: 30px; height: 30px; color: var(--accent); }
.nav__wordmark {
  font-family: var(--font-head);
  font-size: 1.22rem;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.nav__wordmark strong { font-weight: 800; }

.nav__links {
  display: flex;
  align-items: center;
  gap: 1.8rem;
  font-size: 0.92rem;
  font-weight: 500;
}
.nav__links > a:not(.btn) { color: var(--muted); transition: color 0.2s ease; }
.nav__links > a:not(.btn):hover { color: var(--ink); }
.nav__login { white-space: nowrap; }

.nav__burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  padding: 8px;
  cursor: pointer;
}
.nav__burger span {
  width: 24px; height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.nav__burger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__burger.is-open span:nth-child(2) { opacity: 0; }
.nav__burger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero__media { position: absolute; inset: 0; }
.hero__video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Tonet fra blå mod teal, så videoen matcher logoets farver */
  filter: hue-rotate(-32deg) saturate(0.72);
}
.hero__overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, rgba(255, 255, 255, 0.65) 0%, rgba(255, 255, 255, 0.25) 40%, rgba(255, 255, 255, 0.85) 88%, var(--bg) 100%),
    linear-gradient(100deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.55) 48%, rgba(255, 255, 255, 0.15) 100%);
}

.hero__content {
  position: relative;
  z-index: 2;
  padding-top: calc(var(--nav-h) + 4vh);
  padding-bottom: 10vh;
}

.hero__content h1 { max-width: 26ch; margin-bottom: 1.4rem; }

.hero__sub {
  max-width: 52ch;
  font-size: clamp(1rem, 1.4vw, 1.15rem);
  color: var(--muted);
  margin-bottom: 2.2rem;
}

/* CTA-knapper og Keyloop-kort: kortet ankres til rækkens bund,
   så dets bundkant flugter præcist med knappernes — og det rager
   opad ved siden af underteksten i stedet for at skubbe knapperne ned. */
.hero__row {
  position: relative;
  margin-bottom: 2.6rem;
}

.hero__actions { display: flex; flex-wrap: wrap; gap: 1rem; }

.hero__trust { display: flex; flex-wrap: wrap; gap: 0.6rem 2rem; }
.hero__trust li {
  position: relative;
  padding-left: 1.6rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--muted);
}
.hero__trust li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.28em;
  width: 1em;
  height: 1em;
  border-radius: 50%;
  background:
    url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none"><path d="M5 12.5l4.5 4.5L19 8" stroke="%23ffffff" stroke-width="3.4" stroke-linecap="round" stroke-linejoin="round"/></svg>') center / 68% no-repeat,
    var(--accent);
}

/* Keyloop Partner Programme-logo i hero.
   Friarealet (halv logohøjde, på hvid) er bagt ind i selve billedfilen,
   jf. Keyloops guidelines — derfor kun let padding her. */
.hero__partner {
  position: absolute;
  right: 0;
  bottom: 0;
  display: block;
  line-height: 0;
  background: #ffffff;
  border: 1px solid rgba(30, 50, 54, 0.1);
  border-radius: calc(var(--radius) + 4px);
  box-shadow: 0 24px 60px -28px rgba(30, 50, 54, 0.28);
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.hero__partner:hover {
  transform: translateY(-3px);
  box-shadow: 0 30px 70px -28px rgba(30, 50, 54, 0.36);
}
/* Billedfilen indeholder friarealet — ved 220px billedbredde er selve logoet
   ~151px, så Keyloops digitale minimum på 150px overholdes ved alle bredder. */
.hero__partner img { display: block; width: clamp(220px, 17vw, 238px); height: auto; }

@media (max-width: 1180px) {
  .hero__partner {
    position: static;
    display: inline-flex;
    width: auto;
    max-width: 100%;
    margin-top: 1.6rem;
  }
  .hero__partner img { max-width: 100%; }
}

.hero__scroll {
  position: absolute;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  z-index: 2;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  color: var(--muted);
  animation: floaty 2.6s ease-in-out infinite;
}
.hero__scroll svg { width: 20px; height: 20px; }
.hero__scroll:hover { color: var(--accent); }

@keyframes floaty {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, 8px); }
}

/* ---------- Sektioner ---------- */
.section { padding: clamp(4.5rem, 9vw, 7.5rem) 0; }
.section--tint { background: var(--tint); }

.section__head {
  text-align: center;
  max-width: 700px;
  margin: 0 auto clamp(2.6rem, 5vw, 4rem);
}
.section__lead { color: var(--muted); margin-top: 1rem; font-size: 1.05rem; }

/* ---------- Automatiseringsflow ---------- */
.flow {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  gap: 1.2rem;
  align-items: stretch;
}

.flow__step {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.9rem 1.6rem;
  box-shadow: var(--shadow);
  text-align: center;
}
.flow__step--center { border-color: rgba(252, 164, 60, 0.55); }

.flow__icon {
  width: 54px;
  height: 54px;
  margin: 0 auto 1.2rem;
  border-radius: 16px;
  display: grid;
  place-items: center;
  color: var(--teal);
  background: var(--teal-soft);
}
.flow__icon svg { width: 26px; height: 26px; }
.flow__icon--brand { background: var(--accent); color: #27393b; }
.flow__icon--done { background: var(--teal-strong); color: #ffffff; }

.flow__step h3 { margin-bottom: 0.55rem; }
.flow__step p { color: var(--muted); font-size: 0.93rem; }

.flow__arrow {
  align-self: center;
  color: #b6c4d4;
}
.flow__arrow svg { width: 40px; height: 24px; }

/* ---------- Fordele-kort ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.2rem;
}

.card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.9rem 1.6rem;
  transition: transform 0.25s ease, box-shadow 0.3s ease;
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }

.card__icon {
  width: 46px;
  height: 46px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  color: var(--teal);
  background: var(--teal-soft);
  margin-bottom: 1.2rem;
}
.card__icon svg { width: 22px; height: 22px; }

.card h3 { margin-bottom: 0.55rem; }
.card p { color: var(--muted); font-size: 0.94rem; }

/* ---------- Splits ---------- */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: center;
}
.split--reverse .split__media { order: 2; }

.split__media {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.split__media img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4 / 3; }

.split__text h2 { margin-bottom: 1.2rem; }
.split__text > p { color: var(--muted); margin-bottom: 1.1rem; max-width: 54ch; }
.split__text .btn { margin-top: 0.8rem; }

.checklist { display: grid; gap: 0.7rem; margin-top: 1.4rem; }
.checklist li {
  position: relative;
  padding-left: 1.8rem;
  font-weight: 500;
}
.checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.22em;
  width: 1.15em;
  height: 1.15em;
  border-radius: 50%;
  background:
    url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none"><path d="M5 12.5l4.5 4.5L19 8" stroke="%23ffffff" stroke-width="3.4" stroke-linecap="round" stroke-linejoin="round"/></svg>') center / 68% no-repeat,
    var(--success);
}

/* ---------- Keyloop partner ---------- */
.partner__inner {
  background:
    radial-gradient(80% 120% at 90% 0%, rgba(252, 164, 60, 0.1), transparent 55%),
    var(--tint);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 6px);
  padding: clamp(2rem, 5vw, 3.5rem);
  max-width: 900px;
  margin-inline: auto;
}
.partner__inner h2 { margin-bottom: 1.2rem; max-width: 22ch; }
.partner__inner > p { color: var(--muted); margin-bottom: 1.1rem; max-width: 62ch; }

/* Keyloop-logo: foretrukken version på hvid; friarealet (halv logohøjde)
   er bagt ind i billedfilen, jf. Keyloops guidelines. */
.partner__badge {
  margin-top: 1.6rem;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 12px;
  display: inline-block;
  line-height: 0;
  overflow: hidden;
}
.partner__badge[hidden] { display: none; }
.partner__badge img { display: block; width: 320px; max-width: 100%; height: auto; }

/* ---------- Trin ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.2rem;
  counter-reset: step;
}

.step {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2rem 1.7rem;
}

.step__num {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: var(--accent);
  color: #27393b;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.05rem;
  margin-bottom: 1.1rem;
}

.step h3 { margin-bottom: 0.5rem; }
.step p { color: var(--muted); font-size: 0.94rem; }

/* ---------- Kontakt ---------- */
.contact__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 1.4rem;
  align-items: start;
}

.contact__form {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2rem;
  display: grid;
  gap: 1.1rem;
}

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }

.field { display: grid; gap: 0.4rem; }
.field span {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink);
}
.field input,
.field textarea {
  background: var(--tint);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.8rem 1rem;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  resize: vertical;
}
.field input:focus,
.field textarea:focus {
  outline: none;
  background: #ffffff;
  border-color: var(--teal-strong);
  box-shadow: 0 0 0 3px rgba(86, 112, 112, 0.16);
}

.contact__formnote { font-size: 0.85rem; color: var(--muted); min-height: 1.2em; }

.contact__info { display: grid; gap: 1.4rem; }

.info-card {
  background: var(--tint);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem 1.7rem;
}
.info-card h3 {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 0.5rem;
}
.info-card a { font-weight: 600; }
.info-card a:hover { color: var(--teal); }
.info-card p { color: var(--muted); }

/* ---------- Footer ---------- */
.footer {
  background: #27393b;
  color: #c9d6d4;
  padding-top: 3.5rem;
}
.footer .nav__mark { color: var(--accent); }
.footer .nav__wordmark { color: #ffffff; }

.footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2.5rem;
  padding-bottom: 2.8rem;
}

.footer__brand p { font-size: 0.9rem; margin-top: 1rem; color: #93a8a6; }

.footer__links { display: grid; gap: 0.55rem; align-content: start; }
.footer__links a { color: #c9d6d4; font-size: 0.92rem; }
.footer__links a:hover { color: #ffffff; }

.footer__contact { font-size: 0.92rem; color: #93a8a6; }
.footer__contact a { display: inline-block; margin-top: 0.4rem; color: #c9d6d4; }
.footer__contact a:hover { color: #ffffff; }

.footer__bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding: 1.4rem 0;
  font-size: 0.82rem;
  color: #93a8a6;
}

/* ---------- Reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.reveal.is-visible { opacity: 1; transform: none; }

.cards .reveal:nth-child(2), .steps .reveal:nth-child(2) { transition-delay: 0.08s; }
.cards .reveal:nth-child(3), .steps .reveal:nth-child(3) { transition-delay: 0.16s; }
.cards .reveal:nth-child(4) { transition-delay: 0.24s; }
.flow .reveal:nth-child(3) { transition-delay: 0.12s; }
.flow .reveal:nth-child(5) { transition-delay: 0.24s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero__scroll { animation: none; }
  * { transition-duration: 0.01ms !important; }
}

/* ---------- Responsivt ---------- */
@media (max-width: 980px) {
  .flow { grid-template-columns: 1fr; }
  .flow__arrow { justify-self: center; transform: rotate(90deg); }
  .split { grid-template-columns: 1fr; }
  .split--reverse .split__media { order: 0; }
  .contact__grid { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr; gap: 1.8rem; }
}

@media (max-width: 760px) {
  .nav__burger { display: flex; }

  .nav__links {
    position: fixed;
    inset: 0;
    z-index: -1;
    flex-direction: column;
    justify-content: center;
    gap: 1.6rem;
    font-size: 1.25rem;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
  }
  .nav__links.is-open { opacity: 1; pointer-events: auto; z-index: 99; }
  .nav.menu-open { background: transparent; border-bottom-color: transparent; box-shadow: none; }
  .nav__burger { position: relative; z-index: 101; }

  .field-row { grid-template-columns: 1fr; }
}
