/* ═══════════════════════════════════════════════════
   OpenKrew Landing Page — Industrial Terminal Theme
   ═══════════════════════════════════════════════════ */

:root {
  --bg-deep: #0e0e0e;
  --bg-base: #141414;
  --bg-raised: #1a1a1a;
  --bg-surface: #222222;
  --bg-hover: #2a2a2a;

  --border-subtle: #1e1e1e;
  --border-default: #2a2a2a;
  --border-strong: #3a3a3a;

  --text-primary: #e8e8e8;
  --text-secondary: #999999;
  --text-muted: #666666;
  --text-dim: #444444;

  --accent: #3ecfb4;
  --accent-dim: #2a9e84;
  --accent-glow: rgba(62, 207, 180, 0.08);
  --accent-glow-strong: rgba(62, 207, 180, 0.15);

  --font-body: 'DM Sans', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --font-display: 'Instrument Serif', serif;

  --max-w: 1140px;
  --section-pad: 120px;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a { color: inherit; text-decoration: none; }
code { font-family: var(--font-mono); font-size: 0.88em; color: var(--accent); }

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

/* ─── NAV ─────────────────────────────────────────── */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(14, 14, 14, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
  transition: background 0.3s;
}

.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 32px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo img { height: 32px; width: auto; opacity: 0.9; transition: opacity 0.2s; }
.nav-logo:hover img { opacity: 1; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links a {
  font-size: 0.88rem;
  font-weight: 450;
  color: var(--text-secondary);
  transition: color 0.2s;
  letter-spacing: 0.01em;
}
.nav-links a:hover { color: var(--text-primary); }

.nav-github {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border: 1px solid var(--border-default);
  border-radius: 8px;
  font-size: 0.85rem !important;
  transition: border-color 0.2s, background 0.2s !important;
}
.nav-github:hover { border-color: var(--border-strong); background: var(--bg-hover); }

.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 4px; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--text-secondary); margin: 5px 0; transition: 0.2s; }

/* ─── HERO ────────────────────────────────────────── */

.hero {
  position: relative;
  padding: 160px 0 100px;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(62, 207, 180, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(62, 207, 180, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black, transparent);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black, transparent);
}

.hero-glow {
  position: absolute;
  top: 10%;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 500px;
  background: radial-gradient(ellipse, rgba(62, 207, 180, 0.06), transparent 70%);
  pointer-events: none;
}

.hero-content { position: relative; text-align: center; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: var(--accent-glow);
  border: 1px solid rgba(62, 207, 180, 0.15);
  border-radius: 100px;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.03em;
  margin-bottom: 32px;
}

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

.hero-title {
  font-family: var(--font-body);
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
  color: var(--text-primary);
}

.hero-accent {
  background: linear-gradient(135deg, var(--accent), #6ee8d0);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 620px;
  margin: 0 auto 40px;
  line-height: 1.7;
}

.hero-cta {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 60px;
}

/* ─── BUTTONS ─────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 10px;
  font-size: 0.92rem;
  font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid transparent;
  letter-spacing: 0.01em;
}

.btn-primary {
  background: var(--accent);
  color: #0e0e0e;
  border-color: var(--accent);
}
.btn-primary:hover {
  background: #4de0c5;
  border-color: #4de0c5;
  box-shadow: 0 4px 20px rgba(62, 207, 180, 0.25);
}

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border-color: var(--border-strong);
}
.btn-outline:hover {
  border-color: var(--text-muted);
  background: var(--bg-hover);
}

.btn-block { width: 100%; justify-content: center; }

/* ─── TERMINAL ────────────────────────────────────── */

.hero-terminal {
  max-width: 620px;
  margin: 0 auto;
  border: 1px solid var(--border-default);
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg-base);
  box-shadow: 0 20px 60px rgba(0,0,0,0.5), 0 0 40px rgba(62, 207, 180, 0.03);
  text-align: left;
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 12px 16px;
  background: var(--bg-raised);
  border-bottom: 1px solid var(--border-subtle);
}

.terminal-dot { width: 10px; height: 10px; border-radius: 50%; }
.terminal-dot.red { background: #ff5f57; }
.terminal-dot.yellow { background: #febc2e; }
.terminal-dot.green { background: #28c840; }
.terminal-title {
  margin-left: auto;
  font-size: 0.72rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
}

.terminal-body {
  padding: 20px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 1.65;
  color: var(--text-secondary);
  overflow-x: auto;
}

.t-prompt { color: var(--accent); }
.t-cmd { color: var(--text-primary); font-weight: 500; }
.t-green { color: #5ab87a; }
.t-comment { color: var(--text-dim); }

/* ─── SECTIONS ────────────────────────────────────── */

.section {
  padding: var(--section-pad) 0;
}

.section-alt {
  background: var(--bg-base);
}

.section-header {
  text-align: center;
  margin-bottom: 64px;
}

.section-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 16px;
}

.section-title {
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin-bottom: 16px;
}

.section-sub {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ─── STEPS ───────────────────────────────────────── */

.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.step-card {
  padding: 36px 32px;
  background: var(--bg-base);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.step-card:hover {
  border-color: var(--border-strong);
  box-shadow: 0 8px 30px rgba(0,0,0,0.3);
}

.step-num {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 16px;
  letter-spacing: 0.05em;
}

.step-title {
  font-size: 1.15rem;
  font-weight: 650;
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}

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

/* ─── FEATURES ────────────────────────────────────── */

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.feature-card {
  padding: 32px 28px;
  background: var(--bg-raised);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  transition: border-color 0.3s, transform 0.3s;
}

.feature-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
}

.feature-icon {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-glow);
  border: 1px solid rgba(62, 207, 180, 0.12);
  border-radius: 10px;
  margin-bottom: 20px;
}

.feature-icon svg {
  width: 20px;
  height: 20px;
  color: var(--accent);
}

.feature-card h3 {
  font-size: 1.05rem;
  font-weight: 650;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}

.feature-card p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ─── ARCHITECTURE ────────────────────────────────── */

.arch-diagram {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 60px 0;
  position: relative;
  flex-wrap: wrap;
}

.arch-hub {
  position: relative;
  z-index: 2;
  order: 3;
}

.arch-hub-glow {
  position: absolute;
  inset: -30px;
  background: radial-gradient(circle, rgba(62, 207, 180, 0.12), transparent 70%);
  border-radius: 50%;
  z-index: 0;
}

.arch-hub-inner {
  position: relative;
  width: 200px;
  height: 200px;
  border: 2px solid var(--accent);
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--bg-raised);
  text-align: center;
  z-index: 1;
}

.arch-hub-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 4px;
}

.arch-hub-agent {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.arch-hub-detail {
  font-size: 0.68rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.arch-spoke {
  display: flex;
  align-items: center;
  gap: 0;
}

.arch-spoke-1, .arch-spoke-2 { order: 1; }
.arch-spoke-3, .arch-spoke-4 { order: 5; }
.arch-spoke-1 { order: 1; }
.arch-spoke-2 { order: 2; margin-right: -20px; flex-direction: column; position: relative; top: -80px; }
.arch-spoke-3 { order: 4; margin-left: -20px; flex-direction: column; position: relative; top: -80px; }
.arch-spoke-4 { order: 5; }

.arch-node {
  padding: 16px 20px;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: 12px;
  text-align: center;
  min-width: 130px;
}

.arch-node-label {
  display: block;
  font-size: 0.68rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  margin-bottom: 4px;
}

.arch-node-agent {
  display: block;
  font-weight: 650;
  font-size: 0.95rem;
  margin-bottom: 2px;
}

.arch-node-role {
  display: block;
  font-size: 0.72rem;
  color: var(--accent);
  font-weight: 500;
}

.arch-line {
  width: 40px;
  height: 2px;
  background: linear-gradient(90deg, var(--border-strong), var(--accent), var(--border-strong));
  flex-shrink: 0;
}

.arch-spoke-2 .arch-line,
.arch-spoke-3 .arch-line {
  width: 2px;
  height: 40px;
  background: linear-gradient(180deg, var(--border-strong), var(--accent), var(--border-strong));
}

.arch-relay {
  position: absolute;
  bottom: 20px;
  right: 50%;
  transform: translateX(50%);
  padding: 10px 20px;
  background: var(--bg-surface);
  border: 1px dashed var(--border-strong);
  border-radius: 8px;
  text-align: center;
  order: 10;
}

.arch-relay-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

.arch-relay-detail {
  font-size: 0.72rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
}

/* ─── PRICING ─────────────────────────────────────── */

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  align-items: start;
}

.pricing-card {
  padding: 36px 32px;
  background: var(--bg-raised);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  text-align: center;
  position: relative;
  transition: border-color 0.3s;
}

.pricing-card:hover { border-color: var(--border-strong); }

.pricing-card-featured {
  border-color: var(--accent);
  box-shadow: 0 0 40px rgba(62, 207, 180, 0.06);
}

.pricing-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  padding: 4px 16px;
  background: var(--accent);
  color: var(--bg-deep);
  font-size: 0.72rem;
  font-weight: 650;
  border-radius: 100px;
  letter-spacing: 0.02em;
}

.pricing-name {
  font-size: 1rem;
  font-weight: 650;
  margin-bottom: 8px;
  letter-spacing: 0.01em;
}

.pricing-price {
  font-size: 2.4rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 2px;
}

.pricing-price span {
  font-size: 1rem;
  font-weight: 400;
  color: var(--text-muted);
}

.pricing-period {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 28px;
}

.pricing-features {
  list-style: none;
  text-align: left;
  margin-bottom: 28px;
}

.pricing-features li {
  padding: 8px 0;
  font-size: 0.88rem;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  gap: 10px;
}

.pricing-features li:last-child { border-bottom: none; }

.pricing-features li::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  flex-shrink: 0;
}

/* ─── OPEN SOURCE ─────────────────────────────────── */

.oss-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  padding: 48px;
  background: var(--bg-base);
  border: 1px solid var(--border-default);
  border-radius: 20px;
}

.oss-title {
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
  line-height: 1.2;
}

.oss-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 28px;
}

.oss-cta { display: flex; gap: 12px; flex-wrap: wrap; }

.oss-code pre {
  padding: 24px;
  background: var(--bg-raised);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.7;
  color: var(--text-secondary);
  overflow-x: auto;
}

/* ─── FOOTER ──────────────────────────────────────── */

.footer {
  padding: 80px 0 40px;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-deep);
}

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

.footer-brand img { height: 28px; width: auto; margin-bottom: 14px; opacity: 0.7; }
.footer-brand p { font-size: 0.85rem; color: var(--text-muted); line-height: 1.55; }

.footer-col h4 {
  font-size: 0.78rem;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.footer-col a {
  display: block;
  font-size: 0.88rem;
  color: var(--text-secondary);
  padding: 5px 0;
  transition: color 0.2s;
}

.footer-col a:hover { color: var(--text-primary); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  padding-top: 28px;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.78rem;
  color: var(--text-dim);
}

/* ─── ANIMATIONS ──────────────────────────────────── */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-d1 { transition-delay: 0.1s; }
.reveal-d2 { transition-delay: 0.2s; }
.reveal-d3 { transition-delay: 0.3s; }
.reveal-d4 { transition-delay: 0.4s; }

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

/* ─── RESPONSIVE ──────────────────────────────────── */

@media (max-width: 900px) {
  :root { --section-pad: 80px; }

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

  .oss-card { grid-template-columns: 1fr; }

  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }

  .arch-diagram { flex-direction: column; gap: 16px; }
  .arch-spoke { flex-direction: column !important; position: static !important; top: auto !important; margin: 0 !important; }
  .arch-line { width: 2px !important; height: 24px !important; background: linear-gradient(180deg, var(--border-strong), var(--accent), var(--border-strong)) !important; }
  .arch-relay { position: static; transform: none; margin-top: 24px; }
}

@media (max-width: 640px) {
  :root { --section-pad: 60px; }

  .nav-links { display: none; position: absolute; top: 64px; left: 0; right: 0; background: var(--bg-base); border-bottom: 1px solid var(--border-subtle); flex-direction: column; padding: 20px 32px; gap: 16px; }
  .nav-links.open { display: flex; }
  .nav-toggle { display: block; }

  .hero { padding: 120px 0 60px; }
  .hero-title { font-size: 2rem; }
  .hero-sub { font-size: 1rem; }

  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer-bottom { flex-direction: column; gap: 8px; }
}
