/* Bureau des Surfaces — the desk. 1 November 2026. Four routes, one sheet. */
@font-face { font-family: "AHN"; src: url("/fontes/AtkinsonHyperlegibleNext-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "AHN"; src: url("/fontes/AtkinsonHyperlegibleNext-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "AHN"; src: url("/fontes/AtkinsonHyperlegibleNext-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "AHM"; src: url("/fontes/atkinson-hyperlegible-mono-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }

:root {
  color-scheme: light dark;
  --bg: #fff; --fg: #111; --fg-muted: #5c6066; --rule-color: #c9ccd0; --accent: #14528f; --invert: none;
  --edge: 10px; --rail: 232px; --gap: 28px;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #0a0a0a; --fg: #ededed; --fg-muted: #a3a3a3; --rule-color: #3a3a3a; --accent: #67a8e9; --invert: invert(1); }
}
@media (prefers-contrast: more) { :root { --fg-muted: var(--fg); --rule-color: var(--fg); } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; padding: var(--edge);
  background: var(--bg); color: var(--fg);
  font: 400 15px/1.5 "AHN", system-ui, sans-serif;
  display: grid; grid-template-columns: var(--rail) minmax(0, 1fr);
  grid-template-areas: "rail main" "rail foot";
  column-gap: calc(var(--gap) * 1.5); row-gap: calc(var(--gap) * 2);
  min-height: 100vh; align-content: start;
}
a { color: var(--accent); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
p, ul, dl { margin: 0; }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Rail: the tower and the three doors */
header {
  grid-area: rail; align-self: start; position: sticky; top: var(--edge);
  display: flex; flex-direction: column; gap: 18px;
}
.wordmark { margin: 0; }
.wordmark a { display: block; }
.wordmark img { display: block; width: var(--rail); height: auto; filter: var(--invert); }
nav { color: var(--fg-muted); font-size: 14px; }
nav a { color: var(--fg); text-decoration: none; }
nav a:hover, nav a[aria-current="page"] { text-decoration: underline; }

/* Main */
main { grid-area: main; max-width: 1180px; }
h1 { font-weight: 500; font-size: 30px; line-height: 1.15; letter-spacing: -0.01em; margin: 0 0 18px; }
h2 { font-weight: 500; font-size: 17px; line-height: 1.3; margin: 0 0 6px; }
h3 { font-weight: 500; font-size: 17px; line-height: 1.3; margin: 0 0 6px; }
main > p { max-width: 62ch; }
main > p + p { margin-top: 8px; }
main > p:first-of-type { font-size: 22px; line-height: 1.3; font-weight: 500; }
main > p:first-of-type + p[lang="en"] { font-size: 22px; line-height: 1.3; font-weight: 500; margin-top: 2px; }
main > h1.vh + p { margin-top: 0; }

/* Home: the four blocks sit side by side */
main > section {
  border-top: 1px solid var(--rule-color); padding-top: 12px;
}
main:has(> section:not([id])) {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: var(--gap); row-gap: 10px;
}
main:has(> section:not([id])) > :not(section) { grid-column: 1 / -1; }
main:has(> section:not([id])) > section:first-of-type { margin-top: 26px; }
main:has(> section:not([id])) > section { margin-top: 26px; }

/* Offer: four cells, per language */
#fr, #en {
  border-top: 0; padding-top: 0;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: var(--gap); row-gap: 14px;
}
#fr > :not(section), #en > :not(section) { grid-column: 1 / -1; max-width: 62ch; }
#fr > section, #en > section {
  border-top: 1px solid var(--rule-color); padding-top: 12px; margin-top: 12px;
  display: flex; flex-direction: column; gap: 8px;
}
#fr > section > p:last-child, #en > section > p:last-child { margin-top: auto; padding-top: 6px; }
#fr > p:last-child, #en > p:last-child { margin-top: 10px; font-weight: 500; }
#en > h2 { font-size: 30px; line-height: 1.15; letter-spacing: -0.01em; margin-bottom: 4px; }
ul { padding-left: 1.1em; }
li + li { margin-top: 2px; }
hr { border: 0; border-top: 1px solid var(--rule-color); margin: 44px 0 40px; }

/* Footer: the line, then the notice folded */
footer {
  grid-area: foot; border-top: 1px solid var(--rule-color); padding-top: 12px;
  color: var(--fg-muted); font-size: 13px; max-width: 1180px;
}
footer > p + p { margin-top: 2px; }
footer > div { display: contents; }
details { display: inline-block; margin: 12px 24px 0 0; vertical-align: top; }
details[open] { display: block; margin-right: 0; }
summary { cursor: pointer; color: var(--fg); }
summary::marker { color: var(--fg-muted); }
details dl {
  margin-top: 10px; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 10px var(--gap);
}
dt { color: var(--fg-muted); font-size: 12px; }
dd { margin: 0; color: var(--fg); }

/* Narrow */
@media (max-width: 1100px) {
  main:has(> section:not([id])), #fr, #en { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  body { grid-template-columns: minmax(0, 1fr); grid-template-areas: "rail" "main" "foot"; row-gap: 28px; }
  header { position: static; }
  .wordmark img { width: 200px; }
  main:has(> section:not([id])), #fr, #en { grid-template-columns: minmax(0, 1fr); }
  h1, #en > h2 { font-size: 26px; }
  main > p:first-of-type, main > p:first-of-type + p[lang="en"] { font-size: 19px; }
}
@media print {
  body { display: block; }
  header { position: static; }
  details > *:not(summary) { display: block; }
}
