/* ============================================================
   Löfvendahl Systems — personlig forside
   Stil: shadcn/ui (nøytral base, Geist), mørk som standard.
   Selvstendig — ingen byggetrinn, ingen CDN nødvendig.
   ============================================================ */

/* ---- Design-tokens (shadcn neutral) ---------------------- */
:root {
  --background: 0 0% 100%;
  --foreground: 0 0% 3.9%;
  --card: 0 0% 100%;
  --card-foreground: 0 0% 3.9%;
  --muted: 0 0% 96.1%;
  --muted-foreground: 0 0% 45.1%;
  --primary: 0 0% 9%;
  --primary-foreground: 0 0% 98%;
  --secondary: 0 0% 96.1%;
  --secondary-foreground: 0 0% 9%;
  --accent: 0 0% 96.1%;
  --border: 0 0% 89.8%;
  --input: 0 0% 89.8%;
  --ring: 0 0% 63%;
  --radius: 0.75rem;

  --shadow-sm: 0 1px 2px 0 hsl(0 0% 0% / 0.05);
  --shadow-md: 0 8px 30px -12px hsl(0 0% 0% / 0.18);
  --shadow-lg: 0 24px 60px -20px hsl(0 0% 0% / 0.25);
}

.dark {
  --background: 0 0% 3.9%;
  --foreground: 0 0% 98%;
  --card: 0 0% 5.1%;
  --card-foreground: 0 0% 98%;
  --muted: 0 0% 14.9%;
  --muted-foreground: 0 0% 63.9%;
  --primary: 0 0% 98%;
  --primary-foreground: 0 0% 9%;
  --secondary: 0 0% 14.9%;
  --secondary-foreground: 0 0% 98%;
  --accent: 0 0% 14.9%;
  --border: 0 0% 15.9%;
  --input: 0 0% 15.9%;
  --ring: 0 0% 45%;

  --shadow-md: 0 8px 30px -12px hsl(0 0% 0% / 0.6);
  --shadow-lg: 0 30px 70px -20px hsl(0 0% 0% / 0.7);
}

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

* { margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5.5rem;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: "Geist", ui-sans-serif, system-ui, -apple-system,
    "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: hsl(var(--background));
  color: hsl(var(--foreground));
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "cv11", "ss01";
  transition: background-color 0.3s ease, color 0.3s ease;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; cursor: pointer; }
::selection { background: hsl(var(--foreground) / 0.15); }

.mono {
  font-family: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
}

/* ---- Layout ---------------------------------------------- */
.container {
  width: 100%;
  max-width: 1120px;
  margin-inline: auto;
  padding-inline: 1.5rem;
}

.section {
  padding-block: clamp(2.5rem, 5vw, 3.5rem);
  position: relative;
}

.section-head {
  max-width: 620px;
  margin-bottom: 2.5rem;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: hsl(var(--muted-foreground));
  margin-bottom: 1rem;
}
.eyebrow::before {
  content: "";
  width: 1.75rem;
  height: 1px;
  background: hsl(var(--border));
}

.section h2 {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.section-head p {
  margin-top: 1rem;
  color: hsl(var(--muted-foreground));
  font-size: 1.05rem;
}

.text-muted { color: hsl(var(--muted-foreground)); }

/* ---- Badge ----------------------------------------------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.7rem;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1;
  border: 1px solid hsl(var(--border));
  border-radius: 999px;
  background: hsl(var(--muted) / 0.5);
  color: hsl(var(--muted-foreground));
  white-space: nowrap;
}
.badge .dot {
  width: 6px; height: 6px; border-radius: 999px;
  background: hsl(var(--foreground));
}
/* Statusprikk i produktets egen merkefarge */
.badge-postert,
.badge-reps { color: hsl(var(--foreground)); }
.badge-postert .dot { background: #7c3aed; box-shadow: 0 0 0 3px rgb(124 58 237 / 0.22); }
.badge-reps .dot { background: #00ff66; box-shadow: 0 0 0 3px rgb(0 255 102 / 0.18); }

/* ---- Buttons --------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  height: 2.75rem;
  padding-inline: 1.25rem;
  border-radius: calc(var(--radius) - 0.15rem);
  font-size: 0.925rem;
  font-weight: 500;
  border: 1px solid transparent;
  white-space: nowrap;
  transition: background-color 0.18s ease, color 0.18s ease,
    border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
  user-select: none;
}
.btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px hsl(var(--background)), 0 0 0 4px hsl(var(--ring));
}
.btn svg { width: 1.05em; height: 1.05em; }

.btn-primary {
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
}
.btn-primary:hover { opacity: 0.9; }

.btn-outline {
  background: transparent;
  border-color: hsl(var(--border));
  color: hsl(var(--foreground));
}
.btn-outline:hover { background: hsl(var(--accent)); }

.btn-ghost {
  background: transparent;
  color: hsl(var(--foreground));
}
.btn-ghost:hover { background: hsl(var(--accent)); }

.btn-sm { height: 2.25rem; padding-inline: 0.9rem; font-size: 0.875rem; }
.btn-lg { height: 3rem; padding-inline: 1.6rem; font-size: 1rem; }

.btn .arrow { transition: transform 0.18s ease; }
.btn:hover .arrow { transform: translateX(3px); }

/* ---- Header / Nav ---------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid hsl(var(--border) / 0);
  transition: border-color 0.3s ease, background-color 0.3s ease;
}
.site-header.scrolled {
  border-bottom-color: hsl(var(--border));
  background: hsl(var(--background) / 0.7);
  backdrop-filter: saturate(180%) blur(12px);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.brand .logo {
  display: grid;
  place-items: center;
  width: 2rem; height: 2rem;
  border-radius: 0.55rem;
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  font-weight: 700;
  font-size: 0.95rem;
}
.brand small {
  display: block;
  font-size: 0.7rem;
  font-weight: 400;
  color: hsl(var(--muted-foreground));
  letter-spacing: 0;
  margin-top: -2px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
}
.nav-links a {
  padding: 0.5rem 0.85rem;
  border-radius: 0.5rem;
  font-size: 0.9rem;
  color: hsl(var(--muted-foreground));
  transition: color 0.15s ease, background-color 0.15s ease;
}
.nav-links a:hover { color: hsl(var(--foreground)); background: hsl(var(--accent)); }

.nav-actions { display: flex; align-items: center; gap: 0.5rem; }

.icon-btn {
  display: grid;
  place-items: center;
  width: 2.5rem; height: 2.5rem;
  border-radius: 0.6rem;
  border: 1px solid hsl(var(--border));
  background: transparent;
  color: hsl(var(--foreground));
  transition: background-color 0.15s ease, border-color 0.15s ease;
}
.icon-btn:hover { background: hsl(var(--accent)); }
.icon-btn svg { width: 1.15rem; height: 1.15rem; }

.theme-toggle .sun { display: none; }
.dark .theme-toggle .sun { display: block; }
.dark .theme-toggle .moon { display: none; }

.nav-toggle { display: none; }

/* ---- Hero ------------------------------------------------ */
.hero {
  position: relative;
  padding-top: clamp(3.5rem, 8vw, 6rem);
  padding-bottom: clamp(2rem, 4vw, 2.5rem);
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}
.hero-bg::before {
  /* grid */
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, hsl(var(--foreground) / 0.035) 1px, transparent 1px),
    linear-gradient(to bottom, hsl(var(--foreground) / 0.035) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 75% 65% at 50% 0%, #000 40%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 75% 65% at 50% 0%, #000 40%, transparent 100%);
}
.hero-bg::after {
  /* glow */
  content: "";
  position: absolute;
  top: -25%; left: 50%;
  transform: translateX(-50%);
  width: 60rem; height: 40rem;
  background: radial-gradient(circle at center, hsl(var(--foreground) / 0.08), transparent 60%);
  filter: blur(20px);
}

.hero-inner,
.container-narrow { max-width: 780px; }

.hero .pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.35rem 0.35rem 0.85rem;
  border: 1px solid hsl(var(--border));
  border-radius: 999px;
  background: hsl(var(--muted) / 0.4);
  font-size: 0.82rem;
  color: hsl(var(--muted-foreground));
  margin-bottom: 1.75rem;
}
.hero .pill .tag {
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  background: hsl(var(--foreground));
  color: hsl(var(--background));
  font-weight: 500;
  font-size: 0.72rem;
}

.hero h1 {
  font-size: clamp(2.4rem, 6vw, 4.1rem);
  font-weight: 600;
  line-height: 1.03;
  letter-spacing: -0.035em;
}
.hero h1 .grad {
  background: linear-gradient(120deg, hsl(var(--foreground)), hsl(var(--muted-foreground)));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-lead {
  margin-top: 1.5rem;
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: hsl(var(--muted-foreground));
  max-width: 44ch;
}
.hero-actions {
  margin-top: 2.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.hero-stats {
  margin-top: 3.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid hsl(var(--border));
}
.hero-stats .stat .num {
  font-size: 1.75rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.hero-stats .stat .lbl {
  font-size: 0.85rem;
  color: hsl(var(--muted-foreground));
}

/* ---- Products -------------------------------------------- */
.products-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
  align-items: stretch;
}
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 1.75rem;
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  background: hsl(var(--card));
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}
.card:hover {
  border-color: hsl(var(--foreground) / 0.28);
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}
.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1.15rem;
}
.card-top .badge { font-size: 0.72rem; padding-inline: 0.55rem; }
/* Ekte produktlogoer i lik-stor boks */
.card-logo {
  display: grid;
  place-items: center;
  width: 3rem; height: 3rem;
  border-radius: 0.7rem;
  overflow: hidden;
  flex-shrink: 0;
}
.card-logo img { width: 100%; height: 100%; object-fit: contain; }

.card h3 {
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  margin-bottom: 0.35rem;
}
.card .card-cat {
  font-size: 0.78rem;
  color: hsl(var(--muted-foreground));
  margin-bottom: 0.9rem;
}
.card p { color: hsl(var(--muted-foreground)); font-size: 0.95rem; }

.feat-list {
  list-style: none;
  margin: 1.15rem 0 0;
  display: grid;
  gap: 0.55rem;
}
.feat-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  font-size: 0.9rem;
  color: hsl(var(--foreground));
}
.feat-list svg {
  width: 1rem; height: 1rem;
  margin-top: 0.28rem;
  flex-shrink: 0;
  color: hsl(var(--muted-foreground));
}

.card-foot {
  margin-top: auto;
  padding-top: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: hsl(var(--foreground));
}
.card-link svg { width: 1rem; height: 1rem; transition: transform 0.18s ease; }
.card:hover .card-link svg { transform: translate(2px, -2px); }
.card-url { font-size: 0.82rem; color: hsl(var(--muted-foreground)); }

/* ---- Contact / CTA --------------------------------------- */
.cta {
  border: 1px solid hsl(var(--border));
  border-radius: calc(var(--radius) + 0.35rem);
  padding: clamp(2.5rem, 6vw, 4.5rem);
  text-align: center;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse 80% 120% at 50% -20%, hsl(var(--foreground) / 0.07), transparent 60%),
    hsl(var(--card));
}
.cta h2 { font-size: clamp(1.9rem, 4vw, 2.75rem); font-weight: 600; letter-spacing: -0.025em; }
.cta p { margin: 1rem auto 0; max-width: 46ch; color: hsl(var(--muted-foreground)); font-size: 1.05rem; }
.cta-actions { margin-top: 2rem; display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: center; }

/* ---- Footer ---------------------------------------------- */
.site-footer {
  border-top: 1px solid hsl(var(--border));
  padding-block: 3rem 2.5rem;
  margin-top: 2rem;
}
.footer-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: space-between;
  align-items: flex-start;
}
.footer-brand { max-width: 320px; }
.footer-brand p { margin-top: 0.9rem; font-size: 0.9rem; color: hsl(var(--muted-foreground)); }
.footer-cols { display: flex; gap: 4rem; flex-wrap: wrap; }
.footer-col h4 {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: hsl(var(--muted-foreground));
  margin-bottom: 0.9rem;
  font-weight: 500;
}
.footer-col a {
  display: block;
  font-size: 0.9rem;
  color: hsl(var(--muted-foreground));
  padding: 0.28rem 0;
  transition: color 0.15s ease;
}
.footer-col a:hover { color: hsl(var(--foreground)); }
.footer-bottom {
  margin-top: 2.5rem;
  padding-top: 1.75rem;
  border-top: 1px solid hsl(var(--border));
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  color: hsl(var(--muted-foreground));
}
.footer-bottom .socials { display: flex; gap: 0.5rem; }

/* ---- Reveal animation ------------------------------------ */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.in { opacity: 1; transform: none; }

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

/* ---- Responsive ------------------------------------------ */
@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-toggle { display: grid; }

  .nav-links.open {
    display: flex;
    position: absolute;
    top: 4rem; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0.15rem;
    padding: 0.75rem 1.5rem 1.25rem;
    background: hsl(var(--background) / 0.98);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid hsl(var(--border));
  }
  .nav-links.open a { padding: 0.75rem 0.85rem; }

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

@media (max-width: 520px) {
  .container { padding-inline: 1.25rem; }
  .hero-stats { gap: 1.75rem; }
  .brand small { display: none; }
  .footer-cols { gap: 2.5rem; }
}
