/* ============================================
   HNOTEKNIK – UX design, mörkt tema, originalfärger
   Mobilförst, responsiv, tillgänglig
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700&display=swap');

:root {
  /* Originalfärger – behållna från start */
  --bg: #1C1B1F;
  --surface: #2B2930;
  --surface-dim: #252528;
  --border: #49454F;
  --primary: #8AB4F8;
  --primary-light: #AECBFA;
  --primary-dark: #5B9BF8;
  --text: #E6E1E5;
  --text-muted: #CAC4D0;
  --success: #3fb950;
  --error: #f85149;
  --warning: #e3b341;

  --radius: 12px;
  --radius-lg: 16px;
  --shadow: 0 4px 24px rgba(0,0,0,.25);
  --shadow-glow: 0 0 32px -6px rgba(138, 180, 248, .22);
  --transition: 0.2s ease;
}

/* Base */
*, *::before, *::after { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text-muted);
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Layout */
.container {
  width: 100%;
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}
@media (min-width: 640px) {
  .container { padding-left: 1.5rem; padding-right: 1.5rem; }
}
@media (min-width: 1024px) {
  .container { padding-left: 2rem; padding-right: 2rem; }
}

.section {
  padding: 3rem 0;
}
@media (min-width: 640px) {
  .section { padding: 4rem 0; }
}
@media (min-width: 1024px) {
  .section { padding: 5rem 0; }
}

/* Grid – mobilförst */
.grid {
  display: grid;
  gap: 1rem;
}
.grid--2 { grid-template-columns: 1fr; }
.grid--3 { grid-template-columns: 1fr; }
@media (min-width: 640px) {
  .grid--2 { grid-template-columns: repeat(2, 1fr); gap: 1.25rem; }
  .grid--3 { grid-template-columns: repeat(2, 1fr); gap: 1.25rem; }
}
@media (min-width: 1024px) {
  .grid--2 { gap: 1.5rem; }
  .grid--3 { grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
}

/* Header / Nav – en tydlig kant, ingen extra strimma under */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--surface-dim);
  border-bottom: 1px solid var(--border);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 3.5rem;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}
@media (min-width: 768px) {
  .site-header .container { min-height: 4rem; }
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text);
  font-weight: 700;
  font-size: 1.1rem;
  text-decoration: none;
  min-height: 44px;
  padding: 0.25rem 0;
}
.logo img { width: 32px; height: 32px; flex-shrink: 0; }
@media (min-width: 768px) {
  .logo { font-size: 1.2rem; }
  .logo img { width: 36px; height: 36px; }
}
.logo:hover { color: var(--primary); }

.nav-desktop {
  display: none;
}
@media (min-width: 768px) {
  .nav-desktop {
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }
  .nav-desktop a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9375rem;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius);
    transition: color var(--transition), background var(--transition);
  }
  .nav-desktop a:hover {
    color: var(--primary);
    background: rgba(138, 180, 248, 0.08);
  }
}

.nav-dropdown {
  position: relative;
}
.nav-dropdown-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--text-muted);
  background: none;
  border: none;
  font: inherit;
  font-weight: 500;
  cursor: pointer;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius);
  transition: color var(--transition), background var(--transition);
}
.nav-dropdown-trigger:hover { color: var(--primary); background: rgba(138, 180, 248, 0.08); }
.nav-dropdown-trigger svg { flex-shrink: 0; stroke: currentColor; fill: none; }
.nav-dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 0.25rem;
  min-width: 11rem;
  background: var(--surface-dim);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 0.25rem;
  display: none;
}
.nav-dropdown.is-open .nav-dropdown-menu { display: block; }
.nav-dropdown-menu a {
  display: block;
  color: var(--text-muted);
  text-decoration: none;
  padding: 0.65rem 0.75rem;
  border-radius: 6px;
  font-size: 0.9375rem;
  transition: background var(--transition), color var(--transition);
}
.nav-dropdown-menu a:hover {
  background: var(--primary);
  color: var(--bg);
}

/* Mobil meny-knapp */
.nav-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: var(--radius);
  transition: color var(--transition), background var(--transition);
}
.nav-toggle:hover { color: var(--primary); background: rgba(138, 180, 248, 0.08); }
@media (min-width: 768px) {
  .nav-toggle { display: none; }
}

.nav-toggle-icon {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

/* Mobilmeny – syns inte alls när den är stängd (ingen konstig strimma) */
.nav-mobile {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  background: var(--surface-dim);
  border-top: none;
  transition: max-height 0.25s ease, opacity 0.2s ease;
}
@media (min-width: 768px) {
  .nav-mobile { display: none !important; }
}
.nav-mobile:not(.is-hidden) {
  max-height: 20rem;
  opacity: 1;
  border-top: 1px solid var(--border);
}
.nav-mobile a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 1rem;
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  border-bottom: 1px solid var(--border);
  transition: background var(--transition), color var(--transition);
}
.nav-mobile a:last-child { border-bottom: none; }
.nav-mobile a:hover {
  background: var(--primary);
  color: var(--bg);
}
.nav-mobile-divider { height: 1px; background: var(--border); margin: 0.25rem 0; }

/* Main – sidor utan hero behöver luft under header */
main { padding-top: 3.5rem; }

/* Hero – går ända upp till headern (margin-top tar bort gap), ingen synlig strimma */
.hero {
  margin-top: -3.5rem;
  background: linear-gradient(180deg, var(--surface-dim) 0%, var(--surface) 12%, var(--bg) 100%);
  padding: 3.5rem 0 2.5rem;
}
@media (min-width: 640px) {
  .hero { padding: 4rem 0 3.5rem; }
}
@media (min-width: 1024px) {
  .hero { padding: 4.5rem 0 4.5rem; }
}

.hero__inner {
  display: grid;
  gap: 2rem;
  align-items: center;
}
@media (min-width: 1024px) {
  .hero__inner { grid-template-columns: 1fr 1fr; gap: 3rem; }
  .hero__content { order: 1; }
  .hero__image { order: 2; text-align: right; }
}

.hero__badge {
  color: var(--primary);
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 1rem;
  letter-spacing: 0.02em;
}
.hero__title {
  margin: 0 0 1rem;
  font-size: clamp(1.75rem, 5vw, 2.75rem);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
  letter-spacing: -0.03em;
}
.hero__title .highlight { color: var(--primary); }
.hero__lead {
  margin: 0 0 0.75rem;
  font-size: 1.0625rem;
  color: var(--text-muted);
  max-width: 34ch;
  line-height: 1.65;
}
.hero__meta {
  margin: 0 0 1.5rem;
  font-size: 0.9375rem;
  color: var(--text-muted);
  font-style: italic;
}
.hero__meta strong { color: var(--text); }

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.hero__image img {
  max-width: 100%;
  width: 200px;
  height: auto;
  filter: drop-shadow(0 0 24px rgba(138, 180, 248, 0.2));
}
@media (min-width: 640px) {
  .hero__image img { width: 260px; }
}
@media (min-width: 1024px) {
  .hero__image img { width: 280px; }
}

/* Knappar – UX: tydliga, touch-vänliga */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.6rem 1.25rem;
  font: inherit;
  font-weight: 600;
  font-size: 0.9375rem;
  border-radius: var(--radius);
  cursor: pointer;
  text-decoration: none;
  transition: background var(--transition), color var(--transition), box-shadow var(--transition), transform var(--transition);
  border: none;
}
.btn--primary {
  background: var(--primary);
  color: var(--bg);
}
.btn--primary:hover {
  background: var(--primary-light);
  box-shadow: var(--shadow-glow);
  transform: translateY(-1px);
}
.btn--outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}
.btn--outline:hover {
  background: var(--primary);
  color: var(--bg);
  transform: translateY(-1px);
}
.btn--block { width: 100%; }

/* Sektionsrubriker */
.section-title {
  margin: 0 0 0.75rem;
  font-size: 1.625rem;
  font-weight: 700;
  color: var(--text);
  text-align: center;
  letter-spacing: -0.02em;
}
@media (min-width: 640px) {
  .section-title { font-size: 1.875rem; }
}
.section-lead {
  margin: 0 auto 2.25rem;
  max-width: 40ch;
  text-align: center;
  color: var(--text-muted);
  font-size: 1.0625rem;
  line-height: 1.6;
}
@media (min-width: 640px) {
  .section-lead { margin-bottom: 2.75rem; font-size: 1.125rem; }
}

/* Kort – tjänster, boxar */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  height: 100%;
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}
.card:hover {
  border-color: rgba(138, 180, 248, 0.35);
  box-shadow: var(--shadow-glow);
  transform: translateY(-2px);
}
.card__icon {
  color: var(--primary);
  margin-bottom: 1.25rem;
  display: flex;
  justify-content: center;
}
.card__icon svg { width: 44px; height: 44px; }
.card__title {
  margin: 0 0 0.6rem;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text);
  text-align: center;
  letter-spacing: -0.01em;
}
.card__text {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.6;
}

.box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.box:hover {
  border-color: rgba(138, 180, 248, 0.25);
  box-shadow: var(--shadow-glow);
}
@media (min-width: 640px) {
  .box { padding: 1.75rem; }
}
@media (min-width: 1024px) {
  .box { padding: 2rem; }
}
.box__title {
  margin: 0 0 1rem;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text);
}
.box .content ul { margin: 0; padding-left: 1.25rem; }
.box .content li { margin-bottom: 0.5rem; color: var(--text-muted); }
.box .content li:last-child { margin-bottom: 0; }
.box .content p { margin: 0 0 0.75rem; color: var(--text-muted); }
.box .content p:last-child { margin-bottom: 0; }
.box .content strong { color: var(--text); }

/* FAQ */
.faq-list { margin: 0; padding: 0; list-style: none; }
.faq-item {
  margin-bottom: 0.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color var(--transition);
}
.faq-item:hover { border-color: rgba(138, 180, 248, 0.4); }
.faq-item summary {
  padding: 1rem 1.25rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  list-style: none;
  min-height: 44px;
  display: flex;
  align-items: center;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item[open] summary { border-bottom: 1px solid var(--border); }
.faq-item p {
  margin: 0;
  padding: 0 1.25rem 1rem;
  color: var(--text-muted);
  font-size: 0.9375rem;
  line-height: 1.55;
}

/* Formulär – UX: tydliga etiketter, stora fält */
.form-group { margin-bottom: 1.25rem; }
.form-label {
  display: block;
  margin-bottom: 0.35rem;
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--text-muted);
}
.form-input,
.form-textarea {
  width: 100%;
  min-height: 44px;
  padding: 0.65rem 1rem;
  font: inherit;
  font-size: 16px; /* undvik iOS-zoom */
  color: var(--text);
  background: var(--surface-dim);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.form-textarea {
  min-height: 120px;
  resize: vertical;
}
.form-input::placeholder,
.form-textarea::placeholder { color: var(--text-muted); opacity: 0.8; }
.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(138, 180, 248, 0.2);
}

.form-message {
  margin-bottom: 1rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  font-weight: 600;
  text-align: center;
}
.form-message--success { background: rgba(63, 185, 80, 0.15); color: var(--success); }
.form-message--error { background: rgba(248, 81, 73, 0.15); color: var(--error); }

/* Footer */
.site-footer {
  margin-top: auto;
  background: var(--surface-dim);
  border-top: 1px solid var(--border);
  padding: 2rem 0;
}
@media (min-width: 640px) {
  .site-footer { padding: 2.5rem 0; }
}

.site-footer .grid {
  gap: 1.5rem;
}
@media (min-width: 640px) {
  .site-footer .grid { gap: 2rem; }
}

.footer-title {
  margin: 0 0 0.75rem;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
}
.footer-list {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.9375rem;
  color: var(--text-muted);
}
.footer-list li { margin-bottom: 0.35rem; }
.footer-list a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--transition);
}
.footer-list a:hover { color: var(--primary); }
.footer-copy { font-size: 0.8125rem; color: var(--text-muted); margin-top: 1rem; }

/* Tabell (priser) */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-top: 1rem;
}
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}
.table th {
  text-align: left;
  padding: 0.75rem 1rem;
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
  border-bottom: 1px solid var(--border);
}
.table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
}
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr:hover td { background: rgba(255,255,255,0.02); }
.table .price { color: var(--primary); font-weight: 700; }

/* Util */
.text-primary { color: var(--primary); }
.scroll-mt { scroll-margin-top: 4.5rem; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* Fokus – tillgänglighet */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Safe area (notch) */
@supports (padding: env(safe-area-inset-bottom)) {
  body { padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right); }
  .site-footer { padding-bottom: calc(2rem + env(safe-area-inset-bottom)); }
}

* { -webkit-tap-highlight-color: rgba(138, 180, 248, 0.15); }
