/* DAXE · Tombstone announcement system. Petrol on a petrol-wash ground, with brass as the warm accent. */

@font-face {
  font-family: "Albert Sans";
  src: url("../fonts/albert-sans.woff2") format("woff2");
  font-weight: 300 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Albert Sans";
  src: url("../fonts/albert-sans-italic.woff2") format("woff2");
  font-weight: 300 800;
  font-style: italic;
  font-display: swap;
}

:root {
  --ink: #0E3449;
  --ink-soft: #3D5868;       /* secondary text, 6.4:1 on the ground */
  --paper: #FFFFFF;
  --ground: #E8EEF1;         /* page ground: a pale tint of the logo petrol */
  --rule-pale: #C5D0D7;      /* hairline dividers, non-text */
  --brass: #D2A15A;          /* warm accent: inner rules, the action on petrol. Never text on white. */
  --ink-hover: #164A66;      /* primary button hover */
  --brass-deep: #E3BA7C;     /* brass hover: lighter, so petrol text gains contrast */
  --on-ink-soft: #B9CAD4;    /* secondary text on petrol, 8.6:1 */

  --display: "Albert Sans", "Segoe UI", system-ui, sans-serif;
  --text: "Albert Sans", "Segoe UI", system-ui, sans-serif;

  --gutter: clamp(1.25rem, 4vw, 3.5rem);
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2.5rem;
  --space-5: 4rem;
  --space-6: clamp(5rem, 11vw, 9rem);

  --frame-gap: 6px;          /* gap between outer and inner rule of a double frame */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  color-scheme: light;
  accent-color: var(--ink);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
  scrollbar-color: var(--ink) var(--ground);
  -webkit-text-size-adjust: 100%;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--text);
  font-size: clamp(1.0625rem, 0.98rem + 0.3vw, 1.1875rem);
  line-height: 1.65;
  font-kerning: normal;
  font-variant-ligatures: common-ligatures;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--brass); color: var(--ink); }

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.025em;
  margin: 0;
  text-wrap: balance;
}
p { margin: 0; text-wrap: pretty; }
ul { list-style: none; margin: 0; padding: 0; }
img { display: block; max-width: 100%; height: auto; }

a { color: inherit; }
:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 4px;
}

.defs { position: absolute; }
.nowrap { white-space: nowrap; }

.skip {
  position: absolute;
  left: var(--gutter);
  top: -4rem;
  padding: 0.6rem 1rem;
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
  z-index: 10;
}
.skip:focus { top: 0.75rem; }

/* Small capitals, the announcement's label voice */
.caps {
  font-family: var(--text);
  font-size: 0.8em;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  line-height: 1.5;
}

/* ---------- Top bar ---------- */

.bar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: 1.1rem var(--gutter);
  background: rgba(232, 238, 241, 0.96);
  border-bottom: 1px solid transparent;
  transition: border-color 300ms var(--ease-out);
}
.bar.is-scrolled { border-bottom-color: var(--rule-pale); }

.bar__mark { display: block; line-height: 0; color: var(--ink); }
.wordmark { display: block; width: 6.25rem; height: auto; fill: currentColor; }

.bar__nav {
  display: flex;
  gap: var(--space-4);
  margin-left: auto;
}
.bar__nav a,
.bar__cta,
.lang button {
  font-family: var(--text);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink);
  padding: 0.35rem 0;
  background-image: linear-gradient(var(--ink), var(--ink));
  background-size: 0% 1px;
  background-position: 50% 100%;
  background-repeat: no-repeat;
  transition: background-size 360ms var(--ease-out);
}
.bar__nav a:hover,
.bar__cta:hover { background-size: 100% 1px; }
.bar__cta { display: none; }

.lang {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  padding-left: var(--space-3);
  border-left: 1px solid var(--rule-pale);
}
.lang button {
  border: 0;
  border-bottom: 1px solid transparent;
  cursor: pointer;
  padding: 0.35rem 0.1rem 0.3rem;
  margin: 0 0.3rem;
  color: var(--ink-soft);
  background: none;
}
.lang button[aria-pressed="true"] {
  color: var(--ink);
  border-bottom-color: var(--ink);
}
.lang button:hover { color: var(--ink); }

/* ---------- The tombstone: a double-ruled frame ---------- */

.tomb {
  position: relative;
  border: 2px solid var(--ink);
  padding: var(--frame-gap);
}
.tomb::before {
  content: "";
  position: absolute;
  inset: var(--frame-gap);
  border: 1px solid var(--brass);
  pointer-events: none;
}
.tomb__body {
  position: relative;
  text-align: center;
  padding: var(--space-4) var(--space-3);
}

/* ---------- Hero ---------- */

.hero {
  padding: clamp(1.5rem, 4vh, 3rem) var(--gutter) var(--space-6);
}
.tomb--hero {
  max-width: 80rem;
  margin: 0 auto;
  /* the announcement fills the first screen, below the bar */
  min-height: max(34rem, calc(100svh - 7rem));
  display: flex;
  flex-direction: column;
}
.tomb--hero .tomb__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(1.25rem, 3vh, 2rem);
  padding: clamp(3rem, 9vh, 6.5rem) clamp(1.25rem, 6vw, 6rem);
}
.hero h1 {
  font-size: clamp(2.5rem, 1.2rem + 4.6vw, 5.5rem);
  line-height: 1.04;
  max-width: 20ch;
}
.hero__sub {
  font-size: clamp(1.15rem, 1rem + 0.6vw, 1.5rem);
  color: var(--ink-soft);
  max-width: 52ch;
  text-wrap: balance;
}
.hero__mandates {
  margin-top: clamp(1rem, 3vh, 2.25rem);
  padding: 1rem clamp(1rem, 6vw, 5rem);
  letter-spacing: 0.2em;
  border-top: 1px solid var(--brass);
  border-bottom: 1px solid var(--brass);
  font-size: clamp(0.7rem, 0.62rem + 0.3vw, 0.82rem);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--space-2) var(--space-4);
  margin-top: var(--space-2);
}

.btn {
  display: inline-block;
  font-family: var(--text);
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 1.05rem 2.1rem;
  background: var(--ink);
  color: var(--paper);
  border: 1px solid var(--ink);
  outline: 2px solid var(--brass);
  outline-offset: 3px;
  transition: outline-offset 280ms var(--ease-out), background-color 280ms var(--ease-out);
}
.btn:hover { outline-offset: 6px; background: var(--ink-hover); }
.btn:active { outline-offset: 1px; }
.btn:focus-visible { outline: 2px solid var(--ink); outline-offset: 6px; }

.btn--light {
  background: var(--brass);
  color: var(--ink);
  font-weight: 600;
  border-color: var(--brass);
  outline-color: var(--brass);
}
.btn--light:hover { background: var(--brass-deep); border-color: var(--brass-deep); }
.btn--light:focus-visible { outline-color: var(--paper); }

.link {
  font-weight: 500;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.3em;
  text-decoration-color: var(--rule-pale);
  transition: text-decoration-color 240ms var(--ease-out);
  overflow-wrap: anywhere;
}
.link:hover { text-decoration-color: var(--brass); }
.link--light { color: var(--paper); text-decoration-color: rgba(255, 255, 255, 0.4); }
.link--light:focus-visible { outline-color: var(--paper); }

/* The announcement's bottom line: the three offices */
.cities {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--ink);
  margin: 0 var(--frame-gap) 0;
}
.cities li {
  padding: 1.1rem 0.5rem;
  text-align: center;
  font-size: 0.74rem;
}
.cities li + li { border-left: 1px solid var(--rule-pale); }

/* ---------- Sections ---------- */

.section {
  max-width: 74rem;
  margin: 0 auto;
  padding: 0 var(--gutter) var(--space-6);
}
.section__head {
  text-align: center;
  margin-bottom: var(--space-5);
}
.ruled {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 3vw, 2rem);
  font-size: clamp(2rem, 1.4rem + 2vw, 3.25rem);
}
.ruled::before,
.ruled::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--ink);
}
.lede {
  margin: var(--space-3) auto 0;
  max-width: 44ch;
  font-size: clamp(1.1rem, 1rem + 0.35vw, 1.3rem);
  color: var(--ink-soft);
}

/* The wall of tombstones */
.wall {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(1rem, 2.4vw, 2rem);
}
.wall .tomb__body {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.9rem;
  padding: var(--space-4) var(--space-3) var(--space-3);
}
.wall h3 {
  font-size: clamp(1.5rem, 1.2rem + 0.7vw, 1.85rem);
  /* two reserved lines so every frame's text starts at the same height */
  min-height: 2lh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.wall .caps {
  order: 3;
  margin-top: auto;
  font-size: 0.72rem;
  padding: 1rem 0 0;
  border-top: 1px solid var(--brass);
  width: 100%;
  /* sized for the longest scope line so the closing rules align across the row */
  min-height: calc(2lh + 1rem);
}
.wall:lang(fr) .caps { min-height: calc(3lh + 1rem); }
.hero__mandates span { white-space: nowrap; }
.hero__mandates span + span::before { content: "·"; margin: 0 0.55em 0 0.45em; }
/* when the single line cannot fit its frame (FR, tablets, phones), terms wrap as spaced items with no separators to dangle */
.tomb--hero .tomb__body { container-type: inline-size; }
@container (max-width: 58rem) {
  .hero__mandates { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.35rem 1.1rem; }
  .hero__mandates span + span::before { content: none; }
}
.wall p:not(.caps) {
  order: 2;
  margin-bottom: var(--space-3);
  font-size: 1rem;
  color: var(--ink-soft);
  max-width: 24ch;
}


/* Principal: a nameplate, the bio, and a career record across the full width */
.principal {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 9fr);
  grid-template-areas:
    "head   head"
    "plate  text"
    "record record";
  column-gap: clamp(2rem, 5vw, 5rem);
  row-gap: 0;
  align-items: start;
  max-width: 80rem;
}
.principal__head { grid-area: head; }
.principal__plate { grid-area: plate; }
.principal__plate .tomb__body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-4) var(--space-3);
}
.principal__name { font-size: clamp(2rem, 1.5rem + 1.6vw, 3rem); }
.principal__plate .caps {
  padding-top: 0.5rem;
  border-top: 2px solid var(--brass);
  font-size: 0.75rem;
}
.principal__plate .link { margin-top: 0.25rem; font-size: 0.95rem; }

/* LinkedIn: a ruled outline button carrying the LinkedIn mark in petrol */
.btn-social {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 0.5rem;
  padding: 0.65rem 1.1rem;
  border: 1px solid var(--ink);
  color: var(--ink);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background-color 240ms var(--ease-out), color 240ms var(--ease-out);
}
.btn-social svg { width: 1.1rem; height: 1.1rem; fill: currentColor; flex: none; }
.btn-social:hover { background: var(--ink); color: var(--paper); }

.principal__text { grid-area: text; }
.principal__lead {
  margin: 0 0 var(--space-3);
  max-width: 52ch;
  font-size: clamp(1.15rem, 1.05rem + 0.4vw, 1.4rem);
  line-height: 1.5;
}
.principal__bio {
  max-width: 74ch;
  color: var(--ink-soft);
}
.principal__bio p + p { margin-top: 1em; }

/* The career record: a ruled row of five stations, the current one marked in brass */
.record { grid-area: record; margin-top: var(--space-5); }
.record__title {
  margin: 0;
  padding-bottom: 0.75rem;
  font-size: 0.72rem;
}
.record ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}
.record li {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 1.25rem clamp(0.75rem, 1.4vw, 1.5rem) 1.4rem;
}
.record li + li { border-left: 1px solid var(--rule-pale); }
.record li:first-child { padding-left: 0; }
.record li:last-child { padding-right: 0; }
.record .record__now { box-shadow: inset 0 2px 0 var(--brass); }
.record__years {
  order: -1;
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums lining-nums;
  color: var(--ink-soft);
}
.record__org {
  font-family: var(--display);
  font-weight: 500;
  font-size: 1.1rem;
  line-height: 1.3;
}
.record__place { font-size: 0.72rem; color: var(--ink-soft); }
.record__role { font-size: 0.95rem; line-height: 1.45; color: var(--ink-soft); }

@media (max-width: 64rem) {
  /* tablets and phones: the record becomes a vertical ledger */
  .record ol { grid-template-columns: 1fr; border-bottom: 1px solid var(--ink); border-top: 0; }
  .record li { padding: 1rem 0 1.1rem; border-top: 1px solid var(--rule-pale); }
  .record li + li { border-left: 0; }
  .record li:first-child { border-top-color: var(--ink); }
  .record .record__now { box-shadow: none; border-top: 2px solid var(--brass); }
}

/* Close: the one petrol field, where the action lives */
.close {
  background: var(--ink);
  color: var(--paper);
  padding: var(--space-6) var(--gutter);
}
.tomb--reverse {
  max-width: 56rem;
  margin: 0 auto;
  border-color: var(--paper);
}
.tomb--reverse::before { border-color: var(--brass); }
.tomb--reverse .tomb__body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  padding: clamp(3rem, 7vw, 5rem) clamp(1.25rem, 5vw, 4rem);
}
.tomb--reverse h2 { font-size: clamp(2.25rem, 1.4rem + 3vw, 4rem); max-width: 16ch; }
.tomb--reverse .lede { color: var(--on-ink-soft); margin-top: 0; }
.tomb--reverse .actions { margin-top: var(--space-3); }
.close ::selection { background: var(--brass); color: var(--ink); }

/* Footer */
.foot {
  background: var(--ink);
  color: var(--paper);
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  padding: var(--space-4) var(--gutter) var(--space-5);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-4);
}
.foot .wordmark { width: 5rem; }
.foot .caps { font-size: 0.72rem; color: var(--brass); }
.foot__legal {
  margin-left: auto;
  font-size: 0.85rem;
  color: var(--on-ink-soft);
}
.foot a { color: var(--paper); text-underline-offset: 0.3em; text-decoration-thickness: 1px; }
.foot a:focus-visible { outline-color: var(--paper); }

/* ---------- The one authored motion: the hero frame draws itself ---------- */

@media (prefers-reduced-motion: no-preference) {
  /* the outer rule moves to a pseudo-element so it can draw without clipping the content */
  .js .tomb--hero { border-color: transparent; }
  .js .tomb--hero::after {
    content: "";
    position: absolute;
    inset: -2px;
    border: 2px solid var(--ink);
    pointer-events: none;
    animation: frame-draw 1200ms var(--ease-out) both;
  }
  .js .tomb--hero::before {
    animation: frame-draw 1200ms 160ms var(--ease-out) both;
  }
  .js .tomb--hero .tomb__body > *,
  .js .tomb--hero .cities {
    animation: settle 900ms var(--ease-out) both;
    animation-delay: 520ms;
  }
  .js .tomb--hero .tomb__body > :nth-child(2) { animation-delay: 610ms; }
  .js .tomb--hero .tomb__body > :nth-child(3) { animation-delay: 700ms; }
  .js .tomb--hero .tomb__body > :nth-child(4) { animation-delay: 790ms; }
  .js .tomb--hero .cities { animation-delay: 900ms; }
}
@keyframes frame-draw {
  from { clip-path: inset(0 50% 0 50%); }
  to   { clip-path: inset(0 0 0 0); }
}
@keyframes settle {
  /* no opacity: the content is readable at every frame, even if motion never runs */
  from { transform: translateY(0.4rem); filter: blur(2.5px); }
  to   { transform: none; filter: none; }
}

/* ---------- Narrow screens ---------- */

@media (max-width: 64rem) {
  .wall { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 52rem) {
  .bar__nav { display: none; }
  .bar__cta { display: inline-block; margin-left: auto; }

  .principal {
    grid-template-columns: 1fr;
    grid-template-areas: "head" "plate" "text" "record";
    row-gap: var(--space-4);
    max-width: 40rem;
  }
}

@media (max-width: 40rem) {
  .wall { grid-template-columns: 1fr; }
  .wall h3, .wall .caps, .wall:lang(fr) .caps { min-height: 0; }

  .cities li { padding: 0.9rem 0.25rem; font-size: 0.72rem; letter-spacing: 0.1em; }

  .tomb--hero { min-height: auto; }
  .hero__mandates { letter-spacing: 0.12em; }

  .foot__legal { margin-left: 0; width: 100%; }
}
