/* ============================================================
   SupplyFlow — Industrial AI Procurement Agent
   Brand: Dark slate + amber. Technical, not trendy.
   ============================================================ */

/* --- CSS Variables --- */
:root {
  --bg: #0c1319;
  --bg-raised: #111b24;
  --bg-card: #15212c;
  --amber: #f59e0b;
  --amber-dim: rgba(245, 158, 11, 0.12);
  --amber-border: rgba(245, 158, 11, 0.25);
  --text-primary: #f0f4f8;
  --text-secondary: #8da4b5;
  --text-muted: #4a6178;
  --border: rgba(255,255,255,0.07);
  --border-amber: rgba(245,158,11,0.2);
  --radius: 4px;
  --font-body: 'IBM Plex Sans', system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', 'Courier New', monospace;
  --max-w: 1100px;
  --section-pad: 100px;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

/* --- Layout --- */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 32px;
}

/* --- Header --- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(12, 19, 25, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  height: 60px;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-text {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.header-nav {
  display: flex;
  gap: 32px;
}

.header-nav a {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  transition: color 0.2s;
}

.header-nav a:hover { color: var(--amber); }

/* --- Section Shared --- */
.section-label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--amber);
  margin-bottom: 20px;
}

.section-headline {
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  margin-bottom: 48px;
}

.section-headline.left-aligned { text-align: left; }

/* --- HERO --- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 120px 0 60px;
  overflow: hidden;
}

.hero-bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(245,158,11,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(245,158,11,0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black 40%, transparent 100%);
}

.hero-bg-glow {
  position: absolute;
  top: -20%;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(245,158,11,0.08) 0%, transparent 70%);
  pointer-events: none;
}

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

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--amber-dim);
  border: 1px solid var(--amber-border);
  border-radius: 100px;
  padding: 6px 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--amber);
  letter-spacing: 0.04em;
  margin-bottom: 32px;
}

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--amber);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.hero-headline {
  font-size: clamp(48px, 8vw, 96px);
  font-weight: 700;
  line-height: 1.0;
  letter-spacing: -0.04em;
  color: var(--text-primary);
  margin-bottom: 40px;
}

.hero-headline em {
  font-style: normal;
  color: var(--amber);
}

.hero-sub-col { max-width: 640px; }

.hero-lede {
  font-size: 18px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 48px;
}

.hero-stats-row {
  display: flex;
  align-items: flex-start;
  gap: 0;
}

.stat-item {
  flex: 1;
  padding: 20px 28px 20px 0;
}

.stat-item:first-child { padding-left: 0; }

.stat-value {
  display: block;
  font-family: var(--font-mono);
  font-size: 28px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.stat-label {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
  letter-spacing: 0.01em;
}

.stat-divider {
  width: 1px;
  background: var(--border);
  margin: 20px 28px 0 0;
  align-self: stretch;
}

/* Flow Diagram */
.hero-flow-diagram {
  display: flex;
  align-items: center;
  gap: 0;
  margin-top: 72px;
  padding-top: 48px;
  border-top: 1px solid var(--border);
  position: relative;
  z-index: 1;
}

.flow-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  min-width: 90px;
}

.flow-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  background: var(--bg-raised);
  border: 1px solid var(--border-amber);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--amber);
}

.flow-step span {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.flow-arrow {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
}

/* --- FEATURES --- */
.features {
  padding: var(--section-pad) 0;
  border-top: 1px solid var(--border);
}

.features .section-headline { text-align: center; }

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.feature-card {
  background: var(--bg-raised);
  padding: 40px 36px;
  transition: background 0.2s;
}

.feature-card:hover { background: var(--bg-card); }

.feature-icon-wrap {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}

.feature-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}

.feature-body {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* --- AUTONOMOUS WORKFLOW --- */
.autonomous-section {
  padding: var(--section-pad) 0;
  border-top: 1px solid var(--border);
  background: var(--bg-raised);
}

.autonomous-section .section-headline { text-align: center; }

.workflow-timeline {
  display: flex;
  align-items: flex-start;
  gap: 0;
  margin-top: 0;
}

.workflow-step {
  flex: 1;
  padding: 0 20px;
}

.workflow-step:first-child { padding-left: 0; }

.workflow-step-number {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--amber);
  letter-spacing: 0.08em;
  margin-bottom: 16px;
}

.workflow-step-body h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}

.workflow-step-body p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.7;
}

.workflow-connector {
  width: 40px;
  min-width: 40px;
  height: 1px;
  background: repeating-linear-gradient(
    to right,
    var(--amber-border) 0px,
    var(--amber-border) 6px,
    transparent 6px,
    transparent 12px
  );
  margin-top: 20px;
  align-self: flex-start;
}

/* --- HOW IT WORKS --- */
.how-it-works {
  padding: var(--section-pad) 0;
  border-top: 1px solid var(--border);
}

.how-it-works-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.how-it-works-body {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 32px;
}

.setup-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.setup-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.setup-list li svg {
  flex-shrink: 0;
  margin-top: 2px;
}

/* Agent Visual */
.agent-visual {
  background: var(--bg-card);
  border: 1px solid var(--border-amber);
  border-radius: 6px;
  overflow: hidden;
  font-family: var(--font-mono);
}

.agent-status-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: rgba(245,158,11,0.06);
  border-bottom: 1px solid var(--border-amber);
  font-size: 11px;
  color: var(--text-secondary);
}

.agent-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 8px rgba(34,197,94,0.5);
  animation: pulse 2s infinite;
}

.agent-status-text { color: var(--amber); flex: 1; }
.agent-status-time { color: var(--text-muted); }

.agent-event-log { padding: 0; }

.event-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 11px;
  line-height: 1.5;
}

.event-item:last-child { border-bottom: none; }

.event-time { color: var(--text-muted); min-width: 40px; flex-shrink: 0; }
.event-text { color: var(--text-secondary); flex: 1; }

.event-badge {
  padding: 2px 8px;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  flex-shrink: 0;
}

.event-complete .event-badge { background: rgba(245,158,11,0.12); color: var(--amber); }
.event-active .event-badge { background: rgba(34,197,94,0.1); color: #22c55e; }
.event-pending .event-badge { background: rgba(255,255,255,0.05); color: var(--text-muted); }

/* --- MARKET PROOF --- */
.market-proof {
  padding: var(--section-pad) 0;
  border-top: 1px solid var(--border);
  background: var(--bg-raised);
}

.market-header { text-align: center; }

.market-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-top: 0;
}

.market-card {
  background: var(--bg-raised);
  padding: 40px 32px;
}

.market-metric { margin-bottom: 20px; }

.market-number {
  display: block;
  font-family: var(--font-mono);
  font-size: 48px;
  font-weight: 500;
  color: var(--amber);
  letter-spacing: -0.04em;
  margin-bottom: 8px;
  line-height: 1;
}

.market-label {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  line-height: 1.4;
}

.market-card p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
}

.market-disclaimer {
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
  margin-top: 32px;
  font-style: italic;
}

/* --- CLOSING --- */
.closing {
  padding: 120px 0;
  border-top: 1px solid var(--border);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.closing-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 500px;
  height: 300px;
  background: radial-gradient(ellipse, rgba(245,158,11,0.07) 0%, transparent 70%);
  pointer-events: none;
}

.closing-inner { position: relative; z-index: 1; }

.closing-headline {
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  margin-bottom: 24px;
}

.closing-body {
  font-size: 16px;
  color: var(--text-secondary);
  max-width: 540px;
  margin: 0 auto 48px;
  line-height: 1.7;
}

.closing-cta-note {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

/* --- FOOTER --- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 40px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  gap: 16px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-secondary);
}

.footer-tagline {
  font-size: 13px;
  color: var(--text-muted);
  flex: 1;
}

.footer-copy {
  font-size: 12px;
  color: var(--text-muted);
}

/* --- Responsive --- */
@media (max-width: 768px) {
  :root { --section-pad: 64px; }
  .container { padding: 0 20px; }

  .hero-headline { font-size: 48px; }

  .features-grid,
  .market-grid {
    grid-template-columns: 1fr;
  }

  .how-it-works-inner { grid-template-columns: 1fr; gap: 48px; }

  .workflow-timeline {
    flex-direction: column;
    gap: 0;
  }

  .workflow-connector {
    width: 1px;
    height: 24px;
    min-width: unset;
    background: repeating-linear-gradient(
      to bottom,
      var(--amber-border) 0px,
      var(--amber-border) 6px,
      transparent 6px,
      transparent 12px
    );
    margin: 0 0 0 20px;
    align-self: flex-start;
  }

  .workflow-step { padding: 0 0 32px 0; }
  .workflow-step:last-child { padding-bottom: 0; }

  .hero-flow-diagram {
    flex-direction: column;
    gap: 20px;
    align-items: flex-start;
    padding-left: 24px;
  }

  .flow-step { flex-direction: row; align-items: center; min-width: unset; }
  .flow-arrow { display: none; }

  .hero-stats-row {
    flex-direction: column;
    gap: 0;
  }

  .stat-divider { display: none; }
  .stat-item { padding: 16px 0; border-bottom: 1px solid var(--border); }
  .stat-item:last-child { border-bottom: none; }

  .footer-inner { flex-direction: column; align-items: flex-start; gap: 12px; }
  .footer-tagline, .footer-copy { font-size: 12px; }
}

@media (max-width: 480px) {
  .header-nav { display: none; }
  .market-number { font-size: 36px; }
}