/* ==============================================================================
   👑 FLOWORK OS — SOVEREIGN OPTICAL CRYSTAL GLASS DESIGN SYSTEM
   Ultra-High Performance, Zero-Framework, 100% Core Web Vitals Compliant
   ============================================================================== */

:root {
  --bg-canvas: #050811;
  --bg-gradient: radial-gradient(circle at 50% 0%, #0d162a 0%, #050811 75%);
  --bg-glass: rgba(255, 255, 255, 0.035);
  --bg-glass-card: rgba(14, 20, 32, 0.65);
  --bg-glass-hover: rgba(255, 255, 255, 0.06);
  --border-glass: rgba(255, 255, 255, 0.08);
  --border-specular: rgba(255, 255, 255, 0.16);
  --border-glow-green: rgba(0, 255, 102, 0.4);
  --border-glow-cyan: rgba(0, 242, 254, 0.4);
  
  --accent-green: #00ff66;
  --accent-green-dark: #00b347;
  --accent-cyan: #00f2fe;
  --accent-purple: #7928ca;
  --accent-amber: #f59e0b;
  --accent-red: #ef4444;

  --text-main: #f8fafc;
  --text-secondary: #94a3b8;
  --text-dim: #64748b;

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Inter", "Plus Jakarta Sans", sans-serif;
  --font-mono: "JetBrains Mono", "Fira Code", monospace;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-pill: 9999px;

  --shadow-glass: 0 20px 50px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  --shadow-glow-green: 0 0 30px rgba(0, 255, 102, 0.25);
  --shadow-glow-cyan: 0 0 30px rgba(0, 242, 254, 0.25);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  background-color: var(--bg-canvas);
  color: var(--text-main);
  font-family: var(--font-sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body {
  background: var(--bg-canvas);
  background-image: 
    radial-gradient(circle at 15% 15%, rgba(0, 242, 254, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 85% 25%, rgba(0, 255, 102, 0.08) 0%, transparent 45%),
    radial-gradient(circle at 50% 60%, rgba(121, 40, 202, 0.06) 0%, transparent 55%);
  background-attachment: fixed;
  overflow-x: hidden;
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Glass Utility Classes */
.glass-panel {
  background: var(--bg-glass-card);
  backdrop-filter: blur(28px) saturate(160%);
  -webkit-backdrop-filter: blur(28px) saturate(160%);
  border: 1px solid var(--border-glass);
  box-shadow: var(--shadow-glass);
  border-radius: var(--radius-lg);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.glass-panel:hover {
  border-color: var(--border-specular);
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header & Navigation */
.navbar {
  position: sticky;
  top: 16px;
  z-index: 100;
  margin: 0 auto;
  width: calc(100% - 32px);
  max-width: 1160px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  border-radius: var(--radius-pill);
  background: rgba(10, 15, 26, 0.75);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--border-glass);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.5px;
}

.brand-logo-img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  filter: drop-shadow(0 0 10px rgba(0, 243, 255, 0.4));
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), filter 0.25s ease;
}

.nav-brand:hover .brand-logo-img {
  transform: scale(1.1) rotate(-3deg);
  filter: drop-shadow(0 0 18px rgba(0, 243, 255, 0.8));
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}

.nav-link {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.15s ease;
}

.nav-link:hover {
  color: var(--accent-green);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 9px 18px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  border: none;
  outline: none;
}

.btn-primary {
  background: linear-gradient(135deg, #00ff66 0%, #00d655 100%);
  color: #041008;
  box-shadow: var(--shadow-glow-green);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 40px rgba(0, 255, 102, 0.5);
  background: #00ff66;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  color: var(--text-main);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--border-specular);
  transform: translateY(-2px);
}

.btn-lg {
  padding: 13px 28px;
  font-size: 1.05rem;
}

/* Hero Section */
.hero-section {
  padding: 80px 0 60px;
  text-align: center;
  position: relative;
}

.pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: var(--radius-pill);
  background: rgba(0, 255, 102, 0.08);
  border: 1px solid rgba(0, 255, 102, 0.3);
  color: var(--accent-green);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  margin-bottom: 24px;
}

.hero-title {
  font-size: 3.4rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -1.5px;
  margin-bottom: 20px;
  max-width: 960px;
  margin-left: auto;
  margin-right: auto;
}

.gradient-text {
  background: linear-gradient(135deg, #ffffff 30%, var(--accent-green) 70%, var(--accent-cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-lead {
  font-size: 1.25rem;
  color: var(--text-secondary);
  max-width: 780px;
  margin: 0 auto 36px;
  line-height: 1.6;
}

.hero-ctas {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 36px;
  flex-wrap: wrap;
}

.spec-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  color: var(--text-dim);
  font-size: 0.85rem;
  flex-wrap: wrap;
}

.spec-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.spec-item .dot {
  color: var(--accent-green);
}

/* Terminal & Showcase HUD */
.showcase-container {
  margin-top: 50px;
  position: relative;
}

.glass-hud {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 24px;
  padding: 24px;
  text-align: left;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-glass);
}

.terminal-window {
  background: #060913;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

.terminal-header {
  height: 38px;
  background: #0b1120;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.term-dots {
  display: flex;
  gap: 6px;
}

.term-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.term-dot.red { background: #ff5f56; }
.term-dot.yellow { background: #ffbd2e; }
.term-dot.green { background: #27c93f; }

.term-title {
  color: var(--text-dim);
  font-size: 0.75rem;
}

.terminal-body {
  padding: 16px;
  color: var(--text-secondary);
  line-height: 1.6;
  min-height: 280px;
}

.cmd-line {
  color: var(--text-main);
  margin-bottom: 8px;
}

.cmd-prompt {
  color: var(--accent-green);
}

.term-highlight {
  color: var(--accent-cyan);
}

.term-success {
  color: var(--accent-green);
  font-weight: 700;
}

.term-badge {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(0, 255, 102, 0.15);
  border: 1px solid var(--border-glow-green);
  color: var(--accent-green);
  font-size: 0.75rem;
  margin-top: 8px;
}

.hud-preview {
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
}

.hud-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-glass);
}

/* Trust Bar / Fast Metrics */
.trust-bar {
  padding: 40px 0;
  border-top: 1px solid var(--border-glass);
  border-bottom: 1px solid var(--border-glass);
  background: rgba(255, 255, 255, 0.01);
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  text-align: center;
}

.metric-stat {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -1px;
}

.metric-stat .highlight {
  color: var(--accent-green);
}

.metric-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
}

/* Comparison Section */
.section {
  padding: 90px 0;
}

.section-header {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 50px;
}

.section-tag {
  color: var(--accent-cyan);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 12px;
  display: block;
}

.section-title {
  font-size: 2.4rem;
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 16px;
}

.section-subtitle {
  color: var(--text-secondary);
  font-size: 1.1rem;
}

.table-wrapper {
  overflow-x: auto;
}

.comparison-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-glass);
  background: var(--bg-glass-card);
}

.comparison-table th, .comparison-table td {
  padding: 20px 24px;
  text-align: left;
  border-bottom: 1px solid var(--border-glass);
}

.comparison-table th {
  background: rgba(14, 20, 32, 0.95);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
}

.comparison-table th.flowork-th {
  color: var(--accent-green);
  border-left: 1px solid rgba(0, 255, 102, 0.3);
  background: rgba(0, 255, 102, 0.05);
}

.comparison-table td.flowork-td {
  border-left: 1px solid rgba(0, 255, 102, 0.2);
  background: rgba(0, 255, 102, 0.02);
  font-weight: 500;
}

.bad-icon { color: var(--accent-red); margin-right: 8px; }
.good-icon { color: var(--accent-green); margin-right: 8px; }

/* Superpowers Cards */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.superpower-card {
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.superpower-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-glow-green);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.7), 0 0 20px rgba(0, 255, 102, 0.15);
}

.card-icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 20px;
}

.card-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text-main);
}

.card-desc {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.card-footer {
  margin-top: 24px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent-green);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* Quickstart Steps */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 36px;
}

.step-card {
  padding: 28px;
}

.step-num {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--accent-cyan);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 12px;
}

.step-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.step-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.cli-box {
  background: #060913;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--text-main);
}

.cli-copy-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-glass);
  color: var(--text-secondary);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.cli-copy-btn:hover {
  background: var(--accent-green);
  color: #041008;
}

/* Agentic SEO Callout */
.agentic-banner {
  padding: 36px 40px;
  background: linear-gradient(135deg, rgba(0, 242, 254, 0.05) 0%, rgba(121, 40, 202, 0.05) 100%);
  border: 1px solid var(--border-glow-cyan);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-radius: var(--radius-lg);
  margin-top: 40px;
}

.agentic-info h3 {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.agentic-info p {
  color: var(--text-secondary);
  font-size: 0.92rem;
}

/* FAQ Accordion */
.faq-list {
  max-width: 860px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.faq-item {
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  background: var(--bg-glass-card);
  overflow: hidden;
  transition: border-color 0.2s ease;
}

.faq-question {
  width: 100%;
  padding: 20px 24px;
  background: transparent;
  border: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
  text-align: left;
}

.faq-chevron {
  font-size: 1.2rem;
  transition: transform 0.2s ease;
  color: var(--accent-green);
}

.faq-answer {
  padding: 0 24px 20px;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
  display: none;
}

.faq-item.active {
  border-color: var(--border-glow-green);
}

.faq-item.active .faq-chevron {
  transform: rotate(180deg);
}

.faq-item.active .faq-answer {
  display: block;
}

/* Footer */
.footer {
  padding: 60px 0 40px;
  border-top: 1px solid var(--border-glass);
  background: rgba(5, 8, 17, 0.9);
  font-size: 0.88rem;
  color: var(--text-dim);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 40px;
}

.footer-brand p {
  margin-top: 12px;
  color: var(--text-secondary);
  max-width: 320px;
  line-height: 1.5;
}

.footer-col h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 16px;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col a:hover {
  color: var(--accent-green);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.8rem;
}

/* Responsive Design */
@media (max-width: 992px) {
  .hero-title { font-size: 2.6rem; }
  .glass-hud { grid-template-columns: 1fr; }
  .metric-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
  .cards-grid { grid-template-columns: repeat(2, 1fr); }
  .steps-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .navbar { 
    top: 8px; 
    width: calc(100% - 16px); 
    padding: 0 14px; 
    height: 56px;
  }
  .nav-links { display: none; }
  .nav-brand span { font-size: 1rem; }
  .brand-logo-img { width: 28px; height: 28px; }
  .nav-actions .btn-secondary { display: none; }
  .nav-actions .btn-primary { 
    padding: 7px 14px; 
    font-size: 0.78rem; 
    letter-spacing: -0.2px;
  }
  
  .hero-section { padding: 48px 0 36px; }
  .hero-title { 
    font-size: clamp(1.85rem, 6.5vw, 2.3rem); 
    line-height: 1.2; 
    letter-spacing: -0.8px;
    margin-bottom: 16px;
  }
  .hero-lead { 
    font-size: 0.98rem; 
    line-height: 1.55; 
    margin-bottom: 24px; 
  }
  .hero-ctas { 
    flex-direction: column; 
    width: 100%; 
    gap: 12px; 
  }
  .hero-ctas .btn { 
    width: 100%; 
    padding: 12px 20px;
    font-size: 0.95rem;
  }
  .spec-strip { 
    font-size: 0.78rem; 
    gap: 10px; 
  }

  .terminal-window { font-size: 0.75rem; }
  .terminal-body { padding: 12px; min-height: 200px; }

  .comparison-table { font-size: 0.85rem; }
  .comparison-table th, .comparison-table td { padding: 14px 16px; }

  .cards-grid { grid-template-columns: 1fr; }
  .metric-grid { grid-template-columns: 1fr; }
  .agentic-banner { flex-direction: column; align-items: flex-start; padding: 24px 20px; }
  .cli-box { 
    flex-direction: column; 
    align-items: stretch; 
    gap: 14px; 
    padding: 16px;
  }
  .cli-box code {
    word-break: break-all;
    font-size: 0.78rem;
    line-height: 1.4;
  }
  .cli-copy-btn { 
    width: 100%; 
    text-align: center; 
    padding: 10px;
  }
  
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }
}
