/* Viftefabrikken Næringspark – felles stilark */

:root {
  --navy: #002033;
  --navy-2: #0a2f45;
  --mint: #9ddecd;
  --mint-dark: #1f5c4e;
  --orange: #e2673f;
  --orange-dark: #c9532d;
  --sand: #fbf3ec;
  --ink: #0f1d26;
  --muted: #4d5e68;
  --line: #e4e0db;
  --white: #ffffff;

  --font: 'Barlow', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 6px;
  --header-h: 76px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3 {
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 0 0 0.6em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.4rem, 6vw, 4.25rem); }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.75rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

.skip-link {
  position: absolute; left: -9999px; top: 8px;
  background: var(--mint); color: var(--navy); padding: 8px 14px; z-index: 100;
}
.skip-link:focus { left: 8px; }

:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--navy);
  height: var(--header-h);
}
.site-header .wrap {
  height: 100%;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.brand img { height: 56px; width: auto; margin: -8px 0 -8px -12px; }
.nav ul { list-style: none; display: flex; gap: clamp(18px, 3vw, 40px); margin: 0; padding: 0; }
.nav a {
  color: var(--mint);
  text-decoration: none;
  font-weight: 500;
  font-size: 1.05rem;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
}
.nav a:hover,
.nav a[aria-current="page"] { border-bottom-color: var(--mint); }

.nav-toggle {
  display: none;
  background: none; border: 0; color: var(--mint); cursor: pointer;
  width: 44px; height: 44px; padding: 10px; margin-right: -10px;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  display: block; height: 2px; background: currentColor; position: relative; transition: transform .2s;
}
.nav-toggle span::before, .nav-toggle span::after { content: ''; position: absolute; left: 0; right: 0; }
.nav-toggle span::before { top: -8px; }
.nav-toggle span::after { top: 8px; }
.nav-open .nav-toggle span { background: transparent; }
.nav-open .nav-toggle span::before { transform: translateY(8px) rotate(45deg); }
.nav-open .nav-toggle span::after { transform: translateY(-8px) rotate(-45deg); }

@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .nav {
    position: fixed; inset: var(--header-h) 0 auto 0;
    background: var(--navy);
    padding: 8px var(--gutter) 28px;
    display: none;
    border-top: 1px solid var(--navy-2);
  }
  .nav-open .nav { display: block; }
  .nav ul { flex-direction: column; gap: 0; }
  .nav a { display: block; padding: 14px 0; font-size: 1.25rem; border-bottom: 1px solid var(--navy-2); }
  .nav a[aria-current="page"] { border-bottom-color: var(--navy-2); color: var(--white); }
  .brand img { height: 48px; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: min(82vh, 760px);
  display: flex; align-items: flex-end;
  color: var(--white);
  background: var(--navy);
  overflow: hidden;
}
.hero--page { min-height: min(58vh, 520px); }
.hero__slides, .hero__slides img {
  position: absolute; inset: 0; width: 100%; height: 100%;
}
.hero__slides img {
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.2s ease;
}
.hero__slides img.is-active { opacity: 1; }
.hero::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,32,51,.15) 0%, rgba(0,32,51,.2) 45%, rgba(0,32,51,.85) 100%);
}
.hero__content {
  position: relative; z-index: 1;
  width: 100%;
  padding-bottom: clamp(40px, 7vw, 80px);
}
.hero h1 { margin: 0; }
.hero .eyebrow { color: var(--mint); }
.hero__dots { display: flex; gap: 10px; margin-top: 22px; }
.hero__dots button {
  width: 12px; height: 12px; border-radius: 50%;
  border: 2px solid var(--mint); background: transparent; padding: 0; cursor: pointer;
}
.hero__dots button[aria-current="true"] { background: var(--mint); }

.eyebrow {
  display: block;
  text-transform: uppercase; letter-spacing: .14em;
  font-size: .85rem; font-weight: 600;
  color: var(--mint-dark);
  margin-bottom: 10px;
}

/* ---------- Seksjoner ---------- */
.section { padding: clamp(56px, 9vw, 110px) 0; }
.section--sand { background: var(--sand); }
.section--navy { background: var(--navy); color: var(--white); }
.section--tight { padding-top: 0; }

.intro {
  max-width: 820px;
  font-size: clamp(1.15rem, 1.8vw, 1.35rem);
  line-height: 1.6;
}
.intro--center { margin: 0 auto; text-align: center; }
.intro strong { font-weight: 600; }

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 6vw, 80px);
  align-items: center;
}
.split--flip .split__media { order: 2; }
.split__media img {
  width: 100%; aspect-ratio: 4 / 3; object-fit: cover;
  border-radius: var(--radius);
}
.split__body ul { padding-left: 1.1em; margin: 0 0 1.4em; }
.split__body li { margin-bottom: .35em; }
.split__body li::marker { content: '–  '; color: var(--orange); }

@media (max-width: 820px) {
  .split { grid-template-columns: 1fr; }
  .split--flip .split__media { order: 0; }
}

/* ---------- Knapper ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 12px;
  background: var(--orange); color: var(--white);
  font-weight: 600; font-size: 1rem;
  text-decoration: none;
  padding: 13px 26px;
  border-radius: 999px;
  border: 0; cursor: pointer;
  transition: background .15s, transform .15s;
}
.btn::after { content: '›'; font-size: 1.4em; line-height: 0; transform: translateY(-1px); }
.btn:hover { background: var(--orange-dark); }
.btn--ghost { background: transparent; color: var(--mint); border: 2px solid var(--mint); }
.btn--ghost:hover { background: var(--mint); color: var(--navy); }

/* ---------- Fakta ---------- */
.facts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  margin-top: clamp(40px, 6vw, 64px);
}
.facts div { background: var(--white); padding: 26px 22px; }
.facts strong { display: block; font-size: clamp(1.6rem, 3vw, 2.2rem); line-height: 1.1; color: var(--navy); }
.facts span { color: var(--muted); font-size: .98rem; }
@media (max-width: 820px) { .facts { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Galleri ---------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.gallery button {
  padding: 0; border: 0; background: none; cursor: zoom-in;
  border-radius: var(--radius); overflow: hidden;
}
.gallery img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; transition: transform .4s; }
.gallery button:hover img { transform: scale(1.04); }
.gallery button:first-child { grid-column: span 2; grid-row: span 2; }
.gallery button:first-child img { aspect-ratio: auto; height: 100%; }
@media (max-width: 640px) {
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .gallery button:first-child { grid-row: auto; }
  .gallery button:first-child img { aspect-ratio: 3 / 2; }
}

.lightbox {
  border: 0; padding: 0; background: transparent; max-width: 94vw; max-height: 92vh;
}
.lightbox::backdrop { background: rgba(0, 20, 32, .92); }
.lightbox img { max-width: 94vw; max-height: 86vh; border-radius: var(--radius); }
.lightbox__close {
  position: fixed; top: 16px; right: 16px;
  width: 48px; height: 48px; border-radius: 50%;
  border: 0; background: var(--mint); color: var(--navy);
  font-size: 1.6rem; cursor: pointer;
}

.banner-img { width: 100%; border-radius: var(--radius); }

/* ---------- Beliggenhet ---------- */
.features {
  list-style: none; padding: 0; margin: 0;
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 28px;
  text-align: center;
}
.features img { width: 84px; height: 84px; margin: 0 auto 14px; }
.features strong { display: block; font-size: 1.1rem; }
.features span { color: var(--muted); font-size: .98rem; }
@media (max-width: 900px) { .features { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 540px) { .features { grid-template-columns: repeat(2, 1fr); } }

.map {
  width: 100%; height: 440px; border: 0;
  border-radius: var(--radius);
  display: block;
  background: var(--sand);
}

/* ---------- CTA ---------- */
.cta {
  position: relative; overflow: hidden;
  background: var(--navy); color: var(--white);
  padding: clamp(64px, 9vw, 110px) 0;
}
.cta__art {
  position: absolute; right: 0; bottom: 0;
  width: min(900px, 90%); opacity: .9; pointer-events: none;
}
.cta .wrap { position: relative; }
.cta p { color: #cfe3ea; font-size: 1.15rem; max-width: 560px; }

/* ---------- Kontakt ---------- */
.contacts {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
  margin-bottom: clamp(48px, 7vw, 80px);
}
.contact-card {
  display: flex; gap: 18px; align-items: center;
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px;
}
.contact-card img, .contact-card .initials {
  width: 84px; height: 84px; border-radius: 50%; object-fit: cover; flex: none;
}
.contact-card .initials {
  display: grid; place-items: center;
  background: var(--navy); color: var(--mint); font-weight: 700; font-size: 1.6rem;
}
.contact-card h3 { margin: 0 0 2px; font-size: 1.15rem; }
.contact-card .company { color: var(--muted); font-size: .95rem; margin: 0 0 6px; }
.contact-card a { display: block; text-decoration: none; color: var(--mint-dark); font-weight: 500; }
.contact-card a:hover { text-decoration: underline; }
@media (max-width: 900px) { .contacts { grid-template-columns: 1fr; max-width: 520px; } }
.contacts--single { grid-template-columns: minmax(0, 460px); }
.contacts--single .contact-card { padding: 24px; gap: 24px; }
.contacts--single .contact-card img { width: 120px; height: 120px; }
.contacts--single .contact-card h3 { font-size: 1.35rem; }

.form { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 22px; max-width: 760px; }
.form .full { grid-column: 1 / -1; }
.form label { display: block; font-weight: 600; margin-bottom: 6px; font-size: .98rem; }
.form input[type="text"], .form input[type="email"], .form input[type="tel"], .form textarea {
  width: 100%;
  font: inherit;
  padding: 12px 14px;
  border: 1px solid #c9c4be; border-radius: var(--radius);
  background: var(--white);
}
.form textarea { min-height: 130px; resize: vertical; }
.form input:focus, .form textarea:focus { outline: 2px solid var(--mint-dark); outline-offset: 0; border-color: var(--mint-dark); }
.form .check { display: flex; gap: 12px; align-items: flex-start; font-weight: 400; }
.form .check input { width: 20px; height: 20px; margin-top: 3px; accent-color: var(--orange); flex: none; }
.form .hidden { display: none; }
@media (max-width: 640px) { .form { grid-template-columns: 1fr; } }

/* ---------- Tekstsider ---------- */
.prose { max-width: 760px; }
.prose h2 { margin-top: 1.4em; font-size: 1.6rem; }
.note {
  background: #fff6e0; border-left: 4px solid #e6a700;
  padding: 16px 20px; border-radius: 4px; margin-bottom: 2em;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--sand);
  padding: 56px 0 32px;
  font-size: .98rem;
  color: var(--muted);
}
.site-footer .top {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 32px;
  padding-bottom: 32px; border-bottom: 1px solid var(--line);
}
.site-footer .logo img { height: 64px; width: auto; margin-left: -10px; }
.site-footer address { font-style: normal; margin-top: 12px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 6px; }
.site-footer .links a {
  text-decoration: none; color: var(--navy); font-weight: 600;
  text-transform: uppercase; letter-spacing: .08em; font-size: .88rem;
}
.site-footer .links a:hover { color: var(--orange); }
.site-footer .bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px;
  padding-top: 22px; font-size: .9rem;
}
.site-footer .bottom a { color: var(--muted); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}
