/* =========================================================
   SiteChain Solutions — brand stylesheet v2
   Navy / brass / warm-stone. Structural, blueprint-referenced
   layout system extended from the approved design draft to all
   five site pages.
   ========================================================= */

:root {
  --ink: #0f1c2e;
  --ink-2: #16283f;
  --steel: #4c5566;
  --fog: #8b93a0;
  --paper: #f1eee6;
  --paper-2: #e6e1d3;
  --line: #ddd7c8;
  --line-dark: #2a3b52;
  --signal: #a9812f;
  --signal-dim: #8a6a24;
  --white: #ffffff;
  --ok-bg: #eaf1e7;
  --ok-text: #33502f;
  --ok-line: #c3d6bc;
  --err-bg: #f7e9e2;
  --err-text: #8a3a1f;
  --err-line: #e8c7b4;

  --font-display: "Source Serif 4", Georgia, "Times New Roman", serif;
  --font-mono: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
  --font-body: "Source Sans 3", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --maxw: 1240px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 32px;
}

a { color: inherit; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.15;
  margin: 0 0 0.5em 0;
  color: var(--ink);
  text-wrap: balance;
}

h1 { font-weight: 700; font-size: clamp(2.1rem, 4.5vw, 3.6rem); }
h2 { font-weight: 600; font-size: clamp(1.6rem, 3vw, 2.3rem); }
h3 { font-weight: 700; font-size: 1.2rem; }

p { margin: 0 0 1.1em 0; color: var(--steel); }

.lede { font-size: 1.12rem; color: var(--steel); max-width: 60ch; }
.lede.center { margin-left: auto; margin-right: auto; }

/* ---- sheet-reference labels ---- */
.sheet-ref {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--signal);
  display: flex;
  align-items: center;
  gap: 10px;
}
.sheet-ref::before { content: ""; width: 22px; height: 1px; background: var(--signal); display: inline-block; flex-shrink: 0; }

.eyebrow {
  font-family: var(--font-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: 0.76rem;
  color: var(--signal);
  font-weight: 600;
}

/* ---- buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-weight: 600;
  text-decoration: none;
  padding: 0.95em 1.5em;
  border: 1px solid var(--ink);
  border-radius: 0;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
  background: none;
}
.btn-solid, .btn-primary { background: var(--ink); color: var(--paper); }
.btn-solid:hover, .btn-primary:hover { background: var(--signal); border-color: var(--signal); color: var(--ink); }
.btn-line, .btn-ghost { background: transparent; color: var(--ink); }
.btn-line:hover, .btn-ghost:hover { border-color: var(--signal); color: var(--signal-dim); }
.btn-ghost-light { background: transparent; color: var(--paper); border-color: var(--line-dark); }
.btn-ghost-light:hover { border-color: var(--signal); color: var(--signal); }

/* ---- header / nav ---- */
header.site {
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: var(--paper);
  z-index: 50;
}
.nav-row { display: flex; align-items: center; justify-content: space-between; padding: 18px 0; }

.brand { display: flex; align-items: center; gap: 13px; text-decoration: none; }
.brand img { height: 42px; width: auto; }
.brand .wordmark { font-family: var(--font-display); font-weight: 700; font-size: 1.28rem; letter-spacing: 0; color: var(--ink); white-space: nowrap; }
.wordmark .dot { color: var(--signal); }

nav.primary { display: flex; align-items: center; gap: 32px; }
nav.primary a {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink);
  position: relative;
  padding-bottom: 3px;
}
nav.primary a.active { color: var(--signal-dim); }
nav.primary a.active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--signal); }
nav.primary a:hover { color: var(--signal-dim); }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--ink);
  color: var(--ink);
  border-radius: 0;
  padding: 8px 12px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  cursor: pointer;
}

@media (max-width: 780px) {
  .nav-toggle { display: inline-block; }
  nav.primary {
    display: none;
    position: absolute;
    left: 0; right: 0; top: 100%;
    background: var(--paper);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    border-bottom: 1px solid var(--line);
  }
  nav.primary.open { display: flex; }
  nav.primary a { width: 100%; padding: 16px 32px; border-bottom: 1px solid var(--line); }
  nav.primary a.active::after { display: none; }
}

/* ---- HERO (home) ---- */
.hero { padding: 56px 0 0; }
.hero-grid { display: grid; grid-template-columns: 7fr 5fr; gap: 0; border-top: 1px solid var(--line); }
.hero-main { padding: 44px 56px 60px 0; border-right: 1px solid var(--line); }
.hero-side { padding: 44px 0 60px 56px; display: flex; flex-direction: column; justify-content: flex-start; gap: 0; }
.hero h1 { margin: 0.5em 0 0.4em; }
.hero h1 em { font-style: normal; color: var(--signal); }
.hero .lede { margin-bottom: 2em; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }

.hero-fact { border-top: 1px solid var(--line); padding-top: 20px; }
.hero-fact:first-child { border-top: none; padding-top: 0; }
.hero-fact + .hero-fact { margin-top: 20px; }
.hero-fact .num { font-family: var(--font-display); font-weight: 700; font-size: 2.1rem; color: var(--ink); line-height: 1; }
.hero-fact .cap { font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--fog); margin-top: 6px; }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-main { border-right: none; padding: 40px 0 32px; }
  .hero-side { padding: 0 0 44px; border-top: 1px solid var(--line); padding-top: 32px; }
}

/* ---- page hero (secondary pages) ---- */
.page-hero { padding: 56px 0 48px; border-bottom: 1px solid var(--line); }
.page-hero .sheet-ref { margin-bottom: 18px; }
.page-hero h1 { max-width: 20ch; }
.page-hero .lede { margin-top: 0.6em; }

/* ---- section rhythm ---- */
section.sheet { border-top: 1px solid var(--line); padding: 60px 0; }
section.sheet.dark { background: var(--ink); color: var(--paper); border-top-color: var(--line-dark); }
section.sheet.dark p { color: var(--fog); }
section.sheet.dark .sheet-ref { color: var(--signal); }
section.sheet.tight { padding: 44px 0; }

.sheet-head { display: grid; grid-template-columns: 1fr 2fr; gap: 40px; margin-bottom: 44px; align-items: start; }
.sheet-head h2 { margin: 10px 0 0; }
.sheet.dark .sheet-head h2 { color: var(--paper); }
.sheet-head .lede { margin: 10px 0 0; font-size: 1.05rem; }
.sheet.dark .sheet-head .lede { color: var(--fog); }
@media (max-width: 820px) { .sheet-head { grid-template-columns: 1fr; gap: 14px; } }

/* ---- dimension-line stat row ---- */
.dim-row { display: grid; grid-template-columns: repeat(4, 1fr); }
.dim { border-left: 1px solid var(--line-dark); padding: 0 22px 0 20px; }
.dim.on-light { border-left-color: var(--line); }
.dim:first-child { border-left: 1px solid var(--line-dark); }
.dim.on-light:first-child { border-left: 1px solid var(--line); }
.dim .num { font-family: var(--font-display); font-weight: 700; font-size: 2.3rem; color: var(--signal); line-height: 1; }
.dim .cap { font-size: 0.92rem; color: var(--paper); margin: 10px 0 14px; }
.dim.on-light .cap { color: var(--ink); }
.dim .src { font-family: var(--font-mono); font-size: 0.66rem; color: var(--fog); line-height: 1.5; }
@media (max-width: 900px) { .dim-row { grid-template-columns: 1fr 1fr; row-gap: 32px; } }
@media (max-width: 560px) { .dim-row { grid-template-columns: 1fr; } }

/* ---- panels ---- */
.panel-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border: 1px solid var(--line); }
.panel-row.cols-2 { grid-template-columns: repeat(2, 1fr); }
.panel-row.cols-4 { grid-template-columns: repeat(4, 1fr); }
.panel { padding: 30px 28px; border-left: 1px solid var(--line); }
.panel:first-child { border-left: none; }
.panel .tag { font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.08em; color: var(--signal); text-transform: uppercase; display: block; margin-bottom: 14px; }
.panel h3 { font-size: 1.15rem; margin: 0 0 10px; }
.panel p { font-size: 0.94rem; margin-bottom: 0; }
@media (max-width: 820px) {
  .panel-row, .panel-row.cols-2, .panel-row.cols-4 { grid-template-columns: 1fr; }
  .panel { border-left: none; border-top: 1px solid var(--line); }
  .panel:first-child { border-top: none; }
}

/* ---- position / callout block ---- */
.position-block { display: grid; grid-template-columns: 40px 1fr; gap: 24px; }
.position-block .rule { border-left: 2px solid var(--signal); }
.position-block p { color: var(--paper); font-size: 1.08rem; max-width: 68ch; margin-bottom: 0; }
.position-block.on-light .rule { border-left: 2px solid var(--signal); }
.position-block.on-light p { color: var(--steel); }

/* ---- figure / photography plate ---- */
.figure { border: 1px solid var(--line); background: var(--white); }
.figure img { width: 100%; height: 100%; object-fit: cover; display: block; }
.figure-cap {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 18px;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.03em;
  color: var(--fog);
}
.sheet.dark .figure { border-color: var(--line-dark); background: var(--ink-2); }
.sheet.dark .figure-cap { border-top-color: var(--line-dark); }
.figure-cap .tag { color: var(--signal); text-transform: uppercase; }

.figure-row { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: stretch; }
.figure-row.reverse { grid-template-columns: 1fr 1.1fr; }
.figure-row .figure { height: 100%; min-height: 280px; }
.figure-row .figure img { height: 100%; min-height: 280px; }
@media (max-width: 860px) {
  .figure-row, .figure-row.reverse { grid-template-columns: 1fr; }
  .figure-row .figure, .figure-row .figure img { min-height: 220px; }
}

.figure-full img { height: 380px; }
@media (max-width: 640px) { .figure-full img { height: 240px; } }

/* ---- stat grid (secondary use) ---- */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.stat-card { background: var(--white); padding: 28px 24px; }
.stat-num { font-family: var(--font-display); font-size: 2rem; font-weight: 700; color: var(--signal); line-height: 1; margin-bottom: 0.35em; }
.stat-label { color: var(--ink); font-size: 0.95rem; margin-bottom: 0.6em; }
.stat-src { font-family: var(--font-mono); font-size: 0.7rem; color: var(--fog); }

/* ---- model table (services) ---- */
.model-table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.model-table th, .model-table td { text-align: left; padding: 18px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
.model-table th {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fog);
  border-bottom: 2px solid var(--ink);
}
.model-table td:first-child { font-weight: 600; font-family: var(--font-display); color: var(--ink); }
.model-table td { color: var(--steel); }
@media (max-width: 720px) {
  .model-table thead { display: none; }
  .model-table, .model-table tbody, .model-table tr, .model-table td { display: block; width: 100%; }
  .model-table tr { border-bottom: 1px solid var(--line); padding: 16px 0; }
  .model-table td { border-bottom: none; padding: 4px 0; }
  .model-table td::before { content: attr(data-label); display: block; font-family: var(--font-mono); font-size: 0.65rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--fog); margin-bottom: 2px; }
}

/* ---- stage list (services supply-chain map) ---- */
.stage-list { border-top: 1px solid var(--line-dark); }
.stage { display: grid; grid-template-columns: 64px 1fr 1fr; gap: 28px; padding: 30px 0; border-bottom: 1px solid var(--line-dark); align-items: start; }
.stage-num { font-family: var(--font-mono); color: var(--signal); font-size: 1.05rem; font-weight: 700; padding-top: 4px; }
.stage h3 { color: var(--paper); margin-bottom: 0.5em; }
.stage .label { font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.09em; text-transform: uppercase; color: var(--fog); margin-bottom: 0.5em; display: block; }
.stage p { font-size: 0.94rem; color: var(--fog); margin-bottom: 0; }
@media (max-width: 780px) { .stage { grid-template-columns: 1fr; gap: 10px; } .stage-num { padding-top: 0; } }

/* ---- pillars (about) ---- */
.pillars { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0; border: 1px solid var(--line); margin-top: 2em; }
.pillar { padding: 26px 26px; border-left: 1px solid var(--line); }
.pillar:first-child { border-left: none; }
.pillar .num { font-family: var(--font-mono); color: var(--signal); font-size: 0.85rem; margin-bottom: 0.6em; display: block; }
@media (max-width: 780px) { .pillars { grid-template-columns: 1fr; } .pillar { border-left: none; border-top: 1px solid var(--line); } .pillar:first-child { border-top: none; } }

/* ---- founder block (about) ---- */
.founder-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: start; }
.founder-grid .figure img { height: 340px; }
.founder-copy .role { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.09em; text-transform: uppercase; color: var(--signal); display: block; margin-bottom: 0.8em; }
.founder-copy p { color: var(--fog); }
.founder-note {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--fog);
  border-left: 2px solid var(--signal);
  padding: 4px 0 4px 14px;
  margin-top: 1.4em;
}
@media (max-width: 820px) { .founder-grid { grid-template-columns: 1fr; } .founder-grid .figure img { height: 260px; } }

/* ---- survey ---- */
.survey-intro { border: 1px solid var(--line); background: var(--white); padding: 26px 28px; margin-bottom: 40px; }
.survey-intro p { margin-bottom: 0; color: var(--steel); }

.survey-form { display: flex; flex-direction: column; }
.rating-block { padding: 28px 0; border-bottom: 1px solid var(--line); }
.rating-block:first-of-type { padding-top: 0; }
.rating-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; margin-bottom: 6px; }
.rating-head .label { font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.09em; text-transform: uppercase; color: var(--signal); }
.rating-head h3 { margin: 0; font-size: 1.12rem; }
.rating-desc { color: var(--steel); font-size: 0.92rem; margin: 8px 0 16px; }

.rating-scale { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.rating-option { position: relative; }
.rating-option input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.rating-option .tile {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  border: 1px solid var(--steel); padding: 13px 6px; text-align: center; font-family: var(--font-mono);
  background: var(--white); transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.rating-option .tile .n { font-size: 1.1rem; font-weight: 700; color: var(--ink); }
.rating-option .tile .t { font-size: 0.6rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--fog); }
.rating-option input:checked + .tile { border-color: var(--signal); background: var(--signal); }
.rating-option input:checked + .tile .n, .rating-option input:checked + .tile .t { color: var(--ink); }
.rating-option input:focus-visible + .tile { outline: 2px solid var(--signal); outline-offset: 2px; }
@media (max-width: 560px) { .rating-scale { gap: 6px; } .rating-option .tile { padding: 9px 2px; } }

/* ---- forms (contact + survey shared) ---- */
.field { margin-bottom: 18px; }
.field label {
  display: block; font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--steel); margin-bottom: 0.6em;
}
.field input, .field textarea, .field select {
  width: 100%; font-family: var(--font-body); font-size: 1rem; padding: 13px 14px;
  border: 1px solid var(--steel); border-radius: 0; background: var(--white); color: var(--ink);
}
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--signal); }
.field textarea { min-height: 130px; resize: vertical; }

.form-msg { font-family: var(--font-mono); font-size: 0.84rem; padding: 13px 14px; display: none; margin-bottom: 16px; }
.form-msg.show { display: block; }
.form-msg.ok { background: var(--ok-bg); color: var(--ok-text); border: 1px solid var(--ok-line); }
.form-msg.err { background: var(--err-bg); color: var(--err-text); border: 1px solid var(--err-line); }

/* ---- contact page ---- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 0; border: 1px solid var(--line); }
.contact-info { padding: 40px 40px; border-right: 1px solid var(--line); background: var(--ink); color: var(--paper); }
.contact-info h2 { color: var(--paper); }
.contact-info p { color: var(--fog); }
.contact-info dt { font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--fog); margin-top: 1.6em; }
.contact-info dd { margin: 0.4em 0 0 0; font-size: 1.08rem; color: var(--paper); }
.contact-info a { color: var(--paper); text-decoration: none; border-bottom: 1px solid var(--signal); }
.contact-info a:hover { color: var(--signal); }
.contact-form-wrap { padding: 40px 40px; }
@media (max-width: 820px) {
  .contact-grid { grid-template-columns: 1fr; }
  .contact-info { border-right: none; border-bottom: 1px solid var(--line-dark); }
}

/* ---- CTA sheet ---- */
.cta-sheet { padding: 76px 0; text-align: left; }
.cta-sheet h2 { font-weight: 700; font-size: clamp(1.9rem, 4vw, 3rem); margin: 0 0 0.3em; max-width: 22ch; }
.cta-sheet .lede { max-width: 54ch; margin-bottom: 2em; }
.cta-row { display: flex; gap: 14px; flex-wrap: wrap; }
.cta-sheet.center { text-align: center; }
.cta-sheet.center h2, .cta-sheet.center .lede { margin-left: auto; margin-right: auto; }
.cta-sheet.center .cta-row { justify-content: center; }

/* ---- footer ---- */
footer.site { border-top: 1px solid var(--line); padding: 40px 0 32px; background: var(--paper); }
.footer-row { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 18px; padding-bottom: 26px; border-bottom: 1px solid var(--line); }
.footer-row .brand img { height: 30px; width: auto; }
.footer-row .brand .wordmark { font-size: 1rem; }
footer nav { display: flex; gap: 26px; flex-wrap: wrap; }
footer nav a { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; text-decoration: none; color: var(--steel); }
footer nav a:hover { color: var(--signal-dim); }
.footer-meta { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; font-family: var(--font-mono); font-size: 0.7rem; color: var(--fog); margin-top: 20px; }
.footer-meta a { color: var(--fog); text-decoration: none; }
.footer-meta a:hover { color: var(--signal-dim); }

/* ---- misc ---- */
.center { text-align: center; }
.mt-0 { margin-top: 0; }
.source-note { font-family: var(--font-mono); font-size: 0.72rem; color: var(--fog); margin-top: 2em; }
