/* Datacenter wayfinding: flat sign panels, thick rules, square corners.
   Green means "go" or "you are here", nothing else. Contract: .impeccable/surfaces/ */
@font-face { font-family: Overpass; font-weight: 400; font-display: swap; src: url(fonts/overpass-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: Overpass; font-weight: 700; font-display: swap; src: url(fonts/overpass-latin-700-normal.woff2) format('woff2'); }
@font-face { font-family: Overpass; font-weight: 900; font-display: swap; src: url(fonts/overpass-latin-900-normal.woff2) format('woff2'); }

:root {
  --violet: #4a2fc4;
  --violet-deep: #33208c;
  --violet-light: #7855fa;
  --green: #b0d235;
  --ink: #1c2023;
  --board: #eef0f4;
  --white: #fff;
  --on-violet: #e4ddff;
  --muted: #474b57;
  --pad: clamp(56px, 7vw, 96px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; font: 400 1.0625rem/1.55 Overpass, system-ui, sans-serif; background: var(--board); color: var(--ink); }
html[lang=en] [lang=fr], html[lang=fr] [lang=en] { display: none; }
::selection { background: var(--green); color: var(--ink); }
:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; }
.directory :focus-visible, .platforms :focus-visible { outline-color: var(--violet); }
a { color: inherit; text-underline-offset: .2em; text-decoration-thickness: 2px; }
a:hover { text-decoration-color: var(--green); }
h1, h2, h3 { margin: 0; font-weight: 900; line-height: 1.05; letter-spacing: -.015em; text-wrap: balance; }
h2 { font-size: clamp(2rem, 4.5vw, 3.25rem); margin-bottom: 32px; }
h3 { font-size: 1.25rem; }
p { text-wrap: pretty; }
code { font: .875em ui-monospace, 'Cascadia Code', Menlo, monospace; overflow-wrap: anywhere; }
.wrap { width: min(1200px, 100% - 40px); margin-inline: auto; }
section[id] { scroll-margin-top: 8px; }

.skip { position: absolute; left: -999px; }
.skip:focus { left: 8px; top: 8px; z-index: 10; background: var(--white); color: var(--ink); padding: 8px 14px; }

.bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px;
  padding: 12px max(20px, (100% - 1200px) / 2); background: var(--ink); color: var(--white); }
/* lighten: the logo's own dark square melts into the bar, as in the application. */
.brand { display: flex; align-items: center; gap: 14px; font-size: clamp(1.25rem, 2.6vw, 1.75rem); font-weight: 900; line-height: 1.1; text-decoration: none; }
.brand img { flex: none; width: clamp(48px, 6vw, 64px); height: auto; mix-blend-mode: lighten; }
.bar nav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; }
.bar nav a { font-weight: 700; text-decoration: none; padding: 6px 0; }
.bar nav a:hover { text-decoration: underline; }
.bar-kofi { display: flex; }
.bar-kofi img { object-fit: contain; transition: transform .2s cubic-bezier(.16, 1, .3, 1); }
.bar-kofi:hover img { transform: scale(1.15); }
.langs { display: flex; border: 2px solid var(--white); }
.langs button { font: 700 .875rem/1 Overpass, system-ui, sans-serif; padding: 8px 10px; min-width: 40px; border: 0; background: none; color: var(--white); cursor: pointer; }
.langs button[aria-pressed=true] { background: var(--white); color: var(--ink); }

.hero { background: var(--violet); color: var(--white); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 48px; align-items: end; padding-block: var(--pad) 48px; }
h1 { font-size: clamp(2.75rem, 6.4vw, 5.25rem); line-height: .98; letter-spacing: -.03em; }
h1 em { font-style: normal; white-space: nowrap; }
.lead { max-width: 56ch; margin: 28px 0 0; color: var(--on-violet); font-size: 1.1875rem; }

.sign { border-top: 10px solid var(--green); }
.go { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 24px; background: var(--green); color: var(--ink); text-decoration: none; }
.go-label { display: grid; line-height: 1.1; }
.go-verb { font-size: clamp(1.75rem, 3vw, 2.5rem); font-weight: 900; }
.go-os { font-weight: 700; margin-top: 6px; }
.go svg { flex: none; transition: transform .25s cubic-bezier(.16, 1, .3, 1); }
.go:hover { background: #c3e64a; }
.go:hover svg { transform: translateY(6px); }
.go:focus-visible { outline-color: var(--white); }
.sign p { margin: 16px 0 0; color: var(--on-violet); font-size: .9375rem; }
.sign p a { color: var(--white); font-weight: 700; }

/* The tool's own banner: the server room the signs point into. Its left part is blank, so it is cropped right. */
.racks { height: clamp(100px, 11vw, 160px); background: #1c2023 url(assets/banner.jpg) right center / cover no-repeat; border-top: 6px solid var(--ink); }

.route { background: var(--ink); color: var(--white); padding-block: var(--pad); }
.route ol { display: grid; grid-template-columns: repeat(4, 1fr); margin: 0; padding: 0; list-style: none; }
.route li { position: relative; padding: 52px 24px 0 0; }
/* Station marker and the line to the next one. */
.route li::before { content: ''; position: absolute; z-index: 1; top: 0; left: 0; width: 28px; height: 28px; border: 6px solid var(--white); border-radius: 50%; background: var(--ink); }
.route li:not(:last-child)::after { content: ''; position: absolute; top: 11px; left: 28px; right: 0; height: 6px; background: var(--white); }
.route li.optional::before { border-style: dotted; border-width: 5px; }
.route li.arrive::before { border-color: var(--green); background: var(--green); box-shadow: 0 0 0 5px var(--ink), 0 0 0 9px var(--green); }
.route li p { margin: 10px 0 0; color: #c8cbd6; font-size: .9375rem; }

.shots { padding-block: var(--pad); background: var(--white); }
/* Column ratio chosen so the app screen and the two stacked pictures end level. */
.gallery { display: grid; grid-template-columns: minmax(0, 638fr) minmax(0, 538fr); gap: 32px 24px; align-items: start; }
.gallery figure { margin: 0; border-top: 6px solid var(--ink); }
.gallery .wide { grid-column: 1 / -1; }
.gallery a { display: block; text-decoration: none; }
.gallery a:hover figcaption { text-decoration: underline; text-decoration-color: var(--violet); }
.gallery img { display: block; width: 100%; height: auto; }
.gallery figcaption { margin-top: 10px; font-size: .9375rem; color: var(--muted); }
.stack { display: grid; gap: 32px; }
.gallery img[src$="diagram.png"] { border: 1px solid #dcdee6; border-top: 0; }
.shots :focus-visible { outline-color: var(--violet); }
@media (max-width: 860px) { .gallery { grid-template-columns: minmax(0, 1fr); } }
.directory { padding-block: var(--pad); }
.intro { max-width: 60ch; margin: -16px 0 8px; color: var(--muted); }
.legend { display: flex; align-items: center; gap: 10px; margin: 0 0 32px; font-size: .9375rem; color: var(--muted); }
.opt-mark { width: 10px; height: 10px; flex: none; border: 2px solid var(--violet); border-radius: 50%; }
.boards { columns: 3 300px; column-gap: 20px; }
.board { break-inside: avoid; margin: 0 0 20px; background: var(--white); }
.board h3 { padding: 16px 18px; background: var(--violet-deep); color: var(--white); }
.board h3 small { display: block; margin-bottom: 2px; font-size: .875rem; font-weight: 400; color: var(--on-violet); }
.board ul { margin: 0; padding: 6px 18px 12px; list-style: none; }
.board li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 7px 0; border-bottom: 1px solid #dcdee6; font-size: .9375rem; line-height: 1.35; }
.board li:last-child { border: 0; }
.board li.opt { color: var(--muted); }
.board li.opt::after { content: ''; width: 10px; height: 10px; flex: none; border: 2px solid var(--violet); border-radius: 50%; }

.rules { background: var(--violet-deep); color: var(--white); padding-block: var(--pad); }
.rules dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 40px 48px; margin: 0; }
.rules dl div { border-top: 6px solid var(--violet-light); padding-top: 16px; }
.rules dt { font-size: 1.375rem; font-weight: 900; line-height: 1.15; }
.rules dd { margin: 10px 0 0; color: var(--on-violet); max-width: 46ch; }

.platforms { padding-block: var(--pad); background: var(--white); }
.platforms ul { margin: 0; padding: 0; list-style: none; border-top: 6px solid var(--ink); }
.platforms li { border-bottom: 2px solid var(--ink); }
.platforms li a { display: grid; grid-template-columns: 15rem 1fr auto; gap: 6px 24px; align-items: baseline; padding: 18px 12px; text-decoration: none; }
.platforms li a:hover { background: var(--board); }
.platforms li a:hover strong { text-decoration: underline; text-decoration-color: var(--violet); }
.platforms li a[aria-current] { background: var(--green); }
.platforms li strong { font-size: 1.25rem; font-weight: 900; }
.platforms h3 { margin: 48px 0 12px; }
.notes { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 8px 48px; }
.notes p { margin: 0; max-width: 60ch; }
.notes strong { display: block; }
.notes code { display: block; margin-top: 10px; padding: 10px 12px; background: var(--board); user-select: all; }
.all { margin: 32px 0 0; font-weight: 700; }

footer { background: var(--ink); color: #c8cbd6; padding-block: 48px; font-size: .9375rem; }
footer p { margin: 16px 0 0; max-width: 75ch; }
footer a { color: var(--white); }
.kofi { display: inline-flex; align-items: center; gap: 10px; padding: 10px 16px; border: 2px solid var(--white); font-weight: 700; text-decoration: none; }
.kofi:hover { background: var(--violet); }
.kofi img { object-fit: contain; }

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; align-items: start; gap: 32px; }
  .route ol { grid-template-columns: 1fr; }
  .route li { padding: 0 0 28px 52px; }
  .route li:last-child { padding-bottom: 0; }
  .route li:not(:last-child)::after { top: 28px; bottom: 0; left: 11px; right: auto; width: 6px; height: auto; }
  .platforms li a { grid-template-columns: 1fr; }
  .platforms li code { color: var(--muted); }
  .platforms li a[aria-current] code { color: var(--ink); }
}

/* One authored moment: the route draws itself as it scrolls into view. Static where unsupported. */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .route li:not(:last-child)::after { animation: draw linear both; animation-timeline: view(); animation-range: entry 20% cover 40%; transform-origin: left top; }
  }
}
@keyframes draw { from { scale: 0 1; } }
@media (max-width: 860px) { @keyframes draw { from { scale: 1 0; } } }
