/* ===== Font ===== */
@font-face {
  font-family: 'Inter';
  src: url('fonts/inter-variable.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* ===== Base ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --text: #1a1a1a;
  --text-secondary: #4a4a4a;
  --bg: #ffffff;
  --bg-alt: #f4f1ec;
  --bg-dark: #0f1a2e;
  --accent: #0f4c81;
  --accent-bright: #5ec8e6;
  --border: #ddd;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --max-w: 1100px;
  --header-h: 64px;
}

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

body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--text); text-decoration: none; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }

/* ===== Typography ===== */
h1 { font-size: 56px; font-weight: 800; line-height: 1.08; letter-spacing: -1.5px; }
h2 { font-size: 46px; font-weight: 800; line-height: 1.08; letter-spacing: -1.2px; margin-bottom: 16px; }
h3 { font-size: 18px; font-weight: 700; line-height: 1.3; margin-bottom: 6px; }
.lead { font-size: 18px; color: var(--text-secondary); margin-bottom: 48px; max-width: 480px; }
.overline { display: block; font-size: 12px; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase; color: var(--accent); margin-bottom: 8px; }

/* ===== Buttons ===== */
.btn {
  display: inline-block;
  padding: 14px 32px;
  font-size: 15px;
  font-weight: 600;
  font-family: var(--font);
  border: none;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.btn-white { background: #fff; color: var(--bg-dark); }
.btn-white:hover { background: var(--accent-bright); color: var(--bg-dark); transform: translateY(-2px); box-shadow: 0 8px 22px rgba(94,200,230,0.3); }
.btn-ghost { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,0.4); }
.btn-ghost:hover { border-color: var(--accent-bright); color: var(--accent-bright); transform: translateY(-2px); }

/* ===== Header ===== */
.header {
  position: sticky; top: 0; z-index: 100;
  height: var(--header-h);
  background: var(--bg-dark);
  transition: background 0.3s;
}
.header.scrolled { background: rgba(255,255,255,0.98); box-shadow: 0 1px 0 var(--border); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 100%; }
.logo { font-size: 17px; font-weight: 700; color: #fff; letter-spacing: -0.3px; }
.header.scrolled .logo { color: var(--text); }

.nav-list { display: flex; list-style: none; gap: 4px; }
.nav-link { padding: 6px 12px; font-size: 14px; font-weight: 500; color: rgba(255,255,255,0.65); transition: color 0.15s; }
.nav-link:hover, .nav-link.active { color: #fff; }
.header.scrolled .nav-link { color: var(--text-secondary); }
.header.scrolled .nav-link:hover, .header.scrolled .nav-link.active { color: var(--text); }

.header-cta { font-size: 14px; font-weight: 600; color: rgba(255,255,255,0.7); transition: color 0.15s; }
.header-cta:hover { color: #fff; }
.header.scrolled .header-cta { color: var(--accent); }

.menu-toggle { display: none; flex-direction: column; gap: 6px; width: 32px; height: 32px; justify-content: center; background: none; border: none; cursor: pointer; padding: 4px; }
.menu-bar { display: block; height: 2px; background: #fff; transition: all 0.3s; }
.header.scrolled .menu-bar { background: var(--text); }
.menu-toggle.active .menu-bar:first-child { transform: rotate(45deg) translate(3px, 3px); }
.menu-toggle.active .menu-bar:last-child { transform: rotate(-45deg) translate(3px, -3px); }

/* ===== Hero ===== */
.hero {
  position: relative; overflow: hidden;
  padding: 120px 0 140px;
  display: flex; align-items: center;
  min-height: 560px;
}
.hero-bg { position: absolute; inset: 0; background: linear-gradient(135deg, #060d1a 0%, #0c2240 35%, #1a3a66 65%, #0a1830 100%); }
.hero-pattern {
  position: absolute; inset: 0; z-index: 0;
  background-image: radial-gradient(rgba(255,255,255,0.07) 1px, transparent 1px);
  background-size: 32px 32px;
}
.hero-inner { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 48px; }
.hero-content { max-width: 540px; flex-shrink: 0; }
.hero h1 { color: #fff; margin-bottom: 20px; }
.hero-subtitle { font-size: 19px; color: rgba(255,255,255,0.75); line-height: 1.6; margin-bottom: 40px; }
.hero-actions { display: flex; gap: 12px; }
.hero-graphic { flex-shrink: 0; width: 320px; height: 320px; opacity: 1; }
.hero-graphic svg { width: 100%; height: 100%; }

/* ===== Logos (removed — client names woven into Om oss text) ===== */

/* ===== Sections ===== */
.section { padding: 100px 0; }
.section-alt { background: var(--bg-alt); }
.section-dark { background: var(--bg-dark); color: #fff; }
.section-dark h2 { color: #fff; }
.section-dark > .container > p { color: rgba(255,255,255,0.75); }

/* ===== Split (Om oss) ===== */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.split-media { overflow: hidden; }
.split-media img { width: 100%; height: 400px; object-fit: cover; }
.split-text p { color: var(--text-secondary); font-size: 17px; margin-bottom: 16px; }
.check-list { list-style: none; margin-top: 24px; }
.check-list li { padding: 8px 0; padding-left: 24px; position: relative; font-size: 15px; color: var(--text-secondary); border-bottom: 1px solid var(--border); }
.check-list li:last-child { border: none; }
.check-list li::before { content: '\2713'; position: absolute; left: 0; color: var(--accent); font-weight: 700; }

/* ===== Service Highlight (AI callout) ===== */
.service-highlight {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  padding: 40px 48px;
  background: var(--bg-dark);
  color: #fff;
  margin-bottom: 16px;
}
.service-highlight-content { flex: 1; }
.service-highlight-content .overline { color: rgba(255,255,255,0.5); margin-bottom: 12px; }
.service-highlight-content h3 { font-size: 24px; color: #fff; margin-bottom: 12px; }
.service-highlight-content p { font-size: 16px; color: rgba(255,255,255,0.75); line-height: 1.65; margin-bottom: 14px; }
.service-highlight-content .service-tech { color: rgba(255,255,255,0.4); }
.service-highlight-icon { flex-shrink: 0; color: rgba(255,255,255,0.15); }

/* ===== Services ===== */
.services { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.service {
  padding: 32px; background: var(--bg);
  border: 1px solid rgba(15,76,129,0.10); border-top: 3px solid var(--accent);
  box-shadow: 0 2px 14px rgba(15,30,55,0.05);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}
.service:hover { transform: translateY(-4px); box-shadow: 0 14px 32px rgba(15,30,55,0.12); border-top-color: var(--accent-bright); }
.service-icon { color: var(--accent); margin-bottom: 16px; display: block; }
.service h3 { font-size: 20px; margin-bottom: 8px; }
.service p { font-size: 15px; color: var(--text-secondary); line-height: 1.6; margin-bottom: 12px; }
.service-tech { display: block; font-size: 12.5px; font-weight: 600; color: var(--accent); letter-spacing: 0.3px; }

/* ===== Tech Section (Kompetanse) ===== */
.tech-section { padding: 64px 0; background: var(--bg); border-top: 1px solid rgba(15,76,129,0.08); text-align: center; }
.tech-section-heading { font-size: 20px; font-weight: 700; letter-spacing: -0.3px; margin-bottom: 28px; }
.tech-pills { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.tech-pills span {
  display: inline-block;
  padding: 8px 18px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  background: var(--bg);
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 100px;
  line-height: 1.4;
  transition: border-color 0.15s, background 0.15s;
}
.tech-pills span:hover { border-color: var(--accent); background: rgba(15,76,129,0.04); }

/* ===== Stat banner ===== */
.stat-banner { padding: 48px 0; background: var(--bg-dark); }
.stat-banner-inner { display: flex; justify-content: center; gap: 80px; text-align: center; }
.stat-number { display: block; font-size: 40px; font-weight: 800; color: #fff; letter-spacing: -1px; line-height: 1.1; }
.stat-label { display: block; font-size: 14px; font-weight: 500; color: rgba(255,255,255,0.6); margin-top: 4px; }

/* ===== Projects ===== */
/* Featured project — full width hero treatment */
.project-featured {
  display: grid; grid-template-columns: 1.2fr 1fr; align-items: stretch;
  background: var(--bg); overflow: hidden; border-radius: 5px;
  border: 1px solid rgba(0,0,0,0.08); box-shadow: 0 4px 16px rgba(0,0,0,0.07);
  margin-bottom: 24px;
}
.project-featured-img img { width: 100%; height: 100%; min-height: 380px; object-fit: cover; }
.project-featured-text { padding: 48px; display: flex; flex-direction: column; justify-content: center; }
.project-featured-text h3 { font-size: 28px; margin-bottom: 14px; }
.project-featured-text p { font-size: 15px; color: var(--text-secondary); line-height: 1.65; margin-bottom: 12px; }
.project-featured-text .project-result { color: var(--text); }
.project-featured-text .project-tech { font-size: 13px; font-weight: 600; color: var(--accent); margin-top: 8px; }

/* Secondary project cards — two-column grid */
.projects-secondary { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.project-card {
  background: var(--bg); overflow: hidden; border-radius: 5px;
  border: 1px solid rgba(0,0,0,0.08); box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.project-card-img img { width: 100%; height: 200px; object-fit: cover; }
.project-card-text { padding: 28px; }
.project-card-text h3 { font-size: 20px; margin-bottom: 10px; }
.project-card-text p { font-size: 14px; color: var(--text-secondary); line-height: 1.6; margin-bottom: 10px; }
.project-card-text .project-result { color: var(--text); }
.project-card-text .project-tech { font-size: 12px; font-weight: 600; color: var(--accent); margin-top: 6px; }

/* ===== Quote block (dark editorial beat) ===== */
.quote-block { padding: 100px 0; background: var(--bg-dark); position: relative; overflow: hidden; }
.quote-block::before {
  content: '\201C'; position: absolute; top: 10px; left: 50%; transform: translateX(-50%);
  font-size: 220px; line-height: 1; color: rgba(94,200,230,0.10); font-family: Georgia, serif;
}
.quote-blockquote { max-width: 740px; margin: 0 auto; text-align: center; position: relative; }
.quote-blockquote p { font-size: 25px; font-weight: 500; line-height: 1.5; color: #fff; letter-spacing: -0.4px; }
.quote-attribution { margin-top: 28px; }
.quote-role { font-size: 14px; color: var(--accent-bright); font-style: normal; letter-spacing: 0.3px; }

/* ===== Contact ===== */
.section-kontakt { padding: 100px 0; background: var(--bg-alt); }
.contact-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; max-width: 980px; margin: 0 auto; align-items: start; }
.contact-left { padding-top: 8px; }
.contact-left > p { color: var(--text-secondary); font-size: 17px; margin-top: 8px; max-width: 420px; }
.contact-direct { margin-top: 36px; padding-top: 28px; border-top: 1px solid rgba(15,76,129,0.15); }
.contact-direct-label { font-size: 12px; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase; color: var(--text-secondary); margin-bottom: 10px; }
.contact-mail { font-size: 20px; font-weight: 600; color: var(--accent); transition: color 0.15s; }
.contact-mail:hover { color: var(--accent-bright); }
.contact-promise { font-size: 14px; color: var(--text-secondary); margin-top: 10px; }
.contact-right { background: var(--bg); padding: 40px; box-shadow: 0 6px 28px rgba(15,30,55,0.08); border: 1px solid rgba(15,76,129,0.08); }
.contact-form { display: flex; flex-direction: column; gap: 16px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label { font-size: 13px; font-weight: 600; color: var(--text); }
.form-group input,
.form-group textarea {
  padding: 12px 16px;
  font-size: 15px;
  font-family: var(--font);
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  transition: border-color 0.15s;
}
.form-group input:focus,
.form-group textarea:focus { outline: none; border-color: var(--accent); }
.form-group textarea { resize: vertical; min-height: 120px; }
.btn-dark { background: var(--bg-dark); color: #fff; }
.btn-dark:hover { background: var(--accent); transform: translateY(-2px); box-shadow: 0 8px 22px rgba(15,76,129,0.28); }

/* ===== Footer ===== */
.footer { background: var(--bg-dark); border-top: 1px solid rgba(255,255,255,0.08); padding: 40px 0; color: rgba(255,255,255,0.4); font-size: 14px; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 24px; }
.footer-brand { max-width: 360px; }
.footer-company { font-weight: 700; font-size: 16px; color: rgba(255,255,255,0.85); margin-bottom: 6px; }
.footer-tagline { font-size: 13px; color: rgba(255,255,255,0.45); line-height: 1.5; }
.footer-links { display: flex; gap: 24px; }
.footer-links a { color: rgba(255,255,255,0.4); }
.footer-links a:hover { color: rgba(255,255,255,0.7); }
.footer-copy { width: 100%; text-align: center; margin-top: 16px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,0.06); font-size: 13px; }

/* ===== Scroll rail (gjennomgående seksjons-indeks) ===== */
.scroll-rail {
  position: fixed; top: 50%; transform: translateY(-50%);
  left: clamp(20px, calc((100vw - var(--max-w)) / 2 - 76px), 220px);
  z-index: 90; pointer-events: auto;
}
.rail-inner { position: relative; padding: 2px 0; }
.rail-track, .rail-fill {
  position: absolute; left: 6px; width: 2px; border-radius: 2px; transform: translateX(-50%);
}
.rail-track { top: 10px; bottom: 10px; background: rgba(15,76,129,0.18); }
.rail-fill {
  top: 10px; height: 0;
  background: linear-gradient(180deg, #3d8fd4, #5ec8e6);
  box-shadow: 0 0 8px rgba(94,200,230,0.55);
  transition: height 0.25s ease;
}
.rail-list { list-style: none; position: relative; margin: 0; padding: 0; }
.rail-item { position: relative; display: flex; align-items: center; height: 38px; padding-left: 22px; cursor: pointer; }
.rail-marker {
  position: absolute; left: 6px; top: 50%;
  width: 11px; height: 11px; border-radius: 50%;
  transform: translate(-50%, -50%);
  background: var(--bg); border: 2px solid rgba(15,76,129,0.30);
  transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}
.rail-num {
  font-size: 11px; font-weight: 700; letter-spacing: 0.5px;
  color: rgba(15,76,129,0.45); transition: color 0.3s ease; font-variant-numeric: tabular-nums;
}
.rail-label {
  position: absolute; left: 48px; white-space: nowrap;
  font-size: 11px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase;
  color: var(--text); background: rgba(255,255,255,0.9); padding: 3px 9px; border-radius: 3px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.10);
  opacity: 0; transform: translateX(-6px); pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.rail-item.passed .rail-marker { border-color: #5ec8e6; }
.rail-item.active .rail-marker {
  background: #5ec8e6; border-color: #3d8fd4; transform: translate(-50%, -50%) scale(1.15);
  box-shadow: 0 0 0 4px rgba(94,200,230,0.18), 0 0 12px rgba(94,200,230,0.6);
}
.rail-item.active .rail-num { color: var(--accent); }
.scroll-rail:hover .rail-label,
.rail-item.active .rail-label { opacity: 1; transform: translateX(0); }
/* Active label = bare editorial text, not a floating chip */
.rail-item.active .rail-label {
  background: transparent; box-shadow: none; padding-left: 0; left: 48px;
  color: var(--accent); font-weight: 700;
}
/* Adaptive theme when the rail sits over a dark section */
.scroll-rail[data-on-dark] .rail-track { background: rgba(255,255,255,0.18); }
.scroll-rail[data-on-dark] .rail-num { color: rgba(255,255,255,0.5); }
.scroll-rail[data-on-dark] .rail-item.active .rail-num { color: #fff; }
.scroll-rail[data-on-dark] .rail-marker { background: rgba(255,255,255,0.14); border-color: rgba(255,255,255,0.38); }
.scroll-rail[data-on-dark] .rail-label { color: #fff; background: rgba(255,255,255,0.12); box-shadow: none; }
.scroll-rail[data-on-dark] .rail-item.active .rail-label { color: #fff; background: transparent; }

/* ===== Scroll reveal ===== */
.js .reveal {
  opacity: 0; transform: translateY(22px);
  transition: opacity 0.7s cubic-bezier(0.22,0.61,0.36,1), transform 0.7s cubic-bezier(0.22,0.61,0.36,1);
  will-change: opacity, transform;
}
.js .reveal.in-view { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .rail-fill, .rail-marker { transition: none; }
}

/* Rail needs gutter room — only show on wide viewports */
@media (max-width: 1180px) { .scroll-rail { display: none; } }

/* ===== Mobile ===== */
@media (max-width: 900px) {
  h1 { font-size: 40px; letter-spacing: -1px; }
  h2 { font-size: 32px; }
  .hero-inner { flex-direction: column; text-align: left; }
  .hero-graphic { width: 220px; height: 220px; }
  .split { grid-template-columns: 1fr; gap: 32px; }
  .split-media img { height: 280px; }
  .services { grid-template-columns: 1fr 1fr; }
  .service { padding: 24px; }
  .service-highlight { flex-direction: column; padding: 32px; gap: 24px; }
  .service-highlight-icon { display: none; }
  .contact-layout { grid-template-columns: 1fr; gap: 36px; max-width: 560px; }
  .contact-right { padding: 28px; }
  .contact-left p { max-width: none; }
  .project-featured { grid-template-columns: 1fr; }
  .project-featured-img img { min-height: 240px; height: 280px; }
  .project-featured-text { padding: 28px; }
  .projects-secondary { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .stat-banner-inner { gap: 40px; }
  .stat-number { font-size: 32px; }
  .quote-blockquote p { font-size: 18px; }
}

@media (max-width: 640px) {
  h1 { font-size: 32px; }
  h2 { font-size: 28px; }
  .hero { padding: 80px 0 100px; min-height: 420px; }
  .hero-graphic { display: none; }
  .hero-content { max-width: 100%; }
  .hero-subtitle { font-size: 16px; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { text-align: center; }
  .header-cta { display: none; }
  .menu-toggle { display: flex; }
  .nav { position: fixed; top: var(--header-h); left: 0; right: 0; background: var(--bg-dark); padding: 16px 24px; transform: translateY(-100%); opacity: 0; pointer-events: none; transition: all 0.3s; z-index: 99; }
  .header.scrolled .nav { background: #fff; }
  .header.scrolled .nav .nav-link { color: var(--text-secondary); }
  .nav.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .nav-list { flex-direction: column; gap: 4px; }
  .nav-link { font-size: 16px; padding: 10px 0; }
  .services { grid-template-columns: 1fr; }
  .section { padding: 64px 0; }
  .tech-section { padding: 40px 0; }
  .tech-section-heading { font-size: 18px; }
  .section-kontakt { padding: 64px 0; }
  .quote-block { padding: 48px 0; }
  .quote-blockquote p { font-size: 17px; }
  .stat-banner { padding: 36px 0; }
  .stat-banner-inner { gap: 32px; }
  .stat-number { font-size: 28px; }
  .stat-label { font-size: 12px; }
  .project-featured-text h3 { font-size: 22px; }
  .footer-inner { flex-direction: column; text-align: center; }
  .footer-links { justify-content: center; }
}
