/* Nordic Resilience — site styles.
   One hand-written stylesheet, no framework. Fonts are self-hosted (SIL OFL). */

@font-face {
  font-family: "Raleway";
  src: url("../fonts/raleway-latin-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Quantico";
  src: url("../fonts/quantico-latin-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Quantico";
  src: url("../fonts/quantico-latin-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #111d2e;
  --bg-alt: #19283f;
  --bg-deep: #0b1524;
  --panel: #1a2b43;
  --panel-hi: #223756;
  --line: rgba(255, 255, 255, 0.1);
  --text: #e8eef6;
  --muted: #b3c1d3;
  --teal: #2bb9a3;
  --cyan: #22a7e0;
  --link: #6fcdf5;
  --brand-gradient: linear-gradient(135deg, #2bb9a3 0%, #1f9fd8 100%);
  /* Deeper version for surfaces that carry white text (5.6:1 or better against #fff). */
  --brand-gradient-deep: linear-gradient(135deg, #0e7468 0%, #0b639a 100%);
  --ink-on-brand: #06131f;
  --font-body: "Raleway", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-display: "Quantico", "Raleway", "Segoe UI", system-ui, sans-serif;
  --header-h: 4.5rem;
  color-scheme: dark;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.7;
  font-variant-numeric: lining-nums;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}

img {
  max-width: 100%;
  height: auto;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 700;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  line-height: 1.25;
  margin: 0 0 1rem;
  text-wrap: balance;
}
h1 {
  font-size: clamp(2rem, 5.5vw, 3.25rem);
}
h2 {
  font-size: clamp(1.4rem, 3.2vw, 1.9rem);
}
h3 {
  font-size: 1.1rem;
}
h4 {
  font-size: 1rem;
}

p,
ul,
ol {
  margin: 0 0 1.15rem;
}
p:last-child,
ul:last-child,
ol:last-child {
  margin-bottom: 0;
}

a {
  color: var(--link);
  text-underline-offset: 0.2em;
  text-decoration-thickness: 1px;
}
a:hover {
  color: #fff;
}

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

.wrap {
  width: min(100% - 2.5rem, 72rem);
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  padding: 0.6rem 1rem;
  background: #fff;
  color: #06131f;
  font-weight: 600;
  border-radius: 3px;
}
.skip-link:focus {
  top: 0.75rem;
  color: #06131f;
}

/* ---------------------------------------------------------------- header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(17, 29, 46, 0.88);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header-inner {
  display: flex;
  align-items: center;
  gap: 1rem 2rem;
  min-height: var(--header-h);
}
.logo {
  display: inline-flex;
  margin-right: auto;
}
.logo img {
  display: block;
  height: 2.5rem;
  width: auto;
}
.site-nav ul {
  display: flex;
  gap: 2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-nav a {
  display: block;
  padding: 0.5rem 0;
  font-family: var(--font-display);
  font-size: 0.875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--text);
  border-bottom: 2px solid transparent;
}
.site-nav a:hover {
  color: #fff;
  border-bottom-color: rgba(255, 255, 255, 0.35);
}
.site-nav a[aria-current="page"] {
  color: var(--link);
  border-bottom-color: var(--cyan);
}
.lang-switch {
  padding: 0.5rem 1.1rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.8125rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink-on-brand);
  background: var(--brand-gradient);
  border-radius: 3px;
}
.lang-switch:hover {
  color: var(--ink-on-brand);
  filter: brightness(1.12);
}

@media (max-width: 47.99rem) {
  :root {
    --header-h: 6.75rem;
  }
  .site-header-inner {
    flex-wrap: wrap;
    gap: 0.25rem 1rem;
    padding: 0.7rem 0 0.35rem;
  }
  .logo img {
    height: 2rem;
  }
  .site-nav {
    order: 3;
    flex-basis: 100%;
  }
  .site-nav ul {
    justify-content: space-between;
    gap: 0.5rem;
  }
  .site-nav a {
    font-size: 0.8125rem;
    letter-spacing: 0.06em;
    padding: 0.55rem 0.15rem;
  }
}

/* ---------------------------------------------------------------- buttons */

.btn {
  display: inline-block;
  padding: 0.85rem 1.7rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink-on-brand);
  background: var(--brand-gradient);
  border: 1px solid transparent;
  border-radius: 3px;
  transition: transform 0.15s ease, filter 0.15s ease, background-color 0.15s ease;
}
.btn:hover {
  color: var(--ink-on-brand);
  filter: brightness(1.12);
  transform: translateY(-1px);
}
.btn-ghost {
  color: #fff;
  background: rgba(14, 26, 43, 0.35);
  border-color: rgba(255, 255, 255, 0.5);
}
.btn-ghost:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  filter: none;
}
.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2rem;
}
.btn-row-center {
  justify-content: center;
}

/* ---------------------------------------------------------------- hero (front page) */

.hero {
  position: relative;
  display: grid;
  place-items: center;
  min-height: min(calc(100svh - var(--header-h)), 46rem);
  overflow: hidden;
  isolation: isolate;
  text-align: center;
  /* Still image of the same idea; shown when WebGL or motion is unavailable. */
  background:
    radial-gradient(55% 70% at 18% 22%, rgba(43, 185, 163, 0.34), transparent 70%),
    radial-gradient(50% 65% at 82% 68%, rgba(34, 167, 224, 0.36), transparent 70%),
    radial-gradient(40% 50% at 60% 10%, rgba(88, 110, 230, 0.2), transparent 70%),
    var(--bg-deep);
}
.hero-canvas {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1.2s ease;
}
.hero-canvas.is-running {
  opacity: 1;
}
.hero::after {
  /* Fades the animation into the page below and keeps the text readable. */
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(60% 55% at 50% 48%, rgba(10, 20, 34, 0.55), transparent 75%),
    linear-gradient(to bottom, transparent 70%, var(--bg) 100%);
  pointer-events: none;
}
.hero-content {
  padding: 4rem 0 5rem;
}
.eyebrow {
  margin: 0 0 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #d7f3ff;
}
.hero h1 {
  margin: 0;
  font-size: clamp(2.5rem, 9vw, 5.75rem);
  letter-spacing: 0.02em;
  text-transform: none;
  text-shadow: 0 2px 30px rgba(6, 19, 31, 0.6);
}
.hero-lead {
  max-width: 40rem;
  margin: 1.5rem auto 0;
  font-size: 1.15rem;
  color: var(--text);
}
.hero .btn-row {
  justify-content: center;
  margin-top: 2.5rem;
}

/* ---------------------------------------------------------------- page banner (inner pages) */

.page-banner {
  padding: clamp(3rem, 9vw, 5.5rem) 0 clamp(2.5rem, 7vw, 4.5rem);
  text-align: center;
  background:
    linear-gradient(rgba(14, 26, 43, 0.72), rgba(14, 26, 43, 0.92)),
    url("../img/banner-sm.webp") center / cover no-repeat,
    var(--bg-deep);
  border-bottom: 1px solid var(--line);
}
@media (min-width: 48rem) {
  .page-banner {
    background:
      linear-gradient(rgba(14, 26, 43, 0.72), rgba(14, 26, 43, 0.92)),
      url("../img/banner.webp") center / cover no-repeat,
      var(--bg-deep);
  }
}
.page-banner h1 {
  margin: 0 auto;
  max-width: 22em;
}
.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.25rem 0.6rem;
  list-style: none;
  margin: 1.25rem 0 0;
  padding: 0;
  font-size: 0.875rem;
  color: var(--muted);
}
.breadcrumb li + li::before {
  content: "/";
  margin-right: 0.6rem;
  color: rgba(255, 255, 255, 0.35);
}
.breadcrumb a {
  color: var(--muted);
}
.breadcrumb a:hover {
  color: #fff;
}

/* ---------------------------------------------------------------- sections */

.section {
  padding: clamp(3.5rem, 8vw, 6rem) 0;
}
.section-alt {
  background: var(--bg-alt);
}
.section-head {
  max-width: 48rem;
  margin: 0 auto 3rem;
  text-align: center;
}
.section-head > :last-child {
  margin-bottom: 0;
}
.section-head p {
  color: var(--muted);
}

/* Heading rule: a dot between two fading lines. */
.rule::after {
  content: "";
  display: block;
  width: 10rem;
  height: 9px;
  margin: 1.1rem auto 1.6rem;
  background:
    radial-gradient(circle, var(--cyan) 0 3px, transparent 3.5px) center / 9px 9px no-repeat,
    linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.28) 38%, transparent 44%, transparent 56%, rgba(255, 255, 255, 0.28) 62%, transparent) center / 100% 1px no-repeat;
}
.rule-left::after {
  width: 6rem;
  margin-left: 0;
  background:
    radial-gradient(circle, var(--cyan) 0 3px, transparent 3.5px) left center / 9px 9px no-repeat,
    linear-gradient(90deg, transparent 14px, rgba(255, 255, 255, 0.28) 14px, transparent) center / 100% 1px no-repeat;
}

.split {
  display: grid;
  gap: 2.5rem 4rem;
  align-items: center;
}
@media (min-width: 52rem) {
  .split {
    grid-template-columns: 1.15fr 0.85fr;
  }
  .split-even {
    grid-template-columns: 1fr 1fr;
  }
}
.split p {
  color: var(--muted);
}
.split-media img {
  display: block;
  width: 100%;
  border-radius: 6px;
}
.split-icon {
  justify-self: center;
}
.split-icon img {
  width: min(12rem, 45vw);
  opacity: 0.85;
}

/* ---------------------------------------------------------------- cards */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr));
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 1.9rem 1.75rem 1.6rem;
  background: linear-gradient(165deg, var(--panel-hi), var(--panel));
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: var(--brand-gradient);
}
.card:hover,
.card:focus-within {
  transform: translateY(-3px);
  border-color: rgba(43, 185, 163, 0.6);
  box-shadow: 0 14px 34px rgba(4, 10, 20, 0.45);
}
.card-icon {
  width: 3.5rem;
  height: 3.5rem;
  margin-bottom: 1.1rem;
}
.card h3 {
  margin-bottom: 0.7rem;
  font-size: 1.05rem;
}
.card h3 a {
  color: inherit;
  text-decoration: none;
}
.card h3 a::after {
  /* The whole card is the link target. */
  content: "";
  position: absolute;
  inset: 0;
}
.card p {
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.6;
}
.card-more {
  margin-top: auto;
  padding-top: 1.1rem;
  font-family: var(--font-display);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--link);
}
.card-more::after {
  content: " \2192";
}
.card-accent {
  background: var(--brand-gradient-deep);
  border-color: transparent;
}
.card-accent :focus-visible {
  outline-color: #fff;
}
.card-accent::before {
  display: none;
}
.card-accent p,
.card-accent .card-more {
  color: #fff;
}

/* Compact list of links to the service pages (front page, and under each service). */
.service-links {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr));
  gap: 0.9rem;
  list-style: none;
  margin: 0;
  padding: 0;
  text-align: left;
}
.service-links a {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  height: 100%;
  min-height: 4rem;
  padding: 0.8rem 1.1rem;
  background: linear-gradient(165deg, var(--panel-hi), var(--panel));
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  font-weight: 600;
  font-size: 0.98rem;
  line-height: 1.35;
  text-decoration: none;
  transition: border-color 0.18s ease, transform 0.18s ease;
}
.service-links a:hover {
  color: #fff;
  border-color: rgba(43, 185, 163, 0.6);
  transform: translateY(-2px);
}
.service-links img {
  flex: none;
  width: 2.25rem;
  height: 2.25rem;
}
.related-title {
  margin: 3.5rem 0 1.25rem;
  font-size: 1rem;
  letter-spacing: 0.1em;
  color: var(--muted);
}

/* Tiles: short labelled boxes (partner areas). */
.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  min-height: 13rem;
  padding: 2rem 1.5rem;
  text-align: center;
  background: var(--brand-gradient-deep);
  border-radius: 6px;
}
.tile img {
  width: 4.5rem;
  height: 4.5rem;
}
.tile h3 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.35;
}

/* ---------------------------------------------------------------- call-to-action band */

.cta-band {
  text-align: center;
  background:
    linear-gradient(rgba(14, 26, 43, 0.84), rgba(14, 26, 43, 0.9)),
    url("../img/world-sm.webp") center / cover no-repeat,
    var(--bg-deep);
}
@media (min-width: 48rem) {
  .cta-band {
    background:
      linear-gradient(rgba(14, 26, 43, 0.84), rgba(14, 26, 43, 0.9)),
      url("../img/world.webp") center / cover no-repeat,
      var(--bg-deep);
  }
}
.cta-band .wrap {
  max-width: 52rem;
}
.cta-band p {
  color: var(--text);
}
.cta-band .btn-row {
  justify-content: center;
}
.cta-plain {
  text-align: center;
  background: var(--bg-alt);
  border-top: 1px solid var(--line);
}
.cta-plain .wrap {
  max-width: 46rem;
}
.cta-plain p {
  color: var(--muted);
}
.cta-plain .btn-row {
  justify-content: center;
}

/* ---------------------------------------------------------------- long-form text */

.prose {
  max-width: 48rem;
}
.prose p,
.prose li {
  color: var(--muted);
}
.prose .note {
  margin-bottom: 2.5rem;
  padding: 0.9rem 1.1rem;
  border-left: 3px solid var(--teal);
  background: var(--panel);
  border-radius: 0 4px 4px 0;
  font-size: 0.95rem;
}
.prose code {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.92em;
  color: var(--text);
}
.prose strong {
  color: var(--text);
  font-weight: 600;
}
.prose h2 {
  margin-bottom: 0;
}
.prose h3 {
  margin-top: 2.25rem;
  color: var(--text);
}
.prose ul,
.prose ol {
  padding-left: 1.25rem;
}
.prose li {
  margin-bottom: 0.4rem;
  padding-left: 0.25rem;
}
.prose ul li::marker {
  color: var(--teal);
}
.prose ol li::marker {
  color: var(--link);
  font-family: var(--font-display);
  font-weight: 700;
}
.prose figure {
  margin: 2rem 0;
}
.prose figure img {
  display: block;
  width: 100%;
  border-radius: 6px;
  background: #fff;
}
.prose figcaption {
  margin-top: 0.6rem;
  font-size: 0.875rem;
  color: var(--muted);
}

/* Two-column bullet list for short items. */
.columns-2 {
  columns: 2 14rem;
  column-gap: 2.5rem;
}
.columns-2 li {
  break-inside: avoid;
}

/* Legal pages: denser, numbered headings stay readable. */
.kind-legal .prose h2 {
  margin-top: 2.75rem;
  font-size: 1.25rem;
}
.kind-legal .prose h2:first-child {
  margin-top: 0;
}
.kind-legal .prose h3 {
  font-size: 1rem;
}
.kind-legal .rule-left::after {
  margin-bottom: 1.1rem;
}

/* ---------------------------------------------------------------- certifications */

.cert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 21rem), 1fr));
  gap: 1.5rem;
  align-items: start;
  list-style: none;
  margin: 0;
  padding: 0;
}
.cert {
  padding: 1.75rem;
  background: linear-gradient(165deg, var(--panel-hi), var(--panel));
  border: 1px solid var(--line);
  border-radius: 6px;
}
.cert-badge {
  display: flex;
  justify-content: center;
  margin-bottom: 1.25rem;
}
.cert-badge img {
  /* The percentage-free height keeps tall badges inside the card. */
  height: 8.5rem;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  border-radius: 4px;
}
.cert h3 {
  text-align: center;
  text-transform: none;
  letter-spacing: 0.01em;
  font-size: 1.05rem;
  margin-bottom: 0.9rem;
}
.cert p {
  color: var(--muted);
  font-size: 0.95rem;
}
.cert details {
  border-top: 1px solid var(--line);
  padding-top: 0.9rem;
}
.cert summary {
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--link);
}
.cert summary:hover {
  color: #fff;
}
.cert details p {
  margin: 0.9rem 0 0;
}
.cert details ul {
  margin: 0.9rem 0 0;
  padding-left: 1.2rem;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.55;
}
.cert details li {
  margin-bottom: 0.3rem;
}
.cert details li::marker {
  color: var(--teal);
}

/* ---------------------------------------------------------------- contact details */

.ob {
  text-decoration: none;
  white-space: nowrap;
}
.ob-img {
  display: inline-block;
  height: 1.2em;
  width: auto;
  vertical-align: -0.3em;
  opacity: 0.92;
}
.ob:hover .ob-img {
  opacity: 1;
}
.ob.is-live {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.35);
}
.ob.is-live:hover {
  color: #fff;
  text-decoration-color: currentColor;
}

.contact-details {
  display: grid;
  gap: 1.1rem;
  justify-content: center;
  margin: 2.5rem 0 0;
  padding: 0;
  list-style: none;
  font-size: clamp(1.25rem, 4.6vw, 2rem);
  font-weight: 500;
  color: #fff;
}
.contact-details li {
  display: flex;
  align-items: center;
  gap: 0.6em;
}
.contact-details svg {
  flex: none;
  width: 1em;
  height: 1em;
  fill: none;
  stroke: var(--teal);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------------------------------------------------------------- footer */

.site-footer {
  background: var(--bg-deep);
  border-top: 1px solid var(--line);
  font-size: 0.95rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr));
  gap: 2.5rem 2rem;
  padding: 3.5rem 0 3rem;
}
.site-footer h2 {
  margin-bottom: 1rem;
  font-size: 0.95rem;
  letter-spacing: 0.1em;
}
.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  color: var(--muted);
}
.site-footer li {
  margin-bottom: 0.55rem;
}
.site-footer a {
  color: var(--muted);
  text-decoration: none;
}
.site-footer a:hover {
  color: #fff;
  text-decoration: underline;
}
.footer-base {
  padding: 1.25rem 0 1.75rem;
  border-top: 1px solid var(--line);
  text-align: center;
  font-size: 0.875rem;
  color: var(--muted);
}

/* ---------------------------------------------------------------- 404 */

.not-found {
  display: grid;
  gap: 3rem;
  max-width: 40rem;
  text-align: center;
}
.not-found h1,
.not-found h2 {
  font-size: clamp(1.6rem, 5vw, 2.4rem);
}
.not-found p {
  color: var(--muted);
}

/* ---------------------------------------------------------------- utilities */

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

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
}

@media print {
  .site-header,
  .site-footer,
  .hero-canvas,
  .btn-row,
  .cta-plain {
    display: none;
  }
  body,
  .section,
  .section-alt,
  .page-banner,
  .hero,
  .cta-band,
  .card,
  .card-accent,
  .tile,
  .cert {
    background: #fff !important;
    color: #000;
  }
  h1,
  h2,
  h3,
  p,
  li,
  a,
  .eyebrow,
  .breadcrumb a {
    color: #000 !important;
    text-shadow: none;
  }
  .card-icon,
  .tile img,
  .split-icon img,
  .ob-img {
    /* White artwork and the light contact images would vanish on paper. */
    filter: invert(1);
  }
  .card,
  .tile,
  .cert {
    border: 1px solid #999;
    break-inside: avoid;
  }
}
