/* ============================================================
   Focal Talent — focaltalent.work
   Butter and charcoal. No accent hue. Rules, never cards.
   ============================================================ */

:root {
  --paper:        #faf9e1;   /* pale butter */
  --paper-2:      #f2f0d0;
  --ink:          #171713;
  --ink-muted:    #5f5f52;   /* ~6.0:1 on paper — body-safe */
  --ink-faint:    #a3a294;   /* decorative only — never body text */
  --rule:         #e3e1c3;
  --rule-strong:  #c6c4a6;
  /* The reference carries no accent hue: the colour story is the band flip.
     Accent resolves to ink so numerals still outrank the muted labels. */
  --accent:       #171713;

  /* A grotesque with DIN in its ancestry — industrial, and heavy when pushed. */
  --sans:  "Archivo", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono:  "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --gutter: 7.5rem;
  --gap:    2.5rem;
  --hang:   calc(var(--gutter) + var(--gap));
  --measure: 34rem;          /* ~60 characters at 18px Archivo */

  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* ── Reset ─────────────────────────────────────────────────── */

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.125rem;
  line-height: 1.6;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, p, ul, dl, dd { margin: 0; }
ul { padding: 0; list-style: none; }

a { color: inherit; }

::selection { background: var(--accent); color: var(--paper); }

/* ── Utilities ─────────────────────────────────────────────── */

.sr-only {
  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: -9999px; top: 0; z-index: 100;
  background: var(--ink); color: var(--paper);
  font-family: var(--mono); font-size: .75rem;
  letter-spacing: .085em; text-transform: uppercase;
  padding: .75rem 1rem; text-decoration: none;
}
.skip:focus { left: 0; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* ── Page grid: content sits left of centre ────────────────── */

.grid {
  display: grid;
  grid-template-columns:
    [gutter-start] var(--gutter)
    [content-start] minmax(0, var(--measure))
    [content-end]   minmax(0, 18rem)
    [rail-end];
  column-gap: var(--gap);
  max-width: 68rem;
  margin: 0 auto;
  padding: 0 2rem;
}

.col-content { grid-column: content-start / content-end; }
.col-full    { grid-column: gutter-start / rail-end; }

/* Display type gets its own measure — prose measure is far too narrow for it. */
.col-wide {
  grid-column: content-start / rail-end;
  max-width: 52rem;
}

/* ── Masthead ──────────────────────────────────────────────── */

.masthead {
  position: sticky; top: 0; z-index: 50;
  background: var(--paper);
  border-bottom: 1px solid transparent;
  transition: border-color .3s ease;
}
.masthead.stuck { border-bottom-color: var(--rule); }

.masthead-in {
  max-width: 68rem; margin: 0 auto;
  padding: 1.15rem 2rem;
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 1.5rem;
}

.wordmark {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 1.375rem;
  letter-spacing: -.02em;
  text-decoration: none;
  white-space: nowrap;
}

.topnav {
  white-space: nowrap;
  font-family: var(--mono);
  font-size: .75rem;
  letter-spacing: .085em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.topnav a {
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  transition: color .2s ease, border-color .2s ease;
}
.topnav a:hover { color: var(--accent); border-bottom-color: var(--accent); }
.topnav .dot { margin: 0 .5rem; color: var(--ink-faint); }

/* ── Bands ─────────────────────────────────────────────────── */

.band { padding: 6.5rem 0; }
.band:first-of-type { padding-top: 5.5rem; }

.band-inverse {
  --paper:       #262522;
  --paper-2:     #2f2e29;
  --ink:         #faf9e1;
  --ink-muted:   #a8a79a;
  --ink-faint:   #6f6e64;
  --rule:        #3a3934;
  --rule-strong: #4e4d46;
  --accent:      #faf9e1;
  background: var(--paper);
  color: var(--ink);
  padding: 6rem 0 6.5rem;
}

/* A centre line runs down the sheet in the gutter, dash-dot like the drawing.
   Band padding interrupts it between sections, as a drawn line would be. */
.band > .grid { position: relative; }
.band > .grid::before {
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  left: calc(2rem + var(--gutter) + (var(--gap) / 2));
  width: 1px;
  background: repeating-linear-gradient(
    to bottom,
    var(--rule) 0 14px,
    transparent 14px 18px,
    var(--rule) 18px 20px,
    transparent 20px 24px
  );
}

/* ── Section heads: label sits on a full-bleed hairline ────── */

.section-head {
  position: relative;
  margin-bottom: 3.25rem;
  font-family: var(--mono);
  font-size: .8125rem;
  letter-spacing: .085em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.section-head::before {
  content: "";
  position: absolute; left: 0; right: 0; top: .58em;
  height: 1px; background: var(--rule-strong);
  transform: scaleX(0); transform-origin: left;
  transition: transform .9s var(--ease);
}
.section-head.in::before { transform: scaleX(1); }

.section-head .mark {
  position: relative;
  display: inline-block;
  background: var(--paper);
  padding-right: 1rem;
}
.section-head .mark i {
  display: inline-block;
  width: var(--hang);
  font-style: normal;
  color: var(--accent);
}

/* ── I · Hero ──────────────────────────────────────────────── */

.kicker {
  font-family: var(--mono);
  font-size: .8125rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 2.25rem;
}

.display {
  font-family: var(--sans);
  font-weight: 700;
  font-size: clamp(2.25rem, 5.6vw, 3.75rem);
  line-height: 1.06;
  letter-spacing: -.032em;
  margin-bottom: 1.75rem;
}

.accent-rule {
  height: 1px;
  background: var(--accent);
  margin-bottom: 2.25rem;
}

.lede {
  font-size: 1.25rem;
  line-height: 1.55;
  color: var(--ink);
}
.lede em {
  font-style: italic;
}

/* ── Motif: drafted, not decorative ────────────────────────── */

.motif {
  grid-column: content-end / rail-end;
  grid-row: 4;              /* beside the lede — never `-1`, the explicit grid has no rows */
  align-self: start;
  margin: .35rem 0 0;
  color: var(--ink-faint);
}

.motif svg {
  display: block;
  width: 100%;
  max-width: 12.5rem;   /* 200px — 1 user unit renders as 1px */
  height: auto;
  overflow: visible;
}

.motif svg * {
  fill: none;
  stroke: currentColor;
  stroke-width: 1;
}

/* Motifs that sit in the right-hand column beside a section's body. */
.motif--rail {
  grid-column: content-end / rail-end;
  grid-row: 2;
  margin-top: 0;
}
.motif--rail svg { max-width: 11rem; }

/* Dash-dot is the centre-line convention: long dash, gap, dot, gap. */
.mo-centre line,
.mo-pcd { stroke-dasharray: 14 4 2 4; }

/* A P&ID signal line is dashed; process lines are solid. */
.mo-signal { stroke-dasharray: 3 3; }

/* Tag text is type, not linework — the global stroke/fill rule must not apply. */
.motif text {
  fill: currentColor;
  stroke: none;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: .04em;
  text-anchor: middle;
}

/* The outer diameter draws itself once. */
.js .motif .mo-outer {
  stroke-dasharray: 478;              /* 2πr, r = 76 */
  stroke-dashoffset: 478;
  transition: stroke-dashoffset 1.5s var(--ease) .25s;
}
.js .motif.in .mo-outer { stroke-dashoffset: 0; }

/* ── II · Disciplines ──────────────────────────────────────── */

.disciplines li {
  padding: 1.15rem 0;
  border-top: 1px solid var(--rule);
}
.disciplines li:last-child { border-bottom: 1px solid var(--rule); }

.d-name {
  display: block;
  font-weight: 600;
  font-size: 1.1875rem;
  letter-spacing: -.011em;
}

.d-note {
  display: block;
  margin-top: .2rem;
  font-size: 1.0625rem;
  color: var(--ink-muted);
}

/* ── II · Prose ────────────────────────────────────────────── */

.prose p + p { margin-top: 1.5rem; }
.prose p { max-width: var(--measure); }

/* ── IV · Contact ──────────────────────────────────────────── */

.email {
  font-family: var(--sans);
  font-weight: 700;
  font-size: clamp(1.375rem, 3.2vw, 2.25rem);
  line-height: 1.15;
  letter-spacing: -.028em;
  text-decoration: none;
  border-bottom: 1px solid var(--rule-strong);
  padding-bottom: .1em;
  transition: border-color .25s ease, color .25s ease;
}
.email:hover { color: var(--accent); border-bottom-color: var(--accent); }

.copied {
  display: inline-block;
  margin-left: 1rem;
  font-family: var(--mono);
  font-size: .625rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent);
  opacity: 0;
  transition: opacity .25s ease;
  vertical-align: middle;
}
.copied.show { opacity: 1; }

/* ── Colophon ──────────────────────────────────────────────── */

.colophon {
  border-top: 1px solid var(--rule-strong);
  padding: 2.5rem 0 4rem;
}

/* Registration marks bracket the block the way a drawing's title block is
   cornered — four L-ticks built from eight gradients, so no extra elements. */
.titleblock {
  --tick: var(--rule-strong);
  --tick-w: 1px;
  --tick-l: 11px;

  display: flex;
  flex-wrap: wrap;
  gap: 1.75rem 3.5rem;
  padding: 1.5rem 1.25rem;
  width: fit-content;      /* the bracket hugs the block, as a title block does */
  max-width: 100%;
  font-family: var(--mono);
  font-size: .75rem;
  letter-spacing: .08em;

  background-image:
    linear-gradient(var(--tick), var(--tick)), linear-gradient(var(--tick), var(--tick)),
    linear-gradient(var(--tick), var(--tick)), linear-gradient(var(--tick), var(--tick)),
    linear-gradient(var(--tick), var(--tick)), linear-gradient(var(--tick), var(--tick)),
    linear-gradient(var(--tick), var(--tick)), linear-gradient(var(--tick), var(--tick));
  background-repeat: no-repeat;
  background-size:
    var(--tick-l) var(--tick-w), var(--tick-w) var(--tick-l),
    var(--tick-l) var(--tick-w), var(--tick-w) var(--tick-l),
    var(--tick-l) var(--tick-w), var(--tick-w) var(--tick-l),
    var(--tick-l) var(--tick-w), var(--tick-w) var(--tick-l);
  background-position:
    left top, left top,
    right top, right top,
    left bottom, left bottom,
    right bottom, right bottom;
}
.titleblock > div { min-width: 11rem; }
.titleblock dt {
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: .4rem;
}
.titleblock dd { color: var(--ink-muted); }
.titleblock a {
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
  transition: color .2s ease, border-color .2s ease;
}
.titleblock a:hover { color: var(--accent); border-bottom-color: var(--accent); }

/* ── Reveal ────────────────────────────────────────────────── */

.js [data-reveal] {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .8s ease, transform .8s var(--ease);
}
.js [data-reveal].in { opacity: 1; transform: none; }

/* Rules animate their width, not their position. */
.js .accent-rule[data-reveal] { opacity: 1; transform: scaleX(0); transform-origin: left; }
.js .accent-rule[data-reveal].in { transform: scaleX(1); }

.js .section-head[data-reveal] { transform: none; }

/* Without JS the hairlines are simply drawn. */
html:not(.js) .section-head::before { transform: scaleX(1); }

/* ── Narrow ────────────────────────────────────────────────── */

@media (max-width: 60rem) {
  :root { --gutter: 0rem; --gap: 2rem; --hang: 2.25rem; }

  .grid {
    grid-template-columns: [gutter-start content-start] minmax(0, 1fr) [content-end rail-end];
    padding: 0 1.5rem;
  }
  .col-content, .col-full { grid-column: 1 / -1; }

  /* No gutter to run down, and the flange would crowd the lede. */
  .band > .grid::before { display: none; }
  .motif { grid-column: 1 / -1; grid-row: auto; margin-top: 2.5rem; }
  .motif svg { max-width: 9rem; }

  .masthead-in { padding: 1rem 1.5rem; }
  .band { padding: 4.5rem 0; }
  .band:first-of-type { padding-top: 3.5rem; }
  .band-inverse { padding: 4.25rem 0 4.5rem; }
  .section-head { margin-bottom: 2.5rem; }

  .colophon { padding-bottom: 3rem; }
}

@media (max-width: 30rem) {
  /* The forced break strands a word at this width — let the line wrap itself. */
  .display br { display: none; }

  /* "Focal Talent" plus both links will not fit on a narrow phone, and letting
     them wrap looks broken. One link is enough across four short sections. */
  .topnav a:first-of-type,
  .topnav .dot { display: none; }
}

/* ── Dark ──────────────────────────────────────────────────── */

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper:       #1c1b18;
    --paper-2:     #24231f;
    --ink:         #f0efdf;
    --ink-muted:   #9c9b8e;
    --ink-faint:   #6b6a60;
    --rule:        #2e2d28;
    --rule-strong: #43423a;
    --accent:      #f0efdf;
  }
  /* Keep the contrast block reading as a distinct block, not an inversion. */
  :root:not([data-theme="light"]) .band-inverse {
    --paper:       #292824;
    --paper-2:     #33322c;
    --ink:         #f4f3e4;
    --ink-muted:   #a5a497;
    --ink-faint:   #737268;
    --rule:        #3b3a34;
    --rule-strong: #4f4e46;
    --accent:      #f4f3e4;
  }
}

/* ── Reduced motion ───────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
  }
  .js [data-reveal],
  .js .accent-rule[data-reveal] { opacity: 1; transform: none; }
  .section-head::before { transform: scaleX(1) !important; }
  .js .motif .mo-outer { stroke-dashoffset: 0; }
}

/* ── Print ─────────────────────────────────────────────────── */

@media print {
  :root {
    --paper: #fff; --ink: #000; --ink-muted: #333; --ink-faint: #666;
    --rule: #bbb; --rule-strong: #888; --accent: #000;
  }
  .masthead, .skip { display: none; }
  body { font-size: 11pt; line-height: 1.5; }
  .band, .band-inverse {
    background: #fff !important; color: #000 !important;
    padding: 1.5rem 0; break-inside: avoid;
  }
  .band-inverse {
    --paper: #fff; --ink: #000; --ink-muted: #333;
    --rule: #bbb; --rule-strong: #888; --accent: #000;
    border-top: 1px solid #888; border-bottom: 1px solid #888;
  }
  .display { font-size: 28pt; }
  .email { font-size: 16pt; border: 0; }
  [data-reveal] { opacity: 1 !important; transform: none !important; }
  .section-head::before { transform: scaleX(1) !important; }
  .motif .mo-outer { stroke-dashoffset: 0 !important; }
  .grid { max-width: none; padding: 0; }
}
