/* ==========================================================================
   Triarii Controls : shared stylesheet
   Palette derives from the logo: gold shield, crimson helmet, black wordmark.
   Crimson carries all interactive/text accent duty (it passes contrast on
   paper); gold is structural and decorative only, plus text on dark grounds.
   ========================================================================== */

:root {
  /* ground + ink */
  --paper:       #FBFAF7;
  --surface:     #FFFFFF;
  --surface-2:   #F2EFE8;
  --ink:         #16181C;
  --ink-muted:   #55575F;
  --ink-faint:   #85868F;
  --rule:        #E0DCD1;
  --rule-strong: #C6C0B0;

  /* brand */
  --crimson:     #971B1E;
  --crimson-dk:  #6E1417;
  --crimson-soft:#FBEFEF;
  --gold:        #D19C2F;
  --gold-bright: #F8C557;
  --gold-soft:   #FAF2DE;

  /* dark band */
  --night:       #17181B;
  --night-2:     #212227;
  --night-ink:   #ECE9E2;
  --night-muted: #A5A399;
  --night-rule:  #33343A;

  --ok:          #1E7D5C;
  --grid:        rgba(151, 27, 30, .06);
  --shadow:      0 1px 2px rgba(22, 24, 28, .06);

  --serif: "Palatino Linotype", "Book Antiqua", Palatino, "Iowan Old Style", Georgia, "Times New Roman", serif;
  --sans: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", Consolas, "SF Mono", Menlo, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
}

.mono {
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: 12px;
}

h1, h2 {
  font-family: var(--serif);
  font-weight: 700;
  letter-spacing: -.015em;
  line-height: 1.1;
  text-wrap: balance;
  margin: 0;
}
h3, h4 {
  font-family: var(--sans);
  font-weight: 700;
  letter-spacing: -.012em;
  line-height: 1.25;
  margin: 0;
}
h1 { font-size: clamp(36px, 5.6vw, 60px); }
h2 { font-size: clamp(26px, 3.3vw, 37px); }
h3 { font-size: 19px; }
h4 { font-size: 15.5px; }
p  { margin: 0; }
a  { color: var(--crimson); }
a:hover { color: var(--crimson-dk); }

a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 2px solid var(--crimson);
  outline-offset: 2px;
}

.wrap { width: min(1140px, 92vw); margin-inline: auto; }

/* placeholder values awaiting a real number */
.tbd {
  border-bottom: 1px dotted var(--rule-strong);
  color: var(--ink-muted);
  cursor: help;
}

.skip {
  position: absolute; left: -9999px;
  background: var(--crimson); color: #fff; padding: 10px 16px; z-index: 60;
}
.skip:focus { left: 12px; top: 12px; }

/* ============ brand mark (cropped from the vertical logo lockup) ============ */
.markbox {
  overflow: hidden;
  flex: none;
  display: block;
  position: relative;
}
.markbox img {
  position: absolute;
  max-width: none;
  height: auto;
  /* Source lockup is 904x1256 with the shield measured at x 116-785, y 58-816.
     Cropped to x 106-795, y 48-826 (a hair of margin) so only the shield shows. */
  width: 131.2%;
  left: -15.38%;
  top: -6.21%;
}
.markbox.m-nav  { width: 41px; height: 46px; }
.markbox.m-foot { width: 55px; height: 62px; }

/* ============ nav ============ */
header.nav {
  position: sticky; top: 0; z-index: 30;
  background: color-mix(in srgb, var(--paper) 90%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
}
.nav-in { display: flex; align-items: center; gap: 26px; min-height: 74px; }
.brand {
  display: flex; align-items: center; gap: 12px;
  text-decoration: none; color: var(--ink); margin-right: auto;
}
.brand .bname {
  display: block; font-family: var(--serif); font-weight: 700;
  font-size: 20px; letter-spacing: .06em; line-height: 1.05;
}
.brand .btag {
  display: block; color: var(--ink-faint); font-size: 10px;
  letter-spacing: .17em; text-transform: uppercase; font-family: var(--mono);
  margin-top: 3px;
}
.nav-links { display: flex; gap: 24px; align-items: center; }
.nav-links a {
  color: var(--ink-muted); text-decoration: none; font-size: 14.5px;
  padding: 4px 0; border-bottom: 2px solid transparent;
}
.nav-links a:hover { color: var(--ink); }
.nav-links a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--gold); }
/* the in-menu CTA is for the collapsed mobile menu only */
.nav-links .btn { display: none; }

.navtoggle {
  display: none; background: none; border: 1px solid var(--rule-strong);
  border-radius: 2px; padding: 9px 12px; cursor: pointer; color: var(--ink);
  font: inherit; font-size: 13px;
}
@media (max-width: 940px) {
  .nav-links {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--surface); border-bottom: 1px solid var(--rule);
    padding: 6px 4vw 14px;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 13px 0; border-bottom: 1px solid var(--rule); font-size: 16px; }
  .nav-links .btn { display: block; margin-top: 12px; text-align: center; border-bottom: 0; }
  .navtoggle { display: block; }
  .nav-in { position: relative; }
  .nav-in > .btn { display: none; }
}

/* ============ buttons ============ */
.btn {
  display: inline-block; border: 1px solid var(--crimson); border-radius: 2px;
  padding: 12px 22px; text-decoration: none; font-size: 14.5px; font-weight: 600;
  background: var(--crimson); color: #fff; cursor: pointer;
  font-family: var(--sans);
  transition: transform .12s ease, filter .12s ease, background .12s ease;
}
.btn:hover { filter: brightness(1.08); transform: translateY(-1px); color: #fff; }
.btn.ghost { background: transparent; color: var(--crimson); }
.btn.ghost:hover { background: var(--crimson-soft); color: var(--crimson-dk); }
.btn.onnight { border-color: var(--gold-bright); background: var(--gold-bright); color: var(--night); }
.btn.onnight:hover { color: var(--night); }
.btn.onnight.ghost { background: transparent; color: var(--gold-bright); }
.btn.onnight.ghost:hover { background: rgba(248, 197, 87, .12); }

/* ============ hero ============ */
.hero {
  position: relative; overflow: hidden;
  border-bottom: 1px solid var(--rule);
  padding: 86px 0 70px;
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: radial-gradient(115% 80% at 80% 6%, #000 5%, transparent 72%);
  -webkit-mask-image: radial-gradient(115% 80% at 80% 6%, #000 5%, transparent 72%);
  pointer-events: none;
}
.hero-in { position: relative; display: grid; gap: 26px; max-width: 840px; }
.hero.slim { padding: 60px 0 52px; }
.eyebrow { color: var(--crimson); display: flex; align-items: center; gap: 10px; }
.eyebrow::after { content: ""; height: 1px; flex: 1; background: var(--rule); max-width: 200px; }
.lede { font-size: 19.5px; color: var(--ink-muted); max-width: 62ch; }
h1 em, h2 em { font-style: normal; color: var(--crimson); }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.cta-note { color: var(--ink-faint); }

.capstrip { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.capstrip span {
  border: 1px solid var(--rule); border-radius: 2px;
  padding: 5px 10px; color: var(--ink-muted);
  font-family: var(--mono); font-size: 11.5px; letter-spacing: .06em;
  background: var(--surface);
}

/* ============ section scaffolding (drawing-set sheets) ============ */
section { padding: 76px 0; border-bottom: 1px solid var(--rule); }
section.tight { padding: 54px 0; }
.sheet-head { display: grid; gap: 16px; margin-bottom: 42px; }
.sheet-tag { display: flex; align-items: baseline; gap: 14px; color: var(--ink-faint); }
.sheet-tag hr { flex: 1; border: 0; border-top: 1px solid var(--rule); margin: 0; align-self: center; }
.sheet-head p { color: var(--ink-muted); max-width: 68ch; }

/* ============ cards ============ */
.grid { display: grid; gap: 18px; }
.g2 { grid-template-columns: repeat(2, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 940px) { .g3, .g4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 660px) { .g2, .g3, .g4 { grid-template-columns: 1fr; } }

.card {
  background: var(--surface); border: 1px solid var(--rule); border-radius: 2px;
  box-shadow: var(--shadow); display: flex; flex-direction: column;
}
.card-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 16px; border-bottom: 1px solid var(--rule);
  background: var(--surface-2); color: var(--ink-faint);
}
.card-body { padding: 18px 16px 20px; display: grid; gap: 11px; align-content: start; flex: 1; }
.card-body p { color: var(--ink-muted); font-size: 15.5px; }
.card.featured { border-color: var(--crimson); }
.card.featured .card-head { background: var(--crimson-soft); color: var(--crimson); }
.card.gold { border-color: var(--gold); }
.card.gold .card-head { background: var(--gold-soft); color: var(--gold); }

ul.ticks { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
ul.ticks li {
  position: relative; padding-left: 20px;
  color: var(--ink-muted); font-size: 14.5px; line-height: 1.5;
}
ul.ticks li::before {
  content: ""; position: absolute; left: 0; top: .62em;
  width: 9px; height: 1.5px; background: var(--gold);
}
ul.ticks.crim li::before { background: var(--crimson); }

/* ============ steps ============ */
ol.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; counter-reset: s; }
ol.steps li {
  counter-increment: s;
  display: grid; grid-template-columns: 58px 1fr; gap: 22px;
  padding: 22px 0; border-top: 1px solid var(--rule);
}
ol.steps li:last-child { border-bottom: 1px solid var(--rule); }
ol.steps li::before {
  content: counter(s, decimal-leading-zero);
  font-family: var(--mono); font-size: 13px; letter-spacing: .08em;
  color: var(--crimson); padding-top: 4px;
}
ol.steps h3 { margin-bottom: 6px; }
ol.steps p { color: var(--ink-muted); font-size: 15.5px; max-width: 70ch; }
@media (max-width: 560px) { ol.steps li { grid-template-columns: 40px 1fr; gap: 14px; } }

/* ============ night band ============ */
.night {
  background: var(--night); color: var(--night-ink); border-bottom: 0;
  position: relative; overflow: hidden;
}
.night::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(248, 197, 87, .06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(248, 197, 87, .06) 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: radial-gradient(100% 90% at 15% 0%, #000 5%, transparent 70%);
  -webkit-mask-image: radial-gradient(100% 90% at 15% 0%, #000 5%, transparent 70%);
}
.night .wrap { position: relative; }
.night h2, .night h3 { color: var(--night-ink); }
.night h2 em { color: var(--gold-bright); }
.night p, .night .lede { color: var(--night-muted); }
.night .sheet-tag { color: var(--night-muted); }
.night .sheet-tag hr { border-top-color: var(--night-rule); }
.night .card { background: var(--night-2); border-color: var(--night-rule); box-shadow: none; }
.night .card-head { background: #1A1B1F; border-bottom-color: var(--night-rule); color: var(--night-muted); }
.night .card-body p { color: var(--night-muted); }
/* .split p and .prose p are defined further down the sheet at the same specificity as
   .night p, so on a dark band they would win the cascade and paint body copy #55575F on
   #17181B. These two selectors are more specific than both, so order stops mattering.
   Affects the panel band on services.html and the pricing band on trade-partners.html. */
.night .split p, .night .prose p { color: var(--night-muted); }
.night ul.ticks li { color: var(--night-muted); }
.night ul.ticks li::before { background: var(--gold-bright); }
.night .eyebrow { color: var(--gold-bright); }
.night .eyebrow::after { background: var(--night-rule); }
/* Tables on a night band need the full dark treatment. Without this the wrapper stays
   white while the cells inherit the band's cream text, which is unreadable. */
.night .tablewrap { background: var(--night-2); border-color: var(--night-rule); }
.night th, .night td { border-bottom-color: var(--night-rule); color: var(--night-ink); }
.night thead th { background: #1A1B1F; color: var(--night-muted); }
.night td.note { color: var(--night-muted); }
.night .callout { background: rgba(248, 197, 87, .09); border-color: var(--gold); }
.night .callout h3 { color: var(--gold-bright); }
.night .callout p { color: var(--night-muted); }

/* ============ pricing / tables ============ */
.price-hd { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.price {
  font-size: 30px; font-weight: 700; font-family: var(--serif);
  letter-spacing: -.02em; font-variant-numeric: tabular-nums;
}
.price small { font-size: 13px; font-weight: 400; color: var(--ink-faint); letter-spacing: 0; font-family: var(--sans); }

.tablewrap { overflow-x: auto; border: 1px solid var(--rule); border-radius: 2px; background: var(--surface); }
table { border-collapse: collapse; width: 100%; min-width: 560px; font-size: 15px; }
th, td { text-align: left; padding: 13px 16px; border-bottom: 1px solid var(--rule); }
thead th {
  background: var(--surface-2); color: var(--ink-faint); font-weight: 600;
  font-family: var(--mono); font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase;
}
tbody tr:last-child td { border-bottom: 0; }
/* th.rate matters: the rate-card headers must sit over their right-aligned figures */
th.rate, td.rate { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; white-space: nowrap; }
td.note { color: var(--ink-muted); font-size: 14px; }

/* ============ callout ============ */
.callout {
  border: 1px solid var(--gold); border-left: 3px solid var(--gold);
  background: var(--gold-soft); border-radius: 2px;
  padding: 18px 20px; display: grid; gap: 8px;
}
.callout h3 { font-size: 16.5px; }
.callout p { color: #6B5313; font-size: 15.5px; max-width: 74ch; }
.callout.crim { border-color: var(--crimson); border-left-color: var(--crimson); background: var(--crimson-soft); }
.callout.crim p { color: #6E2126; }

/* ============ faq ============ */
details {
  border: 1px solid var(--rule); border-radius: 2px; background: var(--surface);
  padding: 0 16px;
}
details + details { margin-top: 10px; }
summary {
  cursor: pointer; padding: 15px 0; font-weight: 600; font-size: 16px;
  list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 14px;
}
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--crimson); font-size: 20px; line-height: 1; }
details[open] summary::after { content: "\2212"; }
details p { color: var(--ink-muted); font-size: 15.5px; padding-bottom: 16px; max-width: 76ch; }
details p + p { padding-top: 0; margin-top: -6px; }

/* ============ contact ============ */
.contact-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 38px; align-items: start; }
@media (max-width: 880px) { .contact-grid { grid-template-columns: 1fr; } }
form { display: grid; gap: 14px; }
.f2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 560px) { .f2 { grid-template-columns: 1fr; } }
label { display: grid; gap: 6px; color: var(--ink-faint); font-size: 13px; }
input, select, textarea {
  font: inherit; font-size: 15.5px; color: var(--ink);
  background: var(--surface); border: 1px solid var(--rule); border-radius: 2px;
  padding: 11px 12px; width: 100%;
}
textarea { min-height: 138px; resize: vertical; }
.form-note { color: var(--ink-faint); font-size: 13px; }
.hpot { position: absolute; left: -9999px; }
.aside-card { display: grid; gap: 2px; }
.kv { display: grid; gap: 4px; padding: 14px 0; border-bottom: 1px solid var(--rule); }
.kv:last-child { border-bottom: 0; }
.kv b { font-size: 15.5px; font-weight: 600; }
.kv span, .kv a { color: var(--ink-muted); font-size: 14.5px; }

/* ============ cta band ============ */
.ctaband { padding: 62px 0; }
.ctaband-in { display: grid; gap: 20px; max-width: 720px; }

/* ============ footer ============ */
footer.site {
  background: var(--night); color: var(--night-muted);
  padding: 52px 0 40px; border-top: 3px solid var(--gold);
}
.foot-grid {
  display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 32px;
  padding-bottom: 34px; border-bottom: 1px solid var(--night-rule);
}
@media (max-width: 860px) { .foot-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .foot-grid { grid-template-columns: 1fr; } }
.foot-grid h4 {
  color: var(--night-ink); font-family: var(--mono); font-size: 11px;
  letter-spacing: .15em; text-transform: uppercase; font-weight: 600; margin-bottom: 14px;
}
.foot-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.foot-grid a { color: var(--night-muted); text-decoration: none; font-size: 14.5px; }
.foot-grid a:hover { color: var(--gold-bright); }
.foot-brand { display: grid; gap: 14px; }
.foot-brand .bname {
  font-family: var(--serif); font-size: 19px; letter-spacing: .06em; color: var(--night-ink);
}
.foot-brand p { font-size: 14.5px; color: var(--night-muted); max-width: 34ch; }
.foot-brand .lockup { display: flex; align-items: center; gap: 13px; }
.foot-bot {
  display: flex; flex-wrap: wrap; gap: 14px; justify-content: space-between;
  padding-top: 22px; font-size: 13px; color: #7C7A72;
}
.foot-bot a { color: #7C7A72; text-decoration: none; }
.foot-bot a:hover { color: var(--gold-bright); }

/* ============ split detail sections ============ */
.split { display: grid; grid-template-columns: 1.05fr .95fr; gap: 38px; align-items: start; }
@media (max-width: 880px) { .split { grid-template-columns: 1fr; gap: 24px; } }
.split .col { display: grid; gap: 14px; align-content: start; }
.split p { color: var(--ink-muted); }
.split h3 { font-size: 22px; }

/* ============ in-page anchor nav ============ */
.anchornav { display: flex; flex-wrap: wrap; gap: 8px; }
.anchornav a {
  border: 1px solid var(--rule); border-radius: 2px; padding: 7px 12px;
  text-decoration: none; color: var(--ink-muted); background: var(--surface);
  font-family: var(--mono); font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase;
}
.anchornav a:hover { border-color: var(--crimson); color: var(--crimson); }

/* keep anchored sections clear of the sticky header */
section[id], div[id] { scroll-margin-top: 92px; }

/* ============ prose blocks ============ */
.prose { display: grid; gap: 18px; max-width: 72ch; }
.prose p { color: var(--ink-muted); }
.prose h3 { margin-top: 12px; }

/* ============ photo hero ============
   Cityscape banner carried over from the old Wix home page. The scrim is a hard
   requirement, not decoration: the headline sits on the left third of the photo and
   needs a dark ground to stay legible against sky. Keep the gradient if you swap the
   image, and re-check the text if you change the focal point. */
.hero.photo {
  background-color: var(--night);
  background-image:
    linear-gradient(96deg,
      rgba(19, 20, 23, .95) 0%,
      rgba(19, 20, 23, .90) 38%,
      rgba(19, 20, 23, .62) 64%,
      rgba(19, 20, 23, .40) 100%),
    url("skyline-2400.jpg");
  background-size: cover;
  background-position: 68% center;
  border-bottom: 3px solid var(--gold);
  padding: 104px 0 92px;
}
/* the graph-paper overlay fights the photo */
.hero.photo::before { display: none; }

.hero.photo h1 { color: var(--night-ink); }
.hero.photo h1 em { color: var(--gold-bright); }
.hero.photo .lede { color: #D9D6CD; }
.hero.photo .eyebrow { color: var(--gold-bright); }
.hero.photo .eyebrow::after { background: rgba(255, 255, 255, .22); }
.hero.photo .cta-note { color: #A9A69D; }
.hero.photo .capstrip span {
  background: rgba(255, 255, 255, .06);
  border-color: rgba(255, 255, 255, .18);
  color: #CFCCC4;
}

/* Narrow screens put the text over the middle of the photo, so the scrim goes flat
   and heavy instead of directional, and the smaller file is enough for the width. */
@media (max-width: 900px) {
  .hero.photo {
    background-image:
      linear-gradient(rgba(19, 20, 23, .93), rgba(19, 20, 23, .89)),
      url("skyline-1400.jpg");
    background-position: 60% center;
    padding: 76px 0 64px;
  }
}

/* ============ careers form ============ */
input[type="file"] { padding: 8px 10px; cursor: pointer; }
input[type="file"]::file-selector-button {
  font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer;
  border: 1px solid var(--crimson); border-radius: 2px; background: transparent;
  color: var(--crimson); padding: 6px 12px; margin-right: 12px;
}
input[type="file"]::file-selector-button:hover { background: var(--crimson-soft); color: var(--crimson-dk); }
label.check {
  grid-template-columns: auto 1fr; align-items: start; gap: 10px;
  color: var(--ink-muted); font-size: 14.5px;
}
label.check input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--crimson); }
/* only rendered when site.js has something to say about the chosen file */
.form-error { color: var(--crimson); font-size: 14px; display: none; }
.form-error.show { display: block; }
/* the post-submit note is invisible until the form posts back to careers.html#sent */
.sent-note { display: none; margin-top: 22px; }
.sent-note:target { display: grid; }
