/* Embrasure site styles.
   Values follow the home page mockup and the brand tokens (Stone and Ochre).
   Text pairings that pass WCAG 2 AA: ink, stone, deep-ochre on paper;
   paper, sand, ochre on charcoal or ink; ink on ochre. */

:root {
  --paper: #F3EEE4;
  --ink: #23201A;
  --charcoal: #2C2A25;
  --stone: #6B6455;
  --sand: #B3A991;
  --ochre: #E8A420;
  --deep-ochre: #8A5A00;
  --recess: #1A1915;
  --lit-light: #8F8672;
  --shaded-light: #5A5446;
  --stone-tint: #D6CEBB;

  --font-display: "Archivo", Arial, sans-serif;
  --font-body: "Inter", Arial, sans-serif;

  --pad: clamp(20px, 5vw, 40px);
  --sec: clamp(64px, 8vw, 112px);

  /* Home hero geometry, from the mockup */
  --hero-h: clamp(360px, 42vw, 600px);
  --u: clamp(72px, 8.4vw, 120px);
  --door-r: clamp(110px, 18.75vw, 270px);

  /* Ground-dependent colours; light ground by default */
  --fg: var(--ink);
  --muted: var(--shaded-light);
  --rule: var(--stone-tint);
  --accent: var(--deep-ochre);
  --bullet: var(--stone);
  --link: var(--deep-ochre);
  --link-hover: var(--ink);
  --focus: var(--ink);
}

.dk {
  --fg: var(--paper);
  --muted: var(--sand);
  --rule: var(--stone);
  --accent: var(--ochre);
  --bullet: var(--sand);
  --link: var(--ochre);
  --link-hover: var(--paper);
  --focus: var(--paper);
  color: var(--fg);
}

.on-ochre {
  --fg: var(--ink);
  --muted: var(--ink);
  --rule: var(--ink);
  --accent: var(--ink);
  --link: var(--ink);
  --link-hover: var(--ink);
  --focus: var(--ink);
}

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

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 26px;
}

h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg { display: block; }

a { color: var(--link); }
a:hover { color: var(--link-hover); }
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding-inline: var(--pad);
}

.skip {
  position: absolute;
  left: 8px;
  top: -64px;
  z-index: 10;
  padding: 12px 18px;
  background: var(--ink);
  color: var(--paper);
  font-weight: 600;
  text-decoration: none;
}
.skip:focus { top: 8px; color: var(--paper); outline: 2px solid var(--ochre); }

/* ---------- Wordmark ---------- */

.wm {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: .1em;
  line-height: 1;
  white-space: nowrap;
  color: var(--fg);
  text-decoration: none;
}
.wm:hover { color: var(--fg); }
.wa {
  display: inline-block;
  height: .688em;
  width: .741em;
  height: 1cap;
  width: calc(1cap * 1.077);
  margin-right: .1em;
}

/* ---------- Header ---------- */

.hdr { background: var(--paper); border-bottom: 1px solid var(--stone-tint); }
.hdr__in {
  min-height: 71px;
  padding-top: 13px;
  padding-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 32px;
}
.hdr .wm { font-size: 22px; padding: 11px 0; }
.hdr nav { display: flex; align-items: center; flex-wrap: wrap; gap: 0 28px; }
.nav {
  font-size: 15px;
  line-height: 20px;
  color: var(--ink);
  text-decoration: none;
  padding: 12px 0;
}
.nav:hover { color: var(--deep-ochre); }
.nav[aria-current="page"] {
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 8px;
}

/* Narrow screens: Contact sits beside the wordmark, the links run beneath */
@media (max-width: 760px) {
  .hdr__in { position: relative; gap: 0; padding-bottom: 6px; }
  .hdr nav { width: 100%; gap: 0 24px; }
  .hdr nav .btn { position: absolute; top: 13px; right: var(--pad); }
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  min-height: 52px;
  padding: 0 26px;
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  line-height: 20px;
  text-decoration: none;
  border: 0;
  cursor: pointer;
}
.btn--sm { min-height: 44px; padding: 0 18px; font-size: 15px; }

.btn--ink { color: var(--paper); background: var(--ink); }
.btn--ink:hover { color: var(--paper); background: var(--shaded-light); }

.btn--ochre { color: var(--ink); background: var(--ochre); }
.btn--ochre:hover { color: var(--paper); background: var(--ink); }
.dk .btn--ochre:hover { color: var(--ink); background: var(--paper); }

.btn--line { color: var(--fg); border: 1px solid var(--fg); background: transparent; }
.btn--line:hover { color: var(--fg); background: var(--stone-tint); }
.dk .btn--line:hover { background: #45423B; }
.on-ochre .btn--line:hover { color: var(--ink); background: var(--paper); }

.btns { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Type ---------- */

.eyebrow {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 12px;
  line-height: 16px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
}

.h1 {
  font-size: clamp(34px, 4.3vw, 62px);
  line-height: 1.05;
  font-weight: 600;
  letter-spacing: -.02em;
  color: var(--fg);
  text-wrap: balance;
}
.phero .h1 { font-size: clamp(34px, 4vw, 56px); }
.h2 {
  font-size: clamp(30px, 3.4vw, 44px);
  line-height: 1.15;
  font-weight: 600;
  letter-spacing: -.01em;
  color: var(--fg);
  text-wrap: balance;
}
.h3 { font-size: 28px; line-height: 34px; font-weight: 600; color: var(--fg); }
.h4 { font-size: 20px; line-height: 28px; font-weight: 600; color: var(--fg); }

.lede { font-size: 18px; line-height: 1.6; color: var(--muted); text-wrap: pretty; }
.body { font-size: 16px; line-height: 26px; color: var(--muted); text-wrap: pretty; }

.more {
  display: inline-block;
  font-size: 16px;
  line-height: 26px;
  font-weight: 600;
  text-underline-offset: 4px;
}

.ic {
  width: 32px;
  height: 32px;
  fill: none;
  stroke: var(--fg);
  stroke-width: 1.125;
  stroke-linecap: square;
  stroke-linejoin: miter;
}

.ticks {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 16px;
  line-height: 26px;
  color: var(--fg);
}
.ticks li { display: flex; align-items: baseline; gap: 12px; }
.ticks li::before {
  content: "";
  flex: 0 0 6px;
  width: 6px;
  height: 6px;
  background: var(--bullet);
  transform: translateY(-3px);
}

/* Draft marker for facts still to be supplied in site.config.mjs */
.todo {
  display: inline-block;
  padding: 0 8px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
  line-height: 24px;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--ink);
  background: #F6D58A;
  outline: 1px dashed var(--ink);
}

/* ---------- Home hero ---------- */

.hero {
  background: var(--paper);
  min-height: 600px;
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
}
.hero__text {
  flex: 1 1 640px;
  min-width: 0;
  padding: clamp(40px, 5vw, 64px) var(--pad) clamp(40px, 5vw, 64px) max(var(--pad), calc(50vw - 600px));
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
}
.hero__text .h1 { margin: 20px 0 0; }
/* The French headline is longer; a smaller size keeps it to two lines */
html[lang="fr"] .hero__text .h1 { font-size: clamp(34px, 3.7vw, 53px); }
@media (min-width: 1160px) {
  /* Two-column hero: let the headline reach into the gutter, as in the mockup */
  .hero__text .h1 { margin-right: calc(-1 * var(--pad)); }
}
@media (max-width: 640px) {
  .hero { min-height: 0; }
  .hero__text .h1 br { display: none; }
}
.hero__text .lede { margin-top: 24px; max-width: 540px; }
.hero__text .btns { margin-top: 36px; }
.hero__art {
  flex: 1 1 520px;
  min-width: 0;
  align-self: flex-end;
  position: relative;
  height: var(--hero-h);
  background: var(--charcoal);
  clip-path: polygon(calc(var(--hero-h) * .577) 0, 100% 0, 100% 100%, 0 100%);
}
.hero__art svg {
  position: absolute;
  right: calc(var(--door-r) - var(--u) * 1.3462);
  bottom: 0;
  width: calc(var(--u) * 3.6923);
  height: auto;
  aspect-ratio: 96 / 84;
}
.spill { position: relative; background: var(--ink); }
.spill svg {
  position: absolute;
  top: 0;
  right: calc(var(--door-r) - var(--u) * .6538);
  width: calc(var(--u) * 2.3077);
  height: auto;
  aspect-ratio: 60 / 16;
}
.spill__pad { height: calc(var(--u) * .6154 + 56px); }
.spill + .sec { padding-top: 0; }

/* ---------- Inner page hero ---------- */

.phero { position: relative; background: var(--paper); overflow: hidden; }
.phero__in {
  position: relative;
  z-index: 1;
  padding-top: clamp(48px, 6vw, 88px);
  padding-bottom: clamp(48px, 6vw, 88px);
}
.phero__text { display: flex; flex-direction: column; align-items: flex-start; gap: 20px; max-width: 720px; }
.phero__text .lede { max-width: 600px; }
.phero__art { display: none; }

@media (min-width: 1000px) {
  .phero__in { min-height: 360px; display: flex; align-items: center; }
  .phero__text { max-width: 58%; }
  .phero__art {
    display: block;
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: clamp(280px, 30vw, 460px);
  }
  /* A 60 degree face, the same angle as the symbol */
  .phero__art::before {
    content: "";
    position: absolute;
    inset: 0 -70% 0 0;
    background: var(--charcoal);
    transform: skewX(-30deg);
    transform-origin: 0 100%;
  }
  .phero__art svg {
    position: absolute;
    right: clamp(40px, 6vw, 96px);
    bottom: 0;
    width: clamp(150px, 15vw, 216px);
    height: auto;
    aspect-ratio: 96 / 84;
  }
}

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

.sec { padding: var(--sec) 0; }
.sec--paper { background: var(--paper); }
.sec--ink { background: var(--ink); }
.sec--charcoal { background: var(--charcoal); }
.sec--ochre { background: var(--ochre); color: var(--ink); }
.sec--tight { padding: clamp(48px, 6vw, 80px) 0; }

.sec__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px 64px;
}
.sec__head > div { flex: 1 1 360px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.sec__head > p { flex: 1 1 360px; min-width: 0; max-width: 520px; }

/* Rows: the three-column list from the mockup's services section */
.rows { margin-top: 56px; display: flex; flex-direction: column; border-bottom: 1px solid var(--rule); }
.row {
  border-top: 1px solid var(--rule);
  padding: 36px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 20px 48px;
}
.row__title { flex: 1 1 280px; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.row__body { flex: 1.4 1 320px; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }
.row__list { flex: 1 1 280px; min-width: 0; }
.rows + .more, .cols + .more { margin-top: 32px; }

/* Columns: numbered steps, principles, ways to engage */
.cols {
  margin-top: 56px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 40px 48px;
}
.cols--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
.col { border-top: 1px solid var(--rule); padding-top: 24px; display: flex; flex-direction: column; gap: 12px; }
.col .eyebrow { margin-bottom: 4px; }

/* Service detail blocks */
.svc {
  border-top: 1px solid var(--rule);
  padding: clamp(40px, 5vw, 64px) 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.7fr);
  gap: 32px 64px;
  scroll-margin-top: 16px;
}
.svc:first-child { border-top: 0; padding-top: 0; }
.svc:last-child { padding-bottom: 0; }
.svc__title { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }
.svc__main { display: flex; flex-direction: column; gap: 32px; }
.svc__lists { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 32px 48px; }
.svc__lists h3 { margin-bottom: 14px; }
@media (max-width: 820px) { .svc { grid-template-columns: minmax(0, 1fr); } }

/* Definition lists: standards, company facts */
.defs { margin-top: 56px; border-bottom: 1px solid var(--rule); }
.defs > div {
  border-top: 1px solid var(--rule);
  padding: 20px 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.7fr);
  gap: 4px 48px;
}
.defs dt { font-size: 16px; line-height: 26px; font-weight: 600; color: var(--fg); }
.defs dd { font-size: 16px; line-height: 26px; color: var(--muted); }
@media (max-width: 640px) { .defs > div { grid-template-columns: minmax(0, 1fr); } }

/* Two-column split: prose beside a list or facts */
.split { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: 48px 64px; align-items: start; }
.split__col { display: flex; flex-direction: column; align-items: flex-start; gap: 20px; min-width: 0; }
.split__col .defs { margin-top: 12px; width: 100%; }

.people { margin-top: 56px; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 40px 48px; }
.person { border-top: 1px solid var(--rule); padding-top: 24px; display: flex; flex-direction: column; gap: 8px; }

.note {
  border-left: 3px solid var(--accent);
  padding: 4px 0 4px 20px;
  font-size: 16px;
  line-height: 26px;
  color: var(--fg);
}

.contact-line { font-size: clamp(22px, 2.4vw, 28px); line-height: 1.25; font-weight: 600; overflow-wrap: anywhere; }

/* Call to action band */
.cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 32px 64px; }
.cta > div:first-child { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 16px; max-width: 640px; }
.cta .lede { color: var(--ink); }

/* ---------- Footer ---------- */

.ftr { background: var(--charcoal); }
.rampart {
  --bh: clamp(48px, 6vw, 80px);
  position: relative;
  height: var(--bh);
  background-color: var(--charcoal);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Cpath d='M20 5V40H0Z' fill='%2345423B'/%3E%3Cpath d='M20 5L40 40H20Z' fill='%2338352F'/%3E%3C/svg%3E");
  background-size: var(--bh) var(--bh);
  background-repeat: repeat-x;
  background-position: right bottom;
  overflow: hidden;
}
.rampart svg {
  position: absolute;
  right: calc(var(--bh) * 2);
  bottom: 0;
  width: var(--bh);
  height: var(--bh);
}
.ftr__in {
  padding-top: 56px;
  padding-bottom: 40px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 40px 48px;
}
.ftr__brand { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; grid-column: span 2; min-width: 0; }
@media (max-width: 520px) { .ftr__brand { grid-column: auto; } }
.ftr .wm { font-size: 18px; padding: 6px 0; }
.ftr__col { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.ftr__col .eyebrow { margin-bottom: 8px; }
.ftr__col a, .ftr__col span { font-size: 15px; line-height: 20px; padding: 8px 0; color: var(--paper); text-decoration: none; }
.ftr__col a:hover { color: var(--ochre); text-decoration: underline; text-underline-offset: 4px; }
.ftr__base {
  border-top: 1px solid var(--stone);
  padding-top: 20px;
  padding-bottom: 32px;
  font-size: 13px;
  line-height: 20px;
  color: var(--sand);
}

/* ---------- Capability statement ---------- */

.cs-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 24px 48px; }
.cs-head > div { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; min-width: 0; }
.cs-print-wm { display: none; }
.cs-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 32px 48px; margin-top: 32px; }
.cs-grid > div { border-top: 1px solid var(--rule); padding-top: 20px; display: flex; flex-direction: column; gap: 12px; }
.cs-block + .cs-block { margin-top: clamp(48px, 6vw, 72px); }
.cs-block > .lede { margin-top: 16px; max-width: 820px; }
.cs-block .defs { margin-top: 24px; }

@media print {
  @page { size: letter; margin: 14mm; }
  body { background: #fff; font-size: 10.5pt; line-height: 1.45; }
  .hdr, .ftr, .skip, .no-print, .phero__art { display: none !important; }
  .sec { padding: 0 !important; background: #fff !important; }
  .wrap { max-width: none; padding: 0; }
  .cs-print-wm { display: block; font-size: 16pt; margin-bottom: 14pt; }
  .h1 { font-size: 22pt; }
  .h2 { font-size: 13pt; }
  .h4 { font-size: 10.5pt; line-height: 1.3; }
  .lede, .body, .ticks, .defs dt, .defs dd { font-size: 10pt; line-height: 1.45; }
  .cs-block + .cs-block { margin-top: 16pt; }
  .cs-grid { margin-top: 8pt; gap: 10pt 18pt; grid-template-columns: repeat(3, 1fr); }
  .cs-grid--4 { grid-template-columns: repeat(2, 1fr); }
  .cs-grid > div { padding-top: 6pt; gap: 4pt; break-inside: avoid; }
  .cs-block > .lede { margin-top: 6pt; max-width: none; }
  .cs-block .defs { margin-top: 8pt; }
  .defs > div { padding: 4pt 0; }
  .ticks { gap: 2pt; }
  .todo { outline: 1px dashed #000; background: none; }
  a { color: inherit; text-decoration: none; }
}

@media (prefers-reduced-motion: no-preference) {
  .btn, .nav, .ftr__col a { transition: background-color .12s ease, color .12s ease; }
}
