/* Crixus Solutions website styles.
   Plain CSS, no build step. Colours, sizes and fonts are set as custom properties in :root. */

/* Fonts: Inter, self hosted, SIL Open Font License (see /assets/fonts/LICENSE) */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/assets/fonts/inter-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* The Hungarian letters with double acute accents, loaded only on pages that use them */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/assets/fonts/inter-latin-hu.woff2") format("woff2");
  unicode-range: U+0150-0151, U+0170-0171;
}

/* A local fallback sized like Inter, so the text does not jump when the font arrives */
@font-face {
  font-family: "Inter Fallback";
  src: local("Arial");
  ascent-override: 90.4%;
  descent-override: 22.5%;
  line-gap-override: 0%;
  size-adjust: 107.1%;
}

:root {
  color-scheme: dark;
  --bg: #0b0f14;
  --bg-alt: #0e131a;
  --surface: #121821;
  --surface-hi: #172030;
  --panel: #0d131b;
  --border: #222d3b;
  --border-hi: #33445a;
  --grid: rgba(148, 170, 196, 0.07);
  --text: #e8edf2;
  --text-soft: #cfd8e1;
  --muted: #a4b1bf;
  --line: #3a4a5e;
  --accent: #4cc9f0;
  --accent-hi: #86dcf6;
  --accent-ink: #04141c;
  --accent-wash: rgba(76, 201, 240, 0.08);
  --accent-line: rgba(76, 201, 240, 0.32);
  --accent-glow: rgba(76, 201, 240, 0.16);
  --harm: #f2994a;
  --ok: #5fd68a;
  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 24px;
  --gutter: 20px;
  --max: 1120px;
  --header-h: 64px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --font: "Inter", "Inter Fallback", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  /* Type scale. Each step grows with the viewport between a phone and a wide screen */
  --text-sm: 0.9375rem;
  --text-lead: clamp(1.0625rem, 1rem + 0.32vw, 1.25rem);
  --text-h3: clamp(1.125rem, 1.07rem + 0.25vw, 1.25rem);
  --text-h2: clamp(1.75rem, 1.3rem + 1.9vw, 2.625rem);
  --text-h1: clamp(2.25rem, 1.5rem + 3.2vw, 3.75rem);
  --text-display: clamp(2.5rem, 5.6vw - 0.4rem, 4.5rem);
}

/* Base */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

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

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-wrap: break-word;
}

main {
  flex: 1 0 auto;
}

@media (min-width: 768px) {
  body {
    font-size: 1.0625rem;
  }
}

img,
svg,
video,
canvas {
  max-width: 100%;
}

img {
  display: block;
  height: auto;
}

h1,
h2,
h3 {
  margin: 0 0 0.5em;
  font-weight: 650;
  line-height: 1.12;
  letter-spacing: -0.022em;
  text-wrap: balance;
}

h1 {
  font-size: var(--text-h1);
  line-height: 1.06;
  letter-spacing: -0.034em;
}

h2 {
  font-size: var(--text-h2);
  letter-spacing: -0.028em;
}

h3 {
  font-size: var(--text-h3);
  line-height: 1.25;
  letter-spacing: -0.012em;
}

p {
  margin: 0 0 1em;
  text-wrap: pretty;
}

p:last-child {
  margin-bottom: 0;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--accent-hi);
}

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

::selection {
  background: rgba(76, 201, 240, 0.35);
  color: #fff;
}

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

.skip-link {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform 0.15s ease;
}

.skip-link:focus {
  transform: translateY(0);
  color: var(--accent-ink);
}

.container {
  width: 100%;
  max-width: calc(var(--max) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.icon {
  display: inline-block;
  flex: none;
  width: 24px;
  height: 24px;
  vertical-align: middle;
}

.icon-sm {
  width: 18px;
  height: 18px;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 15, 20, 0.86);
  border-bottom: 1px solid var(--border);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  backdrop-filter: saturate(140%) blur(12px);
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

/* On the home pages the header lies over the hero until the page scrolls.
   main.js marks the header once the page scrolls, noscript.css keeps it solid without JavaScript. */
.site-header.over-hero:not(.is-scrolled):not(.is-open) {
  background: transparent;
  border-bottom-color: transparent;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-right: auto;
  color: var(--text);
  font-size: 1.0625rem;
  font-weight: 650;
  letter-spacing: -0.01em;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}

.brand:hover {
  color: var(--text);
}

.brand-mark {
  display: block;
  flex: none;
  width: 30px;
  height: 30px;
}

.brand-sub {
  color: var(--muted);
  font-weight: 450;
}

.site-nav {
  display: flex;
  align-items: center;
  order: 2;
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-right: -8px;
  padding: 0;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

.nav-toggle:hover {
  background: var(--surface);
}

.nav-toggle .icon-close,
.nav-toggle[aria-expanded="true"] .icon-open {
  display: none;
}

.nav-toggle[aria-expanded="true"] .icon-close {
  display: inline-block;
}

.nav-list {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin: 0;
  padding: 8px var(--gutter) 20px;
  list-style: none;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 24px 40px rgba(0, 0, 0, 0.45);
}

.site-header.is-open .nav-list {
  display: block;
}

.nav-list a {
  display: block;
  padding: 14px 4px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  font-size: 1.0625rem;
  font-weight: 500;
  text-decoration: none;
}

.nav-list li:last-child a {
  border-bottom: 0;
}

.nav-list a:hover,
.nav-list a[aria-current="page"],
.nav-list a.is-active {
  color: var(--accent);
}

.lang-switch {
  position: relative;
  order: 1;
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 6px 12px;
  border: 1px solid var(--border-hi);
  border-radius: 999px;
  color: var(--text);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1;
  text-decoration: none;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.lang-switch:hover {
  border-color: var(--accent);
  color: var(--text);
}

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

@media (min-width: 800px) {
  .header-inner {
    gap: 20px;
  }

  .site-nav,
  .lang-switch {
    order: 0;
  }

  .nav-toggle {
    display: none;
  }

  .site-header .nav-list {
    display: flex;
    gap: 2px;
    position: static;
    padding: 0;
    background: none;
    border: 0;
    box-shadow: none;
  }

  .site-header .nav-list a {
    padding: 8px 12px;
    border: 0;
    border-radius: 8px;
    color: var(--muted);
    font-size: 0.9375rem;
    transition: color 0.15s ease, background-color 0.15s ease;
  }

  .site-header .nav-list a:hover {
    background: var(--surface);
    color: var(--text);
  }

  .site-header .nav-list a[aria-current="page"],
  .site-header .nav-list a.is-active {
    color: var(--text);
    background: var(--surface);
  }

  .site-header.over-hero:not(.is-scrolled) .nav-list a {
    color: var(--text-soft);
  }

  .site-header.over-hero:not(.is-scrolled) .nav-list a:hover {
    background: rgba(23, 32, 48, 0.7);
    color: var(--text);
  }

  .lang-short {
    display: none;
  }

  .lang-long {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    clip-path: none;
  }

  .lang-switch {
    letter-spacing: 0;
  }
}

/* Buttons and small parts */

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 22px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.25s ease, transform 0.2s var(--ease);
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 0 0 0 var(--accent-glow), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.btn-primary:hover {
  background: var(--accent-hi);
  color: var(--accent-ink);
  box-shadow: 0 10px 30px -10px rgba(76, 201, 240, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.btn-ghost {
  border-color: var(--border-hi);
  background: rgba(18, 24, 33, 0.55);
  color: var(--text);
}

.btn-ghost:hover {
  border-color: var(--accent);
  background: var(--surface);
  color: var(--text);
}

.btn .icon-sm {
  transition: transform 0.2s var(--ease);
}

.btn:hover .icon-sm {
  transform: translateX(3px);
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  line-height: 1.4;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  flex: none;
  width: 20px;
  height: 1px;
  background: currentColor;
}

.lead {
  max-width: 62ch;
  color: var(--muted);
  font-size: var(--text-lead);
  line-height: 1.6;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  text-decoration: none;
}

.text-link:hover {
  text-decoration: underline;
}

/* Hero on the home pages.
   The picture layer holds the poster, the video and the live canvas.
   On small screens it is a band below the text, on wide screens it fills the hero
   and the network sits to the right of the text. */

.hero {
  --band-h: min(94vw, 560px);
  position: relative;
  isolation: isolate;
  overflow: hidden;
  margin-top: calc(-1 * var(--header-h));
  padding: calc(var(--header-h) + 40px) 0 calc(var(--band-h) * 0.82);
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(ellipse 90% 60% at 30% 10%, #000 10%, transparent 75%);
  mask-image: radial-gradient(ellipse 90% 60% at 30% 10%, #000 10%, transparent 75%);
  pointer-events: none;
}

.hero-media {
  position: absolute;
  z-index: -1;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--band-h);
  overflow: hidden;
  background: var(--bg);
}

/* The object position must match posX and posY of the framing in the hero scene script */
.hero-media img,
.hero-video,
.hero-canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
}

.hero-video,
.hero-canvas {
  opacity: 0;
  transition: opacity 1s ease;
}

.hero-media.is-video .hero-video,
.hero-media.is-live .hero-canvas {
  opacity: 1;
}

/* Shade that keeps the text readable over the picture */
.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, var(--bg) 0%, var(--bg) 19%, rgba(11, 15, 20, 0.55) 31%, rgba(11, 15, 20, 0) 46%),
    linear-gradient(0deg, var(--bg) 0%, rgba(11, 15, 20, 0) 16%);
  pointer-events: none;
}

.hero-grid {
  position: relative;
}

.hero-text {
  max-width: 640px;
}

.hero h1 {
  max-width: 15ch;
  font-size: var(--text-display);
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.hero h1 .hero-accent {
  color: var(--accent);
}

.hero .lead {
  max-width: 50ch;
  color: var(--text-soft);
}

.hero-topics {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 22px;
  margin: 30px 0 0;
  padding: 0;
  list-style: none;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  line-height: 1.4;
  text-transform: uppercase;
}

.hero-topics a {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 28px;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s ease;
}

.hero-topics a::before {
  content: "";
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-wash), 0 0 12px rgba(76, 201, 240, 0.7);
}

.hero-topics a:hover {
  color: var(--text);
}

/* Pause and play button for the moving background */
.hero-toggle {
  position: absolute;
  z-index: 2;
  right: max(var(--gutter), calc((100% - var(--max)) / 2));
  bottom: 18px;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--border-hi);
  border-radius: 50%;
  background: rgba(11, 15, 20, 0.66);
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.hero-toggle:hover {
  border-color: var(--accent);
  background: rgba(23, 32, 48, 0.9);
}

.hero-toggle[hidden] {
  display: none;
}

.hero-toggle .icon {
  width: 18px;
  height: 18px;
}

.hero-toggle .icon-play,
.hero-toggle.is-paused .icon-pause {
  display: none;
}

.hero-toggle.is-paused .icon-play {
  display: block;
}

@media (min-width: 960px) {
  .hero {
    display: flex;
    align-items: center;
    min-height: clamp(640px, 94svh, 920px);
    padding: calc(var(--header-h) + 64px) 0 96px;
  }

  .hero::before {
    display: none;
  }

  .hero-grid {
    width: 100%;
  }

  .hero-media {
    top: 0;
    height: auto;
  }

  .hero-media img,
  .hero-video {
    object-position: 80% 50%;
  }

  .hero-media::after {
    background:
      linear-gradient(90deg, rgba(11, 15, 20, 0.9) 0%, rgba(11, 15, 20, 0.6) 30%, rgba(11, 15, 20, 0) 58%),
      linear-gradient(180deg, rgba(11, 15, 20, 0.7) 0%, rgba(11, 15, 20, 0) 22%),
      linear-gradient(0deg, var(--bg) 0%, rgba(11, 15, 20, 0) 18%);
  }

  /* A dark scrim that travels with the text column, so the text stays readable
     at every window width whatever the animation shows behind it */
  .hero-text {
    position: relative;
  }

  .hero-text::before {
    content: "";
    position: absolute;
    z-index: -1;
    top: -140px;
    bottom: -120px;
    left: -100vw;
    right: -90px;
    background: linear-gradient(90deg, rgba(11, 15, 20, 0.9) calc(100% - 150px), rgba(11, 15, 20, 0.6) calc(100% - 75px), rgba(11, 15, 20, 0) 100%);
    pointer-events: none;
  }

  .hero .lead {
    max-width: 46ch;
  }

  .hero-toggle {
    bottom: 28px;
  }
}

/* Band of four properties under the hero */

.caps {
  position: relative;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
}

.caps::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-line) 30%, var(--accent-line) 70%, transparent);
}

.caps-list {
  display: grid;
  grid-template-columns: 1fr;
  margin: 0;
  padding: 0;
  list-style: none;
}

.caps-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 16px;
  align-items: start;
  align-content: start;
  padding: 24px 0;
  border-top: 1px solid var(--border);
}

.caps-item:first-child {
  border-top: 0;
}

.caps-icon {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--accent-line);
  border-radius: 12px;
  background: var(--accent-wash);
  color: var(--accent);
}

.caps-item h3 {
  margin: 0;
  font-size: 1.0625rem;
  line-height: 1.3;
}

.caps-item p {
  color: var(--muted);
  font-size: var(--text-sm);
  line-height: 1.55;
}

@media (min-width: 640px) {
  .caps-list {
    grid-template-columns: 1fr 1fr;
    column-gap: 32px;
  }

  .caps-item:nth-child(2) {
    border-top: 0;
  }
}

@media (min-width: 1040px) {
  .caps-list {
    grid-template-columns: repeat(4, 1fr);
    column-gap: 0;
  }

  .caps-item {
    grid-template-columns: 1fr;
    gap: 0;
    padding: 36px 28px 38px;
    border-top: 0;
    border-left: 1px solid var(--border);
  }

  .caps-item:first-child {
    padding-left: 0;
    border-left: 0;
  }

  .caps-icon {
    grid-row: auto;
    margin-bottom: 18px;
  }

  .caps-item h3 {
    margin-bottom: 6px;
  }
}

/* Page heading on inner pages */

.page-head {
  position: relative;
  overflow: hidden;
  padding: 52px 0 44px;
  border-bottom: 1px solid var(--border);
}

.page-head::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 75% 20%, #000 10%, transparent 75%);
  mask-image: radial-gradient(ellipse 80% 70% at 75% 20%, #000 10%, transparent 75%);
  pointer-events: none;
}

/* Fine diagonal lines beside the text on wide screens */
.page-head::after {
  content: "";
  display: none;
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  width: min(46%, 560px);
  background: repeating-linear-gradient(115deg, rgba(76, 201, 240, 0.11) 0 1px, transparent 1px 14px);
  -webkit-mask-image: radial-gradient(closest-side at 60% 50%, #000, transparent);
  mask-image: radial-gradient(closest-side at 60% 50%, #000, transparent);
  pointer-events: none;
}

.page-head > .container {
  position: relative;
  z-index: 1;
}

.page-head h1 {
  max-width: 20ch;
}

@media (min-width: 900px) {
  .page-head::after {
    display: block;
  }
}

@media (min-width: 960px) {
  .page-head {
    padding: 88px 0 72px;
  }
}

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 8px;
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 0.9rem;
}

.breadcrumb li + li::before {
  content: "/";
  margin-right: 8px;
  color: var(--border-hi);
}

.breadcrumb a {
  color: var(--muted);
}

.breadcrumb a:hover {
  color: var(--text);
}

/* Sections */

.section {
  padding: 72px 0;
}

.section-alt {
  background: var(--bg-alt);
  border-block: 1px solid var(--border);
}

.section-head {
  max-width: 700px;
  margin-bottom: 40px;
}

.section-head .lead {
  margin-top: 4px;
}

@media (min-width: 960px) {
  .section {
    padding: 112px 0;
  }

  .section-head {
    margin-bottom: 56px;
  }
}

/* Service cards on the home page */

.card-grid {
  display: grid;
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 640px) and (max-width: 999.98px) {
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .card-grid > :last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }
}

@media (min-width: 1000px) {
  .card-grid {
    grid-template-columns: repeat(6, 1fr);
    gap: 20px;
  }

  .card-grid > * {
    grid-column: span 2;
  }

  .card-grid > :nth-child(4),
  .card-grid > :nth-child(5) {
    grid-column: span 3;
  }
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.25s ease, background-color 0.25s ease, box-shadow 0.3s ease, transform 0.3s var(--ease);
}

/* A soft light that follows the pointer, main.js sets the position */
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), rgba(76, 201, 240, 0.09), transparent 62%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.card:hover {
  background: var(--surface-hi);
  border-color: var(--accent-line);
  box-shadow: 0 24px 48px -28px rgba(76, 201, 240, 0.45), 0 0 0 1px rgba(76, 201, 240, 0.08);
  transform: translateY(-3px);
}

.card:hover::before {
  opacity: 1;
}

.card.has-art {
  padding: 10px 10px 24px;
}

.card.has-art > :not(.card-art) {
  margin-inline: 14px;
}

.card h3 {
  margin-bottom: 8px;
}

.card h3 a {
  color: var(--text);
  text-decoration: none;
}

.card h3 a::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: var(--radius);
}

.card h3 a:focus-visible {
  outline: none;
}

.card h3 a:focus-visible::after {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.card p {
  color: var(--muted);
}

.card-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding-top: 20px;
  color: var(--accent);
  font-size: 0.9375rem;
  font-weight: 600;
}

.card-more .icon {
  transition: transform 0.25s var(--ease);
}

.card:hover .card-more .icon {
  transform: translateX(4px);
}

.card-art {
  position: relative;
  height: 148px;
  margin-bottom: 22px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 11px;
  background:
    linear-gradient(var(--grid) 1px, transparent 1px) 0 0 / 20px 20px,
    linear-gradient(90deg, var(--grid) 1px, transparent 1px) 0 0 / 20px 20px,
    var(--panel);
  transition: border-color 0.25s ease;
}

.card:hover .card-art {
  border-color: rgba(76, 201, 240, 0.22);
}

.icon-box {
  display: grid;
  place-items: center;
  flex: none;
  width: 46px;
  height: 46px;
  margin-bottom: 20px;
  border: 1px solid var(--accent-line);
  border-radius: 12px;
  background: var(--accent-wash);
  color: var(--accent);
}

/* Small line drawings for the five fields, used on the home page and the services page */

.ill {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.ill .ln {
  fill: none;
  stroke: var(--line);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ill .ln-soft {
  fill: none;
  stroke: #2a3746;
  stroke-width: 1.5;
  stroke-linecap: round;
}

.ill .ac {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ill .ac-dim {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.5;
  stroke-linecap: round;
  opacity: 0.45;
}

.ill .pn {
  fill: #111822;
  stroke: var(--line);
  stroke-width: 1.5;
}

.ill .pn-ac {
  fill: rgba(76, 201, 240, 0.08);
  stroke: var(--accent);
  stroke-width: 1.5;
}

.ill .dt {
  fill: var(--accent);
}

.ill .dt-dim {
  fill: var(--line);
}

.ill .dt-warn {
  fill: var(--harm);
}

.ill .wr {
  fill: none;
  stroke: var(--harm);
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ill .gl {
  fill: url(#ill-glow);
}

@media (prefers-reduced-motion: no-preference) {
  .ill .mv {
    transition: transform 0.9s var(--ease), opacity 0.4s ease;
  }

  .card:hover .ill .mv-x,
  .service:hover .ill .mv-x {
    transform: translateX(var(--mv, 40px));
  }

  .card:hover .ill .mv-y,
  .service:hover .ill .mv-y {
    transform: translateY(var(--mv, 40px));
  }

  .card:hover .ill .blink,
  .service:hover .ill .blink {
    animation: ill-blink 1s steps(1) infinite;
  }

  .card:hover .ill .flow,
  .service:hover .ill .flow {
    animation: ill-flow 1.2s linear infinite;
  }

  .card:hover .ill .pulse,
  .service:hover .ill .pulse {
    animation: ill-pulse 1.6s ease-in-out infinite;
  }
}

@keyframes ill-blink {
  50% {
    opacity: 0;
  }
}

@keyframes ill-flow {
  to {
    stroke-dashoffset: -24;
  }
}

@keyframes ill-pulse {
  50% {
    opacity: 0.35;
  }
}

/* Call to action band */

.section:not(.section-alt) + .section-cta {
  padding-top: 0;
}

.cta {
  position: relative;
  isolation: isolate;
  display: grid;
  gap: 28px;
  overflow: hidden;
  padding: 40px 24px;
  border: 1px solid var(--accent-line);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(90% 120% at 100% 0%, rgba(76, 201, 240, 0.16), transparent 58%),
    radial-gradient(60% 90% at 0% 100%, rgba(76, 201, 240, 0.06), transparent 60%),
    var(--surface);
  box-shadow: 0 40px 80px -48px rgba(76, 201, 240, 0.35);
}

/* Fine profile lines in the right half of the box */
.cta::before {
  content: "";
  position: absolute;
  inset: 0 0 0 45%;
  z-index: -1;
  background: repeating-linear-gradient(115deg, rgba(76, 201, 240, 0.1) 0 1px, transparent 1px 13px);
  -webkit-mask-image: radial-gradient(closest-side at 70% 40%, #000, transparent);
  mask-image: radial-gradient(closest-side at 70% 40%, #000, transparent);
  pointer-events: none;
}

/* A slow scan line across the box */
.cta::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: -1;
  width: 2px;
  background: linear-gradient(180deg, transparent, rgba(134, 220, 246, 0.55), transparent);
  box-shadow: 0 0 18px 4px rgba(76, 201, 240, 0.18);
  opacity: 0;
  pointer-events: none;
}

@media (prefers-reduced-motion: no-preference) {
  .cta::after {
    animation: cta-scan 9s var(--ease) infinite;
  }
}

@keyframes cta-scan {
  0% {
    opacity: 0;
    transform: translateX(0);
  }
  8% {
    opacity: 1;
  }
  55% {
    opacity: 1;
  }
  64%,
  100% {
    opacity: 0;
    transform: translateX(1400px);
  }
}

.cta h2 {
  max-width: 18ch;
  margin-bottom: 12px;
}

/* A longer heading in the band: smaller, so it stays on one line on wide screens */
.cta h2.cta-long {
  max-width: none;
  font-size: clamp(1.5rem, 0.9rem + 1.6vw, 2.25rem);
}

.cta .eyebrow {
  margin-bottom: 14px;
  color: var(--accent);
}

.cta p {
  max-width: 54ch;
  color: var(--text-soft);
}

.cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.cta-actions .btn-primary {
  min-height: 56px;
  padding-inline: 26px;
  font-size: 1.0625rem;
}

.cta-actions .btn-ghost {
  min-height: 56px;
}

@media (min-width: 860px) {
  .cta {
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 48px;
    padding: 64px 64px;
  }

  .cta-actions {
    flex-direction: column;
    align-items: stretch;
  }
}

/* Services page */

.service {
  display: grid;
  gap: 24px;
  padding: 44px 0;
  border-top: 1px solid var(--border);
  scroll-margin-top: calc(var(--header-h) + 16px);
}

.service:first-child {
  border-top: 0;
  padding-top: 0;
}

.service h2 {
  font-size: clamp(1.45rem, 1.2rem + 0.9vw, 1.875rem);
}

.service-text p {
  max-width: 58ch;
  color: var(--text-soft);
}

.service h3 {
  margin-bottom: 14px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.service-art {
  height: 150px;
  max-width: 420px;
  margin-bottom: 26px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 12px;
  background:
    linear-gradient(var(--grid) 1px, transparent 1px) 0 0 / 20px 20px,
    linear-gradient(90deg, var(--grid) 1px, transparent 1px) 0 0 / 20px 20px,
    var(--panel);
}

@media (min-width: 900px) {
  .service {
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    padding: 64px 0;
  }

  .service-examples {
    padding-top: 202px;
  }
}

.examples {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.examples li {
  position: relative;
  padding: 13px 16px 13px 42px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  line-height: 1.5;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.examples li:hover {
  border-color: var(--border-hi);
  background: var(--surface-hi);
}

.examples li::before {
  content: "";
  position: absolute;
  top: 19px;
  left: 17px;
  width: 9px;
  height: 9px;
  border: 2px solid var(--accent);
  border-radius: 3px;
}

/* Numbered steps */

.steps {
  display: grid;
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

@media (min-width: 640px) {
  .steps {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1000px) {
  .steps {
    grid-template-columns: repeat(4, 1fr);
  }
}

.steps > li {
  position: relative;
  counter-increment: step;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.steps > li::before {
  content: counter(step, decimal-leading-zero);
  display: block;
  margin-bottom: 16px;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.875rem;
  letter-spacing: 0.1em;
}

.steps h3 {
  margin-bottom: 8px;
}

.steps p {
  color: var(--muted);
}

/* Principles with icons */

.principles {
  display: grid;
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 720px) {
  .principles {
    grid-template-columns: repeat(2, 1fr);
  }
}

.principles > li {
  display: flex;
  gap: 18px;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.principles .icon-box {
  margin-bottom: 0;
}

.principles h3 {
  margin-bottom: 6px;
}

.principles p {
  color: var(--muted);
}

/* Team */

.team {
  display: grid;
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 760px) {
  .team {
    grid-template-columns: repeat(2, 1fr);
  }
}

.person {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 28px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

@media (min-width: 420px) {
  .person {
    flex-direction: row;
    align-items: flex-start;
  }
}

.avatar {
  display: grid;
  place-items: center;
  flex: none;
  width: 88px;
  height: 88px;
  border: 1px solid var(--accent-line);
  border-radius: 22px;
  background:
    radial-gradient(circle at 30% 20%, rgba(76, 201, 240, 0.28), transparent 70%),
    var(--surface-hi);
  color: var(--accent);
  font-size: 1.6rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1;
  object-fit: cover;
}

.person h3 {
  margin-bottom: 4px;
  font-size: 1.3rem;
}

.role {
  margin-bottom: 12px;
  color: var(--accent);
  font-weight: 550;
}

.person p:not(.role) {
  color: var(--muted);
}

.person-link {
  margin-top: -4px;
}

/* Contact page */

.contact-grid {
  display: grid;
  gap: 16px;
}

@media (min-width: 900px) {
  .contact-grid {
    grid-template-columns: 1.4fr 1fr;
    align-items: stretch;
  }
}

.contact-main {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
  padding: 32px 24px;
  border: 1px solid var(--accent-line);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(120% 140% at 0% 0%, rgba(76, 201, 240, 0.12), transparent 60%),
    var(--surface);
}

.contact-label {
  margin: 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.contact-email {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  width: fit-content;
  max-width: 100%;
  color: var(--text);
  font-size: clamp(1.4rem, 1rem + 2vw, 2.25rem);
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.2;
  text-decoration: none;
}

.contact-email .icon {
  width: 30px;
  height: 30px;
  color: var(--accent);
}

.contact-email:hover {
  color: var(--accent-hi);
}

.contact-email span {
  text-decoration: underline;
  text-decoration-color: var(--accent-line);
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
}

.contact-main p {
  color: var(--muted);
}

@media (min-width: 900px) {
  .contact-main {
    padding: 48px;
  }
}

.info-stack {
  display: grid;
  gap: 16px;
}

.info-card {
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.info-card h2 {
  margin-bottom: 10px;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
}

.info-card p {
  color: var(--text-soft);
}

/* Legal pages */

.prose {
  max-width: 72ch;
}

.prose h2 {
  margin-top: 2em;
  font-size: 1.35rem;
  letter-spacing: -0.01em;
}

.prose h2:first-child {
  margin-top: 0;
}

.prose p,
.prose li {
  color: var(--text-soft);
}

.prose ul {
  margin: 0 0 1em;
  padding-left: 1.25em;
}

.prose li {
  margin-bottom: 0.4em;
}

.prose li::marker {
  color: var(--accent);
}

.details {
  margin: 0 0 40px;
  border-top: 1px solid var(--border);
}

.details > div {
  display: grid;
  gap: 2px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.details dt {
  color: var(--muted);
}

.details dd {
  margin: 0;
}

@media (min-width: 720px) {
  .details > div {
    grid-template-columns: 240px 1fr;
    gap: 24px;
  }
}

.updated {
  margin-top: 40px;
  color: var(--muted);
  font-size: var(--text-sm);
}

/* Error page */

.error-page {
  padding: 80px 0 96px;
}

.error-code {
  margin-bottom: 12px;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.875rem;
  letter-spacing: 0.2em;
}

.error-page .lead {
  margin-bottom: 0;
}

.error-other {
  margin-top: 40px;
  color: var(--muted);
}

/* Footer */

.site-footer {
  padding: 64px 0 32px;
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  font-size: var(--text-sm);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px 24px;
}

.footer-brand {
  grid-column: 1 / -1;
}

.footer-brand p {
  max-width: 34ch;
  margin-top: 16px;
  color: var(--muted);
}

.footer-title {
  margin-bottom: 14px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.footer-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-list a {
  color: var(--text);
  text-decoration: none;
}

.footer-list a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  color: var(--muted);
}

@media (min-width: 900px) {
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr 1fr;
  }

  .footer-brand {
    grid-column: auto;
  }
}

/* Scroll reveal. main.js marks blocks below the first screen as pending and
   reveals them when they scroll into view. Blocks on the first screen are never hidden. */

@media (prefers-reduced-motion: no-preference) {
  .reveal-pending {
    opacity: 0;
    transform: translateY(22px);
  }

  .reveal-pending.is-in {
    opacity: 1;
    transform: none;
    transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
    transition-delay: var(--reveal-delay, 0s);
  }
}

/* Motion and print */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .card:hover {
    transform: none;
  }

  .cta::after {
    display: none;
  }
}

@media print {
  :root {
    color-scheme: light;
  }

  body {
    background: #fff;
    color: #000;
  }

  .site-header,
  .site-footer,
  .skip-link,
  .btn-row,
  .hero-media,
  .hero-toggle,
  .hero-topics,
  .card-art,
  .service-art,
  .cta {
    display: none !important;
  }

  .hero {
    margin-top: 0;
    padding: 0 0 24px;
  }

  .hero::before,
  .page-head::before,
  .page-head::after {
    display: none;
  }

  .reveal-pending {
    opacity: 1 !important;
    transform: none !important;
  }

  a {
    color: #000;
  }

  .lead,
  .prose p,
  .prose li,
  .details dt,
  .card p,
  .caps-item p {
    color: #000;
  }
}
