/* Self-hosted fonts. Poppins: latin subset from Google Fonts. JetBrains Mono:
   official v2.304 variable font cut down to wght 300-700, no code ligatures,
   and only the characters the site uses (see unicode-range). */
@font-face {
  font-family: 'Poppins';
  font-style: italic;
  font-weight: 600;
  font-display: swap;
  src: url("/assets/fonts/poppins-600-italic.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url("/assets/fonts/poppins-300.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/poppins-400.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/assets/fonts/poppins-500.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/assets/fonts/poppins-600.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/assets/fonts/poppins-700.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("/assets/fonts/jetbrains-mono-v2.woff2") format('woff2');
  unicode-range: U+0020-007E, U+00A0, U+00A9, U+00B7, U+2013-2014, U+2018-2019, U+201C-201D, U+2022, U+2026, U+203A, U+20AC, U+2190, U+2192, U+25A0, U+2713, U+2715;
}

/* ==========================================================================
   OLD HANDS (PTY) LTD — OFFICIAL STYLESHEET
   Aesthetic: Warm archival paper, high-contrast espresso ink,
   crimson accent, brass-gold rulework, calm editorial typography.
   Ref: FuelSolution Orders Audit design language
   ========================================================================== */

:root {
  /* Ground & Surfaces */
  --bg: #F7F2EA;
  --bg-warm: #F1E9DC;
  --bg-darker: #EAE1D1;
  --panel: #FFFFFF;
  --panel-warm: #FAF6F0;
  
  /* Ink & Typography */
  --ink: #251712;
  --ink-soft: #3E2C24;
  --ink-dim: #6B5347;
  --ink-faint: #746152; /* darkest bg #EAE1D1 still >= 4.5:1 */
  --ink-ghost: #A8988B;

  /* Accents */
  --red: #A8151B;
  --red-bright: #C31E24;
  --red-deep: #7A0F13;
  --red-soft-bg: rgba(168, 21, 27, 0.07);
  --red-border: rgba(195, 30, 36, 0.35);

  --gold: #7C5C22;
  --gold-soft: #7A6130; /* darkest bg #EAE1D1 still >= 4.5:1 */
  --gold-light: #C9A050;
  --gold-pale: rgba(124, 92, 34, 0.08);
  --gold-border: rgba(124, 92, 34, 0.28);

  --green: #2E6838;
  --green-bright: #388045;
  --green-pale: rgba(46, 104, 56, 0.1);

  /* Lines & Rules */
  --rule: rgba(37, 23, 18, 0.14);
  --rule-strong: rgba(37, 23, 18, 0.26);
  --rule-subtle: rgba(37, 23, 18, 0.07);

  /* Terminal & Code Console Islands */
  --code-bg: #1D120E;
  --code-surface: #261A15;
  --code-ink: #F1E7D8;
  --code-dim: #A89785;
  --code-rule: rgba(216, 182, 115, 0.22);
  --code-gold: #E8C88A;

  /* Metrics & Layout */
  --max-w: 1140px;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-pill: 999px;

  /* Typography Stacks */
  --font-serif: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  
  /* Transitions */
  --trans: 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Base Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 86px;
  font-size: 16px;
  background-color: var(--bg);
}

body {
  background:
    radial-gradient(ellipse 65% 45% at 92% 0%, rgba(168, 21, 27, 0.045), transparent 60%),
    radial-gradient(ellipse 70% 50% at 4% 100%, rgba(124, 92, 34, 0.05), transparent 65%),
    var(--bg);
  color: var(--ink-soft);
  font-family: var(--font-serif);
  font-weight: 300;
  line-height: 1.68;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

::selection {
  background: var(--red);
  color: #FFFFFF;
}

/* Subtle archival texture */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: radial-gradient(rgba(37, 23, 18, 0.035) 1px, transparent 0);
  background-size: 24px 24px;
  pointer-events: none;
  opacity: 0.75;
  z-index: 0;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  color: var(--ink);
  text-wrap: balance;
  font-weight: 600;
  line-height: 1.15;
}

h1 {
  font-size: clamp(2.4rem, 5.2vw, 4.2rem);
  letter-spacing: -0.025em;
}

h2 {
  font-size: clamp(1.8rem, 3.2vw, 2.7rem);
  letter-spacing: -0.02em;
}

h3 {
  font-size: clamp(1.2rem, 1.8vw, 1.45rem);
  letter-spacing: -0.015em;
}

p {
  color: var(--ink-soft);
  font-size: 1.02rem;
  line-height: 1.72;
  margin-bottom: 1.25rem;
  max-width: 68ch;
  font-weight: 300;
}

p.lede {
  font-size: clamp(1.15rem, 1.8vw, 1.35rem);
  font-weight: 300;
  color: var(--ink-dim);
  line-height: 1.62;
  max-width: 64ch;
}

p.muted {
  color: var(--ink-faint);
  font-size: 0.92rem;
  line-height: 1.6;
}

a {
  color: var(--ink);
  text-decoration: none;
  transition: color var(--trans);
}

a:hover {
  color: var(--red);
}

.mono {
  font-family: var(--font-mono);
}

.amp {
  font-style: italic;
  color: var(--gold);
}

/* Eyebrow marker */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold);
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-weight: 500;
  white-space: nowrap;
}

.eyebrow .rule {
  width: 28px;
  height: 2px;
  background: var(--gold);
  opacity: 0.8;
}

.eyebrow.red {
  color: var(--red);
}

.eyebrow.red .rule {
  background: var(--red);
}

/* Signature Red Tick Rule */
.tick-rule {
  width: 64px;
  height: 3px;
  background: var(--red);
  margin: 22px 0 20px;
}

/* Status and Pill Tags */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold-soft);
  border: 1px solid var(--rule);
  border-radius: var(--radius-pill);
  padding: 5px 14px;
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(4px);
  white-space: nowrap;
}

.tag .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
}

.tag.ok {
  color: var(--green);
  border-color: rgba(46, 104, 56, 0.3);
  background: var(--green-pale);
}

.tag.ok .dot {
  background: var(--green-bright);
}

.tag.red {
  color: var(--red-bright);
  border-color: var(--red-border);
  background: var(--red-soft-bg);
}

.tag.red .dot {
  background: var(--red-bright);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 500;
  padding: 13px 26px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--trans);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--ink);
  color: #FFFFFF;
  border-color: var(--ink);
}

.btn-primary:hover {
  background: var(--red);
  border-color: var(--red);
  color: #FFFFFF;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(168, 21, 27, 0.22);
}

.btn-secondary {
  background: transparent;
  color: var(--ink);
  border-color: var(--rule-strong);
}

.btn-secondary:hover {
  border-color: var(--ink);
  background: var(--bg-warm);
  transform: translateY(-1px);
}

.btn-gold {
  background: var(--gold);
  color: #FFFFFF;
  border-color: var(--gold);
}

.btn-gold:hover {
  background: var(--gold-soft);
  color: #FFFFFF;
  transform: translateY(-1px);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.74rem;
}

/* Layout Containers */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin-left: auto;
  margin-right: auto;
  padding-left: 28px;
  padding-right: 28px;
  position: relative;
  z-index: 1;
}

/* ==========================================================================
   HEADER & CLEAN NON-WRAPPING NAVIGATION
   ========================================================================== */
#site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(247, 242, 234, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
}

#reading-progress {
  position: absolute;
  bottom: -1px;
  left: 0;
  height: 2px;
  background: var(--red);
  width: 0%;
  transition: width 0.1s linear;
  z-index: 101;
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
  gap: 24px;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  flex-shrink: 0;
}

.brand-logo-img {
  height: 42px;
  width: auto;
  display: block;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
  flex-shrink: 0;
}

.nav-link {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-dim);
  transition: color var(--trans);
  position: relative;
  padding: 6px 0;
  white-space: nowrap; /* Prevent any newline breaks */
  display: inline-block;
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--red);
  transition: width var(--trans);
}

.nav-link:hover,
.nav-link.active {
  color: var(--ink);
}

.nav-link.active::after,
.nav-link:hover::after {
  width: 100%;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: 1px solid var(--rule);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  cursor: pointer;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 0.78rem;
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero-section {
  padding: 84px 0 64px;
  position: relative;
}

.hero-meta-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 38px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--ink-dim);
}

.hero-headline {
  font-size: clamp(2.4rem, 5.2vw, 4.3rem);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.025em;
  color: var(--ink);
}

.hero-lead-box {
  margin-top: 22px;
  max-width: 72ch;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin: 34px 0 20px;
}

/* Hero Stats Strip */
.stats-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
  margin-top: 56px;
  padding-top: 32px;
  border-top: 1px solid var(--rule);
}

.stat-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.stat-val {
  font-family: var(--font-serif);
  font-size: clamp(2.2rem, 3.8vw, 3.2rem);
  font-weight: 700;
  line-height: 1;
  color: var(--ink);
  letter-spacing: -0.02em;
}

.stat-val.red {
  color: var(--red-bright);
}

.stat-val.gold {
  color: var(--gold);
}

.stat-desc {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
  line-height: 1.45;
}

/* ==========================================================================
   PHILOSOPHY (WHY OLD HANDS)
   ========================================================================== */
.philosophy-section {
  padding: 96px 0;
  border-top: 1px solid var(--rule);
  background: linear-gradient(180deg, transparent 0%, rgba(241, 233, 220, 0.45) 100%);
}

.grid-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: start;
}

.mission-highlight-card {
  background: var(--panel);
  border: 1px solid var(--rule);
  border-top: 3px solid var(--red);
  padding: 36px 32px;
  border-radius: var(--radius-sm);
  box-shadow: 0 8px 30px rgba(37, 23, 18, 0.04);
}

/* Maker's Stamp Box (Plugs gap in Section 01) */
.maker-stamp-box {
  margin-top: 32px;
  background: var(--bg-warm);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--gold);
  border-radius: var(--radius-sm);
  padding: 22px 24px;
  display: flex;
  align-items: center;
  gap: 22px;
}

.stamp-graphic {
  flex-shrink: 0;
}

.stamp-graphic img {
  display: block;
  width: 80px;
  height: 80px;
}

.stamp-content {
  flex: 1;
}



.veteran-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--gold-pale);
  border: 1px solid var(--gold-border);
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 20px;
}

.callout {
  border-left: 3px solid var(--gold);
  padding: 6px 0 6px 24px;
  margin: 26px 0;
  max-width: 68ch;
}

.callout.red {
  border-left-color: var(--red);
}

.callout .callout-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-soft);
  margin-bottom: 6px;
  display: block;
}

.callout.red .callout-label {
  color: var(--red-bright);
}

.callout p {
  margin: 0;
  font-size: 1.05rem;
  color: var(--ink-soft);
  font-weight: 400;
  line-height: 1.6;
}

.contrast-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 24px 0;
}

.contrast-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  font-size: 0.95rem;
}

.contrast-icon {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  margin-top: 2px;
}

.contrast-icon.cross {
  background: var(--red-soft-bg);
  color: var(--red-bright);
  border: 1px solid var(--red-border);
}

.contrast-icon.check {
  background: var(--green-pale);
  color: var(--green);
  border: 1px solid rgba(46, 104, 56, 0.3);
}

.thesis-sign-off {
  margin-top: 48px;
  padding-top: 36px;
  border-top: 1px solid var(--rule);
}

.sign-off-text {
  font-family: var(--font-sans);
  font-size: 1.15rem;
  line-height: 1.75;
  color: var(--ink);
  font-weight: 500;
  max-width: 920px;
}

/* ==========================================================================
   SERVICES & CAPABILITIES ("THE WORKS")
   ========================================================================== */
.services-section {
  padding: 96px 0;
  border-top: 1px solid var(--rule);
}

.section-head {
  margin-bottom: 48px;
}

.tax-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-top: 36px;
}

.tax-card {
  background: var(--panel);
  border: 1px solid var(--rule);
  border-top: 3px solid var(--red);
  padding: 30px 26px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  border-radius: var(--radius-sm);
  transition: transform var(--trans), box-shadow var(--trans), border-color var(--trans);
  position: relative;
}

.tax-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 36px rgba(37, 23, 18, 0.06);
  border-color: var(--rule-strong);
}

.tax-card.gold-top {
  border-top-color: var(--gold);
}

.tax-card.ink-top {
  border-top-color: var(--ink);
}

.tax-card .tax-frac {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--gold-soft);
  letter-spacing: 0.08em;
}

.tax-card .tax-frac .n {
  color: var(--red-bright);
  font-weight: 600;
}

.tax-card h4 {
  font-size: 1.3rem;
  line-height: 1.25;
  color: var(--ink);
}

.tax-card p {
  font-size: 0.94rem;
  line-height: 1.62;
  color: var(--ink-dim);
  margin: 0;
}

.tax-card .key-bullets {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 12px 0;
  padding: 0;
}

.tax-card .key-bullets li {
  font-size: 0.88rem;
  color: var(--ink-soft);
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.tax-card .key-bullets li::before {
  content: "■";
  color: var(--red);
  font-size: 0.55rem;
  flex-shrink: 0;
}

.tax-card .maps-to {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--ink-faint);
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--rule-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.tax-card .maps-to .mono {
  line-height: 1.4;
}

/* ==========================================================================
   ENGINEERING MATURITY (HIGH ASSURANCE & HARDENED ARCHITECTURE)
   ========================================================================== */
.engineering-section {
  padding: 96px 0;
  border-top: 1px solid var(--rule);
  background: var(--bg-warm);
}

.stack-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-top: 36px;
}

.stack-card {
  background: var(--panel);
  border: 1px solid var(--rule);
  padding: 28px 24px;
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.stack-card .stack-label {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--gold);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 500;
}

.stack-card h3 {
  font-size: 1.25rem;
  color: var(--ink);
}

.stack-card p {
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--ink-dim);
  margin: 0;
}

/* ==========================================================================
   THE OLD HANDS STANDARD (COMMERCIAL & OPERATIONAL PRINCIPLES)
   ========================================================================== */
.principles-section {
  padding: 96px 0;
  border-top: 1px solid var(--rule);
}

.principles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-top: 36px;
}

.principle-card {
  background: var(--panel);
  border: 1px solid var(--rule);
  padding: 32px 26px;
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
}

.principle-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 26px;
  width: 38px;
  height: 3px;
  background: var(--gold);
}

.principle-card:nth-child(2)::before {
  background: var(--red);
}

.principle-num {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--gold);
  letter-spacing: 0.12em;
  margin-top: 6px;
}

.principle-card h3 {
  font-size: 1.25rem;
  color: var(--ink);
}

.principle-card p {
  font-size: 0.92rem;
  color: var(--ink-dim);
  margin: 0;
}

/* ==========================================================================
   CONTACT SECTION
   ========================================================================== */
.contact-section {
  padding: 96px 0 110px;
  border-top: 1px solid var(--rule);
  background: var(--bg-warm);
}

.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 56px;
  align-items: start;
}

.contact-info-panel {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.credentials-box {
  background: var(--panel);
  border: 1px solid var(--rule);
  padding: 24px;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--ink-dim);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.credentials-box .title {
  color: var(--ink);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.mobile-cta-item {
  display: none;
}

.form-row-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* Form Styles */
.contact-form-card {
  background: var(--panel);
  border: 1px solid var(--rule);
  border-top: 3px solid var(--red);
  padding: 40px;
  border-radius: var(--radius-sm);
  box-shadow: 0 12px 40px rgba(37, 23, 18, 0.05);
}

.form-group {
  margin-bottom: 22px;
}

.form-group label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin-bottom: 8px;
  font-weight: 500;
}

.form-control {
  width: 100%;
  padding: 12px 14px;
  font-family: var(--font-serif);
  font-size: 0.98rem;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius-sm);
  transition: all var(--trans);
  outline: none;
}

.form-control:focus {
  background: #FFFFFF;
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(37, 23, 18, 0.08);
}

textarea.form-control {
  min-height: 120px;
  resize: vertical;
}

.form-success-banner {
  display: none;
  background: var(--green-pale);
  border: 1px solid rgba(46, 104, 56, 0.35);
  padding: 20px;
  border-radius: var(--radius-sm);
  color: var(--green);
  font-size: 0.95rem;
  margin-bottom: 24px;
}

.form-error-banner {
  display: none;
  background: var(--red-soft-bg);
  border: 1px solid var(--red-border);
  padding: 16px 20px;
  border-radius: var(--radius-sm);
  color: var(--red-bright);
  font-size: 0.92rem;
  margin-bottom: 24px;
  line-height: 1.5;
}

/* ==========================================================================
   CAPTCHA & ANTI-BOT PROTECTION
   ========================================================================== */
.form-hp {
  position: absolute !important;
  left: -9999px !important;
  top: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
  overflow: hidden !important;
}

.captcha-group {
  margin-top: 6px;
  margin-bottom: 22px;
}

.captcha-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.captcha-badge {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
  background: var(--gold-pale);
  border: 1px solid var(--gold-border);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
}

.captcha-box {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--red);
  padding: 12px 16px;
  border-radius: var(--radius-sm);
}

.captcha-prompt {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
}

.captcha-q-label {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-faint);
}

.captcha-question {
  font-family: var(--font-mono);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 0.04em;
  user-select: none;
}

.captcha-input {
  width: 95px !important;
  padding: 8px 12px !important;
  font-family: var(--font-mono) !important;
  font-size: 1rem !important;
  font-weight: 600 !important;
  text-align: center;
  border: 1px solid var(--rule-strong) !important;
  background: var(--panel) !important;
  border-radius: var(--radius-sm) !important;
}

.captcha-input:focus {
  border-color: var(--red) !important;
  outline: none;
}

.btn-captcha-refresh {
  background: transparent;
  border: 1px solid var(--rule);
  color: var(--ink-dim);
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.15rem;
  line-height: 1;
  transition: transform 0.2s ease, color 0.15s ease, border-color 0.15s ease;
}

.btn-captcha-refresh:hover {
  color: var(--red);
  border-color: var(--red);
  transform: rotate(90deg);
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
#site-footer {
  padding: 70px 0 50px;
  border-top: 1px solid var(--rule);
  background: var(--bg);
  font-size: 0.88rem;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 36px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--rule);
}

.footer-brand {
  max-width: 360px;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  padding-top: 28px;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--ink-faint);
}

/* ==========================================================================
   RESPONSIVE DESIGN SYSTEM
   ========================================================================== */

/* --- 1040px: Medium Desktops & Tablets Landscape --- */
@media (max-width: 1040px) {
  .nav-links {
    gap: 18px;
  }
  .nav-link {
    font-size: 0.74rem;
  }
}

/* --- 900px: Tablets Portrait --- */
@media (max-width: 900px) {
  .grid-2col,
  .contact-layout {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .tax-grid,
  .principles-grid {
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }
  .stats-strip {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
}

/* --- 768px: Mobile Devices & Smaller Tablets --- */
@media (max-width: 768px) {
  /* Prevent horizontal blowout */
  html, body {
    overflow-x: hidden;
  }

  /* Section Spacing */
  .hero-section {
    padding: 48px 0 36px;
  }
  .philosophy-section,
  .services-section,
  .principles-section,
  .contact-section {
    padding: 52px 0;
  }
  .section-head {
    margin-bottom: 28px;
  }

  /* Header & Mobile Navigation */
  #site-header {
    height: 64px;
  }
  .nav-wrap {
    height: 64px;
  }
  .brand-logo-img {
    height: 32px;
  }
  .nav-links {
    display: none;
  }
  .nav-actions .btn {
    display: none;
  }
  .mobile-menu-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 6px 14px;
    background: var(--bg);
    border: 1px solid var(--rule-strong);
    border-radius: var(--radius-sm);
    font-family: var(--font-mono);
    font-size: 0.76rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: var(--ink);
    cursor: pointer;
    transition: all var(--trans);
  }
  .mobile-menu-btn:hover {
    border-color: var(--red);
    color: var(--red);
  }

  /* Mobile Drawer Menu */
  .nav-links.mobile-open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 2px solid var(--ink);
    padding: 14px 20px 22px;
    gap: 0;
    box-shadow: 0 16px 36px rgba(37, 23, 18, 0.12);
    z-index: 99;
  }
  .nav-links.mobile-open li {
    width: 100%;
    list-style: none;
  }
  .nav-links.mobile-open .nav-link {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 44px;
    padding: 12px 4px;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--ink);
    border-bottom: 1px solid var(--rule-subtle);
  }
  .nav-links.mobile-open .nav-link:hover,
  .nav-links.mobile-open .nav-link.active {
    color: var(--red);
  }
  .nav-links.mobile-open .nav-link::after {
    display: none;
  }
  .nav-links.mobile-open .mobile-cta-item {
    display: block !important;
    margin-top: 14px;
  }
  .nav-links.mobile-open .mobile-drawer-cta {
    display: block !important;
    width: 100%;
    text-align: center;
    padding: 12px 16px;
    font-size: 0.85rem;
  }

  /* Hero Section Elements */
  .hero-meta-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding-bottom: 14px;
    margin-bottom: 22px;
  }
  .eyebrow {
    white-space: normal;
    letter-spacing: 0.08em;
    font-size: 0.72rem;
    line-height: 1.45;
  }
  .eyebrow .rule {
    display: none;
  }
  .hero-headline {
    font-size: clamp(1.9rem, 7.5vw, 2.9rem);
    line-height: 1.12;
    letter-spacing: -0.02em;
    word-break: break-word;
  }
  .hero-lead-box p.lede {
    font-size: 1.02rem;
    line-height: 1.62;
  }
  .hero-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    margin: 24px 0 16px;
  }
  .hero-actions .btn {
    width: 100%;
    text-align: center;
    justify-content: center;
    padding: 14px 20px;
  }

  /* Hero Stats Strip: 2x2 Grid on Mobile */
  .stats-strip {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-top: 28px;
    padding-top: 20px;
  }
  .stat-item {
    background: var(--panel);
    border: 1px solid var(--rule);
    border-radius: var(--radius-sm);
    padding: 12px 10px;
  }
  .stat-val {
    font-size: 1.75rem;
  }
  .stat-desc {
    font-size: 0.66rem;
    line-height: 1.35;
  }

  /* Section 01: Thesis */
  .mission-highlight-card {
    padding: 22px 16px;
  }
  .maker-stamp-box {
    padding: 16px 14px;
    gap: 14px;
  }
  .stamp-graphic img {
    width: 52px;
    height: 52px;
  }
  .thesis-sign-off {
    margin-top: 28px;
    padding-top: 20px;
  }
  .sign-off-text {
    font-size: 1rem;
    line-height: 1.68;
  }

  /* Section 02 & 03: Cards */
  .tax-grid,
  .principles-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .tax-card,
  .principle-card {
    padding: 22px 18px;
  }
  .tax-card h4,
  .principle-card h3 {
    font-size: 1.18rem;
  }
  .tax-card p,
  .principle-card p {
    font-size: 0.88rem;
    line-height: 1.55;
  }
  .tax-card .maps-to {
    margin-top: 14px;
    padding-top: 12px;
    font-size: 0.68rem;
  }
  .tax-card .maps-to .mono {
    font-size: 0.66rem;
    line-height: 1.4;
  }

  /* Section 04: Contact Form */
  .form-row-2col {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .contact-form-card {
    padding: 22px 16px;
  }
  .form-control {
    font-size: 16px; /* Critical: Prevents iOS auto-zoom on mobile focus */
    padding: 11px 12px;
  }
  .credentials-box {
    padding: 18px 16px;
    font-size: 0.84rem;
    line-height: 1.65;
  }

  /* Captcha Box Mobile Fitting */
  .captcha-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 12px;
    flex-wrap: wrap;
  }
  .captcha-prompt {
    gap: 6px;
  }
  .captcha-q-label {
    font-size: 0.7rem;
  }
  .captcha-question {
    font-size: 0.95rem;
  }
  .captcha-input {
    width: 68px !important;
    font-size: 16px !important;
    padding: 7px 6px !important;
  }
  .btn-captcha-refresh {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
  }

  /* Footer Mobile Layout */
  #site-footer {
    padding: 44px 0 28px;
  }
  .footer-top {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    padding-bottom: 24px;
  }
  .footer-brand {
    grid-column: 1 / -1;
    max-width: 100%;
  }
  .footer-top > div:last-child {
    grid-column: 1 / -1;
  }
  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding-top: 18px;
  }
  .footer-bottom > div:last-child {
    flex-wrap: wrap;
    gap: 8px;
  }
}

/* --- 480px: Small Mobile Screens (iPhone SE, Galaxy S, etc.) --- */
@media (max-width: 480px) {
  .container {
    padding-left: 16px;
    padding-right: 16px;
  }
  .hero-headline {
    font-size: clamp(1.75rem, 8.5vw, 2.2rem);
    line-height: 1.15;
  }
  .stats-strip {
    gap: 8px;
  }
  .stat-item {
    padding: 10px 8px;
  }
  .stat-val {
    font-size: 1.6rem;
  }
  .stat-desc {
    font-size: 0.62rem;
  }
  .maker-stamp-box {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .contact-form-card,
  .tax-card,
  .principle-card {
    padding: 18px 14px;
  }
}

/* ==========================================================================
   PRINT STYLESHEET
   ========================================================================== */
@media print {
  #site-header,
  .hero-actions,
  .mobile-menu-btn,
  .contact-form-card {
    display: none !important;
  }
  body {
    background: #FFFFFF !important;
    color: #111111 !important;
  }
  .container {
    max-width: 100% !important;
    padding: 0 !important;
  }
  .tax-card, .principle-card, .mission-highlight-card, .stack-card {
    border: 1px solid #CCCCCC !important;
    break-inside: avoid;
  }
}

/* ==========================================================================
   ACCESSIBILITY: SKIP-TO-CONTENT LINK
   ========================================================================== */
.skip-link {
  position: absolute;
  top: -48px;
  left: 12px;
  background: var(--ink);
  color: var(--bg);
  padding: 10px 18px;
  z-index: 10000;
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  transition: top var(--trans);
}
.skip-link:focus {
  top: 0;
  outline: 2px solid var(--gold-light);
  outline-offset: 2px;
}

/* ==========================================================================
   BREADCRUMBS
   ========================================================================== */
.breadcrumbs-nav {
  padding: 24px 0 0;
}
.breadcrumbs-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--ink-dim);
  letter-spacing: 0.02em;
}
.breadcrumbs-list li {
  display: inline-flex;
  align-items: center;
}
.breadcrumbs-list li:not(:last-child)::after {
  content: '›';
  margin: 0 10px;
  color: var(--ink-ghost);
  font-weight: 500;
}
.breadcrumbs-list a {
  color: var(--ink-dim);
  text-decoration: none;
  transition: color var(--trans);
}
.breadcrumbs-list a:hover,
.breadcrumbs-list a:focus-visible {
  color: var(--red);
  text-decoration: underline;
}
.breadcrumbs-list [aria-current="page"] {
  color: var(--ink);
  font-weight: 500;
}

/* Give aria-current="page" nav-link the active treatment too */
.nav-link[aria-current="page"] {
  color: var(--red);
}
.nav-link[aria-current="page"]::after {
  transform: scaleX(1);
}

/* ==========================================================================
   PAGE-HEAD (sub-page hero band)
   ========================================================================== */
.page-head {
  padding: 48px 0 56px;
  border-bottom: 1px solid var(--rule);
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-warm) 100%);
}
.page-head h1 {
  margin-top: 14px;
  margin-bottom: 18px;
}
.page-head .lede {
  max-width: 760px;
}

/* ==========================================================================
   SERVICE DETAIL PAGE
   ========================================================================== */
.service-body {
  padding: 56px 0 72px;
}
.service-body .grid-2col {
  gap: 48px;
}
.service-body h2 {
  margin-top: 32px;
  margin-bottom: 14px;
}
.service-body h3 {
  margin-top: 24px;
  margin-bottom: 10px;
}
.service-body p + ul.key-bullets {
  margin-top: 10px;
}
.service-body ul.key-bullets {
  margin-bottom: 20px;
}
.service-sidebar {
  position: sticky;
  top: 100px;
}
.service-sidebar .tax-card {
  padding: 24px;
}
.related-services {
  margin-top: 56px;
  padding-top: 40px;
  border-top: 1px solid var(--rule);
}
.related-services h2 {
  font-size: 1.4rem;
  margin-bottom: 20px;
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}
.related-card {
  display: block;
  padding: 20px;
  background: var(--panel-warm);
  border: 1px solid var(--rule);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: var(--ink);
  transition: border-color var(--trans), transform var(--trans);
}
.related-card:hover,
.related-card:focus-visible {
  border-color: var(--red-border);
  transform: translateY(-2px);
}
.related-card .mono {
  font-size: 0.72rem;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
  display: block;
}
.related-card h4 {
  font-size: 1rem;
  margin-bottom: 6px;
}
.related-card p {
  font-size: 0.84rem;
  color: var(--ink-dim);
  margin: 0;
}

@media (max-width: 900px) {
  .service-sidebar {
    position: static;
  }
}

/* ==========================================================================
   HOME PAGE SERVICE TILES (condensed grid on index.html)
   ========================================================================== */
.home-services {
  padding: 72px 0;
  background: var(--bg-warm);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.home-services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 32px;
}
.service-tile {
  display: flex;
  flex-direction: column;
  padding: 24px;
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: var(--ink);
  transition: border-color var(--trans), transform var(--trans), box-shadow var(--trans);
}
.service-tile:hover,
.service-tile:focus-visible {
  border-color: var(--red-border);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(37, 23, 18, 0.08);
}
.service-tile .tile-num {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 10px;
  font-weight: 600;
}
.service-tile h3 {
  font-size: 1.08rem;
  margin-bottom: 8px;
  color: var(--ink);
}
.service-tile p {
  font-size: 0.88rem;
  color: var(--ink-dim);
  margin: 0 0 14px;
  line-height: 1.55;
  flex: 1;
}
.service-tile .read-more {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--red);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 500;
}
.service-tile:hover .read-more,
.service-tile:focus-visible .read-more {
  text-decoration: underline;
}

/* ==========================================================================
   HOME-PAGE CTA BAND
   ========================================================================== */
.home-cta {
  padding: 64px 0;
  text-align: center;
}
.home-cta h2 {
  max-width: 760px;
  margin: 0 auto 20px;
}
.home-cta p.lede {
  max-width: 640px;
  margin: 0 auto 32px;
}
.home-cta .hero-actions {
  justify-content: center;
}
