/* Preparo Beredskap — style.css */

/* ── Custom properties ── */
:root {
  --navy:   #1a3a5c;
  --navy-dark: #0f2238;
  --blue:   #4a90d9;
  --light:  #f5f7fa;
  --border: #dde3ea;
  --muted:  #5a7a9c;
  --white:  #ffffff;
  --font:   -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --radius: 8px;
  --shadow: 0 4px 20px rgba(26,58,92,0.12);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  color: var(--navy);
  background: var(--white);
  line-height: 1.6;
}
img, svg { display: block; }
a { text-decoration: none; color: inherit; }

/* ── Utility ── */
.eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 10px;
}
.section-title {
  font-size: clamp(22px, 4vw, 32px);
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 16px;
  line-height: 1.2;
}
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Navigasjon ── */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: var(--navy);
  box-shadow: 0 2px 12px rgba(0,0,0,0.18);
  opacity: 0; /* GSAP animerer denne til 1 */
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 11px;
}
.nav-logo-icon {
  width: 40px; height: 40px;
  background: rgba(255,255,255,0.1);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.nav-logo-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.nav-name {
  font-size: 15px;
  font-weight: 800;
  color: var(--white);
  letter-spacing: 1px;
  line-height: 1;
}
.nav-sub {
  font-size: 8.5px;
  font-weight: 600;
  color: var(--blue);
  letter-spacing: 3px;
  text-transform: uppercase;
  line-height: 1;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}
.nav-link {
  font-size: 14px;
  color: rgba(255,255,255,0.7);
  font-weight: 500;
  transition: color 0.2s;
}
.nav-link:hover { color: var(--white); }
.nav-cta {
  font-size: 13px;
  font-weight: 600;
  background: var(--blue);
  color: var(--white);
  padding: 8px 18px;
  border-radius: 6px;
  transition: background 0.2s, transform 0.15s;
}
.nav-cta:hover { background: #3a80c9; transform: translateY(-1px); }

/* Hamburger-knapp (mobil) */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.nav-toggle span {
  display: block;
  width: 22px; height: 2px;
  background: white;
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.25s;
}

/* ── Hero ── */
#hero {
  position: relative;
  min-height: 100vh;
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-dark) 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding-top: 64px; /* høyde på navbar */
}
.hero-bg { position: absolute; inset: 0; pointer-events: none; }
.hero-circle {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.06);
}
.hero-circle-1 { width: 500px; height: 500px; top: -180px; left: -160px; }
.hero-circle-2 { width: 300px; height: 300px; bottom: -80px; right: -80px; }
.hero-circle-3 { width: 180px; height: 180px; top: 30%; right: 10%; }

.hero-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 24px;
  position: relative;
  z-index: 1;
}
.hero-content {
  text-align: center;
  max-width: 620px;
}
.hero-logo-wrap {
  margin: 0 auto 28px;
  width: fit-content;
  opacity: 0; /* GSAP setter denne */
}
.hero-h1 {
  font-size: clamp(32px, 6vw, 54px);
  font-weight: 900;
  color: var(--white);
  line-height: 1.1;
  margin-bottom: 20px;
  opacity: 0; /* GSAP */
}
.hero-sub {
  font-size: clamp(15px, 2vw, 18px);
  color: rgba(255,255,255,0.62);
  max-width: 480px;
  margin: 0 auto 36px;
  line-height: 1.7;
  opacity: 0; /* GSAP */
}
.hero-btn {
  display: inline-block;
  background: var(--blue);
  color: var(--white);
  font-size: 16px;
  font-weight: 700;
  padding: 14px 36px;
  border-radius: 8px;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  opacity: 0; /* GSAP */
}
.hero-btn:hover {
  background: #3a80c9;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(74,144,217,0.35);
}
.hero-scroll {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  animation: bounce 2s ease-in-out infinite;
  z-index: 1;
}
@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(6px); }
}

/* ── Om oss ── */
#om-oss {
  background: var(--light);
  padding: 96px 0;
}
.om-inner { max-width: 680px; }
.om-text-wrap { text-align: center; margin: 0 auto; }
.om-body {
  font-size: 17px;
  color: var(--muted);
  line-height: 1.8;
  max-width: 560px;
  margin: 0 auto;
}
.om-divider {
  width: 48px; height: 3px;
  background: var(--blue);
  border-radius: 2px;
  margin: 32px auto 0;
}

/* ── Tjenester ── */
#tjenester {
  background: var(--white);
  padding: 96px 0;
}
.tjenester-header { text-align: center; margin-bottom: 52px; }
.tjenester-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}
.tj-card {
  background: var(--light);
  border-radius: 12px;
  padding: 32px 28px;
  border-left: 4px solid var(--blue);
  transition: transform 0.2s, box-shadow 0.2s;
}
.tj-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}
.tj-icon {
  width: 44px; height: 44px;
  background: var(--navy);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 18px;
}
.tj-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 10px;
}
.tj-desc {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.7;
}

/* ── Kontakt ── */
#kontakt {
  background: var(--light);
  padding: 96px 0;
}
.kontakt-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}
.kontakt-ingress {
  font-size: 16px;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 32px;
}
.kontakt-info { display: flex; flex-direction: column; gap: 14px; }
.kontakt-info-row {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 15px;
  color: var(--muted);
  transition: color 0.2s;
}
.kontakt-info-row:hover { color: var(--navy); }
.kontakt-info-icon {
  width: 36px; height: 36px;
  background: var(--navy);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

/* Form */
.kontakt-form { display: flex; flex-direction: column; gap: 18px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label {
  font-size: 13px;
  font-weight: 600;
  color: var(--navy);
  letter-spacing: 0.3px;
}
.form-group input,
.form-group textarea {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  font-size: 15px;
  font-family: var(--font);
  color: var(--navy);
  transition: border-color 0.2s, box-shadow 0.2s;
  resize: vertical;
}
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(74,144,217,0.15);
}
.form-group input.invalid,
.form-group textarea.invalid {
  border-color: #e05252;
}
.form-error {
  font-size: 12px;
  color: #e05252;
  min-height: 16px;
}
.form-btn {
  background: var(--navy);
  color: var(--white);
  font-size: 15px;
  font-weight: 700;
  padding: 14px;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  font-family: var(--font);
}
.form-btn:hover { background: #0f2238; transform: translateY(-1px); }
.form-btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.form-success {
  font-size: 14px;
  color: #2d7a4f;
  font-weight: 600;
  min-height: 20px;
  text-align: center;
}

/* ── Footer ── */
#footer {
  background: var(--navy);
  padding: 28px 0;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,0.5);
}
.footer-copy {
  font-size: 12px;
  color: rgba(255,255,255,0.35);
}
.footer-copy a { color: rgba(255,255,255,0.5); transition: color 0.2s; }
.footer-copy a:hover { color: white; }

/* ── Responsivt ── */
@media (max-width: 768px) {
  /* Nav */
  .nav-toggle { display: flex; }
  .nav-links {
    display: none;
    position: absolute;
    top: 64px; left: 0; right: 0;
    background: var(--navy);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 0 16px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
  }
  .nav-links.open { display: flex; }
  .nav-links li { padding: 0; }
  .nav-link, .nav-cta {
    display: block;
    padding: 12px 24px;
    border-radius: 0;
    font-size: 15px;
  }
  .nav-cta { margin: 8px 16px 0; border-radius: 6px; text-align: center; }

  /* Hero */
  .hero-inner { padding: 60px 20px; }
  .hero-logo-wrap svg { width: 80px; height: 80px; }

  /* Seksjoner */
  #om-oss, #tjenester, #kontakt { padding: 64px 0; }

  /* Tjenester */
  .tjenester-grid { grid-template-columns: 1fr; }

  /* Kontakt */
  .kontakt-inner {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  /* Footer */
  .footer-inner { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
  .hero-logo-wrap svg { width: 64px; height: 64px; }
}

/* ── Navbar scrollet ── */
#navbar.scrolled {
  background: rgba(15, 34, 56, 0.97);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 2px 20px rgba(0,0,0,0.25);
}
