/* ============================================================
   street-agent · FERROUS
   Shared stylesheet
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300;0,9..144,500;0,9..144,700;1,9..144,300;1,9..144,500&family=JetBrains+Mono:ital,wght@0,300;0,400;0,500;0,700;1,400&display=swap');

:root {
  /* FERROUS palette */
  --rust:   #C84B1A;
  --steel:  #1A1F2E;
  --cyan:   #00D4FF;
  --iron:   #F0F2F5;
  --amber:  #FF8C00;

  /* Extended palette */
  --black:  #0A0D14;
  --panel:  #111520;
  --rule:   #2a3040;
  --muted:  #6a7080;
  --text:   #c0c8d8;
  --dim:    #8089a0;

  /* Type */
  --serif:  'Fraunces', Georgia, serif;
  --mono:   'JetBrains Mono', 'SF Mono', Menlo, monospace;

  /* Spacing */
  --max:    1200px;
  --gutter: clamp(16px, 4vw, 48px);
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--steel);
  color: var(--iron);
  font-family: var(--mono);
  font-weight: 400;
  line-height: 1.6;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  background-image:
    radial-gradient(circle at 20% 0%, rgba(200, 75, 26, 0.04) 0%, transparent 40%),
    radial-gradient(circle at 80% 100%, rgba(0, 212, 255, 0.03) 0%, transparent 40%);
  background-attachment: fixed;
  min-height: 100vh;
}

.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ============================================================
   Top status bar — ticker / terminal feel
   ============================================================ */
.status-bar {
  background: var(--black);
  border-bottom: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  padding: 6px 0;
  letter-spacing: 0.05em;
}
.status-bar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.status-bar .dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cyan);
  margin-right: 8px;
  vertical-align: middle;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* ============================================================
   Navigation
   ============================================================ */
nav.primary {
  border-bottom: 1px solid var(--rule);
  padding: 20px 0;
  background: rgba(26, 31, 46, 0.85);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 100;
}
nav.primary .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 32px;
}
.logo {
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 700;
  color: var(--iron);
  text-decoration: none;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 10px;
}
.logo .mark {
  display: inline-block;
  width: 14px;
  height: 14px;
  background: var(--rust);
  transform: rotate(45deg);
  position: relative;
}
.logo .mark::after {
  content: '';
  position: absolute;
  inset: 3px;
  background: var(--steel);
}
nav.primary ul {
  list-style: none;
  display: flex;
  gap: 28px;
  font-family: var(--mono);
  font-size: 13px;
}
nav.primary a {
  color: var(--text);
  text-decoration: none;
  opacity: 0.7;
  transition: opacity 0.15s, color 0.15s;
  position: relative;
}
nav.primary a:hover {
  opacity: 1;
  color: var(--cyan);
}
nav.primary a.active {
  opacity: 1;
  color: var(--iron);
}
nav.primary a.active::before {
  content: '//';
  color: var(--rust);
  margin-right: 6px;
}

/* ============================================================
   Typography
   ============================================================ */
h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--iron);
}

h1.display {
  font-size: clamp(44px, 7vw, 88px);
  font-weight: 300;
  letter-spacing: -0.04em;
  line-height: 0.95;
}
h1.display em {
  font-style: italic;
  color: var(--rust);
  font-weight: 300;
}

h2 {
  font-size: clamp(32px, 4vw, 48px);
  margin-bottom: 20px;
}
h2.mono {
  font-family: var(--mono);
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--cyan);
  font-weight: 500;
}

h3 {
  font-size: 24px;
  margin-bottom: 12px;
}
h3.tag {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--muted);
  margin-bottom: 16px;
  font-weight: 500;
}

p { color: var(--text); margin-bottom: 16px; max-width: 70ch; }
p.lede {
  font-family: var(--serif);
  font-size: clamp(18px, 2vw, 24px);
  line-height: 1.4;
  font-weight: 300;
  color: var(--iron);
  max-width: 60ch;
}

a { color: var(--cyan); text-decoration: none; }
a:hover { color: var(--rust); }
a.inline-link {
  border-bottom: 1px solid currentColor;
  padding-bottom: 1px;
}

em { font-style: italic; }
strong { font-weight: 700; color: var(--iron); }
code {
  font-family: var(--mono);
  font-size: 0.9em;
  background: var(--black);
  padding: 1px 6px;
  border-radius: 3px;
  color: var(--cyan);
  border: 1px solid var(--rule);
}

/* ============================================================
   Sections
   ============================================================ */
section {
  padding: clamp(48px, 8vw, 96px) 0;
  border-bottom: 1px solid var(--rule);
}
section.hero {
  padding: clamp(72px, 12vw, 144px) 0 clamp(48px, 8vw, 96px);
}

.section-label {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--rust);
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.section-label::before {
  content: '';
  width: 40px;
  height: 1px;
  background: var(--rust);
}

/* ============================================================
   Cards & panels
   ============================================================ */
.card {
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 28px;
  position: relative;
}
.card.accent {
  border-left: 3px solid var(--cyan);
}
.card.warn {
  border-left: 3px solid var(--amber);
}

.card h3 {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--muted);
  margin-bottom: 16px;
  font-weight: 500;
}

.metric {
  font-family: var(--mono);
  font-size: 36px;
  font-weight: 700;
  color: var(--iron);
  letter-spacing: -0.02em;
  line-height: 1;
}
.metric-sub {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  margin-top: 8px;
  line-height: 1.6;
}
.metric-up { color: var(--cyan); }
.metric-down { color: var(--rust); }

/* ============================================================
   The Banner — critical disclaimer
   ============================================================ */
.banner {
  background: linear-gradient(90deg, #2a1810 0%, #1f1308 100%);
  border: 1px solid var(--amber);
  border-left: 4px solid var(--amber);
  padding: 24px 28px;
  margin: 32px 0;
  border-radius: 4px;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.7;
  color: var(--text);
}
.banner strong {
  color: var(--amber);
  display: block;
  margin-bottom: 10px;
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.banner a { color: var(--amber); border-bottom: 1px solid currentColor; }

/* ============================================================
   Grid utilities
   ============================================================ */
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2-1 { grid-template-columns: 2fr 1fr; }
.grid-1-2 { grid-template-columns: 1fr 2fr; }

@media (max-width: 900px) {
  .grid-2, .grid-3, .grid-2-1, .grid-1-2 { grid-template-columns: 1fr; }
}

/* ============================================================
   Tables — trade log style
   ============================================================ */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--mono);
  font-size: 13px;
}
.data-table th {
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid var(--rule);
  color: var(--muted);
  font-weight: 500;
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 0.15em;
}
.data-table td {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(42, 48, 64, 0.5);
}
.data-table tr:hover { background: rgba(0, 212, 255, 0.02); }

/* ============================================================
   Reasoning log — agent thoughts
   ============================================================ */
.reasoning {
  padding: 24px 28px;
  background: var(--black);
  border-left: 3px solid var(--cyan);
  border-radius: 0 4px 4px 0;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--dim);
  line-height: 1.9;
}
.reasoning strong { color: var(--iron); font-weight: 500; }
.reasoning .approved { color: var(--cyan); }
.reasoning .rejected { color: var(--rust); }

/* ============================================================
   Chart placeholder
   ============================================================ */
.chart {
  height: 280px;
  background:
    linear-gradient(180deg, rgba(0, 212, 255, 0.06), transparent 70%),
    repeating-linear-gradient(0deg, transparent, transparent 39px, rgba(42, 48, 64, 0.3) 39px, rgba(42, 48, 64, 0.3) 40px),
    repeating-linear-gradient(90deg, transparent, transparent 79px, rgba(42, 48, 64, 0.3) 79px, rgba(42, 48, 64, 0.3) 80px);
  border: 1px solid var(--rule);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  position: relative;
  overflow: hidden;
}
.chart::before {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0; top: 0;
  background:
    linear-gradient(135deg,
      transparent 0%, transparent 30%,
      rgba(0, 212, 255, 0.15) 45%,
      rgba(0, 212, 255, 0.25) 55%,
      transparent 70%);
  clip-path: polygon(0 80%, 10% 75%, 20% 78%, 30% 65%, 40% 68%, 50% 55%, 60% 58%, 70% 45%, 80% 48%, 90% 35%, 100% 38%, 100% 100%, 0 100%);
}

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-decoration: none;
  border: 1px solid var(--iron);
  color: var(--iron);
  background: transparent;
  cursor: pointer;
  transition: all 0.15s;
  border-radius: 2px;
}
.btn:hover {
  background: var(--iron);
  color: var(--steel);
}
.btn.primary {
  background: var(--rust);
  border-color: var(--rust);
  color: var(--iron);
}
.btn.primary:hover {
  background: transparent;
  color: var(--rust);
}
.btn::after { content: ' →'; }

/* ============================================================
   Blog post list
   ============================================================ */
.post-list { list-style: none; }
.post-list > li {
  border-bottom: 1px solid var(--rule);
  padding: 32px 0;
  display: grid;
  grid-template-columns: 120px 1fr auto;
  gap: 32px;
  align-items: baseline;
  transition: background 0.15s;
}
.post-list > li:hover { background: rgba(0, 212, 255, 0.02); }
.post-list .date {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.05em;
}
.post-list .title {
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 500;
  color: var(--iron);
  line-height: 1.3;
}
.post-list .title a { color: inherit; }
.post-list .title a:hover { color: var(--rust); }
.post-list .tag {
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--cyan);
  border: 1px solid var(--rule);
  padding: 4px 10px;
  border-radius: 2px;
}
@media (max-width: 700px) {
  .post-list > li {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

/* ============================================================
   Article — long-form content
   ============================================================ */
article.long-form {
  max-width: 680px;
  margin: 0 auto;
}
article.long-form .meta {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 24px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
article.long-form h1 {
  font-family: var(--serif);
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 300;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin-bottom: 32px;
}
article.long-form h2 {
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 500;
  margin-top: 48px;
  margin-bottom: 16px;
}
article.long-form h3 {
  font-family: var(--mono);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--cyan);
  margin-top: 32px;
  margin-bottom: 12px;
}
article.long-form p {
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.7;
  color: var(--text);
  margin-bottom: 20px;
  max-width: none;
}
article.long-form ul, article.long-form ol {
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.7;
  color: var(--text);
  margin-bottom: 20px;
  padding-left: 24px;
}
article.long-form li { margin-bottom: 8px; }
article.long-form pre {
  background: var(--black);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 20px;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.6;
  margin: 24px 0;
  color: var(--text);
}
article.long-form blockquote {
  border-left: 3px solid var(--rust);
  padding-left: 24px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 20px;
  color: var(--iron);
  margin: 32px 0;
  font-weight: 300;
}

/* ============================================================
   Legal text — disclosures and terms
   ============================================================ */
.legal {
  max-width: 720px;
  margin: 0 auto;
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.7;
}
.legal h1 {
  font-family: var(--serif);
  font-size: 40px;
  font-weight: 300;
  margin-bottom: 16px;
}
.legal .updated {
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 48px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.legal h2 {
  font-family: var(--mono);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--rust);
  margin-top: 40px;
  margin-bottom: 12px;
  font-weight: 500;
}
.legal p, .legal li {
  color: var(--text);
  margin-bottom: 16px;
  max-width: none;
}

/* ============================================================
   Footer
   ============================================================ */
footer.site {
  background: var(--black);
  padding: 48px 0 32px;
  border-top: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  line-height: 1.8;
}
footer.site .disclaimer {
  padding-bottom: 32px;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 24px;
  max-width: none;
  color: var(--dim);
}
footer.site .disclaimer strong {
  color: var(--amber);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  display: block;
  margin-bottom: 10px;
}
footer.site .meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
footer.site .meta a {
  color: var(--muted);
  margin-right: 20px;
  text-decoration: none;
}
footer.site .meta a:hover { color: var(--cyan); }

/* ============================================================
   Utility
   ============================================================ */
.muted { color: var(--muted); }
.cyan  { color: var(--cyan); }
.rust  { color: var(--rust); }
.amber { color: var(--amber); }
.center { text-align: center; }
.mono  { font-family: var(--mono); }
.serif { font-family: var(--serif); }

.divider {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 48px 0;
}
.divider.ornament {
  border: 0;
  text-align: center;
  margin: 64px 0;
}
.divider.ornament::before {
  content: '◆ ◆ ◆';
  color: var(--rust);
  letter-spacing: 12px;
  font-size: 10px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px;
  border: 1px solid var(--cyan);
  color: var(--cyan);
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border-radius: 2px;
}
.status-pill::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--cyan);
  animation: pulse 2s infinite;
}

/* Animations */
@keyframes fade-up {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.animate {
  animation: fade-up 0.8s ease-out both;
}
.animate.d1 { animation-delay: 0.1s; }
.animate.d2 { animation-delay: 0.2s; }
.animate.d3 { animation-delay: 0.3s; }
.animate.d4 { animation-delay: 0.4s; }
