/* ============================================================================
   sourcing.cisomarketplace.com — shared stylesheet
   Editorial / refined aesthetic. Fraunces + JetBrains Mono + Inter Tight.
   ============================================================================ */

:root {
  --ink: #0a0e14;
  --paper: #f4f1ea;
  --paper-2: #ebe6d9;
  --accent: #c8472d;
  --accent-2: #2a4a3e;
  --muted: #5a5a55;
  --serif: 'Fraunces', Georgia, serif;
  --sans: 'Inter Tight', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;   /* prevent horizontal scroll from wide tables on mobile */
  max-width: 100vw;
}

/* ---- Top rail (legacy breadcrumb) ---- */
.rail {
  border-bottom: 1px solid var(--ink);
  padding: 14px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ---- Full site nav (category pages) ---- */
.site-nav {
  border-bottom: 1px solid var(--ink);
  padding: 0 32px;
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  min-height: 48px;
  position: relative;
  z-index: 50;
}
.site-nav a {
  color: var(--ink); text-decoration: none;
  display: inline-flex; align-items: center; padding: 0 4px;
  border-bottom: 2px solid transparent;
  transition: border-color 0.15s ease;
}
.site-nav a:hover { border-bottom-color: var(--ink); }
.site-nav a.accent { color: var(--accent); }
.site-nav .nav-left  { display: flex; gap: 24px; align-items: center; }
.site-nav .nav-right { display: flex; gap: 20px; align-items: center; }
.site-nav .divider   { width: 1px; background: var(--ink); opacity: 0.2; align-self: stretch; }
/* Cat dropdown in static pages */
.site-nav .cat-drop  { position: relative; display: flex; align-items: center; }
.site-nav .cat-btn   {
  color: var(--ink); background: none;
  border: none; border-bottom: 2px solid transparent;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase;
  cursor: pointer; display: flex; align-items: center; gap: 4px; padding: 0 4px;
  height: 48px;
}
.site-nav .cat-btn:hover { border-bottom-color: var(--ink); }
.site-nav .cat-menu {
  display: none; position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
  background: var(--paper); border: 1px solid var(--ink); border-top: none;
  min-width: 220px; z-index: 100; box-shadow: 4px 4px 0 rgba(10,14,20,0.08);
}
.site-nav .cat-drop:hover .cat-menu { display: block; }
.site-nav .cat-menu a {
  display: flex; padding: 9px 16px;
  border-bottom: 1px solid rgba(10,14,20,0.08);
  font-size: 11px; letter-spacing: 0.06em; color: var(--ink);
}
.site-nav .cat-menu a:last-child { border-bottom: none; }
.site-nav .cat-menu a:hover { background: var(--paper-2); border-bottom-color: rgba(10,14,20,0.08); }

/* ---- Full site footer (category pages) ---- */
.site-foot-full {
  padding: 48px 32px 40px;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.07em; text-transform: uppercase;
  border-top: 1px solid var(--ink); color: var(--muted);
}
.site-foot-full .foot-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 32px;
}
.site-foot-full .foot-col h4 {
  font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink); margin-bottom: 14px; font-weight: 700;
}
.site-foot-full .foot-col ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.site-foot-full .foot-col li a { color: var(--muted); text-decoration: none; font-size: 11px; }
.site-foot-full .foot-col li a:hover { color: var(--ink); }
.site-foot-full .foot-bottom {
  border-top: 1px solid rgba(10,14,20,0.12); padding-top: 20px;
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 12px; font-size: 10px;
}
.site-foot-full .foot-bottom a { color: var(--muted); text-decoration: none; }
.site-foot-full .foot-bottom a:hover { color: var(--ink); }
@media (max-width: 960px) {
  .site-foot-full .foot-grid { grid-template-columns: 1fr 1fr; }
  .site-nav { padding: 0 20px; }
}
@media (max-width: 600px) {
  .site-foot-full .foot-grid { grid-template-columns: 1fr; }
}
.rail a { color: var(--ink); text-decoration: none; }
.rail a:hover { color: var(--accent); }
.rail .breadcrumb { display: flex; gap: 12px; align-items: center; }
.rail .breadcrumb .sep { color: var(--muted); }

/* ---- Supplier-page hero (split layout) ---- */
.hero {
  padding: 70px 32px 50px;
  border-bottom: 1px solid var(--ink);
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 80px;
  position: relative;
}
.hero::before {
  content: '';
  position: absolute;
  left: 56.5%;
  top: 0; bottom: 0;
  width: 1px;
  background: var(--ink);
  opacity: 0.15;
}
.hero .eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.hero .eyebrow::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--ink);
  opacity: 0.3;
}
.hero h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(48px, 6vw, 84px);
  line-height: 0.98;
  letter-spacing: -0.02em;
  font-variation-settings: 'opsz' 144;
}
.hero h1 em {
  font-style: italic;
  color: var(--accent);
  font-variation-settings: 'opsz' 144, 'SOFT' 100;
}
.hero .lede {
  font-family: var(--serif);
  font-size: 21px;
  line-height: 1.45;
  margin-top: 28px;
  font-variation-settings: 'opsz' 60;
}

/* ---- Single-column hero (category pages) ---- */
.hero-wide { padding: 70px 32px 50px; border-bottom: 1px solid var(--ink); }
.hero-wide .eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 24px;
}
.hero-wide h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(48px, 6vw, 88px);
  line-height: 0.98;
  letter-spacing: -0.02em;
  font-variation-settings: 'opsz' 144;
  max-width: 1000px;
}
.hero-wide h1 em { font-style: italic; color: var(--accent); }
.hero-wide .lede {
  font-family: var(--serif);
  font-size: 22px;
  line-height: 1.5;
  max-width: 800px;
  margin-top: 28px;
  font-variation-settings: 'opsz' 60;
}

/* ---- Hero CTA card (sidebar) ---- */
.hero-side {
  background: var(--ink);
  color: var(--paper);
  padding: 36px 32px;
  align-self: start;
  border: 1px solid var(--ink);
}
.hero-side h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 22px;
  line-height: 1.2;
  margin-bottom: 16px;
  letter-spacing: -0.01em;
}
.hero-side p {
  font-size: 14px;
  color: rgba(244, 241, 234, 0.75);
  line-height: 1.55;
  margin-bottom: 24px;
}
.facts {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: rgba(244, 241, 234, 0.6);
  margin-top: 28px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.facts span::before { content: '· '; color: var(--accent); }

/* ---- Buttons ---- */
.btn-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  background: var(--accent);
  color: var(--paper);
  border: 1px solid var(--accent);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.02em;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn-cta:hover { transform: translate(-2px, -2px); box-shadow: 4px 4px 0 var(--paper); }
.btn-cta.inverse { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.btn-cta.inverse:hover { box-shadow: 4px 4px 0 var(--accent); }

/* ---- Section base ---- */
.section { padding: 70px 32px; border-bottom: 1px solid var(--ink); }
.section h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 40px;
  max-width: 900px;
  font-variation-settings: 'opsz' 144;
}
.section h2 em { font-style: italic; color: var(--accent); }
.section .lede-body {
  font-size: 18px;
  line-height: 1.6;
  color: var(--ink);
  max-width: 760px;
  margin-bottom: 32px;
}

/* ---- Fit grid (2x2) ---- */
.fit-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border-top: 1px solid var(--ink);
  border-left: 1px solid var(--ink);
}
.fit-cell {
  padding: 28px;
  border-right: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}
.fit-cell .label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 12px;
}
.fit-cell h4 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 20px;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}
.fit-cell p { font-size: 15px; color: var(--muted); }

/* ---- Capabilities list (what it does) ---- */
.what-it-is { display: grid; grid-template-columns: 1fr 1.3fr; gap: 60px; }
.what-it-is .left {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.what-it-is ul { list-style: none; }
.what-it-is li {
  padding: 18px 0;
  border-top: 1px solid var(--ink);
  font-size: 16px;
}
.what-it-is li:last-child { border-bottom: 1px solid var(--ink); }
.what-it-is li strong {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 18px;
  display: block;
  margin-bottom: 4px;
}
.what-it-is li span { color: var(--muted); }

/* ---- 3-column compare (this / adjacent / different shape) ---- */
.compare {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border: 1px solid var(--ink);
}
.compare-col { padding: 28px; border-right: 1px solid var(--ink); }
.compare-col:last-child { border-right: none; }
.compare-col.this { background: var(--paper-2); }
.compare-col h4 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 22px;
  margin-bottom: 16px;
  letter-spacing: -0.01em;
}
.compare-col .tag {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}
.compare-col ul { list-style: none; }
.compare-col li {
  padding: 10px 0;
  border-top: 1px dashed rgba(10, 14, 20, 0.2);
  font-size: 14px;
  color: var(--muted);
}
.compare-col li:first-child { border-top: none; }

/* ---- Side-by-side comparison table (category pages) ---- */
.compare-table { border: 1px solid var(--ink); overflow-x: auto; }
.compare-table table { width: 100%; border-collapse: collapse; min-width: 900px; }
.compare-table th, .compare-table td {
  padding: 18px 16px;
  text-align: left;
  border-bottom: 1px solid var(--ink);
  border-right: 1px solid var(--ink);
  vertical-align: top;
}
.compare-table th:last-child, .compare-table td:last-child { border-right: none; }
.compare-table thead th {
  background: var(--ink);
  color: var(--paper);
  font-family: var(--serif);
  font-weight: 500;
  font-size: 22px;
  letter-spacing: -0.01em;
}
.compare-table thead th .tag {
  display: block;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 400;
  margin-bottom: 6px;
}
.compare-table tbody th {
  background: var(--paper-2);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  width: 180px;
  font-weight: 400;
}
.compare-table tbody td { background: var(--paper); font-size: 14px; color: var(--ink); line-height: 1.55; }

/* ---- "When to brief" cards ---- */
.when-grid {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--ink);
  border-left: 1px solid var(--ink);
}
.when-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.when-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
.when-grid.cols-5 { grid-template-columns: repeat(5, 1fr); }
.when-card {
  padding: 28px 24px;
  border-right: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 240px;
}
.when-card h3 { font-family: var(--serif); font-weight: 500; font-size: 24px; letter-spacing: -0.01em; }
.when-card .tag { font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent-2); }
.when-card p { font-size: 14px; color: var(--muted); line-height: 1.55; flex: 1; }
.when-card a {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  padding-top: 12px;
  border-top: 1px dashed rgba(10, 14, 20, 0.2);
  margin-top: auto;
}
.when-card a:hover { color: var(--accent); }

/* ---- CTA strip ---- */
.cta-strip {
  background: var(--ink);
  color: var(--paper);
  padding: 70px 32px;
  text-align: center;
}
.cta-strip h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(32px, 4.5vw, 52px);
  line-height: 1.05;
  max-width: 800px;
  margin: 0 auto 24px;
  letter-spacing: -0.02em;
}
.cta-strip h2 em { font-style: italic; color: var(--accent); }

/* ---- Footer ---- */
.foot {
  padding: 40px 32px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.foot a { color: var(--muted); text-decoration: none; }
.foot a:hover { color: var(--ink); }
.foot-links { display: flex; gap: 28px; }

/* ---- Mobile ---- */
@media (max-width: 1100px) {
  .when-grid.cols-5 { grid-template-columns: 1fr 1fr 1fr; }
  .when-grid.cols-4 { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
  /* Hero: stack to single column */
  .hero { grid-template-columns: 1fr; gap: 40px; }
  .hero::before { display: none; }
  .hero-side { margin-top: 0; }

  /* Content grids */
  .what-it-is, .fit-grid, .compare { grid-template-columns: 1fr; }
  .fit-cell { border-right: none; }
  .compare-col { border-right: none; border-bottom: 1px solid var(--ink); }
  .compare-col:last-child { border-bottom: none; }

  /* Reduce section padding */
  .section { padding: 48px 20px; }
  .hero { padding: 48px 20px 40px; }

  /* Nav rail: allow wrap, tighten padding */
  .rail {
    padding: 12px 20px;
    flex-wrap: wrap;
    gap: 8px;
  }
  .rail .breadcrumb { font-size: 10px; flex-wrap: wrap; }

  /* CTA sidebar */
  .cta-strip { padding: 48px 20px; }
  .cta-strip h2 { font-size: clamp(28px, 7vw, 48px); }

  /* Footer */
  .foot { padding: 28px 20px; flex-direction: column; gap: 16px; }
}

@media (max-width: 700px) {
  .when-grid.cols-5, .when-grid.cols-4, .when-grid.cols-3 { grid-template-columns: 1fr; }

  /* Comparison table: ensure horizontal scroll works cleanly */
  .compare-table { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .compare-table table { min-width: 600px; } /* reduce from 900px on small screens */

  /* Hero h1 smaller on phone */
  .hero h1 { font-size: clamp(32px, 9vw, 56px); }

  /* Fit grid single-col explicit */
  .fit-grid { grid-template-columns: 1fr; gap: 0; }
  .fit-cell { border-bottom: 1px solid var(--ink); padding: 24px 0; }
  .fit-cell:last-child { border-bottom: none; }
}
