/* Sagacity Effect LLC — base stylesheet
   Design system: warm-neutral "cozy corporate" with light + dark themes.
   Typography: Fraunces serif headlines, Inter body, JetBrains Mono accents. */

/* ============================================================
   THEME VARIABLES
   Default is light. Dark theme applied via [data-theme="dark"]
   on <html>. Set by inline script in <head> before paint to
   prevent flash.
   ============================================================ */

:root,
[data-theme="light"] {
  --bg:           #f7f2e8;   /* warm cream paper */
  --bg-elev:      #ffffff;   /* elevated card surface */
  --fg:           #1a1f2c;   /* deep navy-charcoal text */
  --fg-muted:     #5b5d65;   /* secondary text */
  --fg-subtle:    #8a8780;   /* tertiary, labels, captions */
  --border:       #e2dccf;   /* subtle warm gray-tan */
  --border-strong:#cfc7b3;   /* stronger divider */
  --surface:      #fdfaf3;   /* slightly lighter than bg */
  --surface-2:    #f0e9d8;   /* slightly darker accent surface */
  --accent:       #8b5a2b;   /* warm copper */
  --accent-hover: #6d4520;   /* deeper copper on hover */
  --accent-fg:    #fdfaf3;   /* text on accent */
  --accent-soft:  rgba(139, 90, 43, 0.10);
  --shadow-sm:    0 1px 2px rgba(60, 40, 20, 0.04),
                  0 1px 3px rgba(60, 40, 20, 0.06);
  --shadow-md:    0 4px 12px rgba(60, 40, 20, 0.06),
                  0 2px 4px rgba(60, 40, 20, 0.04);
  --shadow-lg:    0 16px 40px rgba(60, 40, 20, 0.10),
                  0 4px 12px rgba(60, 40, 20, 0.06);
  --noise-opacity: 0.025;
}

[data-theme="dark"] {
  --bg:           #15110b;   /* deep warm brown-black */
  --bg-elev:      #1f1a14;   /* elevated surface */
  --fg:           #f4ede0;   /* warm cream */
  --fg-muted:     #b0a899;   /* secondary */
  --fg-subtle:    #7a7468;   /* tertiary */
  --border:       #2a2520;
  --border-strong:#3d362d;
  --surface:      #1c1814;
  --surface-2:    #251f19;
  --accent:       #d4a574;   /* warm amber */
  --accent-hover: #e0b687;
  --accent-fg:    #15110b;
  --accent-soft:  rgba(212, 165, 116, 0.14);
  --shadow-sm:    0 1px 2px rgba(0, 0, 0, 0.30);
  --shadow-md:    0 4px 12px rgba(0, 0, 0, 0.40),
                  0 2px 4px rgba(0, 0, 0, 0.30);
  --shadow-lg:    0 16px 40px rgba(0, 0, 0, 0.50),
                  0 4px 12px rgba(0, 0, 0, 0.30);
  --noise-opacity: 0.04;
}

/* ============================================================
   TOKENS
   ============================================================ */

:root {
  --max-w:        1120px;
  --gap:          32px;
  --radius-sm:    6px;
  --radius:       10px;
  --radius-lg:    16px;
  --transition:   220ms cubic-bezier(0.4, 0, 0.2, 1);

  --font-serif:   "Fraunces", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --font-sans:    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI",
                  "Helvetica Neue", Arial, sans-serif;
  --font-mono:    "JetBrains Mono", "SF Mono", Menlo, Consolas, monospace;
}

/* ============================================================
   RESET
   ============================================================ */

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color-scheme: light dark;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--fg);
  background: var(--bg);
  font-weight: 400;
  min-height: 100vh;
  position: relative;
  transition: background-color var(--transition), color var(--transition);
}

/* Subtle paper-grain noise overlay for "cozy" tactile feel. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: var(--noise-opacity);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.5 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  background-size: 200px 200px;
  mix-blend-mode: multiply;
}
[data-theme="dark"] body::before {
  mix-blend-mode: screen;
}

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

a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  text-decoration-color: var(--accent-soft);
  transition: color var(--transition), text-decoration-color var(--transition);
}
a:hover {
  text-decoration-color: var(--accent);
}

::selection {
  background: var(--accent-soft);
  color: var(--fg);
}

/* ============================================================
   SKIP LINK
   ============================================================ */

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: var(--accent-fg);
  padding: 12px 20px;
  z-index: 100;
  text-decoration: none;
  font-weight: 600;
  border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus { left: 0; }

/* ============================================================
   LAYOUT
   ============================================================ */

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 28px;
  position: relative;
  z-index: 2;
}

/* ============================================================
   HEADER
   ============================================================ */

.site-header {
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  backdrop-filter: saturate(160%) blur(10px);
  position: sticky;
  top: 0;
  z-index: 50;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 18px;
  padding-bottom: 18px;
}
.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: var(--fg);
  flex-shrink: 0;
}
.brand-img {
  height: 44px;
  width: auto;
  display: block;
  border-radius: 4px;
}
@media (max-width: 600px) {
  .brand-img { height: 36px; }
}
.nav-toggle {
  display: none;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 8px 14px;
  font-family: inherit;
  font-size: 14px;
  color: var(--fg);
  cursor: pointer;
  border-radius: var(--radius-sm);
  font-weight: 500;
  transition: background var(--transition);
}
.nav-toggle:hover { background: var(--surface-2); }
.nav-list {
  display: flex;
  list-style: none;
  gap: 32px;
  align-items: center;
}
.nav-list a {
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--fg-muted);
  padding: 4px 0;
  border-bottom: 1.5px solid transparent;
  transition: color var(--transition), border-color var(--transition);
}
.nav-list a:hover { color: var(--fg); }
.nav-list a.active {
  color: var(--fg);
  border-bottom-color: var(--accent);
}

@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .nav-list {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 8px 28px 16px;
    align-items: stretch;
  }
  .nav-list.open { display: flex; }
  .nav-list li { padding: 8px 0; border-bottom: 1px solid var(--border); }
  .nav-list li:last-child { border-bottom: none; }
  .nav-list a { display: block; padding: 8px 0; }
}

/* ============================================================
   THEME TOGGLE
   ============================================================ */

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--fg-muted);
  cursor: pointer;
  font-family: inherit;
  transition: background var(--transition), color var(--transition),
              border-color var(--transition);
}
.theme-toggle:hover {
  background: var(--surface-2);
  color: var(--accent);
  border-color: var(--border-strong);
}
.theme-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.theme-toggle svg { display: block; }
[data-theme="light"] .theme-toggle .icon-sun  { display: none; }
[data-theme="light"] .theme-toggle .icon-moon { display: block; }
[data-theme="dark"]  .theme-toggle .icon-sun  { display: block; }
[data-theme="dark"]  .theme-toggle .icon-moon { display: none; }

/* ============================================================
   TYPOGRAPHY (display)
   ============================================================ */

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 500;
  letter-spacing: -0.018em;
  line-height: 1.15;
  color: var(--fg);
}

h1 { font-size: clamp(40px, 5.5vw, 68px); }
h2 { font-size: clamp(30px, 4vw, 44px); }
h3 { font-size: clamp(20px, 2vw, 24px); }
h4 { font-size: 18px; font-weight: 600; }

p { color: var(--fg-muted); line-height: 1.65; }

code, kbd {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background: var(--surface-2);
  padding: 0.15em 0.4em;
  border-radius: 4px;
  color: var(--accent);
}

/* ============================================================
   HERO (two-column, image right)
   ============================================================ */

.hero {
  padding: 80px 0 100px;
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 64px;
  align-items: center;
}
.hero-eyebrow {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 20px;
  padding: 6px 12px;
  background: var(--accent-soft);
  border-radius: 999px;
}
.hero h1 {
  font-style: italic;
  margin-bottom: 24px;
  max-width: 12ch;
}
.hero h1 .accent { color: var(--accent); font-style: italic; }
.hero .lede {
  font-size: 19px;
  color: var(--fg-muted);
  max-width: 540px;
  margin: 0 0 36px;
  line-height: 1.6;
}
.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}
.hero-meta {
  margin-top: 40px;
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--fg-subtle);
  font-family: var(--font-mono);
}
.hero-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.hero-meta span::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
}
.hero-image {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  aspect-ratio: 4 / 5;
  position: relative;
}
.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.hero-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 60%, rgba(0,0,0,0.15));
  pointer-events: none;
}
@media (max-width: 880px) {
  .hero { padding: 56px 0 72px; }
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero h1 { max-width: none; }
  .hero-image { aspect-ratio: 16 / 10; order: -1; }
}

/* ============================================================
   BUTTONS
   ============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 15px;
  font-family: var(--font-sans);
  text-decoration: none;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: background var(--transition), color var(--transition),
              border-color var(--transition), transform var(--transition);
  letter-spacing: 0.01em;
  line-height: 1.2;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--accent);
  color: var(--accent-fg);
  border-color: var(--accent);
  box-shadow: 0 1px 0 rgba(0,0,0,0.08), inset 0 1px 0 rgba(255,255,255,0.1);
}
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-secondary {
  background: transparent;
  color: var(--fg);
  border-color: var(--border-strong);
}
.btn-secondary:hover { background: var(--surface-2); border-color: var(--fg); }
.btn-ghost {
  background: transparent;
  color: var(--fg-muted);
  border: none;
  padding: 13px 8px;
  text-decoration: none;
  font-weight: 500;
}
.btn-ghost:hover { color: var(--accent); }

/* ============================================================
   SECTIONS
   ============================================================ */

section {
  padding: 96px 0;
  border-bottom: 1px solid var(--border);
  position: relative;
}
section:last-of-type { border-bottom: none; }
section .section-eyebrow {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}
section h2 {
  margin-bottom: 16px;
  max-width: 22ch;
}
section h2 .accent { color: var(--accent); font-style: italic; }
section .section-lede {
  font-size: 18px;
  color: var(--fg-muted);
  max-width: 640px;
  margin-bottom: 56px;
  line-height: 1.6;
}

/* ============================================================
   WHY GRID (3 columns)
   ============================================================ */

.why-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-top: 48px;
}
.why-card {
  padding: 32px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
}
.why-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.why-card .num {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent);
  letter-spacing: 0.08em;
  margin-bottom: 20px;
  display: block;
}
.why-card h3 {
  margin-bottom: 12px;
  font-style: italic;
}
.why-card p {
  font-size: 15px;
  line-height: 1.65;
}
@media (max-width: 880px) {
  .why-grid { grid-template-columns: 1fr; gap: 20px; }
}

/* ============================================================
   STEPS (4 columns)
   ============================================================ */

.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  counter-reset: step;
  margin-top: 48px;
}
.step {
  position: relative;
  padding: 32px 24px 24px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  counter-increment: step;
}
.step::before {
  content: counter(step, decimal-leading-zero);
  position: absolute;
  top: 24px;
  right: 24px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent);
  font-weight: 500;
  letter-spacing: 0.06em;
}
.step h3 {
  font-size: 19px;
  font-style: italic;
  margin-bottom: 10px;
  margin-top: 32px;
}
.step p {
  font-size: 14px;
  line-height: 1.6;
}
@media (max-width: 960px) {
  .steps { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 540px) {
  .steps { grid-template-columns: 1fr; gap: 16px; }
}

/* ============================================================
   CTA STRIP
   ============================================================ */

.cta-strip {
  text-align: center;
  padding: 96px 0;
  background: var(--surface-2);
  border-top: 1px solid var(--border);
  border-bottom: none;
  position: relative;
}
.cta-strip h2 {
  color: var(--fg);
  margin: 0 auto 16px;
  font-style: italic;
  max-width: 24ch;
}
.cta-strip p {
  color: var(--fg-muted);
  font-size: 18px;
  margin: 0 auto 32px;
  max-width: 560px;
}
.cta-strip .actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ============================================================
   ABOUT / STORY
   ============================================================ */

.story {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 64px;
  align-items: start;
}
.story-img {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
  aspect-ratio: 4 / 5;
}
.story-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.story-copy h3 {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 32px 0 12px;
}
.story-copy h3:first-child { margin-top: 0; }
.story-copy p {
  font-size: 16px;
  line-height: 1.7;
  margin-bottom: 16px;
  color: var(--fg-muted);
}
.story-copy p:last-child { margin-bottom: 0; }
@media (max-width: 880px) {
  .story { grid-template-columns: 1fr; gap: 32px; }
  .story-img { aspect-ratio: 16 / 10; }
}

/* ============================================================
   PULL QUOTE
   ============================================================ */

.pull-quote {
  font-family: var(--font-serif);
  font-size: clamp(22px, 2.6vw, 30px);
  line-height: 1.4;
  font-weight: 500;
  font-style: italic;
  border-left: 3px solid var(--accent);
  padding: 8px 0 8px 28px;
  margin: 32px 0;
  color: var(--fg);
}

/* ============================================================
   CAPABILITIES TABLE
   ============================================================ */

.cap-table {
  width: 100%;
  border-collapse: collapse;
  margin: 32px 0 48px;
  font-size: 14px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.cap-table th,
.cap-table td {
  text-align: left;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.cap-table tr:last-child td { border-bottom: none; }
.cap-table th {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-subtle);
  background: var(--surface);
}
.cap-table td code {
  font-size: 12px;
  background: var(--accent-soft);
  color: var(--accent);
  padding: 3px 8px;
  border-radius: 4px;
  font-weight: 500;
}
.cap-table strong { color: var(--fg); font-weight: 600; }

/* ============================================================
   TWO COL PANELS
   ============================================================ */

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin: 48px 0;
}
.panel {
  padding: 32px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.panel h3 {
  font-style: italic;
  margin-bottom: 20px;
  font-size: 22px;
}
.panel ul {
  list-style: none;
}
.panel ul li {
  padding: 8px 0 8px 24px;
  position: relative;
  font-size: 15px;
  color: var(--fg-muted);
  line-height: 1.6;
  border-bottom: 1px solid var(--border);
}
.panel ul li:last-child { border-bottom: none; }
.panel ul li::before {
  content: "→";
  position: absolute;
  left: 0;
  top: 8px;
  color: var(--accent);
  font-weight: 600;
}
@media (max-width: 880px) {
  .two-col { grid-template-columns: 1fr; gap: 20px; }
}

/* ============================================================
   REQUIREMENTS LIST
   ============================================================ */

.req-list {
  list-style: none;
  margin: 24px 0;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.req-list > li {
  padding: 20px 24px 20px 56px;
  border-bottom: 1px solid var(--border);
  position: relative;
}
.req-list > li:last-child { border-bottom: none; }
.req-list > li::before {
  content: "✓";
  position: absolute;
  left: 24px;
  top: 22px;
  color: var(--accent);
  font-weight: 700;
  font-size: 16px;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-soft);
  border-radius: 50%;
}
.req-list > li strong {
  display: block;
  font-family: var(--font-sans);
  font-weight: 600;
  color: var(--fg);
  margin-bottom: 4px;
  font-size: 15px;
}
.req-list > li span {
  color: var(--fg-muted);
  font-size: 14px;
  line-height: 1.55;
}

/* ============================================================
   CONTACT
   ============================================================ */

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 24px;
}
.contact-card {
  padding: 32px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: border-color var(--transition), transform var(--transition);
}
.contact-card:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}
.contact-card h3 {
  font-size: 18px;
  font-style: italic;
  margin-bottom: 10px;
}
.contact-card > p {
  font-size: 14px;
  color: var(--fg-muted);
  margin-bottom: 16px;
  line-height: 1.55;
}
.contact-card .email {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  border-bottom: 1px solid var(--accent-soft);
  padding-bottom: 1px;
}
.contact-card .email:hover { border-bottom-color: var(--accent); }
@media (max-width: 720px) {
  .contact-grid { grid-template-columns: 1fr; gap: 16px; }
}

.address-block {
  margin-top: 24px;
  padding: 28px 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.7;
  color: var(--fg);
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 24px;
  align-items: start;
}
.address-block .label {
  font-family: var(--font-sans);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--fg-subtle);
  font-weight: 600;
  padding-top: 4px;
}
@media (max-width: 540px) {
  .address-block { grid-template-columns: 1fr; gap: 12px; }
}

/* ============================================================
   FOOTER
   ============================================================ */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 56px 0 32px;
  font-size: 14px;
  color: var(--fg-muted);
  background: var(--bg);
  position: relative;
  z-index: 2;
}
.site-footer .container {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 32px;
}
.site-footer .footer-brand p {
  font-size: 14px;
  color: var(--fg-muted);
  margin-top: 12px;
  line-height: 1.55;
  max-width: 32ch;
}
.site-footer h4 {
  font-family: var(--font-sans);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--fg-subtle);
  font-weight: 600;
  margin-bottom: 16px;
}
.site-footer ul { list-style: none; }
.site-footer ul li { margin-bottom: 8px; }
.site-footer a {
  color: var(--fg-muted);
  text-decoration: none;
  font-size: 14px;
}
.site-footer a:hover { color: var(--accent); }
.site-footer .footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--fg-subtle);
}
@media (max-width: 720px) {
  .site-footer .container { grid-template-columns: 1fr; gap: 32px; }
}

/* ============================================================
   PAGE HERO (sub pages)
   ============================================================ */

.page-hero {
  padding: 80px 0 56px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.page-hero .eyebrow {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}
.page-hero h1 {
  font-style: italic;
  margin-bottom: 20px;
  max-width: 22ch;
}
.page-hero .lede {
  font-size: 19px;
  color: var(--fg-muted);
  max-width: 640px;
  line-height: 1.6;
}

/* ============================================================
   BIO CARD
   ============================================================ */

.bio {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  padding: 32px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-top: 32px;
  box-shadow: var(--shadow-sm);
}
.bio-avatar {
  width: 72px;
  height: 72px;
  background: var(--accent);
  color: var(--accent-fg);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 26px;
  font-weight: 500;
  flex-shrink: 0;
}
.bio-content h4 {
  font-family: var(--font-serif);
  font-size: 19px;
  font-style: italic;
  font-weight: 500;
  margin-bottom: 4px;
}
.bio-content p {
  color: var(--fg-muted);
  font-size: 14px;
  line-height: 1.6;
}

/* ============================================================
   CAPABILITIES PAGE — image section
   ============================================================ */

.cap-section-with-image {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 64px;
  align-items: center;
  padding: 80px 0;
  border-bottom: 1px solid var(--border);
}
.cap-section-with-image .cap-image {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
  aspect-ratio: 4 / 3;
  order: 2;
}
.cap-section-with-image .cap-image img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
@media (max-width: 880px) {
  .cap-section-with-image { grid-template-columns: 1fr; gap: 32px; }
  .cap-section-with-image .cap-image { order: -1; aspect-ratio: 16 / 10; }
}

/* ============================================================
   PRINT
   ============================================================ */

@media print {
  .site-header, .site-footer, .nav-toggle, .theme-toggle { display: none; }
  body { font-size: 12pt; color: #000; background: #fff; }
  a { color: #000; text-decoration: none; }
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ============================================================
   VENDOR APPLICATION FORM
   ============================================================ */

.container-narrow { max-width: 820px; }

/* Stepper */
.stepper {
  list-style: none;
  display: flex;
  gap: 0;
  padding: 0;
  margin: 0 0 48px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.stepper-item {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  position: relative;
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--fg-subtle);
  border-right: 1px solid var(--border);
  transition: background var(--transition), color var(--transition);
}
.stepper-item:last-child { border-right: none; }
.stepper-item.active {
  background: var(--accent-soft);
  color: var(--fg);
}
.stepper-item.done {
  color: var(--fg-muted);
}
.stepper-item.done .stepper-num {
  background: var(--accent);
  color: var(--accent-fg);
}
.stepper-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--fg-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  flex-shrink: 0;
  transition: background var(--transition), color var(--transition);
}
.stepper-item.active .stepper-num {
  background: var(--accent);
  color: var(--accent-fg);
}
.stepper-label {
  font-weight: 500;
  letter-spacing: 0.01em;
}
@media (max-width: 720px) {
  .stepper { flex-direction: column; }
  .stepper-item { border-right: none; border-bottom: 1px solid var(--border); }
  .stepper-item:last-child { border-bottom: none; }
  .stepper-label { font-size: 13px; }
}

/* Form steps */
.vendor-form {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px;
  box-shadow: var(--shadow-sm);
}
@media (max-width: 720px) {
  .vendor-form { padding: 24px; }
}
.form-step {
  border: none;
  padding: 0;
  margin: 0;
  display: none;
}
.form-step.active {
  display: block;
  animation: formStepIn 280ms ease-out;
}
@keyframes formStepIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.form-step-title {
  display: block;
  width: 100%;
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}
.form-step-title h2 {
  font-style: italic;
  margin: 8px 0 12px;
  font-size: clamp(26px, 3.4vw, 34px);
}
.form-step-title p {
  color: var(--fg-muted);
  font-size: 15px;
  margin: 0;
  max-width: 56ch;
}
.step-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 4px 10px;
  border-radius: 999px;
}
.form-section-h3 {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg);
  margin: 40px 0 20px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.form-section-h3:first-of-type { margin-top: 0; padding-top: 0; border-top: none; }

/* Form rows + groups */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}
.form-row-3 { grid-template-columns: 1fr 1fr 1fr; }
@media (max-width: 640px) {
  .form-row, .form-row-3 { grid-template-columns: 1fr; gap: 16px; }
}
.form-group {
  margin-bottom: 20px;
}
.form-group label {
  display: block;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  color: var(--fg);
  margin-bottom: 6px;
  letter-spacing: 0.01em;
}
.req { color: var(--accent); font-weight: 600; }
.form-hint {
  font-size: 12px;
  color: var(--fg-subtle);
  margin: 6px 0 0;
  line-height: 1.5;
}
.form-hint a { color: var(--accent); }
.form-error {
  font-size: 12px;
  color: #b3502b;
  margin: 6px 0 0;
  display: none;
  font-weight: 500;
}
.form-group.has-error .form-error { display: block; }
.form-group.has-error input,
.form-group.has-error select,
.form-group.has-error textarea {
  border-color: #b3502b;
  background: rgba(179, 80, 43, 0.04);
}

/* Inputs */
.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group input[type="url"],
.form-group input[type="number"],
.form-group input[type="month"],
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 11px 14px;
  font-family: var(--font-sans);
  font-size: 15px;
  color: var(--fg);
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  transition: border-color var(--transition), background var(--transition),
              box-shadow var(--transition);
  line-height: 1.4;
}
.form-group textarea { resize: vertical; min-height: 96px; }
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--bg-elev);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--fg-subtle);
  opacity: 1;
}
.form-group select {
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8' width='12' height='8'><path d='M1 1l5 5 5-5' stroke='%238a8780' stroke-width='1.5' fill='none' stroke-linecap='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

/* Checkboxes + radios */
.checkbox-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 640px) {
  .checkbox-grid { grid-template-columns: 1fr; }
}
.checkbox-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.check, .radio {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--fg);
  line-height: 1.45;
}
.check:hover, .radio:hover { border-color: var(--accent); }
.check input, .radio input {
  margin: 2px 0 0;
  accent-color: var(--accent);
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  cursor: pointer;
}
.check input:checked + span,
.radio input:checked + span {
  color: var(--fg);
}
.check span, .radio span { display: block; }
.check span strong, .radio span strong {
  display: block;
  font-weight: 600;
  font-size: 14px;
  color: var(--fg);
  margin-bottom: 2px;
}
.check span em, .radio span em {
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-subtle);
  letter-spacing: 0.04em;
}
.check:has(input:checked),
.radio:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.check-attestation {
  padding: 16px 20px;
  background: var(--surface);
}
.radio-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.radio-inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--fg-muted);
  cursor: pointer;
}
.radio-inline input { accent-color: var(--accent); }

/* File upload */
.file-upload {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 20px;
  background: var(--bg);
  border: 1.5px dashed var(--border-strong);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
  position: relative;
  margin-bottom: 0;
}
.file-upload:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.file-upload.has-file {
  border-style: solid;
  border-color: var(--accent);
  background: var(--bg-elev);
}
.file-upload input[type="file"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  margin: 0;
  padding: 0;
}
.file-upload-prompt {
  display: block;
  pointer-events: none;
}
.file-upload-prompt strong {
  display: block;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 600;
  color: var(--fg);
  margin-bottom: 2px;
}
.file-upload-prompt em {
  display: block;
  font-style: normal;
  font-family: var(--font-sans);
  font-size: 12px;
  color: var(--fg-subtle);
}
.file-upload-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg-muted);
  white-space: nowrap;
  pointer-events: none;
}
.file-upload.has-file .file-upload-status {
  background: var(--accent);
  color: var(--accent-fg);
  border-color: var(--accent);
}

/* Contract blocks (past performance) */
.contract-block {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 16px;
  background: var(--bg);
  position: relative;
}
.contract-block:not(:only-child) .remove-contract {
  display: inline-flex;
}
.contract-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
  gap: 12px;
}
.contract-header h3 {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--fg);
  margin: 0;
}
.contract-type { display: inline-flex; gap: 12px; }
.remove-contract {
  display: none;
  background: none;
  border: 1px solid var(--border);
  color: var(--fg-muted);
  font-family: var(--font-sans);
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  cursor: pointer;
  margin-left: 8px;
}
.remove-contract:hover {
  color: #b3502b;
  border-color: #b3502b;
}

/* Form nav */
.form-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  gap: 16px;
  flex-wrap: wrap;
}
.form-progress-text {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--fg-subtle);
  flex: 1;
  text-align: center;
}
#prev-step[disabled] { visibility: hidden; }

/* Form status / success */
.form-status {
  margin-top: 24px;
  padding: 20px 24px;
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.5;
}
.form-status.success {
  background: rgba(78, 130, 78, 0.10);
  border: 1px solid rgba(78, 130, 78, 0.30);
  color: #2f5a2f;
}
.form-status.error {
  background: rgba(179, 80, 43, 0.08);
  border: 1px solid rgba(179, 80, 43, 0.30);
  color: #8a3d20;
}
[data-theme="dark"] .form-status.success { color: #a8d4a0; }
[data-theme="dark"] .form-status.error { color: #e3a78d; }
.form-status strong { display: block; margin-bottom: 4px; font-size: 16px; }

/* Save status */
.form-save-status {
  margin: 16px 0 0;
  text-align: center;
  font-family: var(--font-sans);
  font-size: 12px;
  color: var(--fg-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.save-dot {
  width: 6px;
  height: 6px;
  background: #6d9a6d;
  border-radius: 50%;
  display: inline-block;
}
.form-save-status.saving .save-dot { background: var(--accent); }
.form-save-status.saved .save-dot { background: #6d9a6d; }

/* Form errors banner (top of form) */
.form-errors-banner {
  margin-bottom: 32px;
  padding: 18px 22px;
  background: rgba(179, 80, 43, 0.10);
  border: 1px solid rgba(179, 80, 43, 0.35);
  border-radius: var(--radius);
  color: #8a3d20;
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
}
.form-errors-banner strong {
  display: block;
  font-size: 15px;
  margin-bottom: 10px;
  font-weight: 600;
}
.form-errors-banner ul {
  list-style: disc;
  padding-left: 22px;
  margin: 0;
}
.form-errors-banner li {
  margin-bottom: 4px;
}
.form-errors-banner li:last-child { margin-bottom: 0; }
[data-theme="dark"] .form-errors-banner { color: #e3a78d; }

/* Invalid field pulse (catch attention when validation fails) */
.invalid {
  animation: invalidPulse 600ms ease-out;
}
@keyframes invalidPulse {
  0%   { box-shadow: 0 0 0 0 rgba(179, 80, 43, 0.4); }
  50%  { box-shadow: 0 0 0 6px rgba(179, 80, 43, 0.20); }
  100% { box-shadow: 0 0 0 0 rgba(179, 80, 43, 0); }
}
