/* ==========================================================================
   CENTNORD v2 — ABOUT PAGE
   --------------------------------------------------------------------------
   Loaded on about.html after tokens.css, main.css and service.css (which
   provides the shared hero grid and figure frame).

     A1  Hero figure "One roof"     A3  Pillars (icon cards)
     A2  Code editor (typed story)  A4  Where we work (world map)
   ========================================================================== */


/* A1 ─────────────────────────── "ONE ROOF" FIGURE ───────────────────────────
   The Centnord star at the centre; the three service icons on its east,
   south and west points. Each lights up in turn (4.5s cycle): one roof,
   three services. The north point is labelled YOUR GOAL.                */

.of-svg .of-ring  { fill: none; stroke: var(--blue); stroke-opacity: 0.3; stroke-dasharray: 3 5; }
.of-svg .of-north { stroke: var(--green); stroke-width: 1.5; stroke-dasharray: 3 4; }
.of-svg .of-label { font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; fill: var(--ink-3); }
.of-svg .of-goal  { fill: var(--green-ink); }
.of-svg .of-glow  { filter: blur(30px); opacity: 0.45; }
.of-svg .of-link  { stroke: var(--blue); stroke-opacity: 0.35; stroke-width: 1.5; stroke-dasharray: 4 4; }
.of-svg .of-dot   { fill: var(--surface); stroke: var(--blue); stroke-opacity: 0.5; stroke-width: 1.5; }
.of-svg .icon .stroke { fill: none; stroke: var(--star-navy); stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.of-svg .icon .node   { fill: var(--green); }

.of-node .of-dot, .of-node .of-link, .of-node .of-label { animation: of-cycle 4.5s var(--ease) var(--d, 0s) infinite; }
@keyframes of-cycle {
  0%, 30%   { stroke-opacity: 1; fill-opacity: 1; }
  36%, 100% { stroke-opacity: 0.4; }
}
.of-node .of-dot   { animation-name: of-dot; }
.of-node .of-link  { animation-name: of-link; }
.of-node .of-label { animation-name: of-label; }
@keyframes of-dot   { 0%, 30% { stroke-opacity: 1; fill: var(--blue-soft); } 36%, 100% { stroke-opacity: 0.5; fill: var(--surface); } }
@keyframes of-link  { 0%, 30% { stroke-opacity: 1; stroke-dashoffset: -16; } 36%, 100% { stroke-opacity: 0.35; stroke-dashoffset: 0; } }
@keyframes of-label { 0%, 30% { fill: var(--navy); } 36%, 100% { fill: var(--ink-3); } }


/* A2 ────────────────────────── CODE EDITOR — TYPED STORY ──────────────────────
   "We're Nordic at heart" written as a developer would. js/about.js types
   it out character by character when the editor comes into view, then
   the status bar reports 0 errors. Without JS or with reduced motion, the
   finished code is shown. The real sentence sits beside it for screen
   readers (visually hidden).                                           */

.editor {
  background: var(--navy);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-hover);
  overflow: hidden;
  color: var(--on-navy);
}
.ed-bar {
  display: flex; align-items: center; gap: var(--s-4);
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(141, 189, 235, 0.14);
  font-family: var(--mono); font-size: 0.6875rem; letter-spacing: 0.06em; color: var(--on-navy-dim);
}
.ed-dots { display: inline-flex; gap: 6px; }
.ed-dots i { width: 9px; height: 9px; border-radius: 50%; background: rgba(141, 189, 235, 0.25); }
.ed-dots i:first-child { background: var(--green); }
.ed-file { color: #fff; }
.ed-lang { margin-left: auto; text-transform: uppercase; }

.ed-code {
  margin: 0; padding: 1.25rem 1.25rem 1.25rem 0;
  font-family: var(--mono); font-size: clamp(0.78rem, 0.7rem + 0.3vw, 0.9375rem); line-height: 1.85;
  white-space: pre; overflow-x: auto;
}
.ed-code .line { display: block; min-height: 1.85em; }   /* one fixed row per line: nothing shifts while typing */
.ed-code .ln {
  display: inline-block; width: 3.25em; padding-right: 1.25em; text-align: right;
  color: rgba(141, 189, 235, 0.35); user-select: none;
}
.t-c { color: var(--on-navy-dim); font-style: italic; }
.t-k { color: var(--blue-on-navy); }
.t-v { color: #fff; }
.t-p { color: var(--on-navy); }
.t-s { color: var(--green); }
.t-x { color: var(--on-navy-dim); }

.ed-cursor {
  display: inline-block; width: 0.55em; height: 1.15em; margin-left: 1px;
  vertical-align: -0.2em; background: var(--green);
  animation: ed-blink 1s steps(1) infinite;
}
@keyframes ed-blink { 50% { opacity: 0; } }

.ed-status {
  display: flex; justify-content: space-between; gap: var(--s-4);
  padding: 0.625rem 1rem;
  border-top: 1px solid rgba(141, 189, 235, 0.14);
  font-family: var(--mono); font-size: 0.6875rem; letter-spacing: 0.06em; color: var(--on-navy-dim);
}
.ed-ok { color: var(--green); opacity: 0; transition: opacity 400ms var(--ease); }
.editor.is-done .ed-ok, html:not(.js) .ed-ok { opacity: 1; }

.prose .label { margin-bottom: var(--s-5); }


/* A3 ──────────────────────────────── PILLARS ───────────────────────────────
   Three icon cards in the service-card language: registration marks snap
   into the corners and the icon redraws on hover.                      */

.pillars { display: grid; gap: var(--s-5); grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 52em) { .pillars { grid-template-columns: 1fr; } }
.pillar {
  position: relative; padding: var(--s-6);
  background: var(--surface); border: 1px solid var(--line);
  transition: border-color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.pillar:hover { border-color: var(--blue); transform: translateY(-3px); }
.pillar .icon { width: 44px; height: 44px; margin-bottom: var(--s-5); }
.pillar:hover .icon .draw { animation: icon-draw var(--t-slow) var(--ease); }
.pillar:hover .icon .node { animation: node-pulse 0.6s var(--ease); }
.pillar h3 { font-size: var(--text-lg); margin-bottom: var(--s-2); }
.pillar p { font-size: var(--text-sm); color: var(--ink-2); margin: 0; }
.pillar::before, .pillar::after, .pillar .marks::before, .pillar .marks::after {
  content: ""; position: absolute; width: 12px; height: 12px; border: 0 solid var(--blue);
  opacity: 0; transition: opacity var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.pillar::before        { top: -6px; left: -6px; border-top-width: 1.5px; border-left-width: 1.5px; transform: translate(6px, 6px); }
.pillar::after         { top: -6px; right: -6px; border-top-width: 1.5px; border-right-width: 1.5px; transform: translate(-6px, 6px); }
.pillar .marks::before { bottom: -6px; left: -6px; border-bottom-width: 1.5px; border-left-width: 1.5px; transform: translate(6px, -6px); }
.pillar .marks::after  { bottom: -6px; right: -6px; border-bottom-width: 1.5px; border-right-width: 1.5px; transform: translate(-6px, -6px); }
.pillar:hover::before, .pillar:hover::after, .pillar:hover .marks::before, .pillar:hover .marks::after { opacity: 1; transform: none; }


/* A4 ───────────────────────────── WHERE WE WORK ─────────────────────────────
   A navy chapter with a dot-matrix world map (Natural Earth data). Every
   dot is land. Scandinavia is lit; the HQ star pulses in Sweden; dashed
   bearing lines flow outward for the international delivery network.
   Regions only: no cities are drawn until Centnord confirms them.      */

.map-sec {
  background-color: var(--navy);
  background-image:
    linear-gradient(var(--grid-line-navy) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line-navy) 1px, transparent 1px);
  background-size: var(--grid-size) var(--grid-size);
  color: var(--on-navy);
  padding-block: var(--section-y);
}
.map-sec h2 { color: #fff; }
.map-sec .label { color: var(--blue-on-navy); }
.map-sec .head2 p:not(.label) { color: var(--on-navy); }

.map-top {
  display: flex; justify-content: space-between; gap: var(--s-4);
  margin-bottom: var(--s-3);
  font-family: var(--mono); font-size: 0.6875rem; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--on-navy-dim);
}
.mapfig {
  position: relative; margin: 0;
  border: 1px solid rgba(141, 189, 235, 0.25);
  padding: clamp(0.75rem, 2vw, 1.75rem);
}
.mapfig::before, .mapfig::after, .mapfig .reg::before, .mapfig .reg::after {
  content: ""; position: absolute; width: 14px; height: 14px; border: 0 solid var(--blue-on-navy);
}
.mapfig::before      { top: -7px; left: -7px;  border-top-width: 1.5px; border-left-width: 1.5px; }
.mapfig::after       { top: -7px; right: -7px; border-top-width: 1.5px; border-right-width: 1.5px; }
.mapfig .reg::before { bottom: -7px; left: -7px;  border-bottom-width: 1.5px; border-left-width: 1.5px; }
.mapfig .reg::after  { bottom: -7px; right: -7px; border-bottom-width: 1.5px; border-right-width: 1.5px; }

.map-svg { display: block; width: 100%; height: auto; overflow: visible; }
.map-svg .dots circle { fill: rgba(141, 189, 235, 0.32); }
.map-svg .dots .sc { fill: var(--blue-on-navy); r: 2.6; filter: drop-shadow(0 0 3px rgba(141, 189, 235, 0.7)); }
.map-svg .ray { fill: none; stroke-width: 1.5; stroke-dasharray: 4 6; animation: ray-flow 1.6s linear var(--d, 0s) infinite; }
@keyframes ray-flow { to { stroke-dashoffset: -20; } }
.map-svg .hq-b { fill: #fff; }
.map-svg .hq-t { fill: var(--green); filter: drop-shadow(0 0 4px rgba(57, 183, 143, 0.9)); }
.map-svg .hq-pulse { fill: none; stroke: var(--green); stroke-width: 1.5; transform-box: fill-box; transform-origin: center;
                     animation: hq-pulse 2.8s ease-out infinite; }
.map-svg .hq-pulse.p2 { animation-delay: 1.4s; }
@keyframes hq-pulse { from { transform: scale(0.6); opacity: 0.9; } to { transform: scale(3.4); opacity: 0; } }
.map-svg .hq-label { font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; fill: #fff;
                     stroke: var(--navy); stroke-width: 5px; paint-order: stroke; stroke-linejoin: round; }   /* halo over the dots */

.map-legend {
  display: flex; flex-wrap: wrap; gap: var(--s-3) var(--s-6);
  margin-top: var(--s-5);
  font-family: var(--mono); font-size: var(--text-mono); letter-spacing: 0.04em; color: var(--on-navy);
}
.map-legend li { display: inline-flex; align-items: center; gap: 0.625rem; }
.lg { display: inline-block; flex: none; }
.lg-hq  { width: 12px; height: 12px; background: var(--green); clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); }
.lg-sc  { width: 8px; height: 8px; border-radius: 50%; background: var(--blue-on-navy); }
.lg-net { width: 22px; height: 0; border-top: 1.5px dashed var(--blue-on-navy); }

/* Phones: the whole world is too small to read, so the map zooms in on
   the Nordics, Europe and Africa (HQ stays in view, a little left of centre) */
@media (max-width: 52em) {
  .mapfig { overflow: hidden; }
  .map-svg { width: 240%; max-width: none; margin-left: -82%; }
}

@media (prefers-reduced-motion: reduce) {
  .map-svg .ray, .map-svg .hq-pulse, .of-node * { animation: none !important; }
  .map-svg .hq-pulse { opacity: 0; }
}
