/* ===== Design tokens ===== */
:root {
  color-scheme: light;

  --paper: #f6f7fa;           /* cool white page */
  --surface: #ffffff;
  --ink: #14213a;             /* deep slate navy text */
  --ink-muted: #4d5a73;
  --navy: #2a405b;            /* brand Deep Navy: actions, icons, focus, footer */
  --navy-light: #4f688d;      /* lighter navy for accents and glows */
  --navy-hover: #1e3046;
  --navy-deep: #1e3046;       /* footer CTA band */
  --mist: #e9edf3;            /* brand Light Gray: panels inside illustrations */
  --footer-text: #c9d3e0;     /* light gray text on navy */
  --line: #d9dee8;
  --field-border: #8592a8;
  --error: #b42318;
  --success: #1f7a4d;

  --radius: 10px;             /* buttons and fields */
  --r-panel: 24px;
  --r-tile: 18px;
  --max: 1200px;
  --header-h: 72px;
  --sans: "Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
}

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

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

body {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
}

h1, h2, h3 {
  margin: 0 0 0.5em;
  font-family: var(--sans);
  line-height: 1.1;
  letter-spacing: -0.015em;
  text-wrap: balance;
}
h2 { font-size: clamp(2rem, 4.2vw, 3rem); font-weight: 750; letter-spacing: -0.02em; }
h3 { font-size: 1.2rem; font-weight: 650; }
p { margin: 0 0 1em; text-wrap: pretty; }
img, svg { display: block; max-width: 100%; }
a { color: var(--navy); text-underline-offset: 0.15em; }
a:hover { color: var(--navy-hover); }

:focus-visible {
  outline: 2px solid var(--navy);
  outline-offset: 3px;
  border-radius: 4px;
}

.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 16px;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--navy);
  color: #fff;
  border-radius: var(--radius);
  font: 600 1rem var(--sans);
  text-decoration: none;
}
.skip-link:focus { top: 12px; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 1.3em;
  border: 1.5px solid var(--navy);
  border-radius: var(--radius);
  background: var(--navy);
  color: #fff;
  font: 650 1rem/1 var(--sans);
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}
.btn:hover { background: var(--navy-hover); border-color: var(--navy-hover); color: #fff; }
.btn-outline { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-outline:hover { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn-small { min-height: 44px; padding: 0 1.1em; font-size: 0.95rem; }
.btn-block { width: 100%; }

/* ===== Header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--paper) 94%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font: 750 1.15rem var(--sans);
  letter-spacing: -0.01em;
  text-decoration: none;
}
.brand:hover { color: var(--ink); }

.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: none;
  border: 0;
  cursor: pointer;
}
.nav-toggle .bar {
  display: block;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.25s;
}
.nav-toggle[aria-expanded="true"] .bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.site-nav {
  position: absolute;
  top: var(--header-h);
  left: 0;
  right: 0;
  display: none;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.2s, transform 0.2s, display 0.2s allow-discrete;
}
.site-nav.open { display: block; opacity: 1; transform: none; }
@starting-style {
  .site-nav.open { opacity: 0; transform: translateY(-4px); }
}
.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 8px 16px 20px;
  display: flex;
  flex-direction: column;
}
.site-nav a:not(.btn) {
  display: block;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font: 500 1.05rem var(--sans);
  text-decoration: none;
}
.site-nav a:not(.btn):hover { color: var(--navy); }
.site-nav .btn { width: 100%; margin-top: 16px; }

/* ===== Hero ===== */
.hero { padding: 56px 0 64px; }
.hero-inner { display: grid; gap: 40px; }
.hero h1 {
  max-width: 11ch;
  margin: 0 0 0.45em;
  font-size: clamp(2.6rem, 6.6vw, 5.25rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
}
.hero .lead { max-width: 32em; margin-bottom: 1.6em; font-size: 1.25rem; line-height: 1.55; color: var(--ink-muted); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }

/* Hero graphic: floating dashboard, checklist and progress ring connected to the people they serve.
   The cards settle in once on load, then the links and nodes appear: the page's one load moment. */
.hero-art {
  width: 100%;
  max-width: 340px;
  margin: 0 auto;
  overflow: visible;
}
.ha-grid { fill: url(#ha-dots); }
#ha-dots circle { fill: color-mix(in srgb, var(--navy) 16%, var(--paper)); }
.ha-surface { fill: var(--surface); }
.ha-panel { fill: color-mix(in srgb, var(--mist) 55%, var(--surface)); }
.ha-mist { fill: var(--mist); }
.ha-navy { fill: var(--navy); }
.ha-navy-light { fill: var(--navy-light); }
.ha-rule { stroke: var(--mist); stroke-width: 1.5; }
.ha-area { fill: color-mix(in srgb, var(--navy) 10%, transparent); }
.ha-line { fill: none; stroke: var(--navy); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.ha-point { fill: var(--navy); stroke: var(--surface); stroke-width: 3; }
.ha-check { fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ha-todo { fill: none; stroke: color-mix(in srgb, var(--navy) 35%, var(--surface)); stroke-width: 2; }
.ha-track { fill: none; stroke: var(--mist); stroke-width: 8; }
.ha-progress { fill: none; stroke: var(--navy); stroke-width: 8; stroke-linecap: round; stroke-dasharray: 75 100; }
.ha-links path { fill: none; stroke: color-mix(in srgb, var(--navy) 40%, transparent); stroke-width: 2; stroke-dasharray: 4 6; }
.ha-node { fill: var(--surface); stroke: var(--navy); stroke-width: 2; }

.ha-card {
  transform-box: fill-box;
  transform-origin: center;
  animation: card-in 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.ha-card-main { animation-delay: 0.1s; }
.ha-card-list { animation-delay: 0.3s; }
.ha-card-ring { animation-delay: 0.45s; }
.ha-progress { animation: ring-fill 0.9s ease-out 0.7s both; }
.ha-links, .ha-nodes { animation: fade-in 0.6s ease 0.8s both; }

@keyframes card-in {
  from { opacity: 0; transform: translateY(16px); }
}
@keyframes ring-fill {
  from { stroke-dasharray: 0 100; }
}
@keyframes fade-in {
  from { opacity: 0; }
}

/* ===== Sections ===== */
.section {
  --divider-gap: 64px;
  padding: 0 0 var(--divider-gap);
  /* Anchor links land on the section heading, not on the divider above it */
  scroll-margin-top: calc(-12px - var(--divider-gap));
}

/* Section divider: a rule with the logo's diamond at its center. It takes the place of the
   section's top padding, so the space above and below it matches. */
.section > .container::before {
  content: "";
  display: block;
  height: 12px;
  margin-bottom: var(--divider-gap);
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Crect x='2' y='2' width='8' height='8' rx='1.5' transform='rotate(45 6 6)' fill='%23364f73'/%3E%3C/svg%3E") center / 12px 12px no-repeat,
    linear-gradient(var(--line), var(--line)) center / 100% 1px no-repeat;
}
.section-head { max-width: 40rem; margin-bottom: 40px; }
.section-head h2 { margin: 0; }
.section-head p { margin: 0.4em 0 0; color: var(--ink-muted); font-size: 1.2rem; }

.panel {
  padding: clamp(24px, 4vw, 40px);
  border: 1px solid var(--line);
  border-radius: var(--r-panel);
  background: var(--surface);
}

/* About: vision, mission and values as panels */
.about-grid { display: grid; gap: 16px; }
.statement h3 { margin-bottom: 0.8em; color: var(--navy); font-size: 1rem; letter-spacing: 0; }
.badge {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: 18px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--navy) 10%, var(--surface));
}
.badge svg, .value-icon {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: var(--navy);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.statement p {
  margin: 0;
  font-size: clamp(1.25rem, 2.2vw, 1.55rem);
  line-height: 1.4;
}

.values-panel { margin-top: 16px; }
.values-panel h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
.values-list {
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
  display: grid;
  gap: 28px 32px;
}
.values-list li { padding-top: 20px; border-top: 1px solid var(--line); }
.value-icon { margin-bottom: 14px; }
.values-list h3 { font-size: 1.1rem; }
.values-list p { margin: 0; color: var(--ink-muted); }

/* Services bento */
.bento { display: grid; gap: 16px; }

.tile {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  min-height: 200px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--r-tile);
  background: var(--surface);
  container-type: inline-size;
}
.tile-icon {
  width: 28px;
  height: 28px;
  margin-bottom: 28px;
  fill: none;
  stroke: var(--navy);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.tile h3 { margin: auto 0 0.4em; }
.tile p { margin: 0; color: var(--ink-muted); }

.tile-art { display: none; width: 100%; max-width: 380px; margin: 0 0 28px; }
.art-window { fill: var(--surface); stroke: var(--line); stroke-width: 1.5; }
.art-rule { stroke: var(--line); stroke-width: 1.5; }
.art-dot, .art-line { fill: color-mix(in srgb, var(--navy) 22%, var(--surface)); }
.art-panel { fill: color-mix(in srgb, var(--navy) 7%, var(--surface)); }
.art-bar { fill: color-mix(in srgb, var(--navy) 40%, var(--surface)); }
.art-mid { fill: var(--navy-light); }
.art-strong { fill: var(--navy); }

.tile-custom {
  background:
    radial-gradient(120% 90% at 100% 100%, color-mix(in srgb, var(--navy-light) 14%, transparent), transparent 60%),
    var(--surface);
}
@container (min-width: 420px) {
  .tile-icon { width: 40px; height: 40px; }
  .tile-art { display: block; }
  .tile h3 { font-size: 1.6rem; }
  .tile p { max-width: 32ch; font-size: 1.15rem; }
}

.tile-cta {
  justify-content: space-between;
  gap: 28px;
  padding: 32px;
  border-color: color-mix(in srgb, var(--navy) 30%, transparent);
  background: color-mix(in srgb, var(--navy) 8%, var(--surface));
}
.tile-cta p { color: var(--ink); font: 600 1.15rem/1.4 var(--sans); max-width: 30ch; }
.tile-cta .btn { align-self: flex-start; }

/* Pointer-follow border glow; main.js sets --mx / --my per tile */
.tile::before {
  content: "";
  position: absolute;
  inset: -1px;
  z-index: -1;
  padding: 1.5px;
  border-radius: inherit;
  background: radial-gradient(260px circle at var(--mx, 50%) var(--my, -200%), var(--navy-light), transparent 70%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .bento:hover .tile::before { opacity: 1; }
  .tile { transition: transform 0.2s, box-shadow 0.2s; }
  .tile:hover { transform: translateY(-3px); box-shadow: 0 14px 30px -16px rgb(20 33 58 / 0.3); }
}

/* Process: numbered nodes on a connecting track */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
}
.step {
  position: relative;
  padding: 0 0 40px 64px;
}
.step:last-child { padding-bottom: 0; }
.step:not(:last-child)::before {
  content: "";
  position: absolute;
  left: 22px;
  top: 52px;
  bottom: 8px;
  width: 1px;
  background: var(--field-border);
}
.step-num {
  position: absolute;
  left: 0;
  top: 0;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1.5px solid var(--navy);
  border-radius: 50%;
  background: var(--paper);
  color: var(--navy);
  font: 700 1.05rem var(--sans);
}
.step h3 { padding-top: 10px; margin-bottom: 0.4em; }
.step p { margin: 0; color: var(--ink-muted); }

/* Contact: a regular light section; the navy footer below closes the page */
.contact-grid { display: grid; gap: 40px; }
.contact-info p { color: var(--ink-muted); }
.contact-list {
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
  border-top: 1px solid var(--line);
  font-family: var(--sans);
}
.contact-list li {
  display: grid;
  grid-template-columns: 6rem 1fr;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.contact-list span { color: var(--ink-muted); }
.contact-list a { word-break: break-word; }

.contact-form {
  padding: clamp(24px, 4vw, 36px);
  border: 1px solid var(--line);
  border-radius: var(--r-tile);
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 24px 48px -28px rgb(20 33 58 / 0.3);
}
.field { margin-bottom: 18px; }
.field label { display: block; margin-bottom: 6px; font: 600 1rem var(--sans); }
.optional { font-weight: 400; color: var(--ink-muted); }
.field input, .field textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--field-border);
  border-radius: var(--radius);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field textarea { resize: vertical; }
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--navy) 25%, transparent);
}
.field [aria-invalid="true"] { border-color: var(--error); }
.error { margin: 6px 0 0; color: var(--error); font: 500 0.9rem var(--sans); }
.error:empty { display: none; }
.form-success {
  margin: 16px 0 0;
  padding: 12px 14px;
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--success) 12%, transparent);
  color: var(--ink);
  font: 500 1rem var(--sans);
}

/* ===== Footer: CTA band, four-column grid, bottom bar, all on navy ===== */
.site-footer {
  background: var(--navy);
  color: var(--footer-text);
  font-family: var(--sans);
}
.site-footer a:not(.btn) {
  color: var(--footer-text);
  text-decoration: none;
  text-underline-offset: 0.2em;
  transition: color 0.2s;
}
.site-footer a:not(.btn):hover { color: #fff; text-decoration: underline; }
.site-footer :focus-visible { outline-color: #fff; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }

.footer-cta { padding: 64px 0; background: var(--navy-deep); color: #fff; }
.footer-cta-inner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 28px;
}
.footer-cta h2 { margin: 0 0 0.35em; color: #fff; font-size: clamp(1.75rem, 3.6vw, 2.5rem); }
.footer-cta p { margin: 0; max-width: 34em; color: var(--footer-text); font: 400 1.15rem/1.6 var(--serif); }
.btn-white { background: #fff; border-color: #fff; color: var(--navy); }
.btn-white:hover { background: var(--mist); border-color: var(--mist); color: var(--navy); }

.footer-main { padding: 64px 0; }
.footer-grid { display: grid; gap: 40px; }
.footer-brand .brand,
.footer-brand .brand:hover { color: #fff; text-decoration: none; }
.tagline { max-width: 22rem; margin: 14px 0 22px; font: 400 1.05rem/1.6 var(--serif); }
.social { display: flex; gap: 10px; }
.social a:not(.btn) {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgb(255 255 255 / 0.22);
  border-radius: var(--radius);
  transition: color 0.2s, background-color 0.2s, border-color 0.2s;
}
.social a:not(.btn):hover { color: #fff; background: rgb(255 255 255 / 0.1); border-color: #fff; }
.social svg { width: 18px; height: 18px; fill: currentColor; }

.footer-title { margin: 0 0 14px; color: #fff; font-size: 1rem; font-weight: 650; letter-spacing: 0; }
.footer-links { display: grid; gap: 2px; }
.footer-links a:not(.btn) { display: inline-block; padding: 6px 0; }
.footer-contact li { display: grid; gap: 0; margin-bottom: 10px; }
.footer-contact span { font-size: 0.85rem; color: color-mix(in srgb, var(--footer-text) 85%, var(--navy)); }
.footer-contact a:not(.btn) { padding: 2px 0; word-break: break-word; }

.footer-bottom {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 24px;
  padding-bottom: 28px;
  border-top: 1px solid rgb(255 255 255 / 0.14);
  font-size: 0.9rem;
}
.copyright { margin: 0; }
.legal-links { display: flex; flex-wrap: wrap; gap: 4px 24px; }

/* ===== Reduced motion ===== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .ha-card, .ha-progress, .ha-links, .ha-nodes { animation: none; }
  .site-nav, .btn, .nav-toggle .bar, .tile::before { transition: none; }
}

/* ===== Responsive ===== */
@media (min-width: 640px) {
  .bento {
    grid-template-columns: repeat(2, 1fr);
    grid-template-areas:
      "custom  custom"
      "apps    erp"
      "inst    inst"
      "cloud   support"
      "cta     cta";
  }
  .tile-custom  { grid-area: custom; }
  .tile-apps    { grid-area: apps; }
  .tile-erp     { grid-area: erp; }
  .tile-inst    { grid-area: inst; }
  .tile-cloud   { grid-area: cloud; }
  .tile-support { grid-area: support; }
  .tile-cta     { grid-area: cta; }

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

@media (min-width: 768px) {
  .container { padding: 0 32px; }

  .nav-toggle { display: none; }
  .site-nav {
    position: static;
    display: block;
    opacity: 1;
    transform: none;
    background: none;
    border: 0;
  }
  .site-nav ul { flex-direction: row; align-items: center; gap: 28px; padding: 0; }
  .site-nav a:not(.btn) { padding: 0; border: 0; font-size: 1rem; }
  .site-nav a:not(.btn):hover { text-decoration: underline; }
  .site-nav .btn { width: auto; margin: 0; }

  .section { --divider-gap: 96px; }
  .about-grid { grid-template-columns: 5fr 7fr; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); gap: 48px 40px; }
  .footer-cta-inner { flex-direction: row; align-items: center; justify-content: space-between; gap: 40px; }
  .footer-cta .btn { flex-shrink: 0; }
  .footer-bottom { flex-direction: row; align-items: center; justify-content: space-between; }
}

@media (min-width: 1024px) {
  /* Headline left; logo top right with the intro and buttons below it */
  .hero { padding: 72px 0 88px; }
  /* Text on the left (headline, intro, buttons); the graphic centered beside it */
  .hero-inner { grid-template-columns: 7fr 5fr; align-items: center; gap: 56px; }
  .hero-art { max-width: 440px; }
  .hero .lead { font-size: 1.35rem; }

  .bento {
    grid-template-columns: repeat(4, 1fr);
    grid-template-areas:
      "custom  custom   apps  erp"
      "custom  custom   inst  inst"
      "cloud   support  cta   cta";
  }
  .values-list { grid-template-columns: repeat(4, 1fr); }

  .steps { grid-template-columns: repeat(4, 1fr); gap: 32px; }
  .step { padding: 0; }
  .step:not(:last-child)::before {
    left: 56px;
    right: -24px;
    top: 22px;
    bottom: auto;
    width: auto;
    height: 1px;
  }
  .step h3 { padding-top: 0; margin-top: 32px; }
  .step-num { position: static; }

  .contact-grid { grid-template-columns: 1fr 1.1fr; align-items: start; gap: 64px; }
  .footer-grid { grid-template-columns: 1.5fr 1fr 1fr 1.3fr; }
  .field { margin-bottom: 16px; }
  .field input { min-height: 44px; padding: 9px 14px; }
}
