/* ============================================
   Viby J IT Hjælp – styles.css
   Farver, afstande og typografi for hele siden
   ============================================ */

:root {
  --accent: #2a6f9c;
  --accent-dark: #20557a;
  --accent-soft: #edf4f9;
  --ink: #262d33;
  --muted: #55616d;
  --line: #e3e7ea;
  --line-strong: #c9d3da;
  --card: #ffffff;
  --bg: #ffffff;
  --bg-alt: #f6f8f9;
  --error: #b3261e;
  --error-soft: #fdecea;
  --success: #1e7a4d;
  --success-soft: #e9f6ee;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(20, 30, 40, 0.05);
  --shadow-hover: 0 10px 24px rgba(20, 30, 40, 0.08);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  overflow-x: hidden;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Hjælpeklasser ---------- */

.container {
  max-width: 1040px;
  margin-inline: auto;
  padding-inline: 24px;
}

.section {
  padding-block: 64px;
}

.section-alt {
  background: var(--bg-alt);
}

.eyebrow {
  margin: 0 0 8px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
}

h1,
h2,
h3,
h4 {
  color: var(--ink);
  line-height: 1.22;
  font-weight: 700;
  margin: 0;
}

h1 {
  font-size: clamp(2rem, 4.8vw, 2.7rem);
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.45rem, 2.6vw, 1.8rem);
  letter-spacing: -0.01em;
  margin-bottom: 14px;
}

h3 {
  font-size: 1.05rem;
  font-weight: 600;
}

h4 {
  font-size: 0.95rem;
  font-weight: 600;
}

p {
  margin: 0 0 16px;
}

.section-intro {
  max-width: 620px;
  color: var(--muted);
  margin-bottom: 32px;
  font-size: 1.03rem;
}

/* ---------- Fokus og links ---------- */

a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

a:hover {
  color: var(--accent-dark);
}

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

.skip-link {
  position: absolute;
  left: 12px;
  top: -48px;
  background: var(--accent);
  color: #fff;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  z-index: 100;
  transition: top 0.15s ease;
}

.skip-link:focus {
  top: 12px;
  color: #fff;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow 0.2s ease;
}

.site-header.is-scrolled {
  box-shadow: 0 4px 14px rgba(20, 30, 40, 0.07);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-size: 1.02rem;
  font-weight: 700;
}

.brand:hover {
  text-decoration: none;
}

.brand-mark {
  color: var(--accent);
  flex-shrink: 0;
}

.brand-strong {
  color: var(--ink);
}

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

.site-nav ul {
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav a {
  display: inline-block;
  color: var(--ink);
  text-decoration: none;
  font-size: 0.97rem;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 999px;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.site-nav a:hover {
  background: var(--accent-soft);
  color: var(--accent-dark);
}

/* "Få hjælp"-knap i navbaren (desktop) */

.nav-cta {
  background: var(--accent);
  color: #fff !important;
  font-weight: 600;
  padding: 9px 18px;
  margin-left: 8px;
}

.nav-cta:hover {
  background: var(--accent-dark);
  color: #fff !important;
}

/* Hamburger (kun mobil) */

.menu-button {
  display: none;
  align-items: center;
  gap: 8px;
  background: none;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-family: var(--font);
  font-size: 0.95rem;
  color: var(--ink);
  cursor: pointer;
}

.menu-button:hover {
  border-color: var(--line-strong);
}

.menu-icon {
  position: relative;
  width: 16px;
  height: 12px;
  border-top: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
}

.menu-icon::before {
  content: "";
  position: absolute;
  top: 5px;
  left: 0;
  width: 100%;
  height: 2px;
  background: currentColor;
}

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

.hero {
  position: relative;
  padding-block: 42px 36px;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}

/* Diskret punktmønster, der toner ud nedad */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(42, 111, 156, 0.10) 1.1px, transparent 1.1px);
  background-size: 26px 26px;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, transparent 75%);
  mask-image: linear-gradient(to bottom, #000 0%, transparent 75%);
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 640px;
  margin-inline: auto;
  text-align: center;
}

.hero h1 {
  margin-bottom: 8px;
}

.hero-lead {
  font-size: clamp(1.15rem, 2.2vw, 1.3rem);
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 6px;
  line-height: 1.4;
}

.hero-text {
  font-size: 1.02rem;
  color: var(--muted);
  max-width: 540px;
  margin: 0 auto 22px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.hero-meta {
  margin: 14px 0 0;
  font-size: 0.88rem;
  color: var(--muted);
}

/* ---------- Knapper ---------- */

.btn {
  display: inline-block;
  min-height: 48px;
  padding: 12px 26px;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 2px 6px rgba(42, 111, 156, 0.28);
}

.btn-primary:hover {
  background: var(--accent-dark);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(42, 111, 156, 0.32);
}

.btn-secondary {
  background: var(--bg);
  color: var(--ink);
  border-color: var(--line-strong);
}

.btn-secondary:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-dark);
  transform: translateY(-1px);
}

/* ---------- Services (Det kan jeg hjælpe med) ---------- */

.service-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.service-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.service-card:hover {
  border-color: #b9cedf;
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.service-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  color: var(--accent);
  margin-bottom: 14px;
}

.service-card h3 {
  margin-bottom: 6px;
}

.service-card p {
  color: var(--muted);
  font-size: 0.95rem;
  margin: 0;
}

/* ---------- Priser ---------- */

.price-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-bottom: 24px;
}

.price-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.price-card:hover {
  border-color: #b9cedf;
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.price-card h3 {
  margin-bottom: 8px;
}

.price-card p {
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 18px;
  flex-grow: 1;
}

.price {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--ink) !important;
}

.price-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 2px;
}

.price-more {
  font-size: 0.95rem;
  color: var(--ink);
}

.price-note {
  font-size: 0.9rem;
  color: var(--muted);
  max-width: 720px;
  margin-bottom: 0;
}

/* ---------- Sådan foregår det ---------- */

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  list-style: none;
  margin: 0 0 20px;
  padding: 0;
}

.step {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
  font-size: 1.05rem;
  margin-bottom: 14px;
}

.step h3 {
  margin-bottom: 8px;
}

.step p {
  color: var(--muted);
  font-size: 0.95rem;
  margin: 0;
}

.steps-note {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 0;
}

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

.about-grid {
  display: grid;
  grid-template-columns: 7fr 5fr;
  gap: 44px;
  align-items: start;
}

.about-text p {
  color: var(--muted);
  font-size: 1.05rem;
  margin-bottom: 0;
}

.about-facts {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 26px;
}

.about-facts ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.about-facts li {
  position: relative;
  padding-left: 26px;
  margin-bottom: 13px;
  font-size: 0.97rem;
}

.about-facts li:last-child {
  margin-bottom: 0;
}

.about-facts li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 9px;
  width: 12px;
  height: 7px;
  border-left: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(-45deg);
}

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

.contact-grid {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: 44px;
  align-items: start;
}

.contact-info h3 {
  margin-bottom: 14px;
}

.contact-item {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
  color: var(--ink);
}

.contact-item svg {
  color: var(--accent);
  flex-shrink: 0;
}

.contact-item a {
  overflow-wrap: anywhere;
}

.contact-note {
  font-size: 0.92rem;
  color: var(--muted);
  margin-top: 18px;
  margin-bottom: 0;
}

.contact-hours {
  font-size: 0.92rem;
  color: var(--muted);
  margin-top: 6px;
  margin-bottom: 0;
}

/* ---------- Kontaktformular ---------- */

.contact-form {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: var(--shadow-sm);
}

.field {
  margin-bottom: 20px;
}

.field label {
  display: block;
  font-size: 0.94rem;
  font-weight: 600;
  margin-bottom: 7px;
}

.optional {
  font-weight: 400;
  color: var(--muted);
}

.field input,
.field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 1rem;
  color: var(--ink);
  background: var(--bg);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.field textarea {
  resize: vertical;
  min-height: 110px;
}

.field input:hover:not(:focus),
.field textarea:hover:not(:focus) {
  border-color: var(--line-strong);
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
  background: #fff;
}

/* Fejlmarkering af felter */

.field.is-invalid input,
.field.is-invalid textarea {
  border-color: var(--error);
  box-shadow: 0 0 0 3px var(--error-soft);
}

.field-error {
  margin: 6px 0 0;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--error);
}

/* Afsend-knap med ikon og spinner */

.submit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.submit-btn .btn-icon {
  flex-shrink: 0;
  display: inline-flex;
}

.submit-btn .spinner {
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: form-spin 0.7s linear infinite;
}

.submit-btn.is-sending .spinner {
  display: inline-block;
}

.submit-btn.is-sending .btn-icon {
  display: none;
}

.submit-btn:disabled {
  opacity: 0.75;
  cursor: not-allowed;
}

.submit-btn:disabled:hover {
  background: var(--accent);
  transform: none;
  box-shadow: 0 2px 6px rgba(42, 111, 156, 0.28);
}

@keyframes form-spin {
  to {
    transform: rotate(360deg);
  }
}

/* Statusbesked (sende / succes / fejl) */

.form-status {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 16px 0 0;
  padding: 12px 14px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  line-height: 1.5;
}

.form-status[hidden] {
  display: none;
}

.form-status:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.form-status .status-icon {
  display: none;
  flex-shrink: 0;
  margin-top: 1px;
}

.form-status.is-info {
  background: var(--accent-soft);
  border-color: #cfe0ec;
  color: var(--accent-dark);
}

.form-status.is-success {
  background: var(--success-soft);
  border-color: #c4e3d0;
  color: var(--success);
}

.form-status.is-success .status-icon-success {
  display: inline-flex;
}

.form-status.is-error {
  background: var(--error-soft);
  border-color: #efc9c4;
  color: var(--error);
}

.form-status.is-error .status-icon-error {
  display: inline-flex;
}

.form-note {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 14px 0 0;
}

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

.site-footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--line);
}

.footer-inner {
  padding-block: 36px 28px;
  text-align: center;
}

.footer-name {
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 2px;
}

.footer-tagline {
  color: var(--muted);
  margin-bottom: 14px;
}

.footer-nav ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-nav li {
  display: inline-flex;
  align-items: center;
}

.footer-nav a {
  color: var(--ink);
  text-decoration: none;
  font-size: 0.95rem;
  padding: 4px 2px;
}

.footer-nav a:hover {
  color: var(--accent);
}

.footer-nav li:not(:last-child)::after {
  content: "·";
  margin: 0 10px;
  color: var(--muted);
}

.footer-bottom {
  border-top: 1px solid var(--line);
  padding-block: 14px;
  text-align: center;
}

.footer-bottom p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted);
}

/* ---------- Responsivt ---------- */

@media (max-width: 900px) {
  .service-grid,
  .price-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .about-grid,
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}

@media (max-width: 768px) {
  .section {
    padding-block: 52px;
  }

  .hero {
    padding-block: 36px 28px;
  }

  .contact-form .btn {
    width: 100%;
  }

  .service-grid,
  .price-grid {
    grid-template-columns: 1fr;
  }

  .steps {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .menu-button {
    display: inline-flex;
  }

  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 12px 24px rgba(20, 30, 40, 0.08);
  }

  .site-nav.is-open {
    display: block;
  }

  .site-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 24px 16px;
  }

  .site-nav a {
    display: block;
    padding: 13px 4px;
    font-size: 1.05rem;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
  }

  .site-nav a:hover {
    background: none;
  }

  .site-nav li:last-child a {
    border-bottom: none;
  }

  /* "Få hjælp" som almindeligt link i mobilmenuen */
  .nav-cta,
  .nav-cta:hover {
    background: none;
    color: var(--ink) !important;
    font-weight: 500;
    margin-left: 0;
    padding: 13px 4px;
    border-radius: 0;
  }
}

/* ---------- Meget små skærme (320–480 px) ---------- */

@media (max-width: 480px) {
  .container {
    padding-inline: 20px;
  }

  .header-inner {
    gap: 10px;
    min-height: 56px;
  }

  .brand {
    font-size: 0.95rem;
    gap: 8px;
  }

  .brand-mark {
    width: 28px;
    height: 28px;
  }

  .menu-button {
    padding: 8px 12px;
    font-size: 0.9rem;
  }

  .hero-actions {
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }

  .hero-actions .btn {
    width: 100%;
    max-width: 320px;
  }

  .contact-form {
    padding: 22px 20px;
  }

  .footer-nav ul {
    flex-direction: column;
    align-items: center;
  }

  .footer-nav li {
    margin-bottom: 2px;
  }

  .footer-nav li:not(:last-child)::after {
    content: none;
  }

  .footer-nav a {
    padding: 6px 2px;
  }
}

/* ---------- Tilgængelighed og præferencer ---------- */

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

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
