/* amacepfl.ch — design system and components.
   Technical and precise: ink and paper, one accent (the AMAC red), IBM Plex Sans for text and titles,
   IBM Plex Mono for data. Every value comes from the tokens below; components never hard-code one. */

@font-face { font-family: "IBM Plex Sans"; src: url(/fonts/ibm-plex-sans-latin-400-normal.woff2) format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url(/fonts/ibm-plex-sans-latin-400-italic.woff2) format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url(/fonts/ibm-plex-sans-latin-500-normal.woff2) format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url(/fonts/ibm-plex-sans-latin-600-normal.woff2) format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url(/fonts/ibm-plex-mono-latin-400-normal.woff2) format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }

/* ---------------------------------------------------------------------------------------------
   Tokens
   --------------------------------------------------------------------------------------------- */
:root {
  /* Palette: neutrals with a little warmth, like drawing paper, and one accent. */
  --ink-950: #0E0F11;
  --ink-900: #16171A;
  --ink-800: #222428;
  --ink-700: #34363B;
  --ink-500: #5D6067;
  --ink-300: #A3A6AD;
  --ink-200: #D3D3CE;
  --ink-100: #E5E4DF;
  --paper-50: #F6F5F1;
  --white: #FFFFFF;
  --red-600: #E30613;   /* white text on it: 4.8:1 */
  --red-700: #B8000E;   /* hover and pressed */

  /* Roles (light theme by default; .theme-dark swaps them). */
  --bg: var(--paper-50);
  --surface: var(--white);
  --fg: var(--ink-900);
  --fg-2: var(--ink-700);
  --muted: var(--ink-500);   /* 6.0:1 on --bg */
  --rule: var(--ink-200);
  --rule-soft: var(--ink-100);
  --accent: var(--red-600);
  --accent-strong: var(--red-700);
  --accent-text: var(--red-700);   /* red text: 6.3:1 on --bg (--red-600 is only 4.5:1) */
  --on-accent: var(--white);
  --focus: var(--red-600);

  /* Type: two families, a modular scale (ratio 1.25 from 17 px), large sizes fluid. */
  --font-sans: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --text-xs: 0.8125rem;   /* 13 */
  --text-sm: 0.9375rem;   /* 15 */
  --text-md: 1.0625rem;   /* 17 */
  --text-lg: 1.3125rem;   /* 21 */
  --text-xl: 1.625rem;    /* 26 */
  --text-2xl: clamp(1.875rem, 1.45rem + 1.8vw, 2.5rem);    /* 30 → 40 */
  --text-3xl: clamp(2.25rem, 1.5rem + 3.2vw, 3.75rem);     /* 36 → 60 */
  --weight-regular: 400;
  --weight-medium: 500;
  --weight-semibold: 600;
  --leading-tight: 1.05;
  --leading-snug: 1.2;
  --leading-body: 1.6;
  --tracking-title: -0.02em;
  --tracking-mono: 0.04em;
  --measure: 66ch;

  /* Space: 4 px for fine adjustments, then steps of 8. */
  --space-1: 0.25rem;  /* 4 */
  --space-2: 0.5rem;   /* 8 */
  --space-3: 0.75rem;  /* 12 */
  --space-4: 1rem;     /* 16 */
  --space-5: 1.5rem;   /* 24 */
  --space-6: 2rem;     /* 32 */
  --space-7: 3rem;     /* 48 */
  --space-8: 4rem;     /* 64 */
  --space-9: 6rem;     /* 96 */
  --space-10: 8rem;    /* 128 */
  --section: clamp(var(--space-8), 10vw, var(--space-10));

  /* Layout */
  --page: 80rem;        /* 1280 */
  --gutter: clamp(var(--space-4), 4vw, var(--space-7));
  --columns: 12;
  --column-gap: var(--space-5);
  --header-height: 4.5rem;

  /* Shape and motion */
  --border: 1px;
  --radius-sm: 2px;     /* buttons, fields */
  --radius-md: 4px;     /* images, placeholders */
  --duration-fast: 150ms;
  --duration: 240ms;
  --ease: cubic-bezier(.2, 0, 0, 1);
}

.theme-dark {
  --bg: var(--ink-950);
  --surface: var(--ink-900);
  --fg: var(--paper-50);
  --fg-2: var(--ink-200);
  --muted: var(--ink-300);   /* 8.3:1 on --bg */
  --rule: var(--ink-700);
  --rule-soft: var(--ink-800);
  --focus: var(--paper-50);
  --accent-text: var(--fg);
}

/* ---------------------------------------------------------------------------------------------
   Base
   --------------------------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font: var(--weight-regular) var(--text-md)/var(--leading-body) var(--font-sans); -webkit-font-smoothing: antialiased; }
img, picture, svg { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { margin: 0; font-weight: var(--weight-semibold); letter-spacing: var(--tracking-title); line-height: var(--leading-snug); text-wrap: balance; }
h1 { font-size: var(--text-3xl); line-height: var(--leading-tight); }
h2 { font-size: var(--text-2xl); }
h3 { font-size: var(--text-lg); }
p { margin: 0; max-width: var(--measure); text-wrap: pretty; }
p + p { margin-top: var(--space-4); }
a { color: inherit; text-decoration-thickness: var(--border); text-underline-offset: 0.2em; transition: color var(--duration-fast) var(--ease), text-decoration-color var(--duration-fast) var(--ease); }
a:hover { color: var(--accent-text); }
.theme-dark a:hover { text-decoration-color: var(--accent); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: var(--radius-sm); }
::selection { background: var(--accent); color: var(--on-accent); }
.skip-link { position: absolute; left: var(--space-4); top: var(--space-4); z-index: 100; padding: var(--space-2) var(--space-4); background: var(--fg); color: var(--bg); transform: translateY(-200%); }
.skip-link:focus { transform: none; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Small technical labels: section names, dates, data. */
.label { display: block; font: var(--weight-regular) var(--text-xs)/var(--leading-snug) var(--font-mono); letter-spacing: var(--tracking-mono); text-transform: uppercase; color: var(--muted); }
.lead { font-size: var(--text-lg); line-height: var(--leading-snug); color: var(--fg-2); }
.muted { color: var(--muted); }
.mono { font-family: var(--font-mono); font-size: var(--text-sm); }

/* ---------------------------------------------------------------------------------------------
   Layout
   --------------------------------------------------------------------------------------------- */
.container { width: 100%; max-width: calc(var(--page) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
.grid { display: grid; grid-template-columns: repeat(var(--columns), minmax(0, 1fr)); column-gap: var(--column-gap); row-gap: var(--space-6); }
.section { padding-block: var(--section); border-top: var(--border) solid var(--rule); }
/* A section reads like a spec sheet: its name on the left, its content on the right. */
.section-head { grid-column: 1 / -1; }
.section-body { grid-column: 1 / -1; }
.section-head .label { margin-bottom: var(--space-3); }
.section-head p { margin-top: var(--space-4); color: var(--fg-2); }

/* ---------------------------------------------------------------------------------------------
   Header and navigation
   --------------------------------------------------------------------------------------------- */
.site-header { position: relative; z-index: 10; border-bottom: var(--border) solid var(--rule); background: var(--bg); }
.site-header.over { position: absolute; inset: 0 0 auto; border-color: transparent; background: none; }
.header-in { display: flex; align-items: center; gap: var(--space-6); min-height: var(--header-height); }
.brand { display: inline-flex; flex: none; }
.brand img { height: 2rem; width: auto; }
.nav { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-5); margin: 0 0 0 auto; padding: 0; list-style: none; }
.nav a { display: inline-block; padding-block: var(--space-2); font-size: var(--text-sm); text-decoration: none; border-bottom: 2px solid transparent; }
.nav a[aria-current="page"] { border-bottom-color: var(--accent); }
.menu-toggle { display: none; margin-left: auto; height: 2.5rem; padding: 0 var(--space-4); border: var(--border) solid var(--rule); border-radius: var(--radius-sm); background: none; color: var(--fg); font: var(--weight-medium) var(--text-sm) var(--font-sans); cursor: pointer; }
.menu-toggle:hover { border-color: var(--fg); }

/* ---------------------------------------------------------------------------------------------
   Buttons and links
   --------------------------------------------------------------------------------------------- */
.button { display: inline-flex; align-items: center; gap: var(--space-2); min-height: 3rem; padding: 0 var(--space-5); border: var(--border) solid transparent; border-radius: var(--radius-sm);
  font: var(--weight-medium) var(--text-md)/1 var(--font-sans); text-decoration: none; cursor: pointer;
  transition: background-color var(--duration-fast) var(--ease), border-color var(--duration-fast) var(--ease), color var(--duration-fast) var(--ease); }
.button-primary { background: var(--accent); color: var(--on-accent); }
.button-primary:hover, .theme-dark .button-primary:hover { background: var(--accent-strong); color: var(--on-accent); }
.button-primary:active { background: var(--accent-strong); box-shadow: inset 0 2px 0 rgb(0 0 0 / .2); }
.button-secondary { border-color: var(--rule); color: var(--fg); }
.button-secondary:hover { border-color: var(--fg); color: var(--fg); }
.button[aria-disabled="true"], .button:disabled { opacity: .45; pointer-events: none; }
.arrow-link { display: inline-flex; align-items: center; gap: var(--space-2); font-weight: var(--weight-medium); text-decoration: none; }
.arrow-link::after { content: "→"; transition: transform var(--duration-fast) var(--ease); }
.arrow-link:hover::after { transform: translateX(var(--space-1)); }
/* inline-block: the arrow is not underlined with the link, and it can move. */
.external::after { content: "↗"; display: inline-block; margin-left: 0.15em; transition: transform var(--duration-fast) var(--ease); }
.external:hover::after { transform: translate(0.125em, -0.125em); }

/* ---------------------------------------------------------------------------------------------
   Home: photo, title block, rows
   --------------------------------------------------------------------------------------------- */
.hero { position: relative; display: flex; align-items: flex-end; min-height: min(92svh, 56rem); padding-top: var(--header-height); color: var(--paper-50); isolation: isolate; }
.hero-photo { position: absolute; inset: 0; z-index: -1; }
.hero-photo picture { height: 100%; }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 60%; }
/* Darkens the photo for the text: plain black, strongest at the bottom where the text sits. */
.hero-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgb(14 15 17 / .92) 0%, rgb(14 15 17 / .55) 45%, rgb(14 15 17 / .3) 100%); }
.hero-in { padding-block: var(--space-8) var(--space-7); }
.wordmark { width: min(100%, 40rem); margin-bottom: var(--space-6); }
.hero h1 { max-width: 20ch; font-size: var(--text-2xl); font-weight: var(--weight-medium); }
.hero .lead { margin-top: var(--space-4); color: var(--ink-200); }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-5); margin-top: var(--space-6); }
.hero-caption { position: absolute; right: var(--gutter); bottom: var(--space-7); color: var(--ink-300); }

/* Title block, as in the corner of a technical drawing. */
.cartouche { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; border-top: var(--border) solid var(--rule); border-left: var(--border) solid var(--rule); }
.cartouche div { padding: var(--space-4); border-right: var(--border) solid var(--rule); border-bottom: var(--border) solid var(--rule); }
.cartouche dt { margin-bottom: var(--space-1); }
.cartouche dd { margin: 0; font-size: var(--text-sm); }
.cartouche a { text-decoration: none; }

/* The gear train (public/js/assemblage.js): a canvas with numbered balloons, and its parts list. The
   canvas only takes room once the script has found WebGL (class .live); it fades in when drawn. */
.section-wide .section-head, .section-wide .section-body { grid-column: 1 / -1; }
.section-wide .section-head p { max-width: var(--measure); }
.assemblage { display: grid; gap: var(--space-6); margin-top: var(--space-6); }
.assemblage-view { display: none; position: relative; aspect-ratio: 1 / 1; overflow: hidden; }
.assemblage-view.live { display: block; }
.assemblage-view canvas { display: block; width: 100%; height: 100%; opacity: 0; cursor: grab; touch-action: pan-y; transition: opacity var(--duration) var(--ease); }
.assemblage-view canvas:active { cursor: grabbing; }
.assemblage-view.ready canvas { opacity: 1; }
.balloon { position: absolute; left: 0; top: 0; display: grid; place-items: center; width: var(--space-5); height: var(--space-5); border: var(--border) solid var(--fg-2);
  border-radius: 50%; background: var(--bg); font: var(--weight-regular) var(--text-xs)/1 var(--font-mono); pointer-events: none; opacity: 0; transition: opacity var(--duration) var(--ease); }
.assemblage-view.open .balloon { opacity: 1; }
.balloon.active { border-color: var(--accent); background: var(--accent); color: var(--on-accent); }
.assemblage-tooltip { position: absolute; left: 0; top: 0; margin: var(--space-4) 0 0 var(--space-4); padding: var(--space-1) var(--space-2); border-radius: var(--radius-sm);
  background: var(--fg); color: var(--bg); font: var(--weight-regular) var(--text-xs)/1.4 var(--font-mono); white-space: nowrap; pointer-events: none; }
.assemblage-hint { position: absolute; left: 0; top: 0; color: var(--muted); transition: opacity var(--duration) var(--ease); }
.assemblage-view.turned .assemblage-hint { opacity: 0; }
.nomenclature ol { margin: var(--space-3) 0 0; padding: 0; list-style: none; border-top: var(--border) solid var(--rule); }
.nomenclature button { display: grid; grid-template-columns: var(--space-6) minmax(0, 1fr); column-gap: var(--space-2); width: 100%; padding: var(--space-3) 0 var(--space-3) var(--space-3);
  border: 0; border-left: 2px solid transparent; border-bottom: var(--border) solid var(--rule); background: none; color: inherit; font: inherit; text-align: left; cursor: pointer;
  transition: border-color var(--duration-fast) var(--ease); }
.nomenclature button:hover, .nomenclature button.active { border-left-color: var(--accent); }
.nomenclature .rep { grid-row: span 3; font: var(--weight-regular) var(--text-lg)/1.2 var(--font-mono); color: var(--muted); }
.nomenclature button.active .rep { color: var(--fg); }
.nomenclature b { font-weight: var(--weight-medium); }
.nomenclature small { color: var(--fg-2); font-size: var(--text-sm); }

/* A list of rows separated by rules: services, documents. */
.rows { margin: 0; padding: 0; list-style: none; border-top: var(--border) solid var(--rule); }
.row { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-3); padding-block: var(--space-6); border-bottom: var(--border) solid var(--rule); }
.row h3 { font-size: var(--text-lg); }
.row p { color: var(--fg-2); }
.row-meta { color: var(--muted); font-size: var(--text-sm); }
.row .arrow-link, .row .table-scroll, .row .swatches { margin-top: var(--space-3); }
.actions { margin-top: var(--space-5); }
.links { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-5); font-size: var(--text-sm); }

.events { margin: 0; padding: 0; list-style: none; border-top: var(--border) solid var(--rule); }
.event { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--space-2) var(--space-5); align-items: baseline; padding-block: var(--space-5); border-bottom: var(--border) solid var(--rule); text-decoration: none; }
.event:hover { color: inherit; }
.event:hover h3 { color: var(--accent-text); }
.theme-dark .event:hover h3 { text-decoration: underline; text-decoration-color: var(--accent); }
.event-date { grid-row: span 3; min-width: 5ch; font: var(--weight-regular) var(--text-2xl)/1 var(--font-mono); letter-spacing: var(--tracking-title); }
.event-date small { display: block; margin-top: var(--space-1); font-size: var(--text-xs); letter-spacing: var(--tracking-mono); text-transform: uppercase; color: var(--muted); }
.event h3 { transition: color var(--duration-fast) var(--ease); }
.event p { color: var(--fg-2); font-size: var(--text-sm); }
.event h3, .event p, .event .arrow-link { grid-column: 2; }
.event .arrow-link { margin-top: var(--space-2); }
.status { display: inline-flex; align-items: center; gap: var(--space-2); }
.status::before { content: ""; width: var(--space-2); height: var(--space-2); background: var(--muted); }
.status.open::before { background: var(--accent); }

/* A pole: a photo and its text, side by side from the tablet up. */
.poles { margin: 0; padding: 0; list-style: none; }
.pole { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-5); padding-block: var(--space-7); border-bottom: var(--border) solid var(--rule); }
.pole:first-child { padding-top: 0; }
.pole h3 { font-size: var(--text-xl); }
.pole p { margin-top: var(--space-3); color: var(--fg-2); }
.pole .links { margin-top: var(--space-4); }
.pole-meta { margin-top: var(--space-4); color: var(--muted); font-size: var(--text-sm); }
.figure { margin: 0; }
.figure img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--radius-md); }
.figure figcaption { margin-top: var(--space-2); }

/* Missing information, shown on purpose rather than invented. */
.todo { display: grid; place-items: center; padding: var(--space-5); border: var(--border) dashed var(--accent); border-radius: var(--radius-md); color: var(--accent-text); font: var(--weight-regular) var(--text-sm)/var(--leading-snug) var(--font-mono); text-align: center; }
.todo-inline { color: var(--accent-text); font-family: var(--font-mono); font-size: 0.9em; }
.theme-dark .todo-inline { text-decoration: underline dashed var(--accent); }
.figure .todo { aspect-ratio: 3 / 2; }

.price-table { width: 100%; border-collapse: collapse; font-size: var(--text-sm); }
.price-table th, .price-table td { padding: var(--space-3) var(--space-4) var(--space-3) 0; border-bottom: var(--border) solid var(--rule); text-align: left; vertical-align: top; }
.price-table th { font: var(--weight-regular) var(--text-xs) var(--font-mono); letter-spacing: var(--tracking-mono); text-transform: uppercase; color: var(--muted); }
.price-table td + td { font-family: var(--font-mono); white-space: nowrap; }
.table-scroll { overflow-x: auto; }

.swatches { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-3); }
.swatches img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius-md); background: var(--white); }

.contact-mail { display: inline-block; font-size: var(--text-3xl); font-weight: var(--weight-medium); letter-spacing: var(--tracking-title); line-height: var(--leading-tight); text-decoration: none; overflow-wrap: anywhere; }
.contact-list { margin-top: var(--space-6); }

/* ---------------------------------------------------------------------------------------------
   Inner pages
   --------------------------------------------------------------------------------------------- */
.page-head { padding-block: var(--space-9) var(--space-8); }
.page-head h1 { margin-top: var(--space-3); max-width: 22ch; }
.page-head .lead { margin-top: var(--space-5); }
/* A wide photo under the page title: the campus, cut as a band. */
.page-photo { margin-block: 0 var(--space-8); }
.page-photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius-md); }
/* Fixed layout: the tables of one page share the same columns. */
.data-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.data-table td { overflow-wrap: anywhere; }
.data-table th, .data-table td { padding: var(--space-4) var(--space-4) var(--space-4) 0; border-bottom: var(--border) solid var(--rule); text-align: left; vertical-align: top; font-size: var(--text-sm); }
.data-table th { font: var(--weight-regular) var(--text-xs) var(--font-mono); letter-spacing: var(--tracking-mono); text-transform: uppercase; color: var(--muted); }
.data-table td:first-child { color: var(--muted); }
.data-table td:first-child a { color: var(--fg); }
.data-table a { text-decoration-color: var(--rule); }
.data-table a:hover { color: var(--accent-text); text-decoration-color: currentColor; }
.definitions { display: grid; grid-template-columns: minmax(0, 1fr); margin: 0; border-top: var(--border) solid var(--rule); }
.definitions div { display: grid; gap: var(--space-1); padding-block: var(--space-4); border-bottom: var(--border) solid var(--rule); }
.definitions dt { font-weight: var(--weight-medium); }
.definitions dd { margin: 0; color: var(--fg-2); font-size: var(--text-sm); }
.definitions dt small { display: block; margin-top: var(--space-1); color: var(--muted); }
/* The goals of the statutes, numbered a, b, c as in article 4. */
.goals { margin: 0 0 var(--space-5); padding: 0; list-style: none; counter-reset: goal; border-top: var(--border) solid var(--rule); }
.goals li { display: grid; grid-template-columns: var(--space-6) minmax(0, 1fr); padding-block: var(--space-4); border-bottom: var(--border) solid var(--rule); counter-increment: goal; }
.goals li::before { content: counter(goal, lower-alpha) "."; font-family: var(--font-mono); color: var(--muted); }

/* Members: a name (linked to the EPFL directory) and its role, one per line. */
.groups { display: grid; gap: var(--space-7); }
.group h3 { margin-bottom: var(--space-3); font-size: var(--text-lg); }
.roster { margin: 0; padding: 0; list-style: none; border-top: var(--border) solid var(--rule); }
.roster li { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--space-1) var(--space-4); padding-block: var(--space-3); border-bottom: var(--border) solid var(--rule); }
.roster a { text-decoration-color: var(--rule); }
.roster a:hover { text-decoration-color: currentColor; }
.roster .label { color: var(--muted); }
.group-mail { margin-top: var(--space-3); font-size: var(--text-sm); }
.group .muted { margin-top: var(--space-3); }

.archive { border-bottom: var(--border) solid var(--rule); }
.archive summary { display: flex; justify-content: space-between; gap: var(--space-4); padding-block: var(--space-4); cursor: pointer; list-style: none; }
.archive summary::-webkit-details-marker { display: none; }
.archive summary::after { content: "+"; font-family: var(--font-mono); }
.archive[open] summary::after { content: "−"; }
.archive summary:hover { color: var(--accent-text); }
.archive ul { margin: 0 0 var(--space-5); padding: 0; list-style: none; columns: 2; column-gap: var(--column-gap); font-size: var(--text-sm); }
.archive li { break-inside: avoid; padding-block: var(--space-1); }
.archive li span { color: var(--muted); }
.prose { max-width: var(--measure); }
.prose h2 { margin-top: var(--space-8); font-size: var(--text-xl); }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: var(--space-6); font-size: var(--text-md); }
.prose p, .prose ul { margin-top: var(--space-3); color: var(--fg-2); }
.prose ul { padding-left: var(--space-5); }
.prose li + li { margin-top: var(--space-2); }
.prose .note { margin-top: var(--space-7); padding-top: var(--space-4); border-top: var(--border) solid var(--rule); font-size: var(--text-sm); color: var(--muted); }

/* ---------------------------------------------------------------------------------------------
   Footer
   --------------------------------------------------------------------------------------------- */
.site-footer { padding-block: var(--space-8) var(--space-6); border-top: var(--border) solid var(--rule); font-size: var(--text-sm); }
.footer-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-6) var(--column-gap); }
.footer-brand { grid-column: 1 / -1; }
.site-footer img { height: 1.75rem; width: auto; margin-bottom: var(--space-4); }
.site-footer address { font-style: normal; color: var(--muted); }
.site-footer ul { margin: var(--space-3) 0 0; padding: 0; list-style: none; }
.site-footer li + li { margin-top: var(--space-2); }
.site-footer a { text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-3); margin-top: var(--space-8); padding-top: var(--space-4); border-top: var(--border) solid var(--rule); color: var(--muted); }

/* ---------------------------------------------------------------------------------------------
   Mobile menu (enhanced by site.js; without it, the links stay visible and wrap)
   --------------------------------------------------------------------------------------------- */
@media (max-width: 47.99rem) {
  .js .menu-toggle { display: inline-flex; align-items: center; }
  .js .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; gap: 0; padding: var(--space-2) var(--gutter) var(--space-5); background: var(--bg); border-bottom: var(--border) solid var(--rule); }
  .js .nav.open { display: flex; }
  .js .nav a { display: block; padding-block: var(--space-3); font-size: var(--text-lg); }
  .site-header.over:has(.nav.open), .site-header.over .nav.open { background: var(--ink-950); }
  .hero-caption { position: static; margin-top: var(--space-6); }
  /* Tables become one block per row: the first cell is its label, the column heads are read aloud only. */
  .data-table, .data-table tbody, .data-table tr, .data-table td { display: block; }
  .data-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .data-table tr { padding-block: var(--space-4); border-bottom: var(--border) solid var(--rule); }
  .data-table td { padding: 0; border: 0; overflow-wrap: break-word; }
  .data-table tbody { border-top: var(--border) solid var(--rule); }
  .data-table td:first-child:not(:has(a)) { margin-bottom: var(--space-1); font-size: var(--text-xs); }
}

/* ---------------------------------------------------------------------------------------------
   Tablet (768 px), desktop (1024 px) and wide (1280 px)
   --------------------------------------------------------------------------------------------- */
@media (min-width: 48rem) {
  .cartouche { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .page-photo img { aspect-ratio: 21 / 8; }
  .assemblage-view { aspect-ratio: 4 / 3; }
  .pole { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); column-gap: var(--column-gap); align-items: start; }
  .event { grid-template-columns: 7rem minmax(0, 1fr) auto; }
  .event .arrow-link { grid-column: 3; grid-row: 1 / span 3; align-self: center; margin: 0; }
  .definitions div { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); column-gap: var(--column-gap); }
  .groups { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--column-gap); }
  .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; }
  .footer-brand { grid-column: auto; }
}
@media (min-width: 64rem) {
  .section-head { grid-column: 1 / span 3; }
  .section-body { grid-column: 5 / -1; }
  .section-head.sticky { position: sticky; top: var(--space-6); align-self: start; }
  .assemblage { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); column-gap: var(--column-gap); align-items: center; }
  .archive ul { columns: 3; }
}
/* Wide screens: the service rows get their own title column, once the price table has room beside it. */
@media (min-width: 80rem) {
  .row { grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); column-gap: var(--column-gap); }
  .row > :not(h3) { grid-column: 2; }
  .row h3 { grid-row: 1 / span 4; }
}

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

@media print {
  .site-header, .site-footer, .hero-photo { display: none; }
  body { background: var(--white); color: var(--ink-900); }
}
