/* Stavaro — "Balance in Interim Management"
   Design tokens, layout and the balance motif (beam on a fulcrum). */

@font-face {
  font-family: "Newsreader";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("../fonts/newsreader.woff2") format("woff2");
}
@font-face {
  font-family: "Instrument Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/instrument-sans-400.woff2") format("woff2");
}
@font-face {
  font-family: "Instrument Sans";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/instrument-sans-500.woff2") format("woff2");
}

:root {
  --paper: #f5f2ec;
  --paper-deep: #ece7de;
  --ink: #1b1e23;
  --slate: #4a4f57;
  --bronze: #8c6a3f;      /* marks and lines only */
  --bronze-text: #6e5130; /* AA on paper */
  --line: rgba(27, 30, 35, 0.16);

  --serif: "Newsreader", "Iowan Old Style", Georgia, serif;
  --sans: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  --wrap: 72rem;
  --gutter: clamp(1rem, 4vw, 3rem);
  --section: clamp(5rem, 11vw, 9rem);
  --ease: cubic-bezier(0.3, 0.7, 0.2, 1);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }

a { color: inherit; text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { color: var(--bronze-text); }

:focus-visible {
  outline: 2px solid var(--bronze-text);
  outline-offset: 3px;
  border-radius: 2px;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

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

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--paper);
  border-bottom: 1px solid transparent;
  transition: border-color 0.4s var(--ease);
}
.site-header.is-scrolled { border-bottom-color: var(--line); }

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 4.5rem;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-decoration: none;
}
.wordmark svg { width: 1.6rem; height: auto; }

.nav { display: flex; align-items: center; gap: 2rem; }
.nav ul {
  display: flex;
  gap: 1.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.9375rem;
}
.nav ul a { text-decoration: none; color: var(--slate); }
.nav ul a:hover { color: var(--ink); }

.lang {
  display: flex;
  gap: 0.35rem;
  font-size: 0.8125rem;
  letter-spacing: 0.08em;
  color: var(--slate);
}
.lang a, .lang span[aria-current] {
  display: inline-block;
  padding: 0.35rem 0.15rem;
  text-decoration: none;
}
.lang span[aria-current] { color: var(--ink); font-weight: 500; }
.lang .sep { padding: 0.35rem 0; }

@media (max-width: 760px) {
  .site-header { position: relative; }
  .site-header .wrap { position: relative; flex-wrap: wrap; row-gap: 0.25rem; padding-top: 1rem; min-height: 0; }
  .nav { width: 100%; padding-bottom: 0.6rem; }
  .nav ul { gap: 0.9rem; font-size: 0.8125rem; white-space: nowrap; overflow-x: auto; scrollbar-width: none; }
  .nav ul a { display: inline-block; padding-block: 0.4rem; }
  .lang { position: absolute; top: 0.7rem; right: var(--gutter); }
}

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

.hero { padding-block: clamp(4rem, 12vw, 9rem) clamp(3rem, 7vw, 5rem); }

.eyebrow {
  margin: 0 0 1.75rem;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--bronze-text);
}

.hero h1 {
  max-width: 15ch;
  margin: 0;
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(2.6rem, 7vw, 5.4rem);
  line-height: 1.04;
  letter-spacing: -0.015em;
}

.hero .lead {
  max-width: 36rem;
  margin: 2rem 0 0;
  font-size: clamp(1.0625rem, 1.6vw, 1.25rem);
  color: var(--slate);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 2rem;
  align-items: center;
  margin-top: 2.5rem;
}

.button {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.95rem 1.5rem;
  background: var(--ink);
  color: var(--paper);
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.3s var(--ease);
}
.button:hover { background: #33373e; color: var(--paper); }
.button .arrow { transition: transform 0.3s var(--ease); }
.button:hover .arrow { transform: translateX(3px); }

.text-link { font-size: 0.9375rem; color: var(--slate); }

/* ---------- Balance motif ---------- */

.balance { margin-top: clamp(3.5rem, 8vw, 6rem); }
.balance svg { width: 100%; height: auto; overflow: visible; }
.balance .beam { transform-box: view-box; } /* pivot set per SVG via transform-origin attribute */
.tilt-right { --tilt: 4deg; }
.balance .fulcrum { fill: var(--bronze); }
.balance .ink { fill: var(--ink); }
.balance .hollow { fill: none; stroke: var(--ink); stroke-width: 1; }
.balance .rod { stroke: var(--ink); stroke-width: 1; vector-effect: non-scaling-stroke; }
.balance-caption {
  display: flex;
  justify-content: space-between;
  margin-top: 0.85rem;
  font-size: 0.8125rem;
  letter-spacing: 0.06em;
  color: var(--slate);
}

@keyframes settle {
  0%   { transform: rotate(var(--tilt, -4deg)); }
  55%  { transform: rotate(calc(var(--tilt, -4deg) * -0.3)); }
  80%  { transform: rotate(calc(var(--tilt, -4deg) * 0.1)); }
  100% { transform: rotate(0deg); }
}

.js .balance .beam { transform: rotate(var(--tilt, -4deg)); }
.js .balance.is-settled .beam { animation: settle 2.4s var(--ease) both; }

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

.section { padding-block: var(--section); position: relative; }

/* Section divider: a hairline resting on a small fulcrum */
.section::before {
  content: "";
  position: absolute;
  top: 0;
  left: var(--gutter);
  right: var(--gutter);
  max-width: calc(var(--wrap) - 2 * var(--gutter));
  margin-inline: auto;
  height: 1px;
  background: var(--line);
}
.section::after {
  content: "";
  position: absolute;
  top: 1px;
  left: 50%;
  width: 0;
  height: 0;
  margin-left: -6px;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-bottom: 9px solid var(--bronze);
}

.section-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2rem;
}
@media (min-width: 1000px) {
  .section-grid { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 4rem; }
  .section-head { position: sticky; top: 7rem; align-self: start; }
}

.section-num {
  display: block;
  margin-bottom: 0.75rem;
  font-family: var(--serif);
  font-size: 1rem;
  color: var(--bronze-text);
}
.section-head h2 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(2rem, 3.6vw, 2.75rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.prose p { margin: 0 0 1.25rem; max-width: 40rem; }
.prose .intro {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(1.4rem, 2.4vw, 1.85rem);
  line-height: 1.35;
  color: var(--ink);
  margin-bottom: 2rem;
}
.prose p:not(.intro) { color: var(--slate); }

/* Profile facts */
.facts {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  margin: 3rem 0 0;
  border-top: 1px solid var(--line);
}
.facts div {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.25rem;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--line);
}
@media (min-width: 640px) {
  .facts div { grid-template-columns: 11rem minmax(0, 1fr); gap: 2rem; }
}
.facts dt { font-size: 0.8125rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--slate); padding-top: 0.2rem; }
.facts dd { margin: 0; }
.facts dd em { font-family: var(--serif); font-size: 1.08em; }

/* Approach: tensions held in balance */
.tensions { margin: 1rem 0 0; padding: 0; list-style: none; }
.tension { padding: 2.25rem 0; border-bottom: 1px solid var(--line); }
.tension:first-child { padding-top: 1rem; }

.tension-pair {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(4rem, 9rem) minmax(0, 1fr);
  align-items: end;
  gap: 1rem;
  font-family: var(--serif);
  font-size: clamp(1.35rem, 2.6vw, 1.9rem);
  font-weight: 300;
  line-height: 1.15;
}
.tension-pair .left { text-align: right; }
.tension-pair .balance { margin: 0 0 0.3rem; }
@media (max-width: 520px) {
  .tension-pair { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "l r" "b b"; gap: 0.5rem 1rem; font-size: 1.3rem; }
  .tension-pair .left { grid-area: l; text-align: left; }
  .tension-pair .right { grid-area: r; text-align: right; }
  .tension-pair .balance { grid-area: b; justify-self: center; width: 100%; max-width: 10rem; margin: 0.25rem 0 0; }
}
.tension p { margin: 1.1rem auto 0; max-width: 34rem; text-align: center; color: var(--slate); }

/* Services */
.services {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}
@media (min-width: 640px) and (max-width: 999px), (min-width: 1180px) {
  .services { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 3rem; }
}
.service { padding: 1.75rem 0 2rem; border-bottom: 1px solid var(--line); }
.service h3 {
  display: flex;
  gap: 0.9rem;
  align-items: baseline;
  margin: 0 0 0.6rem;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.375rem;
  line-height: 1.25;
}
.service h3 span { font-size: 0.875rem; color: var(--bronze-text); font-feature-settings: "tnum"; }
.service p { margin: 0; color: var(--slate); }

/* Track record ledger */
.ledger {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  margin: 0;
  border-top: 1px solid var(--ink);
}
@media (min-width: 680px) {
  .ledger { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 3rem; }
}
.ledger div { display: flex; flex-direction: column-reverse; padding: 1.75rem 0; border-bottom: 1px solid var(--line); }
.ledger dt {
  font-size: 0.9375rem;
  color: var(--slate);
}
.ledger dd {
  margin: 0 0 0.35rem;
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(2.25rem, 4.2vw, 3.25rem);
  line-height: 1;
  white-space: nowrap;
  letter-spacing: -0.02em;
  font-variant-numeric: lining-nums;
}

.sectors-label {
  margin: 3.5rem 0 1rem;
  font-size: 0.8125rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--slate);
}
.sectors {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.sectors li {
  padding: 0.45rem 0.95rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.9375rem;
}
.prose .note { margin-top: 2.5rem; color: var(--slate); max-width: 40rem; }

/* Contact */
.contact { background: var(--paper-deep); }
.contact h2 {
  max-width: 18ch;
  margin: 0 0 2.5rem;
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(2.2rem, 5vw, 3.75rem);
  line-height: 1.08;
  letter-spacing: -0.015em;
}
.contact-lines { display: grid; gap: 0; margin: 0; max-width: 40rem; border-top: 1px solid var(--line); }
.contact-lines div {
  display: grid;
  grid-template-columns: 8rem minmax(0, 1fr);
  gap: 1rem;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--line);
}
.contact-lines dt { font-size: 0.8125rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--slate); padding-top: 0.3rem; }
.contact-lines dd { margin: 0; font-family: var(--serif); font-size: 1.375rem; overflow-wrap: anywhere; }
.contact-lines a { text-decoration: none; background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size 0.4s var(--ease); }
.contact-lines a:hover { background-size: 100% 1px; }

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

.site-footer { padding-block: 3rem 3.5rem; font-size: 0.875rem; color: var(--slate); }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 1rem 2rem; justify-content: space-between; align-items: flex-start; }
.site-footer address { font-style: normal; line-height: 1.8; }
.site-footer ul { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; margin: 0; padding: 0; list-style: none; }
.site-footer .motto { width: 100%; margin: 1rem 0 0; padding-top: 1.5rem; border-top: 1px solid var(--line); font-family: var(--serif); font-style: italic; }

/* ---------- 404 ---------- */

.notfound { min-height: 70vh; display: flex; align-items: center; }
.notfound h1 { font-family: var(--serif); font-weight: 300; font-size: clamp(2.4rem, 6vw, 4rem); line-height: 1.08; margin: 0 0 1.5rem; }
.notfound p { color: var(--slate); margin: 0 0 0.5rem; }
.notfound .balance { max-width: 34rem; margin-top: 3rem; }

/* ---------- Reveal ---------- */

.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.js .reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .js .balance .beam, .js .balance.is-settled .beam { transform: none; animation: none; }
  .button .arrow, .contact-lines a { transition: none; }
}

@media print {
  .site-header, .balance, .skip-link { display: none; }
  body { background: #fff; }
  .contact { background: none; }
}

/* The 404 beam stays out of balance on purpose */
.notfound .balance .beam,
.js .notfound .balance.is-settled .beam { transform: rotate(-5deg); animation: none; }

/* ---------- Photo (black and white, at the helm) ---------- */

/* Text and photo share the content grid; the beam sits below both. */
.hero-top { display: grid; grid-template-columns: minmax(0, 1fr); }
.hero-text { position: relative; z-index: 1; }

.hero-photo {
  pointer-events: none;
  mix-blend-mode: multiply;
}
/* The wrapper is sized by layout; the image always covers it without distortion. */
.hero-photo img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
}

@media (min-width: 1000px) {
  .hero { overflow-x: clip; }
  .hero-top { position: relative; }
  .hero-text { max-width: 40rem; }
  .hero-photo {
    /* beside the text column; capped so wide screens keep the hands in frame */
    position: absolute;
    top: -5rem;
    bottom: -0.5rem;
    left: 55%;
    width: min(calc(45% + (100vw - 100%) / 2), 46rem);
    opacity: 0.62;
    -webkit-mask-image:
      linear-gradient(to right, transparent 0%, #000 30%, #000 78%, transparent 100%),
      linear-gradient(to bottom, transparent 0%, #000 16%, #000 72%, transparent 100%);
    -webkit-mask-composite: source-in;
    mask-image:
      linear-gradient(to right, transparent 0%, #000 30%, #000 78%, transparent 100%),
      linear-gradient(to bottom, transparent 0%, #000 16%, #000 72%, transparent 100%);
    mask-composite: intersect;
  }
  .hero-photo img { object-position: 40% 30%; }
  .hero .balance { position: relative; z-index: 1; }
}

@media (max-width: 999px) {
  .hero { padding-top: 0; }
  .hero-photo {
    order: -1;
    margin: 0 calc(-1 * var(--gutter)) -3.5rem;
    height: clamp(18rem, 55vw, 26rem);
    opacity: 0.55;
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 14%, #000 45%, transparent 100%);
    mask-image: linear-gradient(to bottom, transparent 0%, #000 14%, #000 45%, transparent 100%);
  }
  .hero-photo img { object-position: 50% 26%; }
}

@media print {
  .hero-photo { display: none; }
}
