/* INRS v2 – visual layout, light and dark variants */

:root {
  --bg: #eef1f1;
  --bg-alt: #ffffff;
  --surface: #ffffff;
  --ink: #18222b;
  --muted: #55616b;
  --line: #d3dbdd;
  --accent: #2d5a4c;
  --accent-soft: #dbe6e1;
  --on-accent: #ffffff;
  --footer: #18222b;
  --footer-ink: #eef1f1;
  --hero-img: url("hero-light.svg");
  --hero-shade: linear-gradient(90deg, rgba(12, 24, 32, 0.62) 0%, rgba(12, 24, 32, 0.28) 55%, rgba(12, 24, 32, 0) 100%);
}
:root[data-variant="dark"] {
  --bg: #121a20;
  --bg-alt: #172128;
  --surface: #1b262e;
  --ink: #e6ecec;
  --muted: #9eabb1;
  --line: #2b3842;
  --accent: #8cbfab;
  --accent-soft: #21342d;
  --on-accent: #10201a;
  --footer: #0c1216;
  --footer-ink: #e6ecec;
  --hero-img: url("hero.jpg");
  --hero-shade: linear-gradient(180deg, rgba(10, 16, 22, 0.15) 0%, rgba(10, 16, 22, 0.55) 100%);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: "Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1.0625rem; line-height: 1.6;
}
a { color: var(--accent); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
.wrap { max-width: 1140px; margin: 0 auto; padding: 0 32px; }
@media (max-width: 600px) { .wrap { padding: 0 16px; } }

/* Header over the hero */
.top { position: absolute; inset: 0 0 auto 0; z-index: 2; padding: 26px 0; color: #ffffff; }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.mark { display: inline-flex; align-items: flex-start; color: #ffffff; text-decoration: none; font-weight: 800; font-size: 1.5rem; letter-spacing: 0.03em; }
.mark .rocket { width: 0.5em; height: 0.8em; margin-left: 0.04em; margin-top: -0.22em; fill: #ffffff; }
.mark .rocket .window { fill: #1c3a30; }
.top nav { display: flex; gap: 28px; font-size: 0.975rem; }
.top nav a { color: #ffffff; text-decoration: none; opacity: 0.92; }
.top nav a:hover { opacity: 1; text-decoration: underline; }
@media (max-width: 640px) { .top nav { gap: 16px; } .top nav a:nth-child(-n+2) { display: none; } }

/* Hero */
.hero {
  position: relative; min-height: min(86vh, 760px); display: flex; align-items: center;
  background: var(--hero-shade), var(--hero-img) center / cover no-repeat; color: #ffffff;
  padding: 120px 0 120px;
}
.hero h1 {
  font-size: clamp(2.5rem, 5.4vw, 4rem); line-height: 1.04; letter-spacing: -0.03em; font-weight: 800;
  margin: 0 0 20px; max-width: 18ch; text-wrap: balance;
}
.hero p { font-size: clamp(1.0625rem, 1.6vw, 1.25rem); max-width: 54ch; margin: 0; color: rgba(255, 255, 255, 0.92); }
.hero .industries { margin-top: 22px; font-size: 0.95rem; color: rgba(255, 255, 255, 0.8); }
.placeholder-tag {
  position: absolute; right: 16px; bottom: 14px; font-size: 0.75rem; color: rgba(255,255,255,0.75);
  background: rgba(0,0,0,0.25); padding: 3px 8px; border-radius: 4px;
}

/* Sections */
section { padding: 96px 0; }
section.alt { background: var(--bg-alt); }
.section-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 16px 64px; align-items: end; margin-bottom: 48px; }
.section-head h2 { font-size: clamp(2rem, 3.6vw, 2.75rem); line-height: 1.08; letter-spacing: -0.02em; margin: 0; }
.section-head p { margin: 0; color: var(--muted); max-width: 60ch; }
@media (max-width: 820px) { .section-head { grid-template-columns: 1fr; } section { padding: 72px 0; } }

/* Services cards */
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
@media (max-width: 960px) { .cards { grid-template-columns: 1fr; } }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  padding: 32px 30px 30px; display: flex; flex-direction: column;
}
.icon {
  width: 52px; height: 52px; border-radius: 12px; background: var(--accent-soft); color: var(--accent);
  display: grid; place-items: center; margin-bottom: 22px;
}
.icon svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.card h3 { font-size: 1.375rem; line-height: 1.2; margin: 0 0 6px; letter-spacing: -0.01em; }
.card .goal { margin: 0 0 22px; font-weight: 600; color: var(--accent); font-size: 0.975rem; }
.card dl { margin: 0; border-top: 1px solid var(--line); }
.card dt { font-weight: 700; margin-top: 18px; line-height: 1.35; }
.card dd { margin: 4px 0 0; color: var(--muted); font-size: 0.95rem; line-height: 1.55; }

/* Engagement model */
.models { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--line); }
@media (max-width: 860px) { .models { grid-template-columns: 1fr; } }
.model { padding: 32px 32px 8px 0; }
.model + .model { padding-left: 32px; border-left: 1px solid var(--line); }
@media (max-width: 860px) {
  .model, .model + .model { padding: 28px 0 4px; border-left: 0; }
  .model + .model { border-top: 1px solid var(--line); }
}
.model .n {
  display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  background: var(--accent); color: var(--on-accent); font-weight: 800; font-size: 1.05rem; margin-bottom: 18px;
}
.model h3 { font-size: 1.1875rem; margin: 0 0 8px; }
.model p { margin: 0; color: var(--muted); }

/* About */
.about { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 48px; align-items: start; }
.about figure { margin: 0; }
.about img { width: 100%; height: auto; display: block; border-radius: 10px; }
.about figure { margin-top: 8px; }
.about h2 { font-size: clamp(2rem, 3.6vw, 2.75rem); line-height: 1.08; letter-spacing: -0.02em; margin: 0 0 20px; }
.about p { margin: 0 0 16px; max-width: 64ch; }
.about p:last-child { color: var(--muted); }
@media (max-width: 820px) { .about { grid-template-columns: 1fr; gap: 28px; } .about figure { max-width: 140px; } }

/* Contact */
.contact { background: var(--footer); color: var(--footer-ink); padding: 56px 0 32px; }
.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px 64px; align-items: end; }
@media (max-width: 760px) { .contact-grid { grid-template-columns: 1fr; } }
.contact h2 { font-size: 1.375rem; line-height: 1.2; margin: 0 0 8px; letter-spacing: -0.01em; }
.contact p { margin: 0; opacity: 0.85; max-width: 46ch; font-size: 0.975rem; }
.contact a { color: var(--footer-ink); }
.contact .big { font-size: 1.0625rem; font-weight: 600; opacity: 1; margin-bottom: 4px; }
.legal { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; margin-top: 40px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,0.14); font-size: 0.875rem; opacity: 0.7; }
.legal .wink { display: inline-flex; align-items: center; gap: 8px; }
.legal .rocket { width: 11px; height: 16px; fill: currentColor; }
.hero .wrap { width: 100%; }
:root[data-variant="dark"] { --hero-shade: linear-gradient(90deg, rgba(8, 14, 24, 0.55) 0%, rgba(8, 14, 24, 0.2) 50%, rgba(8, 14, 24, 0) 100%); }

:root[data-variant="dark"] .placeholder-tag { display: none; }
:root[data-variant="dark"] .hero { background-position: center, center 70%; }

@media (min-width: 900px) { .hero { align-items: flex-start; padding-top: 150px; } }
@media (min-width: 900px) {
  .hero { padding-top: 132px; }
  .hero .industries { position: absolute; bottom: 64px; margin: 0; max-width: none; }
}

/* Fixed menu */
.top { position: fixed; padding: 18px 0; transition: background-color 0.25s ease, padding 0.25s ease, box-shadow 0.25s ease; }
.top.scrolled { background: rgba(14, 22, 30, 0.94); padding: 12px 0; box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06); }
@supports (backdrop-filter: blur(8px)) { .top.scrolled { background: rgba(14, 22, 30, 0.82); backdrop-filter: blur(8px); } }
@media (prefers-reduced-motion: reduce) { .top { transition: none; } }
section, .contact { scroll-margin-top: 64px; }

/* AI & Technology */
.ai-groups { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
@media (max-width: 960px) { .ai-groups { grid-template-columns: 1fr; } }
.ai-group { border-top: 2px solid var(--accent); padding-top: 18px; }
.ai-group h3 { font-size: 1.1875rem; margin: 0 0 12px; }
.ai-group ul { margin: 0; padding: 0; list-style: none; }
.ai-group li { position: relative; padding: 9px 0 9px 20px; border-bottom: 1px solid var(--line); color: var(--ink); font-size: 0.975rem; line-height: 1.5; }
.ai-group li::before { content: ""; position: absolute; left: 0; top: 1.05em; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.ai-principles { list-style: none; margin: 48px 0 0; padding: 24px 28px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px 28px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
@media (max-width: 960px) { .ai-principles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .ai-principles { grid-template-columns: 1fr; } }
.ai-principles li { font-size: 0.925rem; color: var(--muted); line-height: 1.5; }
.ai-principles strong { display: block; color: var(--ink); margin-bottom: 2px; }
@media (max-width: 760px) { .top nav a:nth-child(-n+3) { display: none; } }
.ai-intro p { margin: 0 0 12px; color: var(--muted); max-width: 60ch; }
.ai-intro p:last-child { margin-bottom: 0; color: var(--ink); }
#ai .section-head { align-items: start; }
.section-head.stacked { grid-template-columns: 1fr; gap: 14px; }
.section-head.stacked p { max-width: 70ch; }
.ai-sub { margin: 8px 0 24px; }
.ai-sub h3 { font-size: 1.25rem; margin: 0 0 4px; }
.ai-sub p { margin: 0; color: var(--muted); max-width: 70ch; }
#ai .ai-principles { margin: 0 0 56px; }
.about h2 { font-size: clamp(1.625rem, 2.6vw, 2rem); margin-bottom: 14px; }
.about p { font-size: 0.95rem; line-height: 1.6; margin-bottom: 12px; }

/* ---------- Colour alternatives (sections below the hero) ---------- */
:root { --accent2: var(--accent); --bar: rgba(14, 22, 30, 0.86); }
.top.scrolled { background: var(--bar); }
.model .n { background: var(--accent2); }
.ai-group { border-top-color: var(--accent2); }
.ai-group li::before { background: var(--accent2); }

/* A – Spruce & Ochre: light stone, spruce green, ochre details */
:root[data-palette="spruce"] {
  --bg: #ecece7; --bg-alt: #f8f8f5; --surface: #ffffff; --ink: #1f2a2e; --muted: #56616a; --line: #d5d7cf;
  --accent: #2f5240; --accent-soft: #e2e8e0; --accent2: #a8741f; --on-accent: #ffffff;
  --footer: #1f2a2e; --footer-ink: #eeeeea; --bar: rgba(31, 42, 46, 0.9); color-scheme: light;
}
/* B – Fjord: cool light blue-grey, fjord blue, horizon amber */
:root[data-palette="fjord"] {
  --bg: #e9eff2; --bg-alt: #f7fafb; --surface: #ffffff; --ink: #162a39; --muted: #4f6272; --line: #cfdbe2;
  --accent: #285b7c; --accent-soft: #dde8ef; --accent2: #c27a2e; --on-accent: #ffffff;
  --footer: #12283a; --footer-ink: #eef3f6; --bar: rgba(18, 40, 58, 0.9); color-scheme: light;
}
/* C – Slate & Sand: warm mid-dark slate with sand accents */
:root[data-palette="slate"] {
  --bg: #2a3237; --bg-alt: #323b41; --surface: #374148; --ink: #eeefea; --muted: #b6bdbc; --line: #465158;
  --accent: #d8b57c; --accent-soft: #46483f; --accent2: #d8b57c; --on-accent: #22292d;
  --footer: #1f262a; --footer-ink: #eeefea; --bar: rgba(31, 38, 42, 0.9); color-scheme: dark;
}

/* B – Fjord, tuned to the hero image */
:root[data-palette="fjord"] {
  --bg: #f1f3f4; --bg-alt: #ffffff; --surface: #ffffff; --ink: #0f2236; --muted: #4c5d6c; --line: #d6dee3;
  --accent: #1f4f78; --accent-soft: #e2ebf2; --accent2: #c98a4e; --on-accent: #ffffff;
  --footer: #021a32; --footer-ink: #eef3f6; --bar: rgba(2, 26, 50, 0.9);
}
/* Services continues the deep blue of the image, so the page flows out of the photo */
:root[data-palette="fjord"] { --bg: #e8eef4; --bg-alt: #f6f8fa; --line: #d3dde6; }
/* Soft transition from the photo into the page, like haze over the water */
:root[data-palette="fjord"] .hero::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 180px; pointer-events: none;
  background: linear-gradient(180deg, rgba(232, 238, 244, 0) 0%, rgba(232, 238, 244, 0.35) 45%, #e8eef4 100%);
}
:root[data-palette="fjord"] #services { padding-top: 48px; }
:root[data-palette="fjord"] #services .card { border-color: #d3dde6; }

/* ---------- Harmonized type scale from Services and down ---------- */
:root { --body: var(--ink); }
:root[data-palette="fjord"] { --body: #2c3d4b; }

/* Level 1: section headings */
.section-head h2, .about h2 { font-size: clamp(1.75rem, 3vw, 2.25rem); line-height: 1.12; letter-spacing: -0.02em; font-weight: 700; margin: 0; }
.about h2 { margin-bottom: 16px; }
#services .section-head h2 { color: var(--ink); }

/* Intro text under section headings */
.section-head p, .ai-sub p { font-size: 1rem; line-height: 1.6; color: var(--muted); }

/* Level 2: block headings */
.card h3, .model h3, .ai-group h3, .ai-sub h3 { font-size: 1.1875rem; line-height: 1.3; font-weight: 700; color: var(--ink); letter-spacing: -0.005em; }
.card .goal { font-size: 0.95rem; font-weight: 600; }

/* Level 3: item headings */
.card dt, .ai-principles strong { font-size: 0.975rem; font-weight: 700; color: var(--ink); }

/* Body text */
.card dd, .model p, .ai-group li, .ai-principles li, .about p, .about p:last-child {
  font-size: 0.95rem; line-height: 1.6; color: var(--body);
}
.ai-principles li { color: var(--muted); }

/* Footer rocket as a raised footnote mark */
.legal .wink { align-items: flex-start; gap: 3px; }
.legal .wink .rocket { width: 11px; height: 16px; margin-top: -7px; }
.section-head.stacked p { max-width: none; }
.ai-sub p { max-width: none; }
#ai .section-head { margin-bottom: 28px; }

/* Hero fills the whole first screen, so Services starts below the fold */
.hero { min-height: 100vh; min-height: 100svh; }
