/* Egerco web layout.
   Colour, type, spacing and rules come from tokens.css (the Egerco design system).
   This file adds web layout only: no raw colours, no shadows, no gradients, no transparency, no motion. */

:root {
  --gutter-x: clamp(20px, 5vw, 64px);
  --col-gap: var(--space-4);
  --header-h: 72px;
  --content-max: 1200px;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 28px;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, p, ul, ol, dl, dd, figure, table { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
a { color: var(--link); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: var(--rule-heavy) solid var(--ink); outline-offset: 3px; }
[id] { scroll-margin-top: calc(var(--header-h) + var(--space-2)); }
[data-theme] { background: var(--ground); color: var(--ink); }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip { position: absolute; left: var(--space-2); top: -100px; z-index: 20; padding: var(--space-1) var(--space-2); background: var(--ground); color: var(--ink); }
.skip:focus { top: var(--space-2); }

/* ---------- type ---------- */
.label, .kicker, .nav a, .source, th {
  font-family: var(--font-mono);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.label { font-size: 12px; line-height: 16px; }
.kicker { display: block; font-size: 13px; line-height: 16px; color: var(--ink-muted); }
.kicker::before {
  content: "";
  display: block;
  width: 48px;
  height: var(--accent-bar-height);
  margin-bottom: var(--space-2);
  background: var(--accent);
}
.source { font-size: 12px; line-height: 18px; font-weight: 400; letter-spacing: 0.02em; text-transform: none; color: var(--ink-muted); }
.display { font-size: clamp(40px, 4.6vw, 64px); line-height: 1.05; font-weight: 800; letter-spacing: -0.02em; }
.headline { font-size: clamp(28px, 3.2vw, 44px); line-height: 1.16; font-weight: 700; letter-spacing: -0.01em; max-width: 920px; }
.subhead { font-size: 20px; line-height: 28px; font-weight: 700; }
.lead { font-size: clamp(18px, 1.5vw, 21px); line-height: 1.55; max-width: 40em; }
.small { font-size: 15px; line-height: 24px; }
.muted { color: var(--ink-muted); }
.index { color: var(--accent-ink); }
.figure { font-variant-numeric: tabular-nums lining-nums; }

/* ---------- layout ---------- */
.wrap { width: 100%; max-width: calc(var(--content-max) + 2 * var(--gutter-x)); margin: 0 auto; padding: 0 var(--gutter-x); }
.section { padding: var(--space-12) 0; }
.section--raised { background: var(--ground-raised); }
.section--ruled { border-top: var(--rule-hairline) solid var(--rule); }
.section-head { display: flex; flex-direction: column; gap: var(--space-2); }
.section-body { margin-top: var(--space-8); }
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--col-gap); row-gap: var(--space-6); }
.span-4 { grid-column: span 4; }
.span-5 { grid-column: span 5; }
.span-7 { grid-column: span 7; }
.span-8 { grid-column: span 8; }

/* ---------- buttons ---------- */
.actions { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.btn {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 var(--space-3);
  border: var(--rule-heavy) solid var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 20px;
  font-weight: 600;
  text-decoration: none;
}
.btn--primary { background: var(--ink); color: var(--ground); }
.btn--primary:hover { background: var(--egerco-blue); border-color: var(--egerco-blue); }
.btn--ghost { background: var(--ground); color: var(--ink); }
.btn--ghost:hover { background: var(--ground-raised); }
.btn--accent { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn--accent:hover { background: var(--ink); border-color: var(--ink); }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 10; background: var(--ground); border-bottom: var(--rule-hairline) solid var(--rule); }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); min-height: var(--header-h); }
.site-header__logo { display: block; }
.site-header__logo img { width: 132px; height: auto; }
.site-header__tools { display: flex; align-items: center; gap: var(--space-3); }
.nav { display: flex; align-items: center; gap: var(--space-3); }
.nav a { font-size: 12px; line-height: 16px; color: var(--ink); text-decoration: none; padding: var(--space-1) 0; }
.nav a:hover { text-decoration: underline; text-decoration-thickness: var(--rule-heavy); text-underline-offset: 6px; }
.nav .nav__cta { padding: var(--space-1) var(--space-2); background: var(--ink); color: var(--ground); }
.nav .nav__cta:hover { background: var(--egerco-blue); text-decoration: none; }
/* Language switcher: mono codes; the current language is ink and underlined, the others muted. */
.langs { display: flex; align-items: center; gap: 12px; padding-left: var(--space-3); border-left: var(--rule-hairline) solid var(--rule); }
.langs a { font-family: var(--font-mono); font-size: 12px; line-height: 16px; font-weight: 500; letter-spacing: 0.08em; color: var(--ink-muted); text-decoration: none; padding: var(--space-1) 0; }
.langs a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 6px; }
.langs a[aria-current="page"] { color: var(--ink); text-decoration: underline; text-decoration-thickness: var(--rule-heavy); text-underline-offset: 6px; }

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; }
.hero__text { display: flex; flex-direction: column; gap: var(--space-4); max-width: min(800px, 62vw); padding: var(--space-12) 0 var(--space-12); }
.hero__text .actions { margin-top: var(--space-2); }
/* The title slide's strata, carried to the web: deep, blue, one orange line, ice. */
.strata { position: absolute; top: 0; right: 0; bottom: 0; width: min(28vw, 460px); display: flex; flex-direction: column; gap: var(--space-1); }
.strata > i { display: block; }
.strata__deep { flex: 0 0 51%; background: var(--ground-deep); }
.strata__blue { flex: 0 0 20%; background: var(--egerco-blue); }
.strata__orange { flex: 0 0 4.4%; background: var(--accent); }
.strata__ice { flex: 1; background: var(--ground-ice); }

/* ---------- KPI row ---------- */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: var(--col-gap); row-gap: var(--space-6); margin-top: var(--space-4); }
.kpi { position: relative; display: flex; flex-direction: column; gap: var(--space-1); padding-top: var(--space-3); border-top: var(--rule-heavy) solid var(--rule-strong); }
.kpi--focus::before { content: ""; position: absolute; top: calc(-1 * var(--rule-heavy)); left: 0; width: 100%; height: var(--accent-bar-height); background: var(--accent); }
.kpi__label { color: var(--ink-muted); }
.kpi__value { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 0.18em; font-size: clamp(40px, 4.2vw, 58px); line-height: 1; font-weight: 800; letter-spacing: -0.03em; font-variant-numeric: tabular-nums lining-nums; padding: var(--space-1) 0; }
.kpi__unit { font-size: 0.4em; line-height: 1.2; font-weight: 700; letter-spacing: -0.01em; white-space: nowrap; }
.kpi__note { color: var(--ink-muted); font-size: 15px; line-height: 22px; }
.kpis + .source { margin-top: var(--space-4); }

/* ---------- process (the Timeline pattern: diamonds on one axis) ---------- */
.steps { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: var(--col-gap); padding-top: var(--space-4); }
.steps::before { content: ""; position: absolute; left: 0; right: 0; top: 11px; height: var(--rule-heavy); background: var(--rule-strong); }
.step { position: relative; display: flex; flex-direction: column; gap: var(--space-1); padding-top: var(--space-2); }
.step::before {
  content: "";
  position: absolute;
  top: -29px;
  left: 3px;
  width: 18px;
  height: 18px;
  transform: rotate(45deg);
  background: var(--ground);
  border: var(--rule-heavy) solid var(--rule-strong);
}
.step--focus::before { background: var(--accent); border-color: var(--accent); }
.step p { color: var(--ink-muted); font-size: 15px; line-height: 24px; }

.model-intro { display: flex; flex-direction: column; gap: var(--space-4); }
.defs { display: grid; gap: var(--space-3); padding: var(--space-4); background: var(--ground-raised); }
.defs div { display: flex; flex-direction: column; gap: var(--space-1); }
.defs dt { color: var(--ink); }
.defs dd { color: var(--ink-muted); font-size: 15px; line-height: 24px; }

/* ---------- divisions ---------- */
.divisions { border-top: var(--rule-heavy) solid var(--rule-strong); }
.division { display: grid; grid-template-columns: 3fr 6fr 3fr; column-gap: var(--col-gap); row-gap: var(--space-2); padding: var(--space-4) 0; border-bottom: var(--rule-hairline) solid var(--rule); }
.division__id { display: flex; flex-direction: column; gap: var(--space-1); }
.division__name { color: var(--ink-muted); }
.division__main { display: flex; flex-direction: column; gap: var(--space-1); }
.division__desc { color: var(--ink-muted); }
.division__focus { display: flex; flex-direction: column; border-top: var(--rule-hairline) solid var(--rule); }
.division__focus li { padding: var(--space-1) 0; border-bottom: var(--rule-hairline) solid var(--rule); font-size: 15px; line-height: 22px; }

/* ---------- programme table (the DataTable pattern) ---------- */
.table { width: 100%; border-collapse: collapse; color: var(--ink); font-variant-numeric: tabular-nums lining-nums; }
.table th { font-size: 12px; line-height: 16px; text-align: left; vertical-align: bottom; color: var(--ink-muted); padding: 0 var(--space-3) var(--space-2) 0; border-bottom: var(--rule-heavy) solid var(--rule-strong); }
.table td { padding: var(--space-3) var(--space-3) var(--space-3) 0; border-bottom: var(--rule-hairline) solid var(--rule); vertical-align: top; }
.table td:first-child, .table th:first-child { padding-left: var(--space-2); }
.table .num { text-align: right; }
.table .row-focus td { background: var(--ground-ice); }
.table__name { display: block; font-weight: 700; }
.table__desc { display: block; color: var(--ink-muted); font-size: 15px; line-height: 22px; margin-top: 4px; }
.table__value { display: block; font-weight: 700; white-space: nowrap; }
.table__note { display: block; color: var(--ink-muted); font-size: 14px; line-height: 20px; margin-top: 4px; }
.table + .source { margin-top: var(--space-3); }

/* ---------- map (the Maps rule: flat, land on raised ground, coastlines in rule) ---------- */
.map { display: flex; flex-direction: column; gap: var(--space-2); }
.legend { display: flex; gap: var(--space-4); color: var(--ink-muted); }
.legend__item { display: inline-flex; align-items: center; gap: var(--space-1); }
.legend__item::before { content: ""; width: 11px; height: 11px; margin: 0 2px; transform: rotate(45deg); background: var(--ground); border: var(--rule-heavy) solid var(--rule-strong); }
.legend__item--program::before { background: var(--accent); border-color: var(--accent); }
.map__frame { position: relative; border: var(--rule-hairline) solid var(--rule); }
.map__svg { width: 100%; height: auto; }
.map__land { fill: var(--ground-raised); stroke: var(--rule); stroke-width: 1; vector-effect: non-scaling-stroke; }
.pin { position: absolute; width: 0; height: 0; }
.pin::before { content: ""; position: absolute; left: -7px; top: -7px; width: 14px; height: 14px; transform: rotate(45deg); background: var(--ground); border: var(--rule-heavy) solid var(--rule-strong); }
.pin--program::before { background: var(--accent); border-color: var(--accent); }
.pin__label { position: absolute; top: -8px; left: 14px; white-space: nowrap; font-size: 11px; color: var(--ink); }
.pin__label--left { left: auto; right: 14px; }
.pin--laval { left: 6.76%; top: 19.5%; }
.pin--luxembourg { left: 72.24%; top: 14.04%; }
.pin--milan { left: 74.75%; top: 19.65%; }
.pin--calabria { left: 80.61%; top: 28.51%; }
.pin--drc { left: 86.56%; top: 85%; }

.offices { border-top: var(--rule-heavy) solid var(--rule-strong); }
.office { display: flex; flex-direction: column; gap: 4px; padding: var(--space-3) 0; border-bottom: var(--rule-hairline) solid var(--rule); }
.office__place { color: var(--ink-muted); }
.office__entity { font-size: 17px; line-height: 26px; font-weight: 700; }
.office__desc { color: var(--ink-muted); font-size: 15px; line-height: 24px; }

/* ---------- contact (Navy) ---------- */
.contact { display: flex; flex-direction: column; gap: var(--space-6); }
.contact-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: var(--col-gap); row-gap: var(--space-4); }
.contact-item { display: flex; flex-direction: column; gap: var(--space-1); padding-top: var(--space-3); border-top: var(--rule-heavy) solid var(--rule-strong); }
.contact-item .label { color: var(--ink-muted); }
.contact-item p:not(.label) { font-size: 16px; line-height: 26px; }
.people li + li { margin-top: var(--space-2); }
.people span { display: block; color: var(--ink-muted); font-size: 15px; line-height: 22px; }

/* ---------- who we are ---------- */
.about { display: flex; flex-direction: column; gap: var(--space-4); }
.about__mission { display: flex; flex-direction: column; gap: var(--space-1); padding-top: var(--space-3); border-top: var(--rule-heavy) solid var(--rule-strong); }
.about__mission .label { color: var(--ink-muted); }
.partner { display: flex; flex-direction: column; gap: var(--space-2); align-self: start; padding: var(--space-4); background: var(--ground-raised); }
.partner__label { color: var(--accent-ink); }
.partner__text { color: var(--ink-muted); font-size: 15px; line-height: 24px; }
.block-title { color: var(--ink-muted); }
.quotes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--col-gap); row-gap: var(--space-4); margin-top: var(--space-3); }
.quote { display: flex; flex-direction: column; gap: var(--space-2); padding-top: var(--space-3); border-top: var(--rule-heavy) solid var(--rule-strong); }
.quote blockquote { margin: 0; }
.quote blockquote p { font-size: 19px; line-height: 30px; }
.quote figcaption { display: flex; flex-direction: column; font-size: 15px; line-height: 22px; }
.quote__name { font-weight: 700; }
.quote__role { color: var(--ink-muted); }

/* ---------- services and what we build: the division focus list, reused ---------- */
.services { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: var(--col-gap); row-gap: var(--space-6); margin-top: var(--space-3); }
.caps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: var(--col-gap); row-gap: var(--space-8); }
.service, .cap { display: flex; flex-direction: column; gap: var(--space-2); padding-top: var(--space-3); border-top: var(--rule-heavy) solid var(--rule-strong); }
.service__text, .cap__text { color: var(--ink-muted); font-size: 15px; line-height: 24px; }
.list { display: flex; flex-direction: column; margin-top: var(--space-1); border-top: var(--rule-hairline) solid var(--rule); }
.list li { padding: var(--space-1) 0; border-bottom: var(--rule-hairline) solid var(--rule); font-size: 15px; line-height: 22px; }

/* ---------- leadership (Imagery rule: real photographs, full column width, square corners, no filters) ---------- */
.team { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); column-gap: var(--col-gap); row-gap: var(--space-6); }
.member { display: flex; flex-direction: column; gap: var(--space-1); }
.member__photo { width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover; margin-bottom: var(--space-1); background: var(--ground); }
.member__name { font-size: 17px; line-height: 26px; font-weight: 700; }
.member__title { font-family: var(--font-mono); font-size: 12px; line-height: 16px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-muted); }
.member__bio { color: var(--ink-muted); font-size: 15px; line-height: 22px; }
.team + .source { margin-top: var(--space-4); }

/* ---------- footer ---------- */
.site-footer { background: var(--ground-deep); color: var(--ink); padding: var(--space-6) 0; }
.site-footer__inner { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: var(--space-4); }
.site-footer__logo { width: 120px; height: auto; }
.site-footer__text { display: flex; flex-direction: column; gap: var(--space-1); color: var(--ink-muted); font-size: 14px; line-height: 22px; max-width: 640px; }
.site-footer a { color: var(--link); }

/* ---------- languages ---------- */
/* Long German compounds break cleanly in narrow cells; any other long word wraps instead of overflowing. */
body { overflow-wrap: break-word; }
:lang(de) .kpi__note, :lang(de) .table td, :lang(de) .division__focus li, :lang(de) .office__desc { hyphens: auto; }
:lang(de) .list li, :lang(de) .service__text, :lang(de) .cap__text, :lang(de) .member__title, :lang(de) .member__bio { hyphens: auto; }

/* ---------- responsive ---------- */
/* The menu's six links need 1,112px in French, the longest language (measured 2026-11-05). */
@media (max-width: 1120px) {
  .nav a:not(.nav__cta) { display: none; }
}
@media (max-width: 1100px) {
  .strata { display: none; }
  .hero__text { max-width: none; }
  .team { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* One column: twelve columns of gaps alone (11 x 32px) were wider than a 360px phone, so the page scrolled sideways. */
  .grid { grid-template-columns: minmax(0, 1fr); }
  .span-4, .span-5, .span-7, .span-8 { grid-column: auto; }
  .division { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .caps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .services, .quotes { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .caps { grid-template-columns: 1fr; }
  .team { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .section { padding: var(--space-8) 0; }
  .section-body { margin-top: var(--space-6); }
  .hero__text { padding: var(--space-8) 0; }
  .steps { grid-template-columns: 1fr; row-gap: var(--space-4); padding-top: 0; padding-left: var(--space-6); }
  .steps::before { left: 11px; right: auto; top: 0; bottom: 0; width: var(--rule-heavy); height: auto; }
  .step { padding-top: 0; }
  .step::before { top: 4px; left: calc(-1 * var(--space-6) + 3px); }
  .table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .table, .table tbody, .table tr, .table td { display: block; width: 100%; }
  .table tr { border-top: var(--rule-heavy) solid var(--rule-strong); padding: var(--space-2) 0; }
  .table td { border: 0; padding: var(--space-1) var(--space-2); }
  .table td::before { content: attr(data-label); display: block; font-family: var(--font-mono); font-size: 11px; line-height: 16px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-muted); }
  .table .num { text-align: left; }
  .table__value { white-space: normal; }
  .pin__label { display: none; }
}
@media (max-width: 520px) {
  .kpis { grid-template-columns: 1fr; }
  .kpis--record { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpis--record .kpi__value { font-size: 32px; }
  .site-header__logo img { width: 112px; }
  .nav { display: none; }
  .langs { padding-left: 0; border-left: 0; }
}
@media (max-width: 340px) {
  .kpis--record { grid-template-columns: 1fr; }
}
