/* Jess Intelligence — main.css (v2)
 * Editorial-operator. Light/bone palette, oxblood accent.
 * Fraunces (display, variable opsz/wght/SOFT/WONK), Source Serif 4 (body),
 * JetBrains Mono (labels). Authored from brand/BRAND-GUIDE.md.
 */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght,SOFT,WONK@9..144,300..700,0..100,0..1&family=Source+Serif+4:opsz,wght@8..60,400;8..60,600&family=JetBrains+Mono:wght@400;500&display=swap');

/* ---------- Tokens ---------- */
:root {
  --bone:        #f4efe6;
  --bone-2:      #ebe4d4;
  --bone-3:      #e2d8c2;
  --ink:         #1a1816;
  --ink-2:       #5a544c;
  --ink-3:       #8b8275;
  --rule:        #c9bfa9;
  --rule-strong: #a89e84;
  --oxblood:     #7a3826;
  --oxblood-deep:#5b2818;
  --oxblood-faint: rgba(122, 56, 38, 0.08);

  --display: 'Fraunces', 'Times New Roman', serif;
  --body:    'Source Serif 4', Georgia, serif;
  --mono:    'JetBrains Mono', 'Courier New', monospace;

  --w:        1080px;
  --w-grid:   1280px;
  --section:  7rem;
  --gutter:   2rem;
  --radius:   2px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bone);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.0625rem;
  font-variation-settings: 'opsz' 14;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
button { background: none; border: 0; cursor: pointer; color: inherit; font: inherit; }
a { color: inherit; text-decoration: none; }

/* ---------- Page paper texture ---------- */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    radial-gradient(rgba(122, 56, 38, 0.022) 1px, transparent 1px);
  background-size: 3px 3px;
  opacity: 0.6;
  mix-blend-mode: multiply;
}
main, header, footer { position: relative; z-index: 1; }

/* ---------- Type ---------- */
.h-display, h1, h2, h3, h4 {
  font-family: var(--display);
  color: var(--ink);
  font-feature-settings: 'ss01', 'ss02';
  font-variation-settings: 'opsz' 60, 'wght' 500, 'SOFT' 50, 'WONK' 0;
  letter-spacing: -0.012em;
}
h1 {
  font-variation-settings: 'opsz' 144, 'wght' 400, 'SOFT' 100, 'WONK' 1;
  font-size: clamp(2.75rem, 6vw, 5.5rem);
  line-height: 0.98;
  letter-spacing: -0.025em;
}
h2 {
  font-variation-settings: 'opsz' 72, 'wght' 450, 'SOFT' 60, 'WONK' 0;
  font-size: clamp(1.875rem, 3.4vw, 2.625rem);
  line-height: 1.10;
  letter-spacing: -0.018em;
}
h3 {
  font-variation-settings: 'opsz' 36, 'wght' 500, 'SOFT' 40, 'WONK' 0;
  font-size: 1.375rem;
  line-height: 1.25;
  letter-spacing: -0.008em;
}
h4 {
  font-variation-settings: 'opsz' 24, 'wght' 600, 'SOFT' 30;
  font-size: 1.0625rem;
}

p {
  font-size: 1.0625rem;
  color: var(--ink);
  max-width: 64ch;
}
p + p { margin-top: 1rem; }

.lede {
  font-family: var(--display);
  font-variation-settings: 'opsz' 36, 'wght' 350, 'SOFT' 80, 'WONK' 0;
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  line-height: 1.45;
  color: var(--ink);
  max-width: 52ch;
  letter-spacing: -0.005em;
}

.label {
  font-family: var(--mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.section-tag {
  font-family: var(--mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--oxblood);
}

.section-num {
  font-family: var(--mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-right: 0.75rem;
}

.small { font-size: 0.875rem; color: var(--ink-2); }
.dim { color: var(--ink-3); }

::selection { background: var(--oxblood); color: var(--bone); }

/* ---------- Inline links ---------- */
.prose a, p a, li a {
  color: var(--ink);
  border-bottom: 1px solid var(--ink-3);
  transition: border-color 150ms ease, color 150ms ease;
}
.prose a:hover, p a:hover, li a:hover {
  color: var(--oxblood);
  border-bottom-color: var(--oxblood);
}

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: var(--w);
  margin: 0 auto;
  padding: 0 1.5rem;
}
.container-grid { max-width: var(--w-grid); }

.section { padding-top: var(--section); padding-bottom: var(--section); }
.section-tight { padding-top: 4rem; padding-bottom: 4rem; }
.section-divider { border-top: 1px solid var(--rule); }

/* ---------- Section ornament ---------- */
.ornament {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  margin-bottom: 2.5rem;
}
.ornament::before {
  content: "";
  width: 24px;
  height: 2px;
  background: var(--oxblood);
  flex-shrink: 0;
}

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(244, 239, 230, 0.92);
  backdrop-filter: saturate(120%) blur(12px);
  -webkit-backdrop-filter: saturate(120%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 150ms ease;
}
.nav.scrolled { border-bottom-color: var(--rule); }

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  max-width: var(--w-grid);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.nav-brand {
  font-family: var(--display);
  font-variation-settings: 'opsz' 24, 'wght' 600, 'SOFT' 0, 'WONK' 0;
  font-size: 1.0625rem;
  letter-spacing: -0.012em;
  color: var(--ink);
  display: inline-flex;
  align-items: baseline;
  gap: 0.5rem;
}
.nav-brand .nav-brand-tag {
  font-family: var(--mono);
  font-size: 0.625rem;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 500;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav-link {
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--ink-2);
  padding: 4px 0;
  border-bottom: 2px solid transparent;
  transition: color 150ms ease, border-color 150ms ease;
}
.nav-link:hover { color: var(--ink); }
.nav-link.is-current { color: var(--ink); border-bottom-color: var(--oxblood); }

.nav-toggle {
  display: none;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
}
.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--ink);
}
.nav-toggle span { position: relative; }
.nav-toggle span::before { content: ""; position: absolute; top: -7px; }
.nav-toggle span::after { content: ""; position: absolute; top: 7px; }

/* ---------- Hero ---------- */
.hero {
  padding-top: 6.5rem;
  padding-bottom: 5rem;
  position: relative;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 1.5rem;
  right: 1.5rem;
  max-width: var(--w-grid);
  margin: 0 auto;
  border-bottom: 1px solid var(--rule);
}
.hero-eyebrow {
  font-family: var(--mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--oxblood);
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  gap: 0.625rem;
}
.hero-eyebrow::before {
  content: "";
  width: 24px;
  height: 2px;
  background: var(--oxblood);
}
.hero-headline {
  max-width: 18ch;
  margin-bottom: 2rem;
}
.hero-headline em {
  font-style: italic;
  font-variation-settings: 'opsz' 144, 'wght' 350, 'SOFT' 100, 'WONK' 1;
  color: var(--oxblood);
}
.hero-sub {
  font-family: var(--display);
  font-variation-settings: 'opsz' 36, 'wght' 350, 'SOFT' 70, 'WONK' 0;
  font-size: clamp(1.15rem, 1.7vw, 1.375rem);
  line-height: 1.45;
  color: var(--ink);
  max-width: 56ch;
  letter-spacing: -0.005em;
}
.hero-actions {
  margin-top: 2.75rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-weight: 500;
  font-size: 0.75rem;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  padding: 0.875rem 1.5rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  transition: background-color 150ms ease, color 150ms ease, border-color 150ms ease;
}
.btn-primary {
  background: var(--ink);
  color: var(--bone);
}
.btn-primary:hover {
  background: var(--oxblood);
  color: var(--bone);
}
.btn-quiet {
  background: transparent;
  color: var(--ink);
  border-color: var(--rule-strong);
}
.btn-quiet:hover { border-color: var(--ink); color: var(--ink); }

/* ---------- Capability list (home: simplest-terms grid) ---------- */
.cap-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  list-style: none;
  border-top: 1px solid var(--rule);
}
@media (min-width: 720px) {
  .cap-list { grid-template-columns: 1fr 1fr; gap: 0; }
  .cap-list li { border-right: 1px solid var(--rule); }
  .cap-list li:nth-child(2n) { border-right: 0; }
}
@media (min-width: 1080px) {
  .cap-list { grid-template-columns: 1fr 1fr 1fr; }
  .cap-list li { border-right: 1px solid var(--rule); }
  .cap-list li:nth-child(2n) { border-right: 1px solid var(--rule); }
  .cap-list li:nth-child(3n) { border-right: 0; }
}
.cap-list li {
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: 1.25rem;
  padding: 1.625rem 1.5rem 1.625rem 0;
  border-bottom: 1px solid var(--rule);
  align-items: baseline;
}
.cap-num {
  font-family: var(--mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding-top: 0.25rem;
}
.cap-body strong {
  display: block;
  font-family: var(--display);
  font-variation-settings: 'opsz' 36, 'wght' 500, 'SOFT' 50, 'WONK' 0;
  font-size: 1.25rem;
  letter-spacing: -0.008em;
  margin-bottom: 0.25rem;
  font-weight: 500;
}
.cap-body em {
  display: block;
  font-family: var(--body);
  font-style: normal;
  font-size: 0.9375rem;
  color: var(--ink-2);
  line-height: 1.45;
}

/* ---------- Operations org-chart ---------- */
.org {
  margin-top: 3rem;
}

/* Root: McGuire Management */
.org-root {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1.5rem 1.75rem;
  border: 1px solid var(--rule-strong);
  background: var(--bone-2);
  max-width: 480px;
  border-radius: var(--radius);
  position: relative;
}
.org-root .label { color: var(--oxblood); }
.org-root .org-root-name {
  font-family: var(--display);
  font-variation-settings: 'opsz' 60, 'wght' 500, 'SOFT' 60;
  font-size: 1.75rem;
  letter-spacing: -0.012em;
}
.org-root .org-root-tag {
  font-family: var(--body);
  font-size: 0.9375rem;
  color: var(--ink-2);
  line-height: 1.45;
}

/* Connector from root to mid (CRM) */
.org-conn {
  width: 2px;
  height: 36px;
  background: var(--rule-strong);
  margin-left: 30px;
}

/* Mid layer: the CRM, drawn as a structural caption */
.org-crm {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--rule);
  background: var(--bone);
  max-width: 480px;
  border-radius: var(--radius);
  position: relative;
}
.org-crm .label { color: var(--ink-3); }
.org-crm .org-crm-name {
  font-family: var(--display);
  font-variation-settings: 'opsz' 36, 'wght' 500, 'SOFT' 50;
  font-size: 1.375rem;
  letter-spacing: -0.008em;
}
.org-crm .org-crm-tag {
  font-family: var(--body);
  font-size: 0.9375rem;
  color: var(--ink-2);
  line-height: 1.45;
}

/* Branch group: heading row */
.org-branch-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-top: 3.5rem;
  margin-bottom: 1.25rem;
  padding-bottom: 0.625rem;
  border-bottom: 1px solid var(--rule-strong);
  gap: 1rem;
  flex-wrap: wrap;
}
.org-branch-head .org-branch-name {
  font-family: var(--display);
  font-variation-settings: 'opsz' 36, 'wght' 500, 'SOFT' 50;
  font-size: 1.25rem;
  letter-spacing: -0.008em;
}
.org-branch-head .org-branch-count {
  font-family: var(--mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* Sub-account rows */
.org-rows {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--rule);
}
.org-row {
  display: grid;
  grid-template-columns: 1.5rem 1fr;
  gap: 1.25rem;
  padding: 1.5rem 0 1.5rem 0;
  border-bottom: 1px solid var(--rule);
  align-items: start;
}
.org-row-pin {
  margin-top: 0.625rem;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ink-3);
  margin-left: 0.5rem;
}
.org-row[data-state="live"] .org-row-pin { background: var(--oxblood); }
.org-row[data-state="dev"] .org-row-pin { background: var(--ink-2); }
.org-row[data-state="built"] .org-row-pin {
  background: transparent;
  border: 2px solid var(--ink-2);
  width: 10px; height: 10px;
}
.org-row[data-state="planned"] .org-row-pin {
  background: transparent;
  border: 1.5px solid var(--ink-3);
  width: 10px; height: 10px;
}

.org-row-name {
  font-family: var(--display);
  font-variation-settings: 'opsz' 36, 'wght' 500, 'SOFT' 50;
  font-size: 1.5rem;
  letter-spacing: -0.012em;
  display: flex;
  align-items: baseline;
  gap: 1rem;
  flex-wrap: wrap;
}
.org-row-tag {
  font-family: var(--mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.org-row-status {
  font-family: var(--mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.org-row[data-state="live"] .org-row-status { color: var(--oxblood); }
.org-row-body {
  margin-top: 0.5rem;
  font-size: 0.9375rem;
  color: var(--ink-2);
  line-height: 1.5;
  max-width: 64ch;
}

/* ---------- Page header ---------- */
.page-header { padding-top: 6rem; padding-bottom: 3rem; }
.page-title { max-width: 22ch; margin-bottom: 1.25rem; }
.page-lede { color: var(--ink); max-width: 56ch; }

/* ---------- Prose blocks ---------- */
.prose { max-width: 64ch; }
.prose h2 { margin-top: 4rem; margin-bottom: 1rem; }
.prose h3 { margin-top: 2.5rem; margin-bottom: 0.5rem; }
.prose p { margin-bottom: 1.25rem; color: var(--ink); }
.prose ul, .prose ol { margin: 1.25rem 0 1.25rem 1.25rem; padding-left: 0.75rem; }
.prose li { margin-bottom: 0.5rem; color: var(--ink); }
.prose blockquote {
  margin: 2rem 0;
  padding: 0 0 0 1.5rem;
  border-left: 2px solid var(--oxblood);
  font-style: normal;
  color: var(--ink);
  font-family: var(--display);
  font-variation-settings: 'opsz' 36, 'wght' 350, 'SOFT' 80;
  font-size: 1.25rem;
  line-height: 1.45;
}

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 0.5rem; }
.field-label {
  font-family: var(--mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.field-input,
.field-textarea,
.field-select {
  width: 100%;
  padding: 0.875rem 1rem;
  background: var(--bone);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1rem;
  outline: none;
  transition: border-color 150ms ease;
}
.field-input:focus,
.field-textarea:focus,
.field-select:focus { border-color: var(--oxblood); }
.field-textarea { min-height: 140px; resize: vertical; line-height: 1.55; }
.field-help { color: var(--ink-3); font-size: 0.875rem; }

.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
@media (min-width: 720px) {
  .form-grid { grid-template-columns: 1fr 1fr; }
  .form-grid .field--full { grid-column: 1 / -1; }
}

/* ---------- Footer ---------- */
.footer {
  background: var(--bone-2);
  border-top: 1px solid var(--rule);
  padding-top: 4rem;
  padding-bottom: 3rem;
  margin-top: 6rem;
}
.footer-top {
  border-top: 2px solid var(--oxblood);
  padding-top: 3rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
}
.footer-brand .footer-name {
  font-family: var(--display);
  font-variation-settings: 'opsz' 24, 'wght' 600, 'SOFT' 0;
  font-size: 1.0625rem;
  margin-bottom: 0.5rem;
}
.footer-brand .footer-tag {
  font-size: 0.875rem;
  color: var(--ink-2);
  max-width: 40ch;
}
.footer-col-title {
  font-family: var(--mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 1rem;
}
.footer-list { list-style: none; display: flex; flex-direction: column; gap: 0.625rem; }
.footer-list a {
  font-size: 0.9375rem;
  color: var(--ink-2);
  border-bottom: 1px solid transparent;
  transition: color 150ms ease, border-color 150ms ease;
}
.footer-list a:hover { color: var(--ink); border-bottom-color: var(--ink-3); }
.footer-legal {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.875rem;
  color: var(--ink-3);
}
@media (min-width: 720px) {
  .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; gap: 3rem; }
}

/* ---------- Responsive ---------- */
@media (max-width: 760px) {
  :root { --section: 4rem; }
  .nav-list {
    position: fixed;
    inset: 68px 0 auto 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: var(--bone);
    border-bottom: 1px solid var(--rule);
    padding: 1rem 1.5rem 1.5rem;
    transform: translateY(-110%);
    transition: transform 200ms ease;
  }
  .nav-list.is-open { transform: translateY(0); }
  .nav-list li { width: 100%; }
  .nav-link {
    display: block;
    width: 100%;
    padding: 0.875rem 0;
    border-bottom: 1px solid var(--rule);
  }
  .nav-link.is-current { border-bottom-color: var(--oxblood); }
  .nav-toggle { display: inline-flex; }
  .hero { padding-top: 3rem; padding-bottom: 3rem; }
  .org-root, .org-crm { max-width: 100%; }
  .org-row { grid-template-columns: 1.25rem 1fr; gap: 0.75rem; }
}

/* ---------- Utilities ---------- */
.muted { color: var(--ink-2); }
.flow > * + * { margin-top: 1rem; }
.cluster {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}
.divider-rule {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 4rem 0;
}

/* ---------- Print ---------- */
@media print {
  body { background: #fff; color: #000; }
  body::before { display: none; }
  .nav, .footer, .btn, .nav-toggle { display: none !important; }
}
