/* The enhaq.online org chart (decision 180). Static, served by Caddy: no script, no cookie, nothing from another
   host. White and ink; names in EB Garamond (Montaigne's own copy), small labels in the device's sans-serif. No colour
   carries meaning. The portraits are used as they are (no rounding, mask or fade on them here).
   Choosing a face follows a link to an empty anchor fixed at the top of the window, placed just before that face's
   panel: ".anchor:target + .panel" shows the panel and the page does not jump. "#top" (Back) shows the opening text. */
@font-face {
  font-family: "EB Garamond";
  src: url("/landing/EBGaramond-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
:root {
  --bg: #ffffff; --ink: #14171c; --muted: #5b6470; --line: #9aa3ad; --rule: #e3e6ea;
  --serif: "EB Garamond", Georgia, "Iowan Old Style", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
html, body { margin: 0; background: var(--bg); color: var(--ink); }
body { font-family: var(--sans); -webkit-text-size-adjust: 100%; }
a { color: var(--ink); }
.anchor { position: fixed; top: 0; left: 0; width: 0; height: 0; overflow: hidden; }

.face { position: relative; box-sizing: border-box; color: var(--ink); text-decoration: none; }
.face img { display: block; }
.face .name { font-family: var(--serif); font-weight: 400; }
.face .role { font-size: 12px; color: var(--muted); }
.face::after { content: ""; position: absolute; inset: 0; border: 1px solid transparent; border-radius: 12px;
  pointer-events: none; }
.face:hover .name { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.face:focus-visible { outline: none; }
.face:focus-visible::after { outline: 2px solid var(--ink); outline-offset: 2px; }
.face:has(+ .anchor:target)::after { border-color: var(--ink); }  /* the chosen face: a thin ink outline */

.panel { display: none; box-sizing: border-box; }
.p-0 { display: block; }
@media (min-width: 900px) { .chart:has(.anchor:target:not(#top)) .p-0 { display: none; } }  /* phone: stays */
.anchor:target + .panel { display: flex; }
.panel h2 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: 28px; line-height: 1.2; }
.panel p { margin: 0; font-family: var(--serif); font-size: 19px; line-height: 1.5; color: var(--ink); }
.open { display: inline-flex; align-items: center; min-height: 44px; box-sizing: border-box; margin-top: 6px;
  padding: 0 22px; border: 1px solid var(--ink); border-radius: 8px; text-decoration: none; font-size: 14px;
  font-weight: 500; }
.open:hover { text-decoration: underline; text-underline-offset: 3px; }
.back { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; font-size: 13px;
  color: var(--muted); }
.open:focus-visible, .back:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

/* Computer: the chart as drawn (a 1280 x 784 field, positions in fractions of 1280), the panel under it. */
@media (min-width: 900px) {
  .chart { display: grid; grid-template-columns: 100%; grid-template-rows: 784px auto; width: min(1280px, 100% - 32px);
    margin: 0 auto; padding-bottom: 48px; }
  .face, .ln { grid-area: 1 / 1; justify-self: start; align-self: start; }
  .face { width: 160px; height: 184px; padding: 8px; display: flex; flex-direction: column; align-items: center;
    justify-content: center; gap: 8px; text-align: center; }
  .face .role { white-space: nowrap; }  /* "Chief investment officer" on one line, inside the 160 px face */
  .face img { width: 104px; height: 104px; }
  .face .name { font-size: 22px; line-height: 1.2; }
  .face .role { margin-top: -6px; }
  .top   { margin: 48px 0 0 calc(50% - 80px); }
  /* PACIOLI-1: three faces under Erasmus (Montaigne, Avicenna, Pacioli), so the row is respaced: 19 points apart,
     no overlap down to the 868 px chart of a 900 px window. */
  .f-e   { margin: 320px 0 0 calc(29% - 80px); }
  .f-mb  { margin: 320px 0 0 calc(70% - 80px); }
  .f-v   { margin: 320px 0 0 calc(90% - 80px); }
  .f-mt  { margin: 592px 0 0 calc(10% - 80px); }
  .f-a   { margin: 592px 0 0 calc(29% - 80px); }
  .f-p   { margin: 592px 0 0 calc(48% - 80px); }
  .f-c   { margin: 592px 0 0 calc(70% - 80px); }
  .ln { background: var(--line); width: 1.5px; }
  .ln-n  { margin: 232px 0 0 calc(50% - 0.75px); height: 44px; }
  .ln-h1 { margin: 275.25px 0 0 29%; width: 61%; height: 1.5px; }
  .ln-e  { margin: 276px 0 0 calc(29% - 0.75px); height: 44px; }
  .ln-mb { margin: 276px 0 0 calc(70% - 0.75px); height: 44px; }
  .ln-v  { margin: 276px 0 0 calc(90% - 0.75px); height: 44px; }
  .ln-e2 { margin: 504px 0 0 calc(29% - 0.75px); height: 44px; }
  .ln-h2 { margin: 547.25px 0 0 10%; width: 38%; height: 1.5px; }
  .ln-mt { margin: 548px 0 0 calc(10% - 0.75px); height: 44px; }
  .ln-a  { margin: 548px 0 0 calc(29% - 0.75px); height: 44px; }
  .ln-p  { margin: 548px 0 0 calc(48% - 0.75px); height: 44px; }
  .ln-c  { margin: 504px 0 0 calc(70% - 0.75px); height: 88px; }
  .panel { grid-area: 2 / 1; justify-self: center; width: min(880px, 100%); min-height: 160px; margin-top: 24px;
    padding: 20px 28px; flex-direction: column; align-items: center; gap: 8px; text-align: center;
    border-top: 1px solid var(--rule); }
  .p-0 { text-align: center; }
  .panel p { max-width: 720px; margin: 0 auto; }
}

/* Phone: a vertical tree. Nauman and the opening text (kept, so nothing above the chosen face moves), then each
   direct report with its own reports indented under it; the text opens under the chosen face and Back closes it. Lines: the first level at 24px, the second at 64px (portrait centres), drawn as
   backgrounds so they run unbroken through open panels. */
@media (max-width: 899.98px) {
  .chart { max-width: 640px; margin: 0 auto; padding: 16px 16px 40px; box-sizing: border-box; }
  .ln { display: none; }
  .face { display: grid; grid-template-columns: 48px 1fr; column-gap: 12px; align-items: center; min-height: 64px;
    padding: 8px 8px 8px var(--x, 0px); --x: 0px; }
  .face img { width: 48px; height: 48px; grid-row: 1 / span 2; }
  .face .name { font-size: 21px; line-height: 1.15; align-self: end; }
  .face .role { align-self: start; }
  .face::after { left: calc(var(--x) - 6px); }
  .f-e, .f-mb, .f-v { --x: 40px; }
  .f-mt, .f-a, .f-p, .f-c { --x: 80px; }
  .panel { flex-direction: column; align-items: flex-start; gap: 6px; padding: 4px 8px 16px 80px; }
  .p-0 { padding: 8px 8px 20px 40px; }
  .panel h2 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .panel p { font-size: 18px; }
  .back { padding: 0; }
  .top { background: linear-gradient(var(--line), var(--line)) 23.25px 56px / 1.5px 100% no-repeat; }
  .p-0, .p-p, .p-c { background: linear-gradient(var(--line), var(--line)) 23.25px 0 / 1.5px 100% no-repeat; }
  .f-e, .f-mb { background:
      linear-gradient(var(--line), var(--line)) 23.25px 0 / 1.5px 100% no-repeat,
      linear-gradient(var(--line), var(--line)) 24px 50% / 16px 1.5px no-repeat,
      linear-gradient(var(--line), var(--line)) 63.25px 56px / 1.5px 100% no-repeat; }
  .p-e, .p-mt, .p-a, .p-mb { background:
      linear-gradient(var(--line), var(--line)) 23.25px 0 / 1.5px 100% no-repeat,
      linear-gradient(var(--line), var(--line)) 63.25px 0 / 1.5px 100% no-repeat; }
  .f-mt, .f-a { background:
      linear-gradient(var(--line), var(--line)) 23.25px 0 / 1.5px 100% no-repeat,
      linear-gradient(var(--line), var(--line)) 63.25px 0 / 1.5px 100% no-repeat,
      linear-gradient(var(--line), var(--line)) 64px 50% / 16px 1.5px no-repeat; }
  .f-p, .f-c { background:
      linear-gradient(var(--line), var(--line)) 23.25px 0 / 1.5px 100% no-repeat,
      linear-gradient(var(--line), var(--line)) 63.25px 0 / 1.5px 50% no-repeat,
      linear-gradient(var(--line), var(--line)) 64px 50% / 16px 1.5px no-repeat; }
  .f-v { background:
      linear-gradient(var(--line), var(--line)) 23.25px 0 / 1.5px 50% no-repeat,
      linear-gradient(var(--line), var(--line)) 24px 50% / 16px 1.5px no-repeat; }
}
