/* ============================================================
   Shuman Consulting Services — stylesheet
   Tonsky-inspired: one flat field, navy ink, hairline borders,
   single narrow column, IBM Plex type.
   Two themes via [data-theme]: "cream" (default) and "gold".
   ============================================================ */

/* ---- 1. Reset ---- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
img, svg, video { display: block; max-width: 100%; height: auto; }
p, h1, h2, h3, h4 { overflow-wrap: break-word; }
:target { scroll-margin-top: 4rem; }

/* ---- 2. Tokens — cream field (default / "light") ---- */
:root {
  --bg:            #f7f3ea;
  --ink:           #1a1a2e;
  --muted:         rgba(26, 26, 46, 0.56);
  --line:          rgba(26, 26, 46, 0.16);
  --line-strong:   rgba(26, 26, 46, 0.42);
  --accent:        #9c7a2b;
  --accent-strong: #7f6321;
  --field-soft:    rgba(26, 26, 46, 0.05);

  --btn-bg:        #1a1a2e;
  --btn-ink:       #f7f3ea;
  --err:           #b3261e;

  --width:         640px;
  --gap:           1.5rem;
  --border:        1.5px;
  --radius:        0.55rem;
  --ease:          cubic-bezier(.4, .36, 0, 1);
}

/* ---- 3. Tokens — gold field (alternate / "dark") ---- */
[data-theme="gold"] {
  --bg:            #c9a84c;
  --ink:           #1a1a2e;
  --muted:         rgba(26, 26, 46, 0.62);
  --line:          rgba(26, 26, 46, 0.28);
  --line-strong:   rgba(26, 26, 46, 0.5);
  --accent:        #1a1a2e;
  --accent-strong: #000;
  --field-soft:    rgba(26, 26, 46, 0.1);

  --btn-bg:        #1a1a2e;
  --btn-ink:       #f4e9c4;
  --err:           #7a1610;
}

/* ---- 4. Base ---- */
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'IBM Plex Sans', system-ui, -apple-system, sans-serif;
  font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.1875rem);
  line-height: 1.5;
  font-feature-settings: "kern" 1, "liga" 1, "calt" 1;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  margin: 0;
  transition: background-color .4s var(--ease), color .4s var(--ease);
}

.page {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: calc(var(--gap) * 3.2);
  padding: calc(var(--gap) * 2.2) 0 calc(var(--gap) * 3.5);
  min-height: 100vh;
}

.band { width: 100%; display: flex; flex-direction: column; align-items: center; }

/* ---- 5. Links ---- */
a {
  color: inherit;
  text-decoration: none;
  border-bottom: var(--border) solid var(--line);
  transition: border-color .2s var(--ease), color .2s var(--ease);
}
a:hover { color: var(--ink); border-color: var(--ink); }
.accent-link { color: var(--accent); border-color: transparent; font-weight: 600; }
.accent-link:hover { color: var(--accent-strong); border-color: var(--accent); }

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

/* ---- 6. Nav ---- */
.nav {
  width: min(var(--width), 92vw);
  display: flex;
  align-items: center;
  gap: clamp(.6rem, 2vw, 1.1rem);
  font-size: .9rem;
}
.nav__wm {
  font-family: 'IBM Plex Mono', monospace;
  font-weight: 600;
  letter-spacing: .04em;
  font-size: .98rem;
  border: none;
  display: inline-flex;
  align-items: center;
}
.nav__wm:hover { color: var(--ink); }
.nav__wm img { height: 40px; width: auto; }
.nav__spacer { flex: 1; }
.nav__links { display: flex; gap: clamp(.6rem, 2vw, 1.1rem); }
.nav__link {
  color: var(--muted);
  border-bottom: var(--border) solid transparent;
  padding-bottom: 2px;
}
.nav__link:hover { color: var(--ink); border-color: var(--line-strong); }
.nav__link[aria-current="page"] { color: var(--ink); border-color: var(--ink); }

/* theme toggle — a two-tone swatch */
.toggle {
  width: 26px; height: 26px; border-radius: 50%;
  border: var(--border) solid var(--line-strong);
  background: conic-gradient(from -45deg, #f7f3ea 0 50%, #c9a84c 50% 100%);
  cursor: pointer; padding: 0; flex: none;
  transition: transform .3s var(--ease), box-shadow .2s var(--ease);
}
.toggle:hover { transform: scale(1.12); box-shadow: 0 0 0 4px var(--field-soft); }

.nav__burger { display: none; background: none; border: none; cursor: pointer; flex: none; color: var(--ink); }
.nav__burger svg { width: 26px; height: 26px; }
.drawer { display: none; }

/* ---- 7. Typography ---- */
.content { width: min(var(--width), 92vw); display: flex; flex-direction: column; gap: var(--gap); }
.content--wide { width: min(calc(var(--width) + 90px), 92vw); }

.label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: .78rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
}
.title, h1, h2, h3 { font-weight: 600; line-height: 1.12; text-wrap: balance; }
.title { font-size: clamp(2rem, 1.4rem + 3vw, 3rem); letter-spacing: -.015em; }
h2 { font-size: clamp(1.4rem, 1.2rem + 1vw, 1.7rem); margin-top: calc(var(--gap) * 1.5); }
.content > h2:first-child { margin-top: 0; }
h3 { font-size: 1.2rem; }
.lead { font-size: 1.12rem; color: var(--muted); max-width: 42ch; }
.muted { color: var(--muted); }
.prose p + p { margin-top: var(--gap); }
.prose p { color: var(--ink); }

/* ---- 8. The "loud" callout idiom ---- */
.loud {
  border: var(--border) solid var(--accent);
  border-radius: var(--radius);
  padding: calc(var(--gap) * 1.3);
  text-align: center;
  font-size: 1.3rem;
  font-weight: 600;
  line-height: 1.3;
  text-wrap: balance;
}
.loud small {
  display: block;
  font-family: 'IBM Plex Mono', monospace;
  font-weight: 400;
  font-size: .85rem;
  letter-spacing: .06em;
  color: var(--accent);
  margin-top: .55rem;
}
.loud--quote { font-style: italic; border-color: var(--line-strong); }
.loud--soft { border-color: var(--line-strong); }

/* ---- 9. Stats strip ---- */
.stats { display: flex; flex-wrap: wrap; gap: var(--gap) calc(var(--gap) * 2); }
.stat__n { font-size: 1.5rem; font-weight: 600; font-family: 'IBM Plex Mono', monospace; }
.stat__l { font-size: .82rem; color: var(--muted); letter-spacing: .02em; }

/* ---- 10. Service / link rows ---- */
.row {
  display: flex; justify-content: space-between; align-items: baseline; gap: 1rem;
  padding: 1rem 0;
  border-top: var(--border) solid var(--line);
  border-bottom: none;
  color: inherit;
}
.row:hover { border-color: var(--line-strong); }
.row:last-of-type { border-bottom: var(--border) solid var(--line); }
.row h3 { transition: color .2s var(--ease); }
.row:hover h3 { color: var(--accent); }
.row p { font-size: .92rem; color: var(--muted); margin-top: .15rem; }
.row__arrow { font-family: 'IBM Plex Mono', monospace; color: var(--accent); transition: transform .2s var(--ease); flex: none; }
.row:hover .row__arrow { transform: translateX(4px); }

/* ---- 11. Office blocks ---- */
.office { padding: 1.1rem 0; border-top: var(--border) solid var(--line); }
.office:last-of-type { border-bottom: var(--border) solid var(--line); }
.office h3 { margin-bottom: .3rem; }
.office__tag { font-family: 'IBM Plex Mono', monospace; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 400; }
.office address { font-style: normal; color: var(--muted); font-size: .95rem; line-height: 1.55; }
.office .accent-link { font-size: .88rem; }
.office__meta { font-family: 'IBM Plex Mono', monospace; font-size: .78rem; color: var(--muted); line-height: 1.7; margin-top: .45rem; }

/* ---- 11b. Capability tag-lists ---- */
.taglist { font-family: 'IBM Plex Mono', monospace; font-size: .8rem; line-height: 2; color: var(--muted); letter-spacing: .01em; }

/* ---- 11c. Bio cards (hover to reveal bio) ---- */
.bios { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); }
.bio { outline: none; }
.bio__media { position: relative; }
.bio__img { width: 100%; border-radius: var(--radius); transition: opacity .25s var(--ease); mix-blend-mode: multiply; }
.bio__text {
  position: absolute; inset: 0; margin: 0; padding: .9rem;
  display: flex; align-items: center;
  font-size: .8rem; line-height: 1.5; color: var(--ink);
  background: var(--bg); border: var(--border) solid var(--line-strong);
  border-radius: var(--radius);
  opacity: 0; transition: opacity .25s var(--ease);
}
.bio:hover .bio__img, .bio:focus .bio__img, .bio:focus-within .bio__img { opacity: 0; }
.bio:hover .bio__text, .bio:focus .bio__text, .bio:focus-within .bio__text { opacity: 1; }
.bio__name { font-weight: 600; font-size: .95rem; margin-top: .6rem; }
.bio__role { font-family: 'IBM Plex Mono', monospace; font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-top: .1rem; }
@media (max-width: 620px) {
  .bios { grid-template-columns: 1fr; justify-items: center; }
  .bio { max-width: 320px; }
}

/* ---- 12. Buttons ---- */
.btns { display: flex; flex-wrap: wrap; gap: .8rem; }
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  background: var(--btn-bg); color: var(--btn-ink);
  border: none; border-radius: var(--radius);
  padding: .7rem 1.3rem; font: inherit; font-weight: 600; font-size: .98rem;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(26,26,46,.18), inset 0 1px 0 rgba(255,255,255,.08);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(26,26,46,.22), inset 0 1px 0 rgba(255,255,255,.12); }
.btn:active { transform: translateY(0); }
.btn--ghost {
  background: transparent; color: var(--ink);
  border: var(--border) solid var(--line-strong); box-shadow: none;
}
.btn--ghost:hover { background: var(--field-soft); box-shadow: none; }
.btn.is-loading { opacity: .7; pointer-events: none; }

/* ---- 12b. Line-art set into the empty space beside a button row ---- */
.cta-row {
  position: relative; display: flex; flex-wrap: wrap;
  align-items: center; gap: var(--gap);
}
.cta-row .btns { flex: none; }
.cta-art {
  position: absolute; right: 0; bottom: 0;
  height: auto; max-width: 55%; opacity: .92;
}
.cta-art--rig { width: 211px; bottom: -46px; }
.cta-art--vessel { width: 337px; }

/* narrow: art drops onto its own line, centred under the buttons */
@media (max-width: 760px) {
  .cta-row .btns { flex: 0 0 100%; }
  .cta-art {
    position: static; bottom: auto;
    max-width: 100%; margin: .25rem auto 0;
  }
  .cta-art--rig { width: 188px; }
  .cta-art--vessel { width: 100%; max-width: 300px; }
}

/* ---- 13. Contact form ---- */
.form { display: flex; flex-direction: column; gap: var(--gap); }
.form-grid { display: grid; grid-template-columns: 1fr; gap: var(--gap); }
@media (min-width: 540px) { .form-grid { grid-template-columns: 1fr 1fr; } }
.field { display: flex; flex-direction: column; gap: .4rem; }
.field label {
  font-family: 'IBM Plex Mono', monospace; font-size: .76rem; letter-spacing: .06em;
  text-transform: uppercase; color: var(--muted);
}
.field input, .field textarea, .field select {
  font: inherit; font-size: 1rem; color: var(--ink);
  background: var(--field-soft);
  border: var(--border) solid var(--line);
  border-radius: var(--radius); padding: .7rem .85rem; width: 100%;
  transition: border-color .2s var(--ease);
}
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--accent); }
.field textarea { min-height: 150px; resize: vertical; }
.field input.has-error, .field textarea.has-error { border-color: var(--err); }
.form-error { color: var(--err); font-size: .8rem; min-height: 1em; }
.form-banner {
  border-radius: var(--radius); padding: 1rem 1.1rem;
  border: var(--border) solid var(--line-strong); font-size: .95rem;
}

/* ---- 14. Footer ---- */
.footer {
  width: min(var(--width), 92vw);
  border-top: var(--border) solid var(--line-strong);
  padding-top: var(--gap);
  display: flex; flex-direction: column; gap: var(--gap);
}
.footer__links { display: flex; flex-wrap: wrap; gap: .6rem calc(var(--gap) * 1.8); }
.footer__h { font-family: 'IBM Plex Mono', monospace; font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); border: none; }
a.footer__h:hover { color: var(--ink); }
.footer__h--muted { color: var(--muted); }
.footer__legal { font-family: 'IBM Plex Mono', monospace; font-size: .76rem; letter-spacing: .04em; color: var(--muted); }

/* ---- 15. Scroll reveal ---- */
[data-reveal] { opacity: 0; transform: translateY(14px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
[data-reveal].is-in { opacity: 1; transform: none; }

/* ---- 16. Responsive ---- */
@media (max-width: 620px) {
  :root { --gap: 1.25rem; }
  .nav__links { display: none; }
  .nav__burger { display: block; }
  .drawer.is-open {
    display: flex; flex-direction: column; gap: .6rem;
    width: min(var(--width), 92vw); padding: .5rem 0 0;
  }
  .drawer a { color: var(--ink); border: none; font-size: 1.05rem; }
  .drawer a[aria-current="page"]::before { content: "› "; color: var(--accent); }
}

/* ---- 17. Reduced motion + a11y ---- */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  [data-reveal] { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}
.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; }
