/* ===== Steadfast Software Group — Core Styles ===== */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600;700&family=Inter:wght@400;500;600;700&family=IBM+Plex+Mono:wght@500&display=swap');

:root {
  --charcoal: #2E3439;       /* Graphite */
  --charcoal-deep: #23282C;
  --gunmetal: #59636B;       /* Gunmetal Gray */
  --slate: #34414A;          /* Dark Slate */
  --paper: #F3F1EA;          /* Off-white, stone-tinted */
  --paper-dim: #E9E6DC;
  --ink: #23282C;
  --ink-soft: #545C5F;
  --forest: #0F6B3A;         /* Forest Green */
  --forest-bright: #16874A;
  --line: #414B4F;
  --line-light: #D8D4C8;

  --display: 'Space Grotesk', sans-serif;
  --body: 'Inter', sans-serif;
  --mono: 'IBM Plex Mono', monospace;

  /* Back-compat aliases used throughout markup */
  --brass: var(--forest);
  --brass-bright: var(--forest-bright);
  --rivet: var(--gunmetal);
  --panel: var(--charcoal-deep);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--body);
  background-color: var(--paper);
  background-image: url('assets/stone-texture-light.png');
  background-repeat: repeat;
  background-size: 800px 800px;
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; text-decoration: none; }

.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 28px;
}

/* ===== Rivet line — signature divider ===== */
.rivet-line {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 2rem;
}
.rivet-line::before,
.rivet-line::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line-light);
}
.rivet-line span {
  display: flex;
  gap: 6px;
}
.rivet-line span i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--brass);
  display: block;
}
.rivet-line.on-dark::before,
.rivet-line.on-dark::after { background: var(--line); }

/* ===== Header / Nav ===== */
header.site-header {
  background-color: var(--charcoal);
  background-image: url('assets/stone-texture-dark.png');
  background-repeat: repeat;
  background-size: 500px 500px;
  color: var(--paper);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--line);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 28px;
  max-width: 1180px;
  margin: 0 auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.05rem;
  color: #fff;
  letter-spacing: 0.01em;
}

.brand-mark {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
}
.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

nav.main-nav {
  display: flex;
  gap: 2rem;
  align-items: center;
}

nav.main-nav a {
  font-size: 0.92rem;
  font-weight: 500;
  color: #C7CDC8;
  transition: color 0.15s ease;
  position: relative;
}
nav.main-nav a:hover { color: #fff; }
nav.main-nav a.active { color: var(--brass-bright); }

.nav-cta {
  background: var(--brass);
  color: var(--paper) !important;
  padding: 10px 20px;
  font-weight: 700;
  font-size: 0.88rem;
  border-radius: 2px;
}
.nav-cta:hover { background: var(--brass-bright); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.nav-toggle span {
  width: 24px;
  height: 2px;
  background: #fff;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 26px;
  font-weight: 700;
  font-size: 0.95rem;
  border-radius: 2px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
}
.btn-primary {
  background: var(--brass);
  color: var(--paper);
}
.btn-primary:hover { background: var(--brass-bright); }
.btn-ghost {
  border-color: var(--line-light);
  color: var(--ink);
}
.btn-ghost:hover { border-color: var(--ink); }
.btn-ghost-dark {
  border-color: #45524B;
  color: var(--paper);
}
.btn-ghost-dark:hover { border-color: var(--brass-bright); color: var(--brass-bright); }

/* ===== Hero ===== */
.hero {
  background-color: var(--charcoal);
  background-image: url('assets/stone-texture-dark.png');
  background-repeat: repeat;
  background-size: 600px 600px;
  color: var(--paper);
  padding: 90px 0 100px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: 0; right: -10%;
  width: 55%;
  height: 100%;
  background:
    repeating-linear-gradient(115deg, rgba(15,107,58,0.08) 0px, rgba(15,107,58,0.08) 1px, transparent 1px, transparent 46px);
  pointer-events: none;
}
.eyebrow {
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brass-bright);
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: '';
  width: 24px;
  height: 1px;
  background: var(--brass-bright);
}
.hero h1 {
  font-family: var(--display);
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  font-weight: 700;
  line-height: 1.08;
  max-width: 780px;
  margin-bottom: 24px;
  letter-spacing: -0.01em;
}
.hero h1 em {
  font-style: normal;
  color: var(--brass-bright);
}
.hero .lead {
  font-size: 1.15rem;
  color: #C7CDC8;
  max-width: 560px;
  margin-bottom: 40px;
}
.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 56px;
}

.spec-plate-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  max-width: 640px;
}
.spec-plate {
  background: var(--panel);
  padding: 20px 22px;
}
.spec-plate .num {
  font-family: var(--mono);
  font-size: 1.5rem;
  color: var(--brass-bright);
  display: block;
}
.spec-plate .label {
  font-size: 0.8rem;
  color: #9BA69E;
  margin-top: 4px;
}

/* ===== Sections general ===== */
section { padding: 88px 0; }
.section-alt {
  background-color: var(--paper-dim);
  background-image: url('assets/stone-texture-light.png');
  background-repeat: repeat;
  background-size: 700px 700px;
}
.section-dark {
  background-color: var(--charcoal);
  background-image: url('assets/stone-texture-dark.png');
  background-repeat: repeat;
  background-size: 600px 600px;
  color: var(--paper);
}

.section-head {
  max-width: 640px;
  margin-bottom: 3.2rem;
}
.section-head h2 {
  font-family: var(--display);
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 14px;
}
.section-head p {
  color: var(--ink-soft);
  font-size: 1.05rem;
}
.section-dark .section-head p { color: #B7C0BB; }

/* ===== Grids / Cards ===== */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 28px;
}
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 28px;
}

.card {
  background: #fff;
  border: 1px solid var(--line-light);
  padding: 32px 28px;
  border-radius: 2px;
}
.card .tag {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--brass);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 14px;
  display: block;
}
.card h3 {
  font-family: var(--display);
  font-size: 1.25rem;
  margin-bottom: 12px;
  font-weight: 700;
}
.card p { color: var(--ink-soft); font-size: 0.98rem; }

.card-dark {
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 32px 28px;
  border-radius: 2px;
}
.card-dark h3 { font-family: var(--display); font-size: 1.25rem; margin-bottom: 12px; color: #fff; }
.card-dark p { color: #B7C0BB; font-size: 0.98rem; }
.card-dark .tag {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--brass-bright);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 14px;
  display: block;
}

/* ===== Process list ===== */
.process-list {
  border-top: 1px solid var(--line-light);
}
.process-item {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 24px;
  padding: 28px 0;
  border-bottom: 1px solid var(--line-light);
}
.process-item .step-mark {
  font-family: var(--mono);
  color: var(--brass);
  font-size: 0.95rem;
  padding-top: 3px;
}
.process-item h3 {
  font-family: var(--display);
  font-size: 1.15rem;
  margin-bottom: 8px;
}
.process-item p { color: var(--ink-soft); }

/* ===== CTA band ===== */
.cta-band {
  background: var(--brass);
  color: var(--paper);
  padding: 60px 0;
  text-align: center;
}
.cta-band h2 {
  font-family: var(--display);
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  margin-bottom: 14px;
}
.cta-band p { margin-bottom: 28px; font-size: 1.05rem; }

/* ===== Footer ===== */
footer {
  background-color: var(--charcoal);
  background-image: url('assets/stone-texture-dark.png');
  background-repeat: repeat;
  background-size: 600px 600px;
  color: #A7B0AC;
  padding: 56px 0 32px;
}
.footer-top {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 40px;
  margin-bottom: 40px;
}
.footer-brand {
  font-family: var(--display);
  color: #fff;
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 10px;
}
.footer-brand-note { max-width: 340px; font-size: 0.92rem; }
.footer-links {
  display: flex;
  gap: 60px;
  flex-wrap: wrap;
}
.footer-links h4 {
  font-family: var(--mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--brass-bright);
  margin-bottom: 14px;
}
.footer-links a, .footer-links p {
  display: block;
  font-size: 0.92rem;
  margin-bottom: 10px;
  color: #B7C0BB;
}
.footer-links a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid var(--line);
  padding-top: 24px;
  font-size: 0.82rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

/* ===== Page hero (interior pages) ===== */
.page-hero {
  background-color: var(--charcoal);
  background-image: url('assets/stone-texture-dark.png');
  background-repeat: repeat;
  background-size: 600px 600px;
  color: var(--paper);
  padding: 64px 0 56px;
}
.page-hero h1 {
  font-family: var(--display);
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 700;
  max-width: 700px;
}
.page-hero p {
  color: #C7CDC8;
  font-size: 1.05rem;
  max-width: 560px;
  margin-top: 16px;
}

/* ===== Forms ===== */
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 20px;
}
.field { display: flex; flex-direction: column; gap: 8px; }
.field.full { grid-column: 1 / -1; }
.field label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink);
}
.field input, .field select, .field textarea {
  padding: 13px 14px;
  border: 1px solid var(--line-light);
  background: #fff;
  font-family: var(--body);
  font-size: 0.95rem;
  border-radius: 2px;
  color: var(--ink);
}
.field textarea { resize: vertical; min-height: 120px; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--brass);
}

/* ===== Case study specifics ===== */
.stat-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 1px;
  background: var(--line-light);
  border: 1px solid var(--line-light);
  margin: 3rem 0;
}
.stat-strip .stat {
  background: #fff;
  padding: 26px 20px;
}
.stat-strip .stat .num {
  font-family: var(--mono);
  font-size: 1.6rem;
  color: var(--brass);
  display: block;
}
.stat-strip .stat .label {
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin-top: 4px;
}

.module-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 14px;
  margin-top: 1.5rem;
}
.module-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  background: #fff;
  border: 1px solid var(--line-light);
  font-size: 0.95rem;
  font-weight: 600;
}
.module-item .dot {
  width: 8px; height: 8px;
  background: var(--brass);
  border-radius: 50%;
  flex-shrink: 0;
}
.module-item.pending { opacity: 0.55; }
.module-item.pending .dot { background: var(--ink-soft); }

/* ===== Responsive ===== */
@media (max-width: 860px) {
  nav.main-nav { display: none; }
  .nav-toggle { display: flex; }
  .grid-3, .grid-2, .form-grid, .module-list { grid-template-columns: 1fr; }
  .stat-strip { grid-template-columns: repeat(2, 1fr); }
  .spec-plate-row { grid-template-columns: 1fr; max-width: 320px; }
  .footer-top { flex-direction: column; }
  section { padding: 60px 0; }
}
