/* SPDX-License-Identifier: MIT */
/* ==============================================================================
   base.css: layout and components for every page. Colors and fonts are set
   by the theme (themes/<name>/theme.css), which wins over this file, so there
   is no need to edit it.

   Page building blocks (see README):
     <section>                a full-width band; .tinted for a colored band,
                              .narrow for reading width, .hero for the opening
     <hgroup>                 eyebrow <p>, then <h1>/<h2>, then a lead <p>
     .cols-2 / -3 / -4        a grid; an <article> in it is a card,
                              a <div> is a plain column
     .actions, .btn, .primary buttons
     ol.steps                 numbered steps
     <details>                questions and answers
     <article> in <main>      long text such as a policy or a post
   ============================================================================== */

@layer base, extensions;   /* extensions win over base; the theme wins over both */

@layer base {

/* --- Tokens (the theme overrides these) --------------------------------------- */
:root {
  color-scheme: light dark;
  --paper: light-dark(#f6f7f9, #0e1014);
  --surface: light-dark(#ffffff, #161a21);
  --ink: light-dark(#10131a, #eceef3);
  --muted: light-dark(#596173, #9ba2b1);
  --line: light-dark(#e1e4ea, #262b35);
  --accent: light-dark(#2b4be0, #8fa3ff);
  --on-accent: light-dark(#ffffff, #0b1030);
  --font-body: system-ui, sans-serif;
  --font-heading: var(--font-body);
  --heading-weight: 600;
  --heading-stretch: 100%;
  --radius: 6px;
  --radius-button: var(--radius);
  --width: 1200px;
  --gutter: clamp(1rem, 4vw, 2rem);
  --gap: 2rem;
}
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }

/* --- Base ---------------------------------------------------------------------- */
*, ::before, ::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 6rem; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.65 var(--font-body);
  overflow-wrap: break-word;
}
img, svg, video { display: block; max-width: 100%; height: auto; }
a { color: var(--accent); text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
::selection { background: color-mix(in srgb, var(--accent) 30%, transparent); }

h1, h2, h3, h4 {
  margin: 0 0 .5em;
  font-family: var(--font-heading);
  font-stretch: var(--heading-stretch);
  font-weight: var(--heading-weight);
  line-height: 1.15;
  letter-spacing: -.01em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.25rem, 1.4rem + 3.4vw, 3.75rem); letter-spacing: -.025em; line-height: 1.05; }
h2 { font-size: clamp(1.625rem, 1.2rem + 1.6vw, 2.25rem); letter-spacing: -.02em; }
h3 { font-size: 1.3125rem; }
h4 { font-size: 1.0625rem; }
p, ul, ol, dl, blockquote, table, pre, figure, details { margin: 0 0 1.25rem; }
p { text-wrap: pretty; }
small { font-size: .875rem; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2.5rem 0; }
address { font-style: normal; }

/* --- Page bands -------------------------------------------------------------- */
body > header, body > footer, main > section {
  padding-inline: max(var(--gutter), (100% - var(--width)) / 2);
}
main > section { padding-block: clamp(2.5rem, 5vw, 4.5rem); }
main > section:first-child { padding-top: clamp(3rem, 7vw, 6rem); }
main > section:last-child { padding-bottom: clamp(3.5rem, 8vw, 7rem); }
main > section.tinted { background: var(--surface); border-block: 1px solid var(--line); }
main > section.tinted + section:not(.tinted) { padding-top: clamp(3rem, 6vw, 5.5rem); }
main > section.narrow > * { max-width: 46rem; }
main > section > :last-child, main > article > :last-child { margin-bottom: 0; }

/* Long text: policies, posts, markdown pages. */
main > article {
  width: min(100% - 2 * var(--gutter), 46rem);
  margin-inline: auto;
  padding-block: clamp(3rem, 7vw, 5.5rem);
}
main > article h2 { margin-top: 2.5rem; font-size: 1.625rem; }
main > article h3 { margin-top: 2rem; }
main > article :is(ul, ol) { padding-left: 1.25rem; }
main > article li + li { margin-top: .4rem; }

/* --- Headings with eyebrow and lead --------------------------------------- */
hgroup { max-width: 46rem; margin-bottom: clamp(2rem, 4vw, 3rem); }
hgroup > * { margin-bottom: 0; }
hgroup > p:has(+ :is(h1, h2)) { margin-bottom: .875rem; color: var(--accent); font-weight: 600; font-size: .9375rem; }
hgroup > :is(h1, h2) + p { margin-top: 1rem; color: var(--muted); font-size: 1.1875rem; line-height: 1.55; }

/* --- Opening section: text beside an image ---------------------------------- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
.hero hgroup { margin-bottom: 0; }
.hero figure { margin: 0; }
.hero figure img { width: 100%; border-radius: var(--radius); border: 1px solid var(--line); }

/* --- Grids --------------------------------------------------------------------- */
/* At most N columns; they wrap to fewer when a column would get too narrow. */
.cols-2 { --cols: 2; --min: 20rem; }
.cols-3 { --cols: 3; --min: 16rem; }
.cols-4 { --cols: 4; --min: 13rem; }
.cols-2, .cols-3, .cols-4 {
  display: grid;
  gap: var(--gap);
  margin: 0;
  padding: 0;
  grid-template-columns: repeat(auto-fill, minmax(max(min(var(--min), 100%), (100% - (var(--cols) - 1) * var(--gap)) / var(--cols)), 1fr));
}
:is(.cols-2, .cols-3, .cols-4) > div > :last-child { margin-bottom: 0; }
:is(.cols-2, .cols-3, .cols-4) > div > h3 { padding-top: 1rem; border-top: 2px solid var(--ink); }

/* An article in a grid is a card. A link in its heading makes the whole card
   clickable; other links in the card stay clickable on top of it. */
:is(.cols-2, .cols-3, .cols-4) > article {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
:is(.cols-2, .cols-3, .cols-4) > article > :last-child { margin-bottom: 0; }
:is(.cols-2, .cols-3, .cols-4) > article :is(h2, h3) { font-size: 1.3125rem; }
article :is(h2, h3) a { color: inherit; text-decoration: none; }
article :is(h2, h3) a::after { content: ""; position: absolute; inset: 0; }
article:has(:is(h2, h3) a:hover) { border-color: var(--muted); }
article:has(:is(h2, h3) a:hover) :is(h2, h3) a { text-decoration: underline; text-decoration-thickness: 1px; }
article :is(h2, h3) a:focus-visible { outline: 0; }
article:has(:is(h2, h3) a:focus-visible) { outline: 2px solid var(--accent); outline-offset: 3px; }
article .social, article .btn { position: relative; z-index: 1; }
article.accent { border-top: 3px solid var(--accent); }
main > section.tinted :is(.cols-2, .cols-3, .cols-4) > article { background: var(--paper); }


/* --- Buttons ------------------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  min-height: 2.75rem;
  padding: .625rem 1.25rem;
  border: 1px solid color-mix(in srgb, var(--ink) 25%, transparent);
  border-radius: var(--radius-button);
  color: var(--ink);
  font-weight: 600;
  font-size: .9375rem;
  line-height: 1.2;
  text-decoration: none;
  transition: background-color .15s, border-color .15s;
}
.btn:hover { border-color: var(--ink); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn.primary:hover { background: color-mix(in srgb, var(--accent) 82%, var(--ink)); }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }

/* --- Numbered steps ----------------------------------------------------------- */
ol.steps { list-style: none; counter-reset: step; }
ol.steps > li { counter-increment: step; padding-top: 1rem; border-top: 2px solid var(--ink); }
ol.steps > li::before {
  content: counter(step);
  display: block;
  margin-bottom: 1.5rem;
  color: var(--accent);
  font: var(--heading-weight) 2.5rem/1 var(--font-heading);
  font-stretch: var(--heading-stretch);
}
ol.steps > li > :last-child { margin-bottom: 0; }
ol.steps h3 { font-size: 1.1875rem; }

/* --- Questions and answers ------------------------------------------------- */
details { max-width: 46rem; margin: 0; border-bottom: 1px solid var(--line); }
details:first-of-type { border-top: 1px solid var(--line); }
summary {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.125rem 0;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--accent); font-size: 1.25rem; line-height: 1; }
details[open] summary::after { content: "–"; }
details > :not(summary) { margin: 0 0 1.25rem; color: var(--muted); }

/* --- Pictures, quotes, tables, code ------------------------------------------ */
figure { margin-inline: 0; }
figure img { border-radius: var(--radius); }
figcaption { margin-top: .625rem; color: var(--muted); font-size: .875rem; }
blockquote { margin-inline: 0; padding-left: 1.25rem; border-left: 3px solid var(--accent); font-size: 1.1875rem; }
table { width: 100%; border-collapse: collapse; font-size: .9375rem; }
th, td { padding: .625rem .75rem .625rem 0; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
code, pre { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .875em; }
pre { overflow-x: auto; padding: 1rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }

/* --- Header ---------------------------------------------------------------------- */
.skip { position: absolute; left: -100vw; }
.skip:focus { left: 1rem; top: 1rem; z-index: 100; padding: .5rem 1rem; background: var(--surface); }

body > header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 2rem;
  height: 4.5rem;
  padding-right: max(4.5rem, (100% - var(--width)) / 2);
  background: color-mix(in srgb, var(--paper) 90%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: .625rem;
  color: var(--ink);
  font: var(--heading-weight) 1.125rem/1 var(--font-heading);
  font-stretch: var(--heading-stretch);
  letter-spacing: -.01em;
  text-decoration: none;
  white-space: nowrap;
}
body > header .logo { margin-right: auto; }
.logo :is(svg, img) { width: 2rem; height: 2rem; flex: none; }

#menu { display: flex; align-items: center; gap: 1.75rem; margin: 0; padding: 0; list-style: none; }
#menu a:not(.btn) { color: var(--muted); font-size: .9375rem; font-weight: 500; text-decoration: none; }
#menu a:not(.btn):hover, #menu a[aria-current] { color: var(--ink); }
#menu a[aria-current] { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: .45em; }

.menu-toggle, .theme-toggle {
  display: inline-grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  background: none;
  color: var(--ink);
  font-size: 1.125rem;
  cursor: pointer;
}
.menu-toggle:hover, .theme-toggle:hover { background: color-mix(in srgb, var(--ink) 8%, transparent); }
.menu-toggle .icon, .theme-toggle .icon { grid-area: 1 / 1; }
.theme-toggle { position: absolute; top: 50%; right: max(1rem, var(--gutter) / 2); translate: 0 -50%; }
.theme-toggle[hidden] { display: none; }

/* The moon switches to dark, the sun switches to light. */
.theme-toggle .icon + .icon,
:root[data-theme="dark"] .theme-toggle .icon:first-child { display: none; }
:root[data-theme="dark"] .theme-toggle .icon + .icon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon:first-child { display: none; }
  :root:not([data-theme="light"]) .theme-toggle .icon + .icon { display: block; }
}

/* Wide screens: the menu is a row. Narrow screens: it opens as a panel. */
@media (min-width: 1081px) {
  .menu-toggle { display: none; }
  #menu { position: static; inset: auto; width: auto; height: auto; overflow: visible; border: 0; background: none; color: inherit; }
}
@media (max-width: 1080px) {
  body > header { gap: .5rem; }
  .menu-toggle .icon + .icon, nav:has(#menu:popover-open) .menu-toggle .icon:first-child { display: none; }
  nav:has(#menu:popover-open) .menu-toggle .icon + .icon { display: block; }
  #menu {
    inset: 4.5rem 0 auto;
    width: 100%;
    max-height: calc(100dvh - 4.5rem);
    margin: 0;
    padding: .75rem var(--gutter) 1.5rem;
    overflow-y: auto;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    border: 0;
    border-bottom: 1px solid var(--line);
    background: var(--paper);
    color: var(--ink);
  }
  #menu:not(:popover-open) { display: none; }
  #menu:popover-open { box-shadow: 0 24px 48px rgb(0 0 0 / .18); }
  #menu a:not(.btn) { display: block; padding: .875rem 0; border-bottom: 1px solid var(--line); font-size: 1.0625rem; }
  #menu .btn { width: 100%; margin-top: 1.25rem; }
}

/* --- Footer --------------------------------------------------------------------- */
body > footer { padding-block: clamp(3rem, 6vw, 4.5rem) 2rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .9375rem; }
body > footer > div { display: grid; grid-template-columns: minmax(0, 2fr) repeat(2, minmax(0, 1fr)); gap: 2.5rem; }
body > footer > div > div:first-child { max-width: 24rem; }
body > footer .logo { height: 2rem; margin-bottom: 1rem; }
body > footer h2 { margin-bottom: 1rem; color: var(--ink); font-size: 1rem; font-stretch: 100%; line-height: 2rem; letter-spacing: 0; }
body > footer ul { display: grid; gap: .5rem; margin: 0; padding: 0; list-style: none; }
body > footer a { color: inherit; text-decoration: none; }
body > footer a:hover { color: var(--ink); text-decoration: underline; }
body > footer address p { margin: 0 0 .5rem; }
body > footer .legal { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--line); font-size: .875rem; }
@media (max-width: 720px) {
  body > footer > div { grid-template-columns: 1fr; gap: 2rem; }
}

/* --- Icons and social links ------------------------------------------------------ */
.icon { width: 1em; height: 1em; fill: currentColor; flex: none; }
.social { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1.25rem 0 0; padding: 0; list-style: none; }
.social a {
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--muted);
}
.social a:hover { border-color: var(--ink); color: var(--ink); }

/* --- Small screens ------------------------------------------------------------- */
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; }
}

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

}

/* Smooth fade between pages in browsers that support it. */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
}
/* SPDX-License-Identifier: MIT */
/* collection.css: shared styles for extensions that list entries (blog, news,
   team, careers, portfolio, services, testimonials, gallery, pricing). It
   comes with each of them. */
@layer extensions {
  /* A post or an entry's own page. */
  main > article > hgroup:has(+ .meta) { margin-bottom: 1.25rem; }
  main > article > .meta { margin-bottom: 2rem; padding-bottom: 1.5rem; border-bottom: 1px solid var(--line); }
  main > article > figure img { width: 100%; }
  main > article > .actions { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--line); }
  main > section + article { padding-top: 0; }
  /* A picture at the top of a card fills its width. */
  :is(.cols-2, .cols-3, .cols-4) > article > figure:first-child {
    margin: -1.5rem -1.5rem 1.25rem;
    aspect-ratio: 3 / 2;
    overflow: hidden;
    border-radius: calc(var(--radius) - 1px) calc(var(--radius) - 1px) 0 0;
    background: var(--line);
  }
  :is(.cols-2, .cols-3, .cols-4) > article > figure:first-child img { width: 100%; height: 100%; object-fit: cover; border-radius: 0; }

  /* Date, category and similar details. */
  .meta { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; margin-bottom: .5rem; color: var(--muted); font-size: .9375rem; }

  /* Key facts as a row: <dl class="facts"><div><dt>Client</dt><dd>…</dd></div>…</dl> */
  .facts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
    gap: 1rem 2rem;
    margin: 0 0 2.5rem;
    padding: 1.25rem 0;
    border-block: 1px solid var(--line);
  }
  .facts dt { color: var(--muted); font-size: .875rem; }
  .facts dd { margin: 0; font-weight: 600; }
  nav[aria-label="Breadcrumb"] { margin-bottom: 1.5rem; font-size: .9375rem; }
  nav[aria-label="Breadcrumb"] a { color: var(--muted); text-decoration: none; }
  nav[aria-label="Breadcrumb"] a::before { content: "← "; }
  nav[aria-label="Breadcrumb"] a:hover { color: var(--ink); }
  .pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 3rem; color: var(--muted); font-size: .9375rem; }
  .pager [rel="next"] { margin-left: auto; }
}
/* ==============================================================================
   Theme: Verithan
   Dark slate and the blue of the logo, on the shared layout. Dark by
   default; the button in the header switches to light, and the visitor's
   choice is remembered.

   Browser color: #1a222c

   The line above is read by build.sh. The font, Inter, is served from this
   website (the .woff2 files next to this file), not from Google, so a visit
   sends nothing to another server. License: inter-license.txt. The logo needs
   no font: its letters are drawn as lines (templates/header.html and footer.html).
   ============================================================================== */

/* Inter (SIL Open Font License 1.1), one variable file per alphabet: the
   browser downloads latin-ext only for letters such as š, č and ž. */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("inter-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("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;
}

:root {
  /* The blue of the logo, and a lighter and a darker step for text on dark
     and on light backgrounds (both pass WCAG AA). */
  --blue-light: #4fb3e8;
  --blue: #1095d6;
  --blue-dark: #0b6fa3;

  /* Each color: light-dark(light mode, dark mode). */
  --paper: light-dark(#eff1f3, #1a222c);            /* page background, as in the logo files */
  --surface: light-dark(#ffffff, #212b36);          /* cards and bands */
  --deep: light-dark(#e4e8ec, #141b23);             /* footer and quiet bands */
  --ink: light-dark(#18202a, #e3e8ee);              /* text */
  --title: light-dark(#0f161f, #f4f7fa);            /* page titles */
  --muted: light-dark(#4f5b68, #a3adb8);            /* secondary text */
  --line: light-dark(#d5dbe1, rgb(16 149 214 / .2));
  --line-strong: light-dark(rgb(16 149 214 / .55), rgb(16 149 214 / .5));
  --accent: var(--blue);                            /* rules, markers, borders */
  --accent-text: light-dark(var(--blue-dark), var(--blue-light));   /* blue headings and figures */
  /* Small text: on light paper the logo blue is too faint to read at label size,
     so labels and links are darker there. */
  --label: light-dark(#4f5b68, var(--blue-light));  /* small uppercase labels */
  --link: light-dark(var(--blue-dark), var(--blue-light));
  --button: var(--blue-dark);                       /* white text on it passes AA */
  --button-hover: #095a85;
  --focus: light-dark(#0f161f, var(--blue-light));
  --on-accent: #ffffff;
  --logo-ink: light-dark(#1d2733, #e8eef4);         /* VERITHAN in the logo */
  --logo-blue: light-dark(var(--blue-dark), var(--blue));   /* GROUP in the logo */

  --font-body: "Inter", system-ui, sans-serif;
  --font-heading: "Inter", system-ui, sans-serif;
  --heading-weight: 500;
  --radius: 1px;
  --radius-button: 1px;
  --width: 1200px;
}

/* Dark unless the visitor chose light (see templates/layout.html). */
:root { color-scheme: dark; }
:root[data-theme="light"] { color-scheme: light; }

body { font-size: 1rem; line-height: 1.7; }
strong { font-weight: 600; color: var(--ink); }

/* --- Headings ------------------------------------------------------------------ */
h1, h2, h3 { color: var(--accent-text); letter-spacing: -.01em; }
h1 { font-size: clamp(2.5rem, 1.6rem + 3vw, 3.5rem); line-height: 1.1; }
h1::first-line, hgroup > h2, main > article > h2, body > footer h2 { color: var(--title); }
h2 { font-size: clamp(1.75rem, 1.4rem + 1.25vw, 2.25rem); line-height: 1.2; }
h3, :is(.cols-2, .cols-3, .cols-4) > article :is(h2, h3) { font-size: 1.3rem; line-height: 1.3; }

/* Small uppercase labels: eyebrows, roles, dates, footer headings. */
hgroup > p:has(+ :is(h1, h2)),
article hgroup > :is(h2, h3) + p,
.profile hgroup p, .person hgroup p,
.meta, main nav[aria-label="Breadcrumb"],
body > footer h2 {
  color: var(--label);
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .15em;
  line-height: 1.6;
  text-transform: uppercase;
}
/* Eyebrows above a heading start with a short blue rule. */
hgroup > p:has(+ :is(h1, h2))::before {
  content: "";
  display: inline-block;
  width: 1.75rem;
  height: 1px;
  margin-right: .75rem;
  background: var(--accent);
  vertical-align: .3em;
}
hgroup > :is(h1, h2) + p { color: var(--muted); font-size: 1.15rem; max-width: 44rem; }
main nav[aria-label="Breadcrumb"] a { color: inherit; text-decoration: none; }
main nav[aria-label="Breadcrumb"] a::before { content: "← "; }
main nav[aria-label="Breadcrumb"] a:hover { color: var(--title); }

/* --- Links and focus ------------------------------------------------------------- */
/* In the base layer, so the template's own link colors (card headings, social
   icons, the menu) still win over these defaults. */
@layer base {
  a { color: var(--link); text-decoration-color: color-mix(in srgb, var(--accent) 70%, transparent); }
  a:hover { text-decoration-color: var(--accent); }
  :focus-visible { outline-color: var(--focus); }
  article:has(:is(h2, h3) a:focus-visible) { outline-color: var(--focus); }
  ::selection { background: rgb(16 149 214 / .3); }
}
main :is(p, li, dd) a:not(.btn), address a { font-weight: 600; }

/* --- Bands ---------------------------------------------------------------------- */
main > section + section { border-top: 1px solid var(--line); }
main > section.tinted { background: var(--surface); }
main > section.deep { background: var(--deep); }
main > section.tinted :is(.cols-2, .cols-3, .cols-4) > article { background: var(--paper); }

/* --- Buttons --------------------------------------------------------------------- */
.btn {
  padding: .8rem 1.5rem;
  border-color: var(--line-strong);
  color: var(--title);
  font-size: .875rem;
  font-weight: 600;
  letter-spacing: .02em;
  transition: background-color .15s, border-color .15s, color .15s;
}
.btn:hover { border-color: var(--accent); background: rgb(16 149 214 / .08); }
.btn.primary { background: var(--button); border-color: var(--button); color: var(--on-accent); }
.btn.primary:hover { background: var(--button-hover); border-color: var(--button-hover); }
.btn:active { translate: 0 1px; }

/* --- Cards ----------------------------------------------------------------------- */
:is(.cols-2, .cols-3, .cols-4) > article {
  padding: 2rem;
  border-color: var(--line);
  transition: border-color .2s;
}
/* A picture at the top of a card reaches its edges (the card has 2rem padding). */
:is(.cols-2, .cols-3, .cols-4) > article > figure:first-child { margin: -2rem -2rem 1.5rem; }
:is(.cols-2, .cols-3, .cols-4) > article:hover,
article:has(:is(h2, h3) a:hover) { border-color: var(--line-strong); }
article.accent { border-top: 1px solid var(--line); border-left: 3px solid var(--accent); }
/* An article on its own in a section (not in a grid) is a card too, with lines short enough to read. */
main > section > article { padding: 2rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
main > section > article.accent { border-left: 3px solid var(--accent); }
main > section > article > p { max-width: 50rem; }
:is(.cols-2, .cols-3, .cols-4) > article > a:last-child:not(.btn) { margin-top: auto; padding-top: 1rem; font-size: .9375rem; font-weight: 600; }
:is(.cols-2, .cols-3, .cols-4) > div > h3 { border-top-color: var(--accent); border-top-width: 1px; }
/* Plain lists in cards. Lists with a class (social icons and the like) keep their own layout. */
article :is(ul, ol):not([class]) { padding-left: 1.25rem; }
article :is(ul, ol):not([class]) > li + li { margin-top: .5rem; }
article :is(ul, ol):not([class]) > li::marker { color: var(--accent); }

/* Numbered steps: 01, 02 … with a blue rule. */
ol.steps > li { padding: 1.75rem; border: 1px solid var(--line); background: var(--surface); }
ol.steps > li::before {
  content: counter(step, decimal-leading-zero);
  display: inline-block;
  margin-bottom: 1.25rem;
  padding-bottom: .25rem;
  border-bottom: 2px solid var(--accent);
  font: 600 1.1rem/1 var(--font-body);
  color: var(--accent-text);
}
main > section.tinted ol.steps > li { background: var(--paper); }

/* Key figures: <ul class="stats cols-4"><li><strong>18+</strong> Label</li></ul> */
ul.stats { --min: 9rem; list-style: none; }
ul.stats > li {
  padding: 1.75rem 1rem;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  text-align: center;
}
ul.stats strong {
  display: block;
  margin-bottom: .5rem;
  color: var(--accent-text);
  font: 500 2.5rem/1.1 var(--font-heading);
  letter-spacing: -.01em;
  text-transform: none;
}

/* Careers: the short summary under each position. */
.jobs > article > div { max-width: 52rem; }
.jobs > article > div > p:not(.meta) { margin: .625rem 0 0; color: var(--muted); }

/* Testimonials: the section stays hidden until the first quote is published. */
section.quotes:not(:has(.testimonials)) { display: none; }

/* A short closing band with a call to action. */
.closing { text-align: center; }
.closing hgroup { margin-inline: auto; }
.closing .actions { justify-content: center; }

/* Facts list: <dl class="facts"> with <div><dt>…</dt><dd>…</dd></div>. A row with
   one line above each fact; beside a card (portfolio), a list with the label on the left. */
dl.facts { padding: 0; border-block: 0; gap: 0 2rem; }
dl.facts div { padding: 1rem 0 .25rem; border-top: 1px solid var(--line); }
dl.facts dt { margin-bottom: .375rem; color: var(--label); font-size: .6875rem; font-weight: 600; letter-spacing: .15em; text-transform: uppercase; }
dl.facts dd { color: var(--title); font-weight: 500; }
:is(.cols-2, .cols-3) > dl.facts { grid-template-columns: 1fr; align-self: start; margin: 0; }
:is(.cols-2, .cols-3) > dl.facts div { display: grid; grid-template-columns: 9rem minmax(0, 1fr); align-items: baseline; gap: 1rem; padding: 1rem 0; }
:is(.cols-2, .cols-3) > dl.facts div:last-child { border-bottom: 1px solid var(--line); }
:is(.cols-2, .cols-3) > dl.facts dt { margin: 0; }
@media (max-width: 480px) {
  :is(.cols-2, .cols-3) > dl.facts div { grid-template-columns: 1fr; gap: .375rem; }
}

/* --- Opening section with a photo (home page only) ------------------ */
.cover {
  position: relative;
  isolation: isolate;
  display: grid;
  align-content: center;
  min-height: min(82vh, 52rem);
  overflow: hidden;
}
.cover > figure { position: absolute; inset: 0; z-index: -1; margin: 0; }
.cover > figure img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; border: 0; border-radius: 0; }
.cover > figure::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, light-dark(rgb(239 241 243 / .92), rgb(26 34 44 / .9)) 0%, light-dark(rgb(239 241 243 / .55), rgb(26 34 44 / .45)) 60%, light-dark(rgb(239 241 243 / .35), rgb(26 34 44 / .3)) 100%),
    linear-gradient(180deg, transparent 55%, var(--paper) 100%);
}
:root:not([data-theme="light"]) .cover > figure img { filter: brightness(.8); }
/* Light mode: a brighter, bluer photo under a veil that runs from near white
   (behind the title) to light blue on the right, instead of gray. */
:root[data-theme="light"] .cover > figure img { filter: brightness(1.35) saturate(1.6); }
:root[data-theme="light"] .cover > figure::after {
  background:
    linear-gradient(90deg, rgb(248 251 254 / .95) 0%, rgb(240 248 254 / .86) 40%, rgb(214 236 252 / .62) 70%, rgb(190 226 250 / .45) 100%),
    linear-gradient(180deg, transparent 55%, var(--paper) 100%);
}
.cover hgroup { max-width: 62rem; }
.cover h1 { font-size: clamp(2.75rem, 1.5rem + 4vw, 4.5rem); }
.cover hgroup > :is(h1, h2) + p { color: var(--ink); }
@media (max-width: 720px) {
  .cover { min-height: 0; }
  ul.stats strong { font-size: 2rem; }
}

/* --- Header ------------------------------------------------------------------------- */
body > header { height: 5.25rem; border-bottom-color: var(--line); }
.logo svg { width: auto; height: auto; }
body > header .logo svg { width: 16.3rem; max-width: 100%; }
#menu { gap: 1.5rem; }
#menu a:not(.btn) { color: var(--muted); font-size: .875rem; transition: color .15s; }
#menu a:not(.btn):hover, #menu a[aria-current] { color: var(--title); }
#menu a[aria-current] { text-decoration: none; }
/* Wide screens: the current section is marked by a blue line on the bottom
   edge of the header, like a tab; pointing at a link shows a faint one. */
@media (min-width: 1081px) {
  body > header > nav { align-self: stretch; }
  #menu { height: 100%; }
  #menu > li { display: flex; align-items: center; align-self: stretch; }
  #menu a:not(.btn) { position: relative; display: flex; align-items: center; height: 100%; }
  #menu a:not(.btn)::after { content: ""; position: absolute; inset: auto 0 -1px; height: 2px; }
  #menu a:not(.btn):hover::after { background: color-mix(in srgb, var(--muted) 40%, transparent); }
  #menu a[aria-current]::after, #menu a[aria-current]:hover::after { background: var(--accent); }
}
/* Narrow screens: a blue bar beside the current section in the open menu. */
@media (max-width: 1080px) {
  #menu a[aria-current] { padding-left: .875rem; box-shadow: inset 2px 0 var(--accent); }
}
@media (max-width: 1240px) and (min-width: 1081px) {
  body > header { gap: 1.25rem; }
  body > header .logo svg { width: 11rem; }
  #menu { gap: 1rem; }
  #menu a:not(.btn) { font-size: .8125rem; }
  #menu .btn { padding-inline: 1rem; }
}
@media (max-width: 1080px) {
  #menu { inset: 5.25rem 0 auto; max-height: calc(100dvh - 5.25rem); }
  body > header .logo svg { width: 13.4rem; }
}
@media (max-width: 420px) {
  body > header { height: 4.5rem; }
  #menu { inset: 4.5rem 0 auto; max-height: calc(100dvh - 4.5rem); }
  body > header .logo svg { width: 11.5rem; }
}

/* --- Footer ------------------------------------------------------------------------- */
body > footer { background: var(--deep); border-top-color: var(--line); }
body > footer > div { grid-template-columns: minmax(0, 1.6fr) repeat(4, minmax(0, 1fr)); gap: 2rem; }
body > footer .logo { height: auto; margin: -4px 0 1.5rem; }   /* the stacked logo is set 4px high */
body > footer .logo svg { width: 12rem; }                       /* stacked logo */
body > footer h2 { margin-bottom: 1rem; line-height: 2; }
body > footer a { color: var(--muted); }
body > footer a:hover { color: var(--title); }
body > footer li:not(:has(a)) { color: var(--muted); opacity: .75; }
body > footer address a { color: var(--link); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--accent) 70%, transparent); }
body > footer address small { opacity: .8; }
body > footer .legal { border-top-color: var(--line); }
@media (max-width: 1080px) {
  body > footer > div { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body > footer > div > div:first-child { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  body > footer > div > div:last-child { grid-column: 1 / -1; }
}
@media (max-width: 359px) {
  body > footer > div { grid-template-columns: 1fr; }
}

/* --- Extensions --------------------------------------------------------------------- */
.profile figure[data-initials]::before, .person figure[data-initials]::before { color: var(--accent-text); }
.org { display: grid; justify-items: center; gap: 0; margin: 0; padding: 0; list-style: none; text-align: center; }
.org > li { width: min(100%, 26rem); padding: 1.5rem; border: 1px solid var(--line); background: var(--surface); }
.org > li + li { position: relative; margin-top: 2.5rem; }
.org > li + li::before { content: ""; position: absolute; left: 50%; top: -2.5rem; height: 2.5rem; border-left: 1px solid var(--accent); }
.org > li > p:first-child { margin: 0 0 .25rem; color: var(--label); font-size: .75rem; font-weight: 600; letter-spacing: .15em; text-transform: uppercase; }
.org > li > p:last-child { margin: .5rem 0 0; color: var(--muted); font-size: .9375rem; }
.org strong { font-size: 1.2rem; font-weight: 500; color: var(--title); }
