/* ==========================================================================
   CENTNORD — MAIN STYLESHEET
   --------------------------------------------------------------------------
   Reads its values from tokens.css (the design system).
   Numbered sections match ARCHITECTURE.md:

     §1  Base & reset            §8   "How we work" compass list
     §2  Preloader               §9   Key facts band
     §3  Header & navigation     §10  Contact section + forms
     §4  Buttons & links         §11  CTA band
     §5  Section scaffolding     §12  Footer
     §6  Hero                    §13  "Talk to us" modal
     §7  Service cards + icons   §14  Inner pages (about / services)
                                 §15  Reveal motion & utilities
   ========================================================================== */


/* §1 ─────────────────────────────── BASE & RESET ───────────────────────── */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 1rem);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  font-weight: var(--w-regular);
  font-size: var(--text-base);
  line-height: var(--leading-body);
  color: var(--ink-2);
  background: var(--bg);
}

h1, h2, h3, h4 {
  margin: 0 0 var(--s-4);
  color: var(--ink);
  font-weight: var(--w-bold);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  text-wrap: balance;
}

h1 { font-size: var(--text-3xl); }
h2 { font-size: var(--text-2xl); }
h3 { font-size: var(--text-xl); line-height: var(--leading-snug); }

p { margin: 0 0 var(--s-4); max-width: 62ch; }
p:last-child { margin-bottom: 0; }

ul, ol { margin: 0; padding: 0; list-style: none; }

img, svg { display: block; max-width: 100%; }

::selection { background: var(--green-soft); color: var(--navy); }

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

/* Skip link — first tab stop on every page (accessibility) */
.skip-link {
  position: absolute; left: var(--s-4); top: -4rem;
  z-index: 200; padding: var(--s-2) var(--s-4);
  background: var(--navy); color: #fff;
  border-radius: var(--r-sm); text-decoration: none;
  transition: top var(--t-fast) var(--ease);
}
.skip-link:focus { top: var(--s-4); }


/* §2 ─────────────────────────────── PRELOADER ──────────────────────────────
   Shown once per browser session (JS checks sessionStorage before paint).
   The star draws its outline, the north tip lights green, then the page
   fades in. Max 1.4s — it is a greeting, not a gate.                      */

#preloader {
  position: fixed; inset: 0; z-index: 300;
  display: none;                 /* JS switches this on for first visits */
  align-items: center; justify-content: center;
  background: var(--bg);
}
html.is-loading #preloader { display: flex; }
html.is-loading body > *:not(#preloader) { visibility: hidden; }

#preloader .star { width: 72px; height: 72px; }

#preloader .star-outline {
  fill: none; stroke: var(--navy); stroke-width: 42;
  stroke-dasharray: 100; stroke-dashoffset: 100;
  animation: pl-draw 0.7s var(--ease) forwards;
}
#preloader .star-tip {
  opacity: 0;
  animation: pl-tip 0.5s var(--ease) 0.55s forwards;
}
#preloader .star-glow {
  opacity: 0; filter: blur(6px);
  animation: pl-glow 0.9s var(--ease) 0.6s forwards;
}
html.is-leaving #preloader {
  animation: pl-out 0.4s var(--ease) forwards;
}

@keyframes pl-draw { to { stroke-dashoffset: 0; } }
@keyframes pl-tip  { to { opacity: 1; } }
@keyframes pl-glow { to { opacity: 0.55; } }
@keyframes pl-out  { to { opacity: 0; visibility: hidden; } }


/* §3 ─────────────────────────── HEADER & NAVIGATION ──────────────────────── */

.site-header {
  position: sticky; top: 0; z-index: 100;
  height: var(--nav-h);
  border-bottom: 1px solid var(--line-soft);
}
/* The translucent blur lives on a pseudo-element, NOT the header
   itself: backdrop-filter on the header would make it the containing
   block for the fixed mobile menu, trapping the menu inside the
   72px header strip. */
.site-header::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.nav {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
  height: 100%;
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--s-5);
}

/* Logo = inline SVG star + live text. Stays sharp at any zoom,
   and the wordmark colour/size is controlled by CSS, not an image. */
.brand {
  display: inline-flex; align-items: center; gap: 0.625rem;
  text-decoration: none;
  position: relative; z-index: 120;   /* stays visible over the open mobile menu */
}
.brand .mark { width: 26px; height: 26px; }
.brand .wordmark {
  font-weight: var(--w-bold); font-size: 1.1875rem;
  color: var(--ink); letter-spacing: -0.01em;
}

.nav-links {
  display: flex; align-items: center; gap: var(--s-6);
}
.nav-links a:not(.btn) {
  position: relative;
  color: var(--ink-2); text-decoration: none;
  font-size: var(--text-sm); font-weight: var(--w-medium);
  padding-block: var(--s-2);
}
/* Hover/active: a green line rises from below — the "north" signal */
.nav-links a:not(.btn)::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0;
  height: 2px; background: var(--green);
  transform: scaleX(0); transform-origin: left center;
  transition: transform var(--t-fast) var(--ease);
}
.nav-links a:not(.btn):hover::after,
.nav-links a[aria-current="page"]::after { transform: scaleX(1); }
.nav-links a[aria-current="page"] { color: var(--ink); }

/* Mobile toggle — two bars that form a cross */
.nav-toggle {
  display: none;
  width: 44px; height: 44px; padding: 0;
  background: none; border: 0; cursor: pointer;
  position: relative; z-index: 120;
}
.nav-toggle span {
  position: absolute; left: 11px; width: 22px; height: 2px;
  background: var(--ink); border-radius: 2px;
  transition: transform var(--t-fast) var(--ease), top var(--t-fast) var(--ease);
}
.nav-toggle span:nth-child(1) { top: 18px; }
.nav-toggle span:nth-child(2) { top: 25px; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { top: 21px; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { top: 21px; transform: rotate(-45deg); }

/* Nav collapses at 44em (~704px): tablets keep the full menu,
   phones get the overlay. */
@media (max-width: 44em) {
  .nav-toggle { display: block; }

  .nav-links {
    position: fixed; inset: 0; z-index: 110;
    flex-direction: column; align-items: flex-start; justify-content: center;
    gap: var(--s-5);
    padding: calc(var(--nav-h) + var(--s-6)) var(--gutter) var(--s-7);
    background: var(--surface);
    opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: opacity var(--t-med) var(--ease),
                transform var(--t-med) var(--ease),
                visibility 0s linear var(--t-med);
  }
  .nav-links.is-open {
    opacity: 1; visibility: visible; transform: none;
    transition: opacity var(--t-med) var(--ease), transform var(--t-med) var(--ease);
  }
  .nav-links a:not(.btn) { font-size: var(--text-xl); padding-block: var(--s-2); }
  .nav-links .btn { margin-top: var(--s-4); }

  /* Reply promise inside the mobile menu — quiet reassurance */
  .nav-links::after {
    content: "We reply within one business day.";
    margin-top: auto;
    font-size: var(--text-sm); color: var(--ink-3);
  }

  body.nav-locked { overflow: hidden; }
}


/* §4 ──────────────────────────── BUTTONS & LINKS ───────────────────────────
   One primary CTA across the whole site: the green button.
   Green = the north tip = the direction to act. Navy text passes AA.     */

.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.8125rem 1.5rem;
  border: 0; border-radius: var(--r-sm);
  font-family: var(--font); font-size: var(--text-sm);
  font-weight: var(--w-bold); text-decoration: none;
  cursor: pointer;
  transition: background var(--t-fast) var(--ease),
              transform var(--t-fast) var(--ease),
              box-shadow var(--t-fast) var(--ease);
}
.btn .arrow { transition: transform var(--t-fast) var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--green); color: var(--navy);
}
.btn-primary:hover { background: var(--green-deep); color: var(--navy); }

.btn-ghost {
  background: transparent; color: var(--ink);
  box-shadow: inset 0 0 0 1.5px var(--line);
}
.btn-ghost:hover { box-shadow: inset 0 0 0 1.5px var(--navy); }

/* Quiet inline text link with arrow — used inside cards and sections */
.link-quiet {
  display: inline-flex; align-items: center; gap: 0.375rem;
  color: var(--ink); font-weight: var(--w-medium);
  font-size: var(--text-sm); text-decoration: none;
}
.link-quiet .arrow { color: var(--green); transition: transform var(--t-fast) var(--ease); }
.link-quiet:hover .arrow { transform: translateX(3px); }


/* §5 ──────────────────────────── SECTION SCAFFOLDING ─────────────────────── */

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: var(--section-y); }
.section + .section { padding-top: 0; }   /* rhythm: space lives below, not stacked */

/* Section label: compass glyph + spaced capitals. The small star
   glyph before each label is the system's "you are here" marker.  */
.eyebrow {
  display: inline-flex; align-items: center; gap: 0.5rem;
  margin-bottom: var(--s-4);
  font-size: var(--text-xs); font-weight: var(--w-medium);
  letter-spacing: var(--tracking-wide); text-transform: uppercase;
  color: var(--ink-3);
}
.eyebrow .glyph { width: 11px; height: 11px; flex: none; }

.section-head { max-width: 40rem; margin-bottom: var(--s-7); }
.section-head .lede { font-size: var(--text-lg); color: var(--ink-2); }


/* §6 ─────────────────────────────── HERO ───────────────────────────────────
   Asymmetric: text column left, the Nordstjärnan right.
   The compass ring drifts slowly; the star does not move.
   That is the brand promise drawn literally: "Your fixed point."        */

.hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(4rem, 3rem + 6vw, 8rem);
}

.hero-grid {
  display: grid; align-items: center;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(2rem, 5vw, 5rem);
}

.hero h1 { margin-bottom: var(--s-5); max-width: 17ch; }
.hero .lede {
  font-size: var(--text-lg); color: var(--ink-2);
  max-width: 44ch; margin-bottom: var(--s-6);
}
.hero-cta { display: flex; align-items: center; gap: var(--s-5); flex-wrap: wrap; }
.hero-note { font-size: var(--text-sm); color: var(--ink-3); }

/* The star figure — the exact logo icon, nothing added.
   The only motion is the north tip breathing. */
.hero-figure { position: relative; justify-self: center; width: min(88%, 20rem); }
.hero-figure .star { position: relative; }
.hero-star-glow { opacity: 0.5; filter: blur(10px); animation: tip-breathe 4s ease-in-out infinite; }

@keyframes tip-breathe {
  0%, 100% { opacity: 0.35; }
  50%      { opacity: 0.7; }
}

@media (max-width: 52em) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-figure { width: min(52%, 14rem); order: -1; margin-bottom: var(--s-2); }
}


/* Mission split — the statement on the left, the explanation on the
   right. Heading and paragraph share a top line, so the eye reads the
   claim first, then the proof. Stacks on tablets and phones. */
.mission {
  display: grid; gap: var(--s-5) clamp(2rem, 5vw, 5rem);
  grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  align-items: start;
}
.mission h2 { margin: 0; max-width: 18ch; }
.mission .lede {
  margin: 0; max-width: 46ch;
  font-size: var(--text-lg); color: var(--ink-2);
  padding-top: 0.35em;   /* optical: aligns the first line with the heading's cap height */
}
@media (max-width: 52em) {
  .mission { grid-template-columns: 1fr; }
  .mission h2 { max-width: 22ch; }
  .mission .lede { padding-top: 0; }
}


/* §7 ───────────────────────── SERVICE CARDS + ICONS ────────────────────────
   Three cards, one per service. On hover:
     1. the card lifts,
     2. a green "north tick" rises from the card's top edge,
     3. the line icon redraws itself (stroke animation),
     4. the icon's green node pulses once.
   Icons share the star's stroke language: 1.75px, rounded joins.        */

.card-grid {
  display: grid; gap: var(--s-5);
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
@media (max-width: 52em) { .card-grid { grid-template-columns: 1fr; } }

.service-card {
  position: relative;
  display: flex; flex-direction: column; gap: var(--s-4);
  padding: var(--s-6);
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-card);
  text-decoration: none;
  transition: transform var(--t-fast) var(--ease),
              box-shadow var(--t-fast) var(--ease),
              border-color var(--t-fast) var(--ease);
}
.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: var(--line);
}

/* The north tick — a small green point rising at top centre */
.service-card::before {
  content: "";
  position: absolute; top: -1px; left: 50%;
  width: 34px; height: 5px;
  transform: translateX(-50%) scaleY(0);
  transform-origin: top center;
  background: var(--green);
  clip-path: polygon(50% 100%, 0 0, 100% 0);  /* points downward into the card */
  transition: transform var(--t-fast) var(--ease);
}
.service-card:hover::before { transform: translateX(-50%) scaleY(1); }

/* Icon primitives are global: the same icon works inside a card
   (where hover animates it) and on a service page hero. */
.icon { width: 48px; height: 48px; color: var(--navy); }
.icon .stroke {
  fill: none; stroke: currentColor; stroke-width: 1.75;
  stroke-linecap: round; stroke-linejoin: round;
}
.icon .draw { stroke-dasharray: 100 100; stroke-dashoffset: 0; }
.service-card:hover .icon .draw { animation: icon-draw var(--t-slow) var(--ease); }
.icon .node { fill: var(--green); transform-origin: center; transform-box: fill-box; }
.service-card:hover .icon .node { animation: node-pulse 0.6s var(--ease); }

@keyframes icon-draw { from { stroke-dashoffset: 100; } to { stroke-dashoffset: 0; } }
@keyframes node-pulse {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.5); }
  100% { transform: scale(1); }
}

.service-card h3 { margin-bottom: var(--s-1); }
.service-card p  { font-size: var(--text-sm); color: var(--ink-2); flex: 1; }
.service-card .link-quiet { margin-top: var(--s-2); }


/* §8 ─────────────────────── "HOW WE WORK" COMPASS LIST ─────────────────────
   Exactly four principles — one per compass direction.
   N E S W become the list markers: the brand's geometry carries
   the content structure. No other consultancy can copy this 1:1.       */

.compass-list {
  display: grid; gap: var(--s-5);
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (max-width: 40em) { .compass-list { grid-template-columns: 1fr; } }

.compass-item {
  display: grid; grid-template-columns: auto 1fr; gap: var(--s-4);
  padding: var(--s-5);
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-md);
}
.compass-point {
  display: grid; place-items: center;
  width: 2.75rem; height: 2.75rem;
  border: 1.5px solid var(--line); border-radius: 50%;
  font-weight: var(--w-bold); font-size: var(--text-sm);
  color: var(--ink);
  position: relative;
}
/* the green tick sits at the letter's bearing on the dial */
.compass-point::after {
  content: ""; position: absolute;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--green);
}
.compass-item[data-dir="N"] .compass-point::after { top: -3.5px; left: 50%; margin-left: -3px; }
.compass-item[data-dir="E"] .compass-point::after { right: -3.5px; top: 50%; margin-top: -3px; }
.compass-item[data-dir="S"] .compass-point::after { bottom: -3.5px; left: 50%; margin-left: -3px; }
.compass-item[data-dir="W"] .compass-point::after { left: -3.5px; top: 50%; margin-top: -3px; }

.compass-item h3 { font-size: var(--text-base); margin-bottom: var(--s-1); }
.compass-item p  { font-size: var(--text-sm); margin: 0; }


/* §9 ─────────────────────────── KEY FACTS BAND ─────────────────────────────
   Navy band — the one dark moment on the page, so it reads as a
   statement, not a theme. Facts are short and scannable.               */

.facts {
  background: var(--navy);
  border-radius: var(--r-lg);
  padding: clamp(2rem, 2vw + 1.5rem, 3.5rem);
  color: var(--on-navy);
}
/* Explicit columns so no fact ever sits orphaned on its own row:
   1 column on phones, 2×2 on tablets, 4 across on desktop. */
.facts-grid { display: grid; gap: var(--s-6); grid-template-columns: 1fr; }
@media (min-width: 40em) { .facts-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 64em) { .facts-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.fact { border-left: 2px solid rgba(255,255,255,0.14); padding-left: var(--s-4); }
.fact.fact-accent { border-left-color: var(--green); }
.fact strong {
  display: block; color: #fff;
  font-size: var(--text-base); font-weight: var(--w-bold);
  margin-bottom: var(--s-1); line-height: var(--leading-snug);
}
.fact span { font-size: var(--text-sm); color: var(--on-navy-dim); }


/* §10 ───────────────────────── CONTACT + FORMS ───────────────────────────── */

.contact-grid {
  display: grid; gap: clamp(2rem, 4vw, 4rem);
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  align-items: start;
}
@media (max-width: 52em) { .contact-grid { grid-template-columns: 1fr; } }

.contact-promise {
  display: flex; align-items: center; gap: 0.625rem;
  margin-top: var(--s-5);
  font-size: var(--text-sm); color: var(--ink-3);
}
.contact-promise .glyph { width: 14px; height: 14px; flex: none; }

/* Form primitives — shared by the page form and the modal form */
.form { display: grid; gap: var(--s-4); }
.form-row { display: grid; gap: var(--s-4); grid-template-columns: 1fr 1fr; }
@media (max-width: 40em) { .form-row { grid-template-columns: 1fr; } }

.field { display: grid; gap: 0.375rem; }
.field label {
  font-size: var(--text-xs); font-weight: var(--w-medium);
  letter-spacing: 0.02em; color: var(--ink);
}
.field input, .field textarea {
  width: 100%;
  padding: 0.75rem 0.875rem;
  font: inherit; font-size: var(--text-sm); color: var(--ink);
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: var(--r-sm);
  transition: border-color var(--t-fast) var(--ease);
}
.field input::placeholder, .field textarea::placeholder { color: var(--ink-3); }
.field input:hover, .field textarea:hover { border-color: var(--ink-3); }
.field input:focus, .field textarea:focus {
  outline: none; border-color: var(--green);
  box-shadow: 0 0 0 3px var(--green-soft);
}
.field textarea { resize: vertical; min-height: 7rem; }

.field .error-msg { display: none; font-size: var(--text-xs); color: #B4452E; }
.field.has-error input, .field.has-error textarea { border-color: #B4452E; }
.field.has-error .error-msg { display: block; }

/* Topic options in the modal — plain text buttons (no pill shapes):
   underline on hover; picked option turns bold and green. */
.chip-row { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-5); }
.chip {
  padding: 0.25rem 0;
  font: inherit; font-size: var(--text-sm); font-weight: var(--w-medium);
  color: var(--ink-2);
  background: none; border: 0; border-radius: 0;
  cursor: pointer;
  text-underline-offset: 5px; text-decoration-thickness: 2px;
  transition: color var(--t-fast) var(--ease);
}
.chip:hover {
  color: var(--ink);
  text-decoration: underline; text-decoration-color: var(--green);
}
.chip[aria-pressed="true"] {
  font-weight: var(--w-bold); color: var(--green-ink);
  text-decoration: underline; text-decoration-color: var(--green);
}

/* Spam trap — invisible to people, irresistible to bots */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Send failed — calm, specific, recoverable */
.form-error { margin: 0; font-size: var(--text-sm); color: #B4452E; }

/* ── SUCCESS FEEDBACK ────────────────────────────────────────────────────
   Replaces the form after a successful send. The choreography is the
   brand idea in motion — a compass finding north:
     0.00s  the star turns in from off-axis and settles on north,
            overshooting slightly then damping, like a real needle
     0.80s  the north tip lights green; one ring ripples outward
     1.00s  "Message sent", the thank-you and the promise rise in, in turn
   Total ≈ 1.6s. With reduced motion, everything appears in its end state. */

.form-success { display: none; padding-block: var(--s-4); outline: none; }
.form.is-sent { display: none; }
.form.is-sent + .form-success { display: block; }

.success-mark {
  position: relative;
  width: 76px; height: 76px;
  margin-bottom: var(--s-5);
}
/* soft green light behind the north tip */
.success-mark::before {
  content: ""; position: absolute;
  left: 50%; top: 2%; width: 46%; height: 52%;
  transform: translateX(-38%);
  background: radial-gradient(closest-side, rgba(57,183,143,0.45), rgba(57,183,143,0));
  opacity: 0;
  animation: ok-glow 2.4s var(--ease) 0.8s both;
}
/* one ring rippling out from the centre: "received" */
.success-mark::after {
  content: ""; position: absolute; inset: 0;
  border: 1.5px solid var(--green); border-radius: 50%;
  opacity: 0;
  animation: ok-ripple 1s var(--ease) 0.8s both;
}
.star-ok {
  position: relative; z-index: 1;
  width: 100%; height: 100%;
  transform-origin: 50% 50%;
  animation: ok-settle 1s cubic-bezier(0.3, 0.7, 0.2, 1) both;
}
.star-ok .ok-tip {
  opacity: 0;
  animation: ok-tip 0.35s var(--ease) 0.8s both;
}

.success-label {
  margin: 0 0 var(--s-2);
  font-size: var(--text-xs); font-weight: var(--w-medium);
  letter-spacing: var(--tracking-wide); text-transform: uppercase;
  color: var(--green-ink);
}
.form-success h3 { margin-bottom: var(--s-2); }
.form-success p:not(.success-label) { color: var(--ink-2); }
.form-success .btn { margin-top: var(--s-5); }

.form-success > :not(.success-mark) { animation: ok-rise 0.5s var(--ease) both; }
.form-success > :nth-child(2) { animation-delay: 1.0s; }
.form-success > :nth-child(3) { animation-delay: 1.1s; }
.form-success > :nth-child(4) { animation-delay: 1.2s; }
.form-success > :nth-child(5) { animation-delay: 1.35s; }

@keyframes ok-settle {
  0%   { opacity: 0; transform: rotate(-135deg) scale(0.55); }
  55%  { opacity: 1; transform: rotate(9deg) scale(1.03); }
  75%  { transform: rotate(-3.5deg) scale(1); }
  90%  { transform: rotate(1deg); }
  100% { opacity: 1; transform: rotate(0deg) scale(1); }
}
@keyframes ok-tip    { from { opacity: 0; } to { opacity: 1; } }
@keyframes ok-ripple {
  0%   { opacity: 0.7; transform: scale(0.35); }
  100% { opacity: 0;   transform: scale(1.7); }
}
@keyframes ok-glow {
  0%   { opacity: 0; }
  30%  { opacity: 1; }
  100% { opacity: 0.55; }
}
@keyframes ok-rise {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}

/* Inside the popup the success moment is centred: a pause, not a page */
.contact-dialog.is-done .dialog-head { display: none; }
.contact-dialog .form-success { text-align: center; padding-block: var(--s-5) var(--s-3); }
.contact-dialog .success-mark { margin-inline: auto; width: 88px; height: 88px; }
.contact-dialog .form-success p { margin-inline: auto; max-width: 34ch; }


/* §11 ─────────────────────────────── CTA BAND ──────────────────────────────
   Used at the bottom of inner pages. Same single CTA, repeated.          */

.cta-band {
  display: grid; justify-items: start; gap: var(--s-5);
  padding: clamp(2.5rem, 3vw + 1.5rem, 4rem);
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-card);
}
.cta-band h2 { margin: 0; max-width: 22ch; }
.cta-band p { color: var(--ink-2); margin: 0; }


/* §12 ─────────────────────────────── FOOTER ──────────────────────────────── */

.site-footer {
  margin-top: var(--section-y);
  background: var(--navy-deep);
  color: var(--on-navy);
}
.footer-main {
  display: grid; gap: var(--s-7);
  grid-template-columns: minmax(0, 4fr) repeat(3, minmax(0, 2.5fr));
  padding-block: var(--s-8);
}
@media (max-width: 52em) {
  .footer-main { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 40em) {
  .footer-main { grid-template-columns: 1fr; gap: var(--s-6); }
}

.footer-brand .brand .wordmark { color: #fff; }

/* On navy, the star inverts: white body, green tip stays. The centre dot
   is a hole in the path, so the footer navy shows through it — the same
   way the original mark behaves on any background. */
.site-footer .mark .mark-body { fill: #FFFFFF; }
.footer-brand p {
  margin-top: var(--s-4);
  font-size: var(--text-sm); color: var(--on-navy-dim); max-width: 34ch;
}

/* Column labels are <p>, not headings: a heading here would jump the
   document outline (h2 → h4). The nav groups are already named by
   their aria-labels. */
.footer-col .footer-h {
  margin: 0 0 var(--s-4);
  color: #fff; font-size: var(--text-xs); font-weight: var(--w-medium);
  letter-spacing: var(--tracking-wide); text-transform: uppercase;
}
.footer-col ul { display: grid; gap: var(--s-3); }
.footer-col a {
  color: var(--on-navy); text-decoration: none; font-size: var(--text-sm);
  transition: color var(--t-fast) var(--ease);
}
.footer-col a:hover { color: #fff; }
.footer-col .promise { font-size: var(--text-sm); color: var(--on-navy-dim); }

.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  gap: var(--s-4); flex-wrap: wrap;
  padding-block: var(--s-5);
  border-top: 1px solid rgba(255,255,255,0.08);
  font-size: var(--text-xs); color: var(--on-navy-dim);
}
.footer-bottom .tagline { color: var(--on-navy); }
.footer-bottom .tagline .n { color: var(--green); }


/* §13 ─────────────────────────── "TALK TO US" MODAL ────────────────────────
   Native <dialog> element: free focus trap, Esc to close, top layer.
   Opened by every [data-open-contact] button on the site.               */

.contact-dialog {
  width: min(92vw, 34rem);
  padding: 0; border: 0;
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-modal);
  overscroll-behavior: contain;
}
/* Compact spacing inside the dialog so it fits the viewport without
   an internal scrollbar on common laptop heights. */
.contact-dialog .form { gap: var(--s-3); }
.contact-dialog textarea { min-height: 4.5rem; }
.contact-dialog::backdrop {
  background: rgba(13, 24, 48, 0.55);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}
.contact-dialog[open] { animation: dlg-in var(--t-med) var(--ease); }
@keyframes dlg-in {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

.dialog-inner { padding: clamp(1.25rem, 3vw, 1.75rem); }
.dialog-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: var(--s-4); margin-bottom: var(--s-4);
}
.dialog-head .mark { width: 28px; height: 28px; margin-bottom: var(--s-2); }
.dialog-head h2 { font-size: var(--text-xl); margin: 0 0 var(--s-1); }
.dialog-head p { font-size: var(--text-sm); color: var(--ink-3); margin: 0; }

.dialog-close {
  flex: none;
  width: 36px; height: 36px;
  display: grid; place-items: center;
  background: none; border: 1.5px solid var(--line); border-radius: 50%;
  color: var(--ink-2); font-size: 1rem; line-height: 1; cursor: pointer;
  transition: border-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.dialog-close:hover { border-color: var(--navy); color: var(--navy); }

.dialog-footnote {
  margin-top: var(--s-3);
  font-size: var(--text-xs); color: var(--ink-3);
}


/* §14 ─────────────────────── INNER PAGES (about / services) ──────────────── */

/* Shared inner-page hero: shorter than the homepage hero */
.page-hero { padding-block: clamp(3rem, 2rem + 4vw, 5.5rem) clamp(2rem, 1.5rem + 2vw, 3.5rem); }
.page-hero .lede { font-size: var(--text-lg); color: var(--ink-2); max-width: 52ch; }

/* About: the "Nordic at heart" statement gets room to breathe */
.statement {
  border-left: 3px solid var(--green);
  padding-left: var(--s-5);
  font-size: var(--text-xl); font-weight: var(--w-bold);
  color: var(--ink); line-height: var(--leading-snug);
  letter-spacing: var(--tracking-tight);
  max-width: 26ch;
}

/* Prose block for longer copy */
.prose { max-width: 40rem; }
.prose p + p { margin-top: var(--s-4); }

/* Single service page: checklist with star ticks */
.check-list { display: grid; gap: var(--s-3); max-width: 38rem; }
.check-list li {
  display: grid; grid-template-columns: auto 1fr; gap: var(--s-3);
  align-items: baseline;
  font-size: var(--text-base); color: var(--ink-2);
}
.check-list .glyph { width: 12px; height: 12px; transform: translateY(1px); color: var(--green); }

/* Steps: how an engagement runs, 01 → 03 */
.steps { display: grid; gap: var(--s-5); grid-template-columns: repeat(3, minmax(0, 1fr)); counter-reset: step; }
@media (max-width: 52em) { .steps { grid-template-columns: 1fr; } }
.step {
  counter-increment: step;
  padding: var(--s-5);
  background: var(--surface);
  border: 1px solid var(--line-soft); border-radius: var(--r-md);
}
.step::before {
  content: "0" counter(step);
  display: block; margin-bottom: var(--s-3);
  font-size: var(--text-xs); font-weight: var(--w-bold);
  letter-spacing: var(--tracking-wide); color: var(--green-ink);
}
.step h3 { font-size: var(--text-base); margin-bottom: var(--s-1); }
.step p { font-size: var(--text-sm); margin: 0; }

/* Two-column split used on service pages */
.split {
  display: grid; gap: clamp(2rem, 4vw, 4.5rem);
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  align-items: start;
}
@media (max-width: 52em) { .split { grid-template-columns: 1fr; } }
.split > .sticky-head { position: sticky; top: calc(var(--nav-h) + var(--s-5)); }
@media (max-width: 52em) { .split > .sticky-head { position: static; } }


/* §15 ─────────────────────── REVEAL MOTION & UTILITIES ─────────────────────
   Sections fade up 12px as they enter the viewport. Subtle on purpose:
   content never hides, it just settles. JS adds .in-view.              */

/* Reveals only arm when JS has tagged <html class="js"> (done in the
   head script). Without JS the content is simply visible — the page
   never depends on script to be readable. */
html.js .reveal { opacity: 0; transform: translateY(12px);
  transition: opacity var(--t-med) var(--ease), transform var(--t-med) var(--ease); }
html.js .reveal.in-view { opacity: 1; transform: none; }

.text-center { text-align: center; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  clip-path: inset(50%); overflow: hidden; white-space: nowrap;
}

/* Reduced motion: every animation collapses to its end state. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
  html.js .reveal { opacity: 1; transform: none; }
}
