/* ROC3: technical, calm, precise. One page, its own files only (fonts included), light and dark by the
   system's choice. */

@font-face {
  font-family: "Saira";
  src: url("/fonts/saira-latin-wght.woff2") format("woff2-variations"), url("/fonts/saira-latin-wght.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("/fonts/inter-latin-wght.woff2") format("woff2-variations"), url("/fonts/inter-latin-wght.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: light dark;
  --bg: #f6f8fb;
  --surface: #ffffff;
  --surface-2: #f1f4f9;
  --text: #121826;
  --muted: #5b667a;
  --line: #e2e7ef;
  --line-strong: #cfd7e3;
  --accent: hsl(208 88% 40%);
  --accent-text: hsl(208 88% 34%);
  --accent-soft: hsl(208 90% 96%);
  --accent-line: hsl(208 70% 80%);
  --grid: rgb(18 24 38 / 0.05);
  --glow: hsl(208 90% 50% / 0.16);
  --shadow: 0 1px 2px rgb(18 24 38 / 0.04), 0 10px 30px -18px rgb(18 24 38 / 0.25);
  --mono: ui-monospace, "JetBrains Mono", "SFMono-Regular", Menlo, Consolas, monospace;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Saira", "Inter", system-ui, sans-serif;
}

/* a soft slate, not black: easy on the eyes */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: hsl(220 16% 14%);
    --surface: hsl(220 15% 17%);
    --surface-2: hsl(220 13% 21%);
    --text: hsl(220 14% 86%);
    --muted: hsl(220 9% 62%);
    --line: hsl(220 12% 25%);
    --line-strong: hsl(220 12% 30%);
    --accent: hsl(208 70% 60%);
    --accent-text: hsl(208 70% 72%);
    --accent-soft: hsl(208 60% 60% / 0.12);
    --accent-line: hsl(208 60% 60% / 0.3);
    --grid: rgb(255 255 255 / 0.04);
    --glow: hsl(208 80% 55% / 0.12);
    --shadow: 0 10px 30px -20px rgb(0 0 0 / 0.6);
  }
}

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

/* thin scrollbars in the theme's colours, quiet until needed (as in the vault) */
* {
  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--muted) 30%, transparent) transparent;
}

/* the scrollbar always there, so nothing shifts */
html {
  overflow-y: scroll;
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}

main {
  flex: 1 0 auto;
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3,
p {
  margin: 0;
}

.wrap {
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ----- top bar ----- */

.top {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(10px);
}

.top-in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 60px;
}

.wordmark {
  font: 700 24px/1 var(--display);
  letter-spacing: 0.02em;
  color: var(--text);
}

.wordmark .three {
  color: var(--accent);
}

.top-nav {
  display: flex;
  gap: 4px;
}

.top-nav a {
  padding: 6px 10px;
  border-radius: 8px;
  font: 600 11px/1.4 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.2s, background-color 0.2s;
}

.top-nav a:hover,
.top-nav a:focus-visible {
  color: var(--accent-text);
  background: var(--accent-soft);
}

/* ----- hero: a faint engineering grid and a glow behind it ----- */

.hero {
  position: relative;
  isolation: isolate;
  padding: 88px 0 72px;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 28px 28px;
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 0%, #000 35%, transparent 80%);
  mask-image: radial-gradient(ellipse 80% 70% at 50% 0%, #000 35%, transparent 80%);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 460px;
  z-index: -1;
  background: radial-gradient(55% 70% at 50% 0%, var(--glow), transparent 70%);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border: 1px solid var(--accent-line);
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-text);
  font: 600 11px/1.4 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

h1 {
  margin-top: 22px;
  font: 700 clamp(38px, 6.4vw, 64px)/1.04 var(--display);
  letter-spacing: -0.015em;
}

.lead {
  margin-top: 20px;
  max-width: 640px;
  font-size: 18px;
  line-height: 1.6;
  color: var(--muted);
}

/* Rigour · Orchestration · Control: the initials carry the accent */
.signature {
  margin-top: 28px;
  font: 500 13px/1.4 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.signature b {
  font-weight: 700;
  color: var(--accent-text);
}

.signature i {
  font-style: normal;
  margin: 0 0.35em;
  opacity: 0.6;
}

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

.section {
  padding: 40px 0;
}

.section-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.chip {
  padding: 5px 8px;
  border-radius: 6px;
  font: 700 11px/1 var(--mono);
  letter-spacing: 0.08em;
  background: var(--text);
  color: var(--bg);
}

@media (prefers-color-scheme: dark) {
  .chip {
    background: var(--accent-soft);
    color: var(--accent-text);
    box-shadow: inset 0 0 0 1px var(--accent-line);
  }
}

h2 {
  font: 650 22px/1.25 var(--display);
  letter-spacing: -0.005em;
}

h3 {
  font-size: 16px;
  font-weight: 650;
  line-height: 1.35;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 20px;
}

.card {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow);
  transition: border-color 0.2s, transform 0.2s;
}

.card:hover {
  border-color: var(--accent-line);
}

.card p,
.tile p {
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
  text-align: justify;
  hyphens: auto;
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  color: var(--accent);
  background: var(--accent-soft);
}

.icon svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.spec {
  font: 600 10px/1.4 var(--mono);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent-text);
  text-align: right;
}

/* the method: a large initial, the word, then what it means in practice */
.principle {
  position: relative;
  overflow: hidden;
}

.letter {
  display: block;
  font: 700 64px/0.9 var(--display);
  color: var(--accent);
  opacity: 0.9;
}

.word {
  display: block;
  margin: 10px 0 12px;
  font: 600 11px/1.4 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.panel {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.panel-lead {
  max-width: 760px;
  font-size: 16px;
  line-height: 1.65;
  text-align: justify;
  hyphens: auto;
}

.tile {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-2);
}

.tile h3 {
  margin-top: 12px;
  font-size: 14px;
}

.tile p {
  font-size: 13px;
  text-align: left;
}

/* the estate: platforms by kind, each kind a small panel of tags */
.estate {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 12px;
}

.estate-group {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}

/* the clouds first, across the whole row; European ones marked */
.estate-group--wide {
  grid-column: 1 / -1;
}

.estate-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 12px;
  margin-bottom: 12px;
}

.estate-legend {
  font: 500 11px/1.4 var(--mono);
  color: var(--muted);
}

.eu-mark,
.tags li.eu::after {
  display: inline-block;
  padding: 1px 4px;
  border-radius: 4px;
  font: 700 9px/1.3 var(--mono);
  letter-spacing: 0.06em;
  vertical-align: 1px;
  color: var(--accent-text);
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px var(--accent-line);
}

.tags li.eu::after {
  content: "EU";
  margin-left: 6px;
}

.estate-label {
  display: block;
  font: 600 10.5px/1.4 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-text);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tags li {
  padding: 5px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface-2);
  font: 500 12px/1.2 var(--mono);
  color: var(--text);
}

/* ----- the closing band ----- */

.band {
  margin-top: 48px;
  padding: 40px 0 44px;
  border-top: 1px solid var(--line);
  background: var(--surface-2);
}

.band-in {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.band-title {
  font: 700 clamp(24px, 3.4vw, 32px)/1.15 var(--display);
}

.band-sub {
  margin-top: 8px;
  color: var(--muted);
}

.band-end {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.wordmark-small {
  font-size: 20px;
}

.signature-small {
  margin: 0;
  font-size: 11px;
  letter-spacing: 0.12em;
}

/* ----- narrower screens ----- */

@media (max-width: 880px) {
  .grid-3 {
    grid-template-columns: 1fr;
  }

  .grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .wrap {
    padding: 0 16px;
  }

  .top-nav {
    display: none;
  }

  .hero {
    padding: 56px 0 48px;
  }

  .lead {
    font-size: 16px;
  }

  .signature {
    letter-spacing: 0.08em;
  }

  .grid-4 {
    grid-template-columns: 1fr;
  }

  .panel {
    padding: 18px;
  }

  .band-end {
    align-items: flex-start;
  }
}

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