/* Total Teknisk AS — demo
   Palett fra eksisterende profil: stålblå logo + petrol + CTA-blå */
:root {
  --brand: #3d7a99;
  --brand-dark: #16303f;
  --brand-darker: #0f2230;
  --cta: #0b5fcc;
  --cta-hover: #0a52b0;
  --text: #1d2b33;
  --muted: #56676f;
  --bg-light: #f4f7f9;
  --border: #dde5ea;
  --white: #ffffff;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(22, 48, 63, 0.08), 0 4px 16px rgba(22, 48, 63, 0.07);
  --container: 1140px;
  --font: "Barlow", -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--white);
}

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

h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 0.6em; font-weight: 700; }
h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
a { color: var(--cta); }
ul { padding-left: 1.2em; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--brand-dark); color: var(--white);
  padding: 10px 16px; z-index: 100;
}
.skip-link:focus { left: 0; }

/* Signatur: rørlinje under seksjonstitler */
.section-title {
  position: relative;
  padding-bottom: 14px;
  margin-bottom: 0.8em;
}
.section-title::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 52px; height: 4px;
  border-radius: 4px;
  background: var(--brand);
}
.section-title.center { text-align: center; }
.section-title.center::after { left: 50%; transform: translateX(-50%); }

/* Knapper */
.btn {
  display: inline-block;
  padding: 12px 22px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}
.btn-primary { background: var(--cta); color: var(--white); }
.btn-primary:hover { background: var(--cta-hover); }
.btn-secondary { background: var(--white); color: var(--cta); border-color: var(--cta); }
.btn-secondary:hover { background: #eef4fd; }
.btn-light { background: var(--white); color: var(--brand-dark); }
.btn-light:hover { background: #e8eef2; }
.btn-outline-light { background: transparent; color: var(--white); border-color: rgba(255, 255, 255, 0.7); }
.btn-outline-light:hover { border-color: var(--white); background: rgba(255, 255, 255, 0.08); }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--white);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
}
.header-logo img { width: 200px; height: auto; }

.nav-list {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-list > li > a {
  display: block;
  padding: 10px 12px;
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  border-radius: 6px;
}
.nav-list > li > a:hover { background: var(--bg-light); }
.nav-list > li > a[aria-current="page"] { color: var(--cta); font-weight: 600; }
.nav-cta { margin-left: 8px; }
.nav-cta .btn { padding: 10px 18px; }
.nav-cta .btn:hover { background: var(--cta-hover); }

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  padding: 10px;
  cursor: pointer;
}
.nav-toggle-bar {
  display: block;
  width: 24px; height: 2.5px;
  background: var(--text);
  margin: 5px 0;
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

/* Hero (forside) */
.hero {
  background: linear-gradient(180deg, var(--bg-light) 0%, var(--white) 100%);
  border-bottom: 1px solid var(--border);
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 48px;
  align-items: center;
  padding: 64px 20px;
}
.hero-kicker {
  color: var(--brand);
  font-weight: 600;
  margin-bottom: 10px;
}
.hero h1 { margin-bottom: 0.4em; }
.hero-lead { font-size: 1.15rem; color: var(--muted); max-width: 34em; }
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 26px 0 18px;
}
.hero-points {
  list-style: none;
  padding: 0;
  margin: 0;
  color: var(--muted);
}
.hero-points li {
  padding-left: 26px;
  position: relative;
  margin-bottom: 6px;
}
.hero-points li::before {
  content: "";
  position: absolute;
  left: 0; top: 7px;
  width: 14px; height: 8px;
  border-left: 2.5px solid var(--brand);
  border-bottom: 2.5px solid var(--brand);
  transform: rotate(-45deg);
}
.hero-photo img {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.hero-photo figcaption {
  font-size: 0.9rem;
  color: var(--muted);
  margin-top: 10px;
}

/* Seksjoner */
.section { padding: 64px 0; }
.section-alt { background: var(--bg-light); }
.section-intro { color: var(--muted); max-width: 44em; margin-bottom: 2em; }

/* Kort-grid */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}
.card h3 { margin-bottom: 0.4em; }
.card p { color: var(--muted); flex-grow: 1; }
.card-link {
  font-weight: 600;
  text-decoration: none;
}
.card-link:hover { text-decoration: underline; }
.card-icon {
  width: 46px; height: 46px;
  color: var(--brand);
  margin-bottom: 16px;
}
.card-icon svg { width: 100%; height: 100%; }

/* Bildekort (produkter/tjenester) */
.photo-card {
  padding: 0;
  overflow: hidden;
}
.photo-card img {
  width: 100%;
  height: 190px;
  object-fit: cover;
}
.photo-card .photo-card-body { padding: 24px 28px 28px; display: flex; flex-direction: column; flex-grow: 1; }

/* Privat/Proff todeling */
.split-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.split-panel {
  border-radius: var(--radius);
  padding: 36px;
  color: var(--white);
  background: var(--brand-dark);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.split-panel.light {
  background: var(--white);
  color: var(--text);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.split-panel p { color: inherit; opacity: 0.92; flex-grow: 1; }
.split-panel .btn { margin-top: 12px; }
.split-panel ul { margin: 0 0 1em; opacity: 0.92; }

/* Døgnvakt / CTA-bånd */
.cta-band {
  background: var(--brand-dark);
  color: var(--white);
  padding: 44px 0;
}
.cta-band-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.cta-band h2 { margin-bottom: 0.2em; }
.cta-band p { margin: 0; opacity: 0.85; }
.cta-band-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* Badge-stripe */
.badge-strip {
  background: var(--white);
  border-top: 1px solid var(--border);
  padding: 28px 0;
}
.badge-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 28px 40px;
}
.badge-list img { height: 52px; width: auto; }

/* Footer */
.site-footer {
  background: var(--brand-dark);
  color: rgba(255, 255, 255, 0.88);
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  padding-top: 52px;
  padding-bottom: 36px;
}
.footer-heading {
  font-size: 1.05rem;
  color: var(--white);
  margin-bottom: 0.7em;
}
.footer-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.footer-list li { margin-bottom: 8px; }
.site-footer a { color: rgba(255, 255, 255, 0.88); }
.site-footer a:hover { color: var(--white); }
.site-footer a.btn-light { color: var(--brand-dark); text-decoration: none; }
.site-footer a.btn-light:hover { color: var(--brand-dark); background: #e8eef2; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding-top: 18px;
  padding-bottom: 22px;
  font-size: 0.92rem;
  opacity: 0.75;
}
.footer-bottom p { margin: 0; }

/* Undersider: sidetopp */
.page-hero {
  background: var(--bg-light);
  border-bottom: 1px solid var(--border);
  padding: 48px 0 40px;
}
.page-hero h1 { margin-bottom: 0.3em; }
.page-hero .lead {
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 40em;
  margin: 0;
}
.breadcrumbs {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 14px;
}
.breadcrumbs a { color: var(--muted); }
.breadcrumbs span { margin: 0 6px; }

/* Innholdsoppsett med bilde */
.content-split {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 44px;
  align-items: start;
}
.content-split img {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* Sjekkliste (typiske feil, prosess) */
.check-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 14px;
}
.check-list li {
  background: var(--white);
  border: 1px solid var(--border);
  border-left: 4px solid var(--brand);
  border-radius: 8px;
  padding: 14px 18px;
}
.check-list strong { display: block; }
.check-list span { color: var(--muted); font-size: 0.97rem; }

/* Produktside: modeller */
.model-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1.2em;
  display: grid;
  gap: 12px;
}
.model-list li {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 4px 16px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 13px 18px;
}
.model-list .model-name { font-weight: 600; }
.model-list .model-note { color: var(--muted); }
.price-note {
  background: var(--bg-light);
  border-radius: 8px;
  padding: 14px 18px;
  color: var(--muted);
  font-size: 0.98rem;
}
.tips-box {
  border: 1px solid var(--border);
  border-left: 4px solid var(--brand);
  border-radius: 8px;
  padding: 16px 20px;
  margin: 1.2em 0;
  background: var(--white);
}
.tips-box p { margin: 0; color: var(--muted); }
.tips-box strong { color: var(--text); }

/* Team */
.team-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.team-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  text-align: center;
  padding-bottom: 22px;
}
.team-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  object-position: top;
}
.team-avatar {
  width: 100%;
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-light);
  color: var(--brand);
  font-size: 3rem;
  font-weight: 700;
}
.team-card h3 { margin: 16px 0 2px; font-size: 1.1rem; }
.team-role { color: var(--muted); margin-bottom: 10px; font-size: 0.95rem; }
.team-card a {
  display: block;
  text-decoration: none;
  font-size: 0.97rem;
  margin-bottom: 2px;
}
.team-card a:hover { text-decoration: underline; }

/* Kontaktside */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 44px;
  align-items: start;
}
.contact-info-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5em;
}
.contact-info-list li {
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.contact-info-list strong { display: block; font-size: 0.92rem; color: var(--muted); font-weight: 600; }
.contact-info-list a { font-size: 1.1rem; font-weight: 600; text-decoration: none; }
.contact-info-list a:hover { text-decoration: underline; }

.contact-form {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: var(--shadow);
}
.form-field { margin-bottom: 18px; }
.form-field label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  font-size: 0.97rem;
}
.form-field input,
.form-field textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font: inherit;
  color: var(--text);
  background: var(--white);
}
.form-field input:focus,
.form-field textarea:focus {
  outline: 2px solid var(--cta);
  outline-offset: 1px;
  border-color: var(--cta);
}
.form-consent {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 0.95rem;
  color: var(--muted);
  margin-bottom: 18px;
}
.form-consent input { margin-top: 4px; }
.form-note { font-size: 0.92rem; color: var(--muted); margin: 12px 0 0; }

/* Proff-undernavigasjon */
.subnav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 2em;
}
.subnav a {
  display: inline-block;
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  text-decoration: none;
  color: var(--text);
  font-weight: 500;
  font-size: 0.97rem;
  background: var(--white);
}
.subnav a:hover { border-color: var(--brand); color: var(--brand); }
.subnav a[aria-current="page"] {
  background: var(--brand);
  border-color: var(--brand);
  color: var(--white);
}

/* Verdier (om oss) */
.value-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

/* Fokus-synlighet */
a:focus-visible, button:focus-visible {
  outline: 3px solid var(--cta);
  outline-offset: 2px;
}

/* Redusert bevegelse */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

/* Mobil */
@media (max-width: 920px) {
  .hero-inner { grid-template-columns: 1fr; gap: 32px; padding: 44px 20px; }
  .card-grid { grid-template-columns: 1fr 1fr; }
  .team-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .content-split { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .split-grid { grid-template-columns: 1fr; }
  .value-grid { grid-template-columns: 1fr; }

  .nav-toggle { display: block; }
  .nav-list {
    display: none;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
    flex-direction: column;
    align-items: stretch;
    padding: 12px 20px 20px;
    gap: 2px;
  }
  .site-nav.open .nav-list { display: flex; }
  .site-nav.open .nav-toggle-bar:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
  .site-nav.open .nav-toggle-bar:nth-child(2) { opacity: 0; }
  .site-nav.open .nav-toggle-bar:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }
  .nav-list > li > a { padding: 12px 8px; }
  .nav-cta { margin: 10px 0 0; }
  .nav-cta .btn { display: block; text-align: center; }
}

@media (max-width: 560px) {
  .card-grid { grid-template-columns: 1fr; }
  .team-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .header-logo img { width: 160px; }
  .section { padding: 48px 0; }
}
