/* ==============================
   BYLINE — AI Content Agent
   Theme: Editorial Midnight
   ============================== */

:root {
  --bg: #0b1628;
  --bg-card: #0f1f38;
  --bg-card-alt: #122040;
  --fg: #f0ece4;
  --fg-muted: #8a9bb5;
  --accent: #e8a838;
  --accent-alt: #4ecdc4;
  --border: #1a2d4a;
  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'DM Sans', system-ui, sans-serif;
}

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

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

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

/* Grain overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 1000;
}

/* Typography */
h1, h2, h3 { font-family: var(--font-display); font-weight: 700; line-height: 1.1; }
em { font-style: italic; font-weight: 300; color: var(--accent); }

/* ==============================
   NAV
   ============================== */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 22, 40, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 56px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--fg);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.nav-tagline {
  font-size: 0.75rem;
  color: var(--fg-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 500;
}

/* ==============================
   HERO
   ============================== */
.hero {
  padding: 80px 24px 60px;
  max-width: 1200px;
  margin: 0 auto;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
  margin-bottom: 60px;
}

.hero-text {}

.hero-eyebrow {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 16px;
}

.hero-headline {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin-bottom: 24px;
  color: var(--fg);
}

.hero-lede {
  font-size: 1.1rem;
  color: var(--fg-muted);
  line-height: 1.7;
  max-width: 480px;
}

/* Agent window */
.agent-window {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0,0,0,0.4);
}

.aw-header {
  background: var(--bg-card-alt);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--border);
}

.aw-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.aw-dot.red { background: #ff5f57; }
.aw-dot.yellow { background: #ffbd2e; }
.aw-dot.green { background: #28c840; }

.aw-title {
  font-size: 0.75rem;
  color: var(--fg-muted);
  margin-left: 8px;
  font-weight: 500;
}

.aw-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.aw-log {
  display: flex;
  gap: 12px;
  font-size: 0.8rem;
  font-family: 'DM Mono', 'Courier New', monospace;
  font-size: 0.78rem;
}

.aw-time {
  color: var(--fg-muted);
  flex-shrink: 0;
  min-width: 40px;
}

.aw-msg { color: var(--fg); }

.aw-done .aw-msg { color: var(--accent-alt); }

.aw-status {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  color: var(--fg-muted);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-alt);
  animation: pulse 2s infinite;
}

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

/* Hero stats */
.hero-stats {
  display: flex;
  align-items: center;
  gap: 0;
  border-top: 1px solid var(--border);
  padding-top: 48px;
}

.stat {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 32px;
}

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

.stat-num {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--accent);
  letter-spacing: -0.03em;
  line-height: 1;
}

.stat-label {
  font-size: 0.78rem;
  color: var(--fg-muted);
  text-align: center;
  margin-top: 6px;
}

.stat-div {
  width: 1px;
  height: 48px;
  background: var(--border);
}

/* Hero social proof */
.hero-proof {
  margin-top: 12px;
}

.proof-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--fg-muted);
  font-weight: 600;
  margin-bottom: 6px;
  padding-left: 4px;
}

.proof-card {
  display: block;
  background: var(--bg-card);
  border: 1px solid var(--accent);
  border-radius: 10px;
  padding: 14px 18px;
  text-decoration: none;
  transition: border-color 0.2s, background 0.2s;
}

.proof-card:hover {
  border-color: var(--accent);
  background: var(--bg-card-alt);
}

.proof-topic {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--fg);
  margin-bottom: 6px;
}

.proof-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: var(--fg-muted);
}

.proof-score {
  color: var(--accent-alt);
  font-weight: 600;
}

.proof-divider {
  color: var(--border);
}

.proof-link {
  color: var(--accent);
  font-weight: 500;
}

/* ==============================
   SHARED SECTION STYLES
   ============================== */
section { padding: 80px 24px; }

.section-eyebrow {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 12px;
}

.section-headline {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin-bottom: 0;
}

/* ==============================
   HOW IT WORKS
   ============================== */
.how-it-works {
  max-width: 1200px;
  margin: 0 auto;
}

.how-it-works .section-header {
  margin-bottom: 56px;
}

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

.step {
  background: var(--bg-card);
  padding: 40px 36px;
}

.step-num {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--accent);
  opacity: 0.3;
  display: block;
  margin-bottom: 12px;
  letter-spacing: -0.03em;
}

.step-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--fg);
}

.step-desc {
  font-size: 0.9rem;
  color: var(--fg-muted);
  line-height: 1.6;
}

/* ==============================
   THE AGENT
   ============================== */
.the-agent {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.agent-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}

.agent-copy .section-headline { margin-bottom: 20px; }

.agent-body {
  font-size: 1rem;
  color: var(--fg-muted);
  line-height: 1.7;
  margin-bottom: 32px;
}

.agent-capabilities {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.agent-capabilities li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.9rem;
  color: var(--fg);
}

.cap-icon {
  font-size: 0.5rem;
  color: var(--accent);
  flex-shrink: 0;
}

/* Agent visual cards */
.agent-visual {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cap-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px;
}

.cap-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--fg-muted);
  font-weight: 600;
  margin-bottom: 12px;
}

.cap-bar-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.cap-bar-label {
  font-size: 0.78rem;
  color: var(--fg-muted);
  min-width: 90px;
}

.cap-bar {
  flex: 1;
  height: 6px;
  background: var(--bg-card-alt);
  border-radius: 3px;
  overflow: hidden;
}

.cap-fill {
  height: 100%;
  background: var(--accent-alt);
  border-radius: 3px;
  transition: width 1s ease;
}

.cap-fill-amber { background: var(--accent); opacity: 0.5; }

.gap-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.gap-tag {
  font-size: 0.75rem;
  color: var(--fg);
  background: var(--bg-card-alt);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 4px 12px;
  font-style: italic;
}

.metrics-row {
  display: flex;
  gap: 24px;
}

.metric { display: flex; flex-direction: column; gap: 4px; }

.metric-val {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--accent);
  letter-spacing: -0.02em;
}

.metric-lbl {
  font-size: 0.7rem;
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ==============================
   DIFFERENTIATORS
   ============================== */
.differentiators {
  max-width: 1200px;
  margin: 0 auto;
}

.differentiators .section-header {
  margin-bottom: 56px;
}

.differentiators-sub {
  font-size: 1rem;
  color: var(--fg-muted);
  margin-top: 16px;
  max-width: 560px;
}

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

.diff-card {
  background: var(--bg-card);
  padding: 40px 36px;
}

.diff-icon { margin-bottom: 20px; }

.diff-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--fg);
}

.diff-desc {
  font-size: 0.88rem;
  color: var(--fg-muted);
  line-height: 1.6;
}

/* ==============================
   MANIFESTO
   ============================== */
.manifesto {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
}

.manifesto-inner {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.manifesto-headline {
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  font-weight: 900;
  letter-spacing: -0.025em;
  line-height: 1.15;
  margin-bottom: 32px;
  color: var(--fg);
}

.manifesto-body {
  font-size: 1.05rem;
  color: var(--fg-muted);
  line-height: 1.75;
  margin-bottom: 20px;
}

.manifesto-tagline {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-style: italic;
  color: var(--accent);
  margin-top: 40px;
  font-weight: 300;
}

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

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-logo {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--fg);
  display: block;
  letter-spacing: -0.02em;
}

.footer-desc {
  font-size: 0.8rem;
  color: var(--fg-muted);
  margin-top: 4px;
}

.footer-copy {
  font-size: 0.78rem;
  color: var(--fg-muted);
}

/* ==============================
   RESPONSIVE
   ============================== */
@media (max-width: 768px) {
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .agent-inner {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .steps-grid, .diff-grid {
    grid-template-columns: 1fr;
  }

  .hero-stats {
    flex-direction: column;
    gap: 24px;
    align-items: flex-start;
    padding-left: 0;
    padding-right: 0;
  }

  .stat-div { display: none; }

  .stat { padding: 0; }

  .footer-inner {
    flex-direction: column;
    gap: 20px;
    align-items: flex-start;
  }

  section { padding: 60px 20px; }
  .hero { padding: 60px 20px 40px; }
}