/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-weight: 400;
  line-height: 1.6;
  color: #111;
  background: #fff;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }

/* ---------- Variables ---------- */
:root {
  --color-text: #111;
  --color-muted: #555;
  --color-accent: #1a3a5c;
  --color-accent-dark: #122a44;
  --color-bg: #fff;
  --color-bg-alt: #f6f7f8;
  --color-border: #e5e7eb;
  --color-placeholder: #9ca3af;
  --max-width: 1100px;
  --space-section: 96px;
  --radius: 4px;
}

/* ---------- Layout ---------- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: var(--space-section) 0;
}

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

/* ---------- Typography ---------- */
h1, h2, h3 {
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--color-text);
}

h1 {
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  margin-bottom: 16px;
}

h2 {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  margin-bottom: 24px;
}

h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 8px;
}

p { margin-bottom: 16px; }
p:last-child { margin-bottom: 0; }

.placeholder {
  color: var(--color-placeholder);
  font-style: italic;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: saturate(180%) blur(8px);
  -webkit-backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--color-border);
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
}

@media (max-width: 768px) {
  .header-inner { height: 64px; }
}

.logo {
  display: flex;
  align-items: center;
  padding: 4px 0;
  height: 64px;
}

.logo picture,
.logo img {
  display: block;
  height: 56px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
}

/* Mobil: redusert størrelse */
@media (max-width: 768px) {
  .logo {
    height: 48px;
  }
  .logo picture,
  .logo img {
    height: 40px;
  }
}

.nav-desktop {
  display: flex;
  gap: 32px;
}

.nav-desktop a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--color-muted);
  transition: color 0.15s ease;
}

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

/* ---------- Hamburger ---------- */
.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  width: 40px;
  height: 40px;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-text);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.hamburger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.hamburger.open span:nth-child(2) {
  opacity: 0;
}
.hamburger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ---------- Mobile menu ---------- */
.mobile-menu {
  position: fixed;
  inset: 80px 0 0 0;
  background: #fff;
  z-index: 99;
  transform: translateX(100%);
  transition: transform 0.25s ease;
  display: flex;
  align-items: flex-start;
  padding-top: 48px;
}

.mobile-menu.open {
  transform: translateX(0);
}

.mobile-menu nav {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0 24px;
}

.mobile-menu a {
  font-size: 1.5rem;
  font-weight: 600;
  padding: 16px 0;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-text);
}

@media (max-width: 768px) {
  .mobile-menu { inset: 64px 0 0 0; }
}

/* ---------- Hero ---------- */
.hero {
  padding: clamp(80px, 12vw, 140px) 0 clamp(80px, 12vw, 140px);
  text-align: center;
  border-bottom: 1px solid var(--color-border);
}

.hero h1 {
  animation: fadeUp 0.6s ease both;
}

.lead {
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  color: var(--color-muted);
  margin-bottom: 32px;
  animation: fadeUp 0.6s 0.1s ease both;
}

.hero-intro {
  max-width: 600px;
  margin: 0 auto 40px;
  color: var(--color-muted);
  animation: fadeUp 0.6s 0.2s ease both;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: var(--radius);
  font-weight: 500;
  font-size: 0.95rem;
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
  cursor: pointer;
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--color-accent);
  color: #fff;
}

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

.btn-secondary {
  background: transparent;
  color: var(--color-accent);
  border-color: var(--color-accent);
}

.btn-secondary:hover {
  background: var(--color-accent);
  color: #fff;
}

/* ---------- Section intro ---------- */
.section-intro {
  color: var(--color-muted);
  margin-bottom: 40px;
  max-width: 600px;
}

/* ---------- Grid ---------- */
.grid {
  display: grid;
  gap: 24px;
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }

/* ---------- Cards ---------- */
.card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
}

.card-image {
  background: var(--color-bg-alt);
  aspect-ratio: 16 / 10;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Logoer skal vises i sin helhet på hvit bakgrunn, ikke croppes */
#selskaper .card-image {
  background: #fff;
  padding: 32px;
}

#selskaper .card-image img {
  object-fit: contain;
  max-height: 100%;
  width: auto;
  max-width: 80%;
}

.card-body {
  padding: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-body p {
  color: var(--color-muted);
  flex: 1;
  margin-bottom: 20px;
}

.card-body .meta {
  font-size: 0.875rem;
  color: var(--color-muted);
  margin-bottom: 8px;
  flex: 0;
}

.card-body .btn {
  align-self: flex-start;
}

/* ---------- Contact ---------- */
.contact-info {
  max-width: 500px;
}

.contact-name {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 16px;
}

.contact-info p {
  margin-bottom: 8px;
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--color-border);
  padding: 32px 0;
  text-align: center;
  font-size: 0.875rem;
  color: var(--color-muted);
}

.site-footer p { margin-bottom: 4px; }

.footer-meta {
  font-size: 0.8125rem;
  opacity: 0.8;
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  :root {
    --space-section: 64px;
  }

  .nav-desktop { display: none; }
  .hamburger { display: flex; }

  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }
}

/* ---------- Focus styles ---------- */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: var(--radius);
}
