/* ==========================================================================
   Matador Strategies LLC — matador-strategies.org
   Design system: dark authority. Lineage: shanemcneil.com
   Type: EB Garamond (display) / Inter (body) / Courier Prime (labels)
   ========================================================================== */

:root {
  /* Ground */
  --bg:            #0c0e10;
  --bg-alt:        #111417;
  --surface:       #16191d;
  --surface-2:     #1c2025;
  --line:          #262b31;
  --line-strong:   #343a42;

  /* Ink */
  --text:          #e9e6e0;
  --text-muted:    #9aa1a9;
  --text-dim:      #6e757d;

  /* Accent */
  --gold:          #b8942a;
  --gold-bright:   #d4b04a;
  --gold-dim:      #7a6220;
  --gold-wash:     rgba(184, 148, 42, 0.08);

  /* Type */
  --f-display: "EB Garamond", "Iowan Old Style", Georgia, serif;
  --f-body:    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --f-mono:    "Courier Prime", "Courier New", ui-monospace, monospace;

  /* Metrics */
  --wrap: 1140px;
  --wrap-narrow: 820px;
  --gut: 28px;
  --rule: 2px;
}

/* --------------------------------------------------------------- reset -- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--f-body);
  font-size: 17px;
  line-height: 1.72;
  font-weight: 350;
  letter-spacing: 0.005em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: var(--gold-bright); text-decoration: none; }
a:hover { color: var(--gold); }

::selection { background: var(--gold); color: #0c0e10; }

:focus-visible {
  outline: 2px solid var(--gold-bright);
  outline-offset: 3px;
}

/* ---------------------------------------------------------- typography -- */
h1, h2, h3, h4 {
  font-family: var(--f-display);
  font-weight: 500;
  line-height: 1.18;
  letter-spacing: -0.01em;
  color: var(--text);
  margin: 0 0 0.6em;
}

h1 { font-size: clamp(2.4rem, 5.2vw, 3.9rem); }
h2 { font-size: clamp(1.85rem, 3.4vw, 2.6rem); }
h3 { font-size: clamp(1.25rem, 2.1vw, 1.55rem); }
h4 { font-size: 1.12rem; }

p { margin: 0 0 1.15em; }
p:last-child { margin-bottom: 0; }

strong { font-weight: 600; color: #f4f1ea; }

.lede {
  font-size: clamp(1.08rem, 1.7vw, 1.28rem);
  line-height: 1.68;
  color: var(--text-muted);
  font-weight: 350;
}

/* Section eyebrow: mono, tracked, gold. The signature label of the system. */
.label {
  font-family: var(--f-mono);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  display: block;
  margin-bottom: 1.1rem;
}

.label-dim { color: var(--text-dim); }

/* -------------------------------------------------------------- layout -- */
.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gut);
}

.wrap-narrow { max-width: var(--wrap-narrow); margin: 0 auto; padding: 0 var(--gut); }

section { padding: clamp(64px, 9vw, 118px) 0; }

.band-alt { background: var(--bg-alt); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.section-head { max-width: 760px; margin-bottom: clamp(38px, 5vw, 58px); }
.section-head p { color: var(--text-muted); }

.rule-gold {
  width: 52px;
  height: var(--rule);
  background: var(--gold);
  border: 0;
  margin: 0 0 1.9rem;
}

/* --------------------------------------------------------- skip / nav --- */
.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--gold); color: #0c0e10;
  padding: 12px 20px; font-family: var(--f-mono); font-size: 0.8rem; z-index: 200;
}
.skip:focus { left: 0; }

.site-head {
  position: sticky; top: 0; z-index: 100;
  background: rgba(12, 14, 16, 0.92);
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--line);
}

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

.brand { display: flex; align-items: center; gap: 13px; color: var(--text); }
.brand:hover { color: var(--text); }

.brand-mark {
  width: var(--rule); height: 30px; background: var(--gold); flex: none;
}

.brand-name {
  font-family: var(--f-display);
  font-size: 1.24rem;
  letter-spacing: 0.02em;
  line-height: 1.1;
}
.brand-name span { display: block; font-family: var(--f-mono); font-size: 0.6rem; letter-spacing: 0.24em; color: var(--text-dim); text-transform: uppercase; margin-top: 3px; }

.nav-links { display: flex; align-items: center; gap: 30px; list-style: none; margin: 0; padding: 0; }

.nav-links a {
  font-family: var(--f-mono);
  font-size: 0.76rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 6px 0;
  border-bottom: var(--rule) solid transparent;
  transition: color 0.18s ease, border-color 0.18s ease;
}
.nav-links a:hover { color: var(--text); border-bottom-color: var(--gold-dim); }
.nav-links a[aria-current="page"] { color: var(--gold); border-bottom-color: var(--gold); }

.nav-toggle {
  display: none; background: none; border: 1px solid var(--line-strong);
  color: var(--text); padding: 9px 12px; cursor: pointer; border-radius: 2px;
}
.nav-toggle span { display: block; width: 18px; height: 1.5px; background: currentColor; margin: 4px 0; transition: transform .2s ease, opacity .2s ease; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }

/* -------------------------------------------------------------- button -- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--f-mono);
  font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase;
  padding: 15px 27px;
  border: 1px solid var(--gold);
  color: var(--gold);
  background: transparent;
  border-radius: 2px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.btn:hover { background: var(--gold); color: #0c0e10; }

.btn-solid { background: var(--gold); color: #0c0e10; border-color: var(--gold); }
.btn-solid:hover { background: var(--gold-bright); border-color: var(--gold-bright); color: #0c0e10; }

.btn-quiet { border-color: var(--line-strong); color: var(--text-muted); }
.btn-quiet:hover { background: transparent; border-color: var(--gold); color: var(--gold); }

.btn-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 2.2rem; }

/* ---------------------------------------------------------------- hero -- */
.hero {
  position: relative;
  padding: clamp(88px, 13vw, 172px) 0 clamp(72px, 10vw, 130px);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(1100px 520px at 12% -10%, rgba(184,148,42,0.10), transparent 62%),
    linear-gradient(180deg, #0e1114 0%, var(--bg) 100%);
  z-index: 0;
}

.hero > .wrap { position: relative; z-index: 1; }

.hero-inner { max-width: 830px; border-left: var(--rule) solid var(--gold); padding-left: clamp(22px, 3.4vw, 40px); }

.hero h1 { margin-bottom: 0.42em; }
.hero h1 em { font-style: italic; color: var(--gold-bright); }

.hero-tag {
  font-family: var(--f-mono);
  font-size: 0.78rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 1.6rem;
}

.hero-sub { font-size: clamp(1.05rem, 1.6vw, 1.24rem); color: var(--text-muted); max-width: 66ch; }

/* Compact page hero for interior pages */
.hero-page { padding: clamp(66px, 9vw, 108px) 0 clamp(46px, 6vw, 72px); }
.hero-page h1 { font-size: clamp(2.1rem, 4.2vw, 3.15rem); }

/* --------------------------------------------------------------- cards -- */
.grid { display: grid; gap: clamp(18px, 2.2vw, 26px); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: var(--rule) solid var(--line-strong);
  padding: clamp(26px, 3vw, 38px);
  border-radius: 2px;
  transition: border-color 0.22s ease, transform 0.22s ease, background 0.22s ease;
}
.card:hover { border-top-color: var(--gold); background: var(--surface-2); }

.card h3 { margin-bottom: 0.55em; }
.card p { color: var(--text-muted); font-size: 0.97rem; }
.card p:last-child { margin-bottom: 0; }

.card-num {
  font-family: var(--f-mono); font-size: 0.72rem; letter-spacing: 0.2em;
  color: var(--gold); display: block; margin-bottom: 1rem;
}

/* Capability list inside cards */
.ticks { list-style: none; margin: 1.2rem 0 0; padding: 0; }
.ticks li {
  position: relative; padding-left: 20px; margin-bottom: 0.55em;
  color: var(--text-muted); font-size: 0.94rem; line-height: 1.6;
}
.ticks li::before {
  content: ""; position: absolute; left: 0; top: 0.62em;
  width: 8px; height: 1.5px; background: var(--gold);
}
.ticks li:last-child { margin-bottom: 0; }

/* ------------------------------------------------------------ products -- */
.product {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(22px, 3vw, 40px);
  padding: clamp(34px, 4.4vw, 52px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--gold-dim);
  border-radius: 2px;
  margin-bottom: clamp(20px, 2.6vw, 30px);
  transition: border-left-color 0.22s ease;
}
.product:hover { border-left-color: var(--gold); }

.product-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 16px; margin-bottom: 0.4rem; }
.product-head h3 { margin: 0; font-size: clamp(1.5rem, 2.5vw, 1.95rem); }

.product-kicker {
  font-family: var(--f-mono); font-size: 0.72rem; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--text-dim); margin-bottom: 1.2rem;
}

.product-figure {
  border: 1px solid var(--line); background: var(--bg-alt);
  border-radius: 2px; overflow: hidden;
}
.product-figure img { width: 100%; }

/* Status pill */
.status {
  font-family: var(--f-mono); font-size: 0.64rem; letter-spacing: 0.18em;
  text-transform: uppercase; padding: 5px 11px; border-radius: 2px;
  border: 1px solid currentColor; white-space: nowrap;
}
.status-live { color: #7fb069; }
.status-dev  { color: var(--gold); }
.status-pre  { color: #8ba3c7; }
.status-patent { color: #c08a5e; }

/* ----------------------------------------------------------- publications */
.pub {
  display: grid; grid-template-columns: 150px minmax(0, 1fr);
  gap: clamp(22px, 3vw, 38px);
  padding: clamp(26px, 3.2vw, 40px) 0;
  border-bottom: 1px solid var(--line);
}
.pub:last-child { border-bottom: 0; }

.pub-cover {
  aspect-ratio: 2 / 3; background: var(--surface-2);
  border: 1px solid var(--line); border-radius: 2px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--f-mono); font-size: 0.6rem; letter-spacing: 0.16em;
  color: var(--text-dim); text-align: center; padding: 12px;
}

.pull {
  border-left: var(--rule) solid var(--gold);
  padding: 4px 0 4px 24px;
  margin: 1.6rem 0;
  font-family: var(--f-display);
  font-size: clamp(1.15rem, 2vw, 1.42rem);
  font-style: italic;
  line-height: 1.5;
  color: var(--text);
}
.pull cite { display: block; font-family: var(--f-mono); font-style: normal; font-size: 0.7rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--text-dim); margin-top: 0.9rem; }

/* ------------------------------------------------------------ CTA band -- */
.cta {
  background:
    linear-gradient(180deg, rgba(184,148,42,0.06), transparent 70%),
    var(--bg-alt);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-align: center;
}
.cta .wrap-narrow { display: flex; flex-direction: column; align-items: center; }
.cta .rule-gold { margin-left: auto; margin-right: auto; }
.cta h2 { max-width: 20ch; }
.cta p { color: var(--text-muted); max-width: 60ch; }
.cta .btn-row { justify-content: center; }

/* ---------------------------------------------------------------- meta --- */
.meta-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 2px; }
.meta-grid > div { background: var(--surface); padding: 24px 26px; }
.meta-grid dt { font-family: var(--f-mono); font-size: 0.68rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold); margin-bottom: 0.5rem; }
.meta-grid dd { margin: 0; color: var(--text-muted); font-size: 0.96rem; }

/* Credential stack */
.stack { list-style: none; margin: 0; padding: 0; }
.stack li { padding: 18px 0; border-bottom: 1px solid var(--line); }
.stack li:last-child { border-bottom: 0; }
.stack .stack-title { display: block; color: var(--text); font-weight: 500; }
.stack .stack-note { font-family: var(--f-mono); font-size: 0.72rem; letter-spacing: 0.1em; color: var(--text-dim); text-transform: uppercase; margin-top: 4px; display: block; }

/* Process steps */
.steps { counter-reset: step; list-style: none; margin: 0; padding: 0; }
.steps li {
  position: relative; padding: 0 0 30px 62px; border-left: 1px solid var(--line); margin-left: 15px;
}
.steps li:last-child { border-left-color: transparent; padding-bottom: 0; }
.steps li::before {
  counter-increment: step; content: counter(step, decimal-leading-zero);
  position: absolute; left: -15px; top: -2px;
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--bg); border: 1px solid var(--gold-dim); color: var(--gold);
  font-family: var(--f-mono); font-size: 0.68rem;
  display: flex; align-items: center; justify-content: center;
}
.steps h4 { margin-bottom: 0.35em; }
.steps p { color: var(--text-muted); font-size: 0.96rem; margin: 0; }

/* --------------------------------------------------------------- footer -- */
.site-foot {
  background: #090a0c;
  border-top: 1px solid var(--line);
  padding: clamp(52px, 6vw, 76px) 0 34px;
  font-size: 0.92rem;
}

.foot-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: clamp(28px, 4vw, 56px); margin-bottom: 46px; }

.foot-grid h4 { font-family: var(--f-mono); font-size: 0.68rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold); margin-bottom: 1.1rem; font-weight: 400; }
.foot-grid ul { list-style: none; margin: 0; padding: 0; }
.foot-grid li { margin-bottom: 0.6em; }
.foot-grid a { color: var(--text-muted); }
.foot-grid a:hover { color: var(--gold); }
.foot-grid p { color: var(--text-muted); }

.foot-brand .brand { margin-bottom: 1.2rem; }

.foot-bottom {
  border-top: 1px solid var(--line);
  padding-top: 26px;
  display: flex; flex-wrap: wrap; gap: 14px; justify-content: space-between;
  font-family: var(--f-mono); font-size: 0.7rem; letter-spacing: 0.08em;
  color: var(--text-dim);
}

address { font-style: normal; color: var(--text-muted); }

/* ----------------------------------------------------------- utilities -- */
.mt-0 { margin-top: 0; }
.center { text-align: center; }
.muted { color: var(--text-muted); }
.mono { font-family: var(--f-mono); }

/* -------------------------------------------------------------- mobile -- */
@media (max-width: 900px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .foot-brand { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
  body { font-size: 16px; }

  .nav-toggle { display: block; }

  .nav-links {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: flex-start; gap: 0;
    background: var(--bg-alt); border-bottom: 1px solid var(--line);
    padding: 8px var(--gut) 20px;
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links li { width: 100%; }
  .nav-links a { display: block; padding: 13px 0; border-bottom: 1px solid var(--line); width: 100%; }
  .nav-links a[aria-current="page"] { border-bottom-color: var(--gold); }

  .site-head { position: relative; }

  .grid-2, .grid-3, .grid-4 { grid-template-columns: minmax(0, 1fr); }
  .pub { grid-template-columns: 110px minmax(0, 1fr); }
  .foot-grid { grid-template-columns: 1fr; }
  .btn { width: 100%; justify-content: center; }
  .btn-row { flex-direction: column; }
}

@media (max-width: 420px) {
  .pub { grid-template-columns: minmax(0, 1fr); }
  .pub-cover { max-width: 120px; }
}

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

@media print {
  .site-head, .site-foot, .btn-row, .cta { display: none; }
  body { background: #fff; color: #000; }
}

/* --------------------------------------------- product media two-column -- */
@media (min-width: 901px) {
  .product.has-media { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); align-items: start; }
}

.figure-placeholder {
  aspect-ratio: 4 / 3;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; text-align: center; padding: 20px;
  background:
    repeating-linear-gradient(135deg, rgba(184,148,42,0.05) 0 10px, transparent 10px 20px),
    var(--bg-alt);
  border: 1px dashed var(--line-strong);
  border-radius: 2px;
  font-family: var(--f-mono);
  font-size: 0.66rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--text-dim);
}
.figure-placeholder strong { color: var(--gold); font-weight: 400; }
