/* Solsem Consulting – sc.solsem.no. No external dependencies. */
:root {
  --ink: #1d2a33;
  --muted: #55636d;
  --bg: #f7f5f0;
  --surface: #ffffff;
  --line: #d9d4c8;
  --accent: #0f6b66;
  --accent-ink: #ffffff;
  --product: #0f6b66;
  --platform: #3d4f8a;
  --tool: #8a5a1f;
  --radius: 10px;
  --radius-lg: 16px;
  --sun: #e8a33d;
  --shadow: 0 1px 2px rgba(29, 42, 51, .05), 0 4px 14px rgba(29, 42, 51, .06);
  --shadow-lg: 0 2px 4px rgba(29, 42, 51, .06), 0 14px 32px rgba(29, 42, 51, .12);
  --wrap: 1080px;
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
}

a { color: var(--accent); }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

h1, h2, h3 { line-height: 1.2; letter-spacing: -.01em; }
h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); margin: 0 0 .5rem; }
h2 { font-size: 1.45rem; margin: 2rem 0 .75rem; }
h3 { font-size: 1.15rem; margin: 0 0 .5rem; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding-left: 1.25rem; padding-right: 1.25rem; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 1rem; top: 1rem; background: var(--surface); padding: .5rem 1rem; z-index: 10; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(20, 31, 39, .92); color: #fff;
  -webkit-backdrop-filter: saturate(140%) blur(8px); backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.header-inner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: .5rem 1.5rem; padding-top: .8rem; padding-bottom: .8rem;
}
.brand {
  display: inline-flex; align-items: center; gap: .6rem;
  color: #fff; font-weight: 700; font-size: 1.15rem; text-decoration: none; letter-spacing: .01em;
}
.brand::before {
  content: ""; width: 1.35rem; height: 1.35rem; border-radius: 50%; flex: none;
  background: radial-gradient(circle at 35% 35%, #ffd98a, var(--sun) 55%, #c9721c);
  box-shadow: 0 0 0 3px rgba(232, 163, 61, .25), 0 0 18px rgba(232, 163, 61, .45);
}
.site-header nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .25rem .4rem; }
.site-header nav a {
  display: block; color: #d9e6e5; text-decoration: none;
  padding: .35rem .8rem; border-radius: 999px; transition: background-color .2s, color .2s;
}
.site-header nav a:hover { color: #fff; background: rgba(255, 255, 255, .1); }
.site-header nav a[aria-current="page"] { color: var(--ink); background: #bfe3df; font-weight: 600; }
/* Language switch: last on wide screens, next to the brand when the menu wraps (see max-width: 860px). */
.site-header nav { order: 2; margin-left: auto; }
.lang-switch {
  order: 3; display: inline-flex; align-items: center; gap: .45rem;
  color: #d9e6e5; text-decoration: none; font-size: .9rem;
  padding: .3rem .75rem; border: 1px solid rgba(255, 255, 255, .35); border-radius: 999px;
  transition: background-color .2s, color .2s;
}
.lang-switch:hover { color: #fff; background: rgba(255, 255, 255, .1); }
.lang-switch .flag { height: .85em; width: auto; flex: none; border-radius: 2px; box-shadow: 0 0 0 1px rgba(255, 255, 255, .25); }

.page { overflow-x: clip; min-height: 100vh; display: flex; flex-direction: column; }
.page > main { flex: 1 0 auto; width: 100%; }
main { padding-top: 0; padding-bottom: 4rem; }

.lead { font-size: 1.2rem; color: var(--muted); max-width: 46rem; }

/* Page head: full-width band behind the page title */
.page-head {
  position: relative; isolation: isolate; color: #fff;
  padding: 3.5rem 0 3rem; margin-bottom: 2.5rem;
}
.page-head::before {
  content: ""; position: absolute; z-index: -1; top: 0; bottom: 0; left: 50%;
  width: 100vw; transform: translateX(-50%);
  background:
    radial-gradient(38rem 22rem at 88% 10%, rgba(232, 163, 61, .38), transparent 70%),
    radial-gradient(30rem 20rem at 0% 100%, rgba(127, 200, 193, .22), transparent 70%),
    linear-gradient(135deg, #142029 0%, #173a3f 55%, var(--accent) 100%);
}
.page-head::after {
  content: ""; position: absolute; z-index: -1; right: 0; top: 50%;
  width: 16rem; height: 16rem; transform: translateY(-50%); border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .14);
  box-shadow: 0 0 0 2.5rem rgba(255, 255, 255, .03), 0 0 0 5rem rgba(255, 255, 255, .02);
  pointer-events: none;
}
.page-head h1 { color: #fff; }
.page-head .lead { color: #d3e4e2; margin-bottom: 0; }
.page-head .lead + p { margin: 1.75rem 0 0; }
.hero { padding: 5rem 0 4.5rem; }
.hero h1 { font-size: clamp(2.3rem, 6vw, 3.6rem); letter-spacing: -.02em; }
.hero .lead { font-size: clamp(1.2rem, 2.2vw, 1.45rem); max-width: 40rem; }

.button {
  display: inline-block; background: var(--sun); color: #1d1a12;
  padding: .75rem 1.5rem; border-radius: 999px; text-decoration: none; font-weight: 700;
  box-shadow: 0 6px 18px rgba(232, 163, 61, .35); transition: transform .2s, box-shadow .2s, background-color .2s;
}
.button:hover { background: #f0b65a; transform: translateY(-2px); box-shadow: 0 10px 24px rgba(232, 163, 61, .45); }
.cta { margin-top: 2rem; }

.more { font-weight: 600; text-decoration: none; }
.more::after { content: " \2192"; content: " \2192" / ""; display: inline-block; transition: transform .2s; }
.more:hover { text-decoration: underline; }
.more:hover::after { transform: translateX(4px); }

/* Home: two feature panels */
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.25rem; }
.feature {
  position: relative; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 1.75rem 1.75rem 1.5rem; box-shadow: var(--shadow);
}
.feature::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px;
  background: linear-gradient(90deg, var(--accent), #2a9d8f);
}
.feature + .feature::before { background: linear-gradient(90deg, var(--sun), #d9822b); }
.feature h2 { margin-top: 0; }
.feature.how { margin-bottom: 1.25rem; }
.feature p:last-child { margin-bottom: 0; }

/* Cards */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.25rem; counter-reset: card; }
.card {
  position: relative;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 1.4rem 1.4rem 1.3rem; box-shadow: var(--shadow);
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: #c9c2b2; }
.card h2 { margin-top: 0; font-size: 1.2rem; }
.card p:last-child { margin-bottom: 0; }
.cards > .card:not(.eco-card)::before {
  counter-increment: card; content: counter(card, decimal-leading-zero);
  content: counter(card, decimal-leading-zero) / "";
  display: block; margin-bottom: .6rem;
  font-size: .85rem; font-weight: 700; letter-spacing: .08em; color: var(--accent);
}
.card-feature {
  grid-column: 1 / -1; color: #fff; border: 0;
  background: linear-gradient(135deg, #173a3f, var(--accent));
}
.card-feature:hover { border-color: transparent; }
.cards > .card.card-feature::before { color: #ffd98a; }
.card-feature a { color: #ffd98a; }

/* About: intro paragraphs under the page title */
.intro { max-width: 46rem; margin: 0 0 2rem; }
.intro p { margin: 0 0 .75rem; }
.intro p:last-child { margin-bottom: 0; }

/* About: contact */
.contact-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 1.5rem 1.75rem; box-shadow: var(--shadow); max-width: 40rem; scroll-margin-top: 5rem;
}
.contact-card h2 { margin-top: 0; }
.contact { list-style: none; margin: 0; padding: 0; }
.contact li { padding: .65rem 0 .65rem 1.4rem; border-top: 1px solid var(--line); position: relative; }
.contact li:first-child { border-top: 0; }
.contact li::before {
  content: ""; position: absolute; left: 0; top: 1.15rem;
  width: .55rem; height: .55rem; border-radius: 50%; background: var(--sun);
}

/* Ecosystem */
.eco-figure { margin: 1.5rem 0 1rem; }
.eco-scroll {
  overflow-x: auto; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 1rem; box-shadow: var(--shadow);
}
.eco-svg { display: block; width: 100%; height: auto; margin: 0 auto; }
.eco-figure figcaption { color: var(--muted); font-size: .95rem; margin-top: .4rem; }

.eco-group { font-size: 14px; font-weight: 700; fill: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.eco-node rect { fill: var(--surface); stroke-width: 2; }
.eco-node text { font-size: 17px; font-weight: 600; fill: var(--ink); }
.eco-node:hover rect, .eco-node:focus rect { fill: #eef6f5; stroke-width: 3; }
.eco-node:focus { outline: none; }
.eco-node:focus-visible rect { stroke-width: 4; }
.eco-node.eco-product rect { stroke: var(--product); }
.eco-node.eco-platform rect { stroke: var(--platform); }
.eco-node.eco-tool rect { stroke: var(--tool); }
.eco-edge { fill: none; stroke: var(--muted); stroke-width: 2; }
.eco-edge:hover { stroke: var(--ink); stroke-width: 3; }
#eco-arrow path { fill: var(--muted); }

.eco-card { border-top: 4px solid var(--line); scroll-margin-top: 5rem; }
.eco-card.eco-product { border-top-color: var(--product); }
.eco-card.eco-platform { border-top-color: var(--platform); }
.eco-card.eco-tool { border-top-color: var(--tool); }
.eco-card:target { box-shadow: 0 0 0 3px var(--accent); }
.eco-card dl { display: grid; grid-template-columns: max-content 1fr; gap: .2rem .8rem; margin: .75rem 0; font-size: .95rem; }
.eco-card dt { color: var(--muted); }
.eco-card dd { margin: 0; }

.eco-card-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .35rem .75rem; margin-bottom: .5rem; }
.eco-card-head h3 { margin: 0; }

/* Status badges: colour plus text, never colour alone */
.badge {
  display: inline-flex; align-items: center; gap: .4rem; white-space: nowrap;
  padding: .15rem .7rem; border-radius: 999px; font-size: .85rem; font-weight: 600; line-height: 1.5;
  background: #e8e8e8; color: var(--ink);
}
.badge::before { content: ""; width: .55rem; height: .55rem; border-radius: 50%; background: currentColor; flex: none; }
.badge-ok { background: #dff3e4; color: #14532d; }
.badge-ok::before { background: #2e9e5b; }
.badge-dev { background: #fcefc7; color: #6b4600; }
.badge-dev::before { background: #d99a1c; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

/* Steps: ecosystem user flow (3) and services process (5) */
.flow { margin: 2rem 0; }
.flow h2 { margin-top: 0; }
.flow-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; counter-reset: step; }
.flow-steps-5 { grid-template-columns: repeat(5, 1fr); }
.flow-steps li {
  position: relative; counter-increment: step;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 1.1rem 1.25rem; box-shadow: var(--shadow); font-weight: 600;
}
.flow-steps li::before {
  content: counter(step); content: counter(step) / "";
  display: flex; align-items: center; justify-content: center;
  width: 2rem; height: 2rem; margin-bottom: .6rem; border-radius: 50%;
  background: var(--accent); color: var(--accent-ink); font-size: 1rem; font-weight: 700;
}
.flow-steps li:not(:last-child)::after {
  content: "\2192"; content: "\2192" / "";
  position: absolute; right: -1.05rem; top: 50%; transform: translateY(-50%);
  color: var(--muted); font-weight: 700; z-index: 1;
}

/* Footer */
.site-footer { background: #142029; color: #a9bcbf; font-size: .95rem; }
.site-footer p { margin: 0; padding: 1.75rem 0; }

.eco-section h2 { display: flex; align-items: center; gap: .6rem; }
.eco-section h2::before { content: ""; width: .7rem; height: .7rem; border-radius: 3px; background: var(--muted); }
.eco-section.eco-product h2::before { background: var(--product); }
.eco-section.eco-platform h2::before { background: var(--platform); }
.eco-section.eco-tool h2::before { background: var(--tool); }

@media (max-width: 860px) {
  .lang-switch { order: 1; margin-left: auto; }
  .site-header nav { order: 2; margin-left: 0; flex-basis: 100%; }
}

@media (max-width: 900px) {
  .flow-steps-5 { grid-template-columns: 1fr; }
  .flow-steps-5 li:not(:last-child)::after { content: "\2193"; content: "\2193" / ""; right: auto; left: 2.5rem; top: auto; bottom: -1.2rem; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .card, .button, .more::after { transition: none; }
  .card:hover, .button:hover { transform: none; }
}

@media (max-width: 600px) {
  body { font-size: 1rem; }
  .page-head { padding: 2.25rem 0 2rem; margin-bottom: 1.75rem; }
  .hero { padding: 3rem 0 2.75rem; }
  .page-head::after { width: 10rem; height: 10rem; right: -3rem; top: 2rem; transform: none; }
  .site-header { position: static; }
  .header-inner { column-gap: .75rem; }
  .lang-switch { padding: .25rem .6rem; gap: .35rem; }
  .feature, .contact-card { padding: 1.25rem; }
  .eco-card dl { grid-template-columns: 1fr; }
  .flow-steps { grid-template-columns: 1fr; }
  .flow-steps li:not(:last-child)::after { content: "\2193"; content: "\2193" / ""; right: auto; left: 2.5rem; top: auto; bottom: -1.2rem; transform: none; }
  .eco-card dt { margin-top: .3rem; }
}
