/* ==========================================================================
   AuraFlow Tech (auraflowtech.lat) — Design System & Premium UI Styles
   Fundado por el Ing. Santiago Delgado Leiva · Zona Sur, Costa Rica
   Theme: Deep Space Obsidian, Cyber Cyan (#22d3ee), Emerald Sync (#10b981)
   ========================================================================== */

:root {
  --bg-primary: #040814;
  --bg-secondary: #071022;
  --bg-card: rgba(11, 19, 37, 0.85);
  --bg-card-hover: rgba(15, 27, 52, 0.95);
  --bg-glass: rgba(7, 16, 34, 0.84);
  --border-subtle: rgba(148, 163, 184, 0.16);
  --border-glow: rgba(34, 211, 238, 0.75);
  --border-cyan: rgba(6, 182, 212, 0.55);

  --text-main: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #64748b;

  --accent-violet: #7c3aed;
  --accent-violet-light: #a78bfa;
  --accent-cyan: #06b6d4;
  --accent-cyan-light: #22d3ee;
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;
  --accent-rose: #f43f5e;

  --gradient-brand: linear-gradient(135deg, #06b6d4 0%, #3b82f6 50%, #7c3aed 100%);
  --gradient-text: linear-gradient(95deg, #ffffff 0%, #38bdf8 50%, #10b981 100%);

  --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.6);
  --shadow-cyan: 0 0 32px rgba(34, 211, 238, 0.22);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --radius-xl: 26px;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
}

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

html {
  scroll-behavior: smooth;
  background-color: var(--bg-primary);
  color: var(--text-main);
  font-family: var(--font-sans);
  line-height: 1.6;
}

body {
  background-color: var(--bg-primary);
  background-image:
    radial-gradient(at 18% 12%, rgba(6, 182, 212, 0.16) 0px, transparent 42%),
    radial-gradient(at 82% 18%, rgba(16, 185, 129, 0.12) 0px, transparent 38%),
    radial-gradient(at 50% 80%, rgba(124, 58, 237, 0.11) 0px, transparent 45%);
  min-height: 100vh;
  overflow-x: hidden;
}

.bg-grid-pattern {
  position: fixed;
  inset: 0;
  background-size: 40px 40px;
  background-image:
    linear-gradient(to right, rgba(30, 41, 59, 0.42) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(30, 41, 59, 0.42) 1px, transparent 1px);
  pointer-events: none;
  z-index: 0;
}

.container {
  max-width: 1260px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

/* Top Cloud VPS Status Bar */
.top-vps-bar {
  background: rgba(4, 10, 24, 0.95);
  border-bottom: 1px solid rgba(34, 211, 238, 0.2);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  padding: 8px 0;
  position: relative;
  z-index: 101;
}

.top-vps-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.vps-left, .vps-right {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.vps-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #38bdf8;
  font-weight: 600;
}

.vps-sep {
  color: #334155;
}

.vps-muted {
  color: #94a3b8;
}

/* Navbar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  background: rgba(4, 8, 20, 0.85);
  border-bottom: 1px solid var(--border-subtle);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 74px;
  gap: 16px;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-main);
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
}

.brand-orb {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: var(--gradient-brand);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 20px rgba(6, 182, 212, 0.45);
  font-size: 1.15rem;
}

.brand-badge {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(6, 182, 212, 0.16);
  border: 1px solid rgba(34, 211, 238, 0.45);
  color: var(--accent-cyan-light);
  font-weight: 700;
}

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

.nav-links a {
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 0.88rem;
  font-weight: 500;
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: var(--accent-cyan-light);
}

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

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-emerald);
  box-shadow: 0 0 10px var(--accent-emerald);
  animation: pulse 2s infinite;
  display: inline-block;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.65; }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 11px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.22s ease;
  text-decoration: none;
  border: none;
  font-family: var(--font-sans);
}

.btn-primary {
  background: linear-gradient(135deg, #06b6d4 0%, #2563eb 100%);
  color: #ffffff;
  box-shadow: 0 8px 25px rgba(6, 182, 212, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(34, 211, 238, 0.5);
}

.btn-secondary {
  background: rgba(15, 23, 42, 0.8);
  color: var(--text-main);
  border: 1px solid rgba(34, 211, 238, 0.35);
}

.btn-secondary:hover {
  background: rgba(15, 23, 42, 1);
  border-color: var(--accent-cyan-light);
}

.btn-sm {
  padding: 8px 14px;
  font-size: 0.82rem;
}

.gradient-text {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Hero Section */
.hero {
  padding: 58px 0 42px;
}

.eyebrow-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 18px;
  border-radius: 999px;
  background: #071529;
  border: 1.5px solid rgba(34, 211, 238, 0.75);
  color: #38bdf8;
  font-size: 0.82rem;
  font-weight: 700;
  font-family: var(--font-mono);
  letter-spacing: 0.08em;
  margin-bottom: 20px;
}

.hero h1 {
  font-size: clamp(2.1rem, 4.2vw, 3.35rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.025em;
  margin-bottom: 16px;
}

.hero-subtitle-mono {
  font-family: var(--font-mono);
  font-size: 1.05rem;
  color: #94a3b8;
  margin-bottom: 16px;
}

.hero p {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 820px;
  margin-bottom: 26px;
}

.hero-cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 38px;
}

/* 3 Core Nodes Grid (Exact OG Card visual layout) */
.core-nodes-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-bottom: 26px;
}

.core-node-card {
  background: rgba(11, 19, 37, 0.92);
  border: 1.8px solid #1e293b;
  border-radius: 18px;
  padding: 26px;
  transition: all 0.25s ease;
  position: relative;
}

.core-node-card:hover {
  transform: translateY(-4px);
  border-color: rgba(34, 211, 238, 0.6);
}

.core-node-card.highlighted-v44 {
  background: rgba(11, 21, 40, 0.97);
  border: 2.5px solid #22d3ee;
  box-shadow: var(--shadow-cyan);
}

.core-node-tag {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 700;
  color: #22d3ee;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}

.core-node-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: #ffffff;
  padding-bottom: 14px;
  margin-bottom: 16px;
  border-bottom: 1px solid #1e293b;
}

.core-node-list {
  list-style: none;
  margin-bottom: 20px;
}

.core-node-list li {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: #cbd5e1;
  margin-bottom: 10px;
}

.core-node-status {
  font-family: var(--font-mono);
  font-size: 0.84rem;
  font-weight: 700;
  color: #10b981;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Interactive CLI Terminal */
.cli-terminal-box {
  background: #030711;
  border: 1px solid rgba(34, 211, 238, 0.35);
  border-radius: 16px;
  overflow: hidden;
  margin-top: 24px;
  box-shadow: var(--shadow-lg);
}

.cli-header {
  background: rgba(15, 23, 42, 0.9);
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.15);
}

.window-dots {
  display: flex;
  gap: 7px;
  align-items: center;
}

.window-dots span {
  width: 11px;
  height: 11px;
  border-radius: 50%;
}

.dot-red { background: #ef4444; }
.dot-amber { background: #f59e0b; }
.dot-green { background: #10b981; }

.cli-cmd-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cli-btn {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  padding: 5px 11px;
  border-radius: 7px;
  background: rgba(6, 182, 212, 0.12);
  border: 1px solid rgba(34, 211, 238, 0.35);
  color: #38bdf8;
  cursor: pointer;
  transition: all 0.2s;
}

.cli-btn:hover, .cli-btn.active {
  background: rgba(6, 182, 212, 0.28);
  color: #ffffff;
  border-color: #22d3ee;
}

.cli-body {
  padding: 18px 22px;
  font-family: var(--font-mono);
  font-size: 0.84rem;
  color: #cbd5e1;
  min-height: 170px;
}

.cli-line {
  margin-bottom: 6px;
}

.cli-prompt {
  color: #22d3ee;
  font-weight: 700;
}

/* Telemetry Strip */
.metrics-strip {
  padding: 18px 0 36px;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.metric-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px;
}

.metric-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 6px;
  font-weight: 600;
}

.metric-value {
  font-size: 1.85rem;
  font-weight: 800;
  font-family: var(--font-mono);
  color: var(--text-main);
}

.metric-delta {
  margin-top: 6px;
  font-size: 0.78rem;
  color: var(--accent-emerald);
  font-weight: 600;
}

/* Section Headers */
section {
  padding: 64px 0;
}

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

.section-tag {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-cyan-light);
  font-weight: 700;
  margin-bottom: 8px;
  display: block;
}

.section-header h2 {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.section-header p {
  color: var(--text-secondary);
  font-size: 1rem;
}

/* Facturador CR v4.4 Live Sandbox */
.factura-sandbox-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 24px;
}

.glass-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 26px;
}

.clave-50-box {
  background: rgba(3, 7, 17, 0.9);
  border: 1.5px solid rgba(34, 211, 238, 0.45);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 16px;
  font-family: var(--font-mono);
}

.clave-50-label {
  font-size: 0.73rem;
  color: #38bdf8;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 4px;
  display: flex;
  justify-content: space-between;
}

.clave-50-value {
  font-size: 0.88rem;
  color: #10b981;
  font-weight: 700;
  word-break: break-all;
}

.xml-preview-box {
  background: #020610;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 10px;
  padding: 12px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: #93c5fd;
  max-height: 190px;
  overflow-y: auto;
  white-space: pre-wrap;
  margin-top: 12px;
}

/* Subdomains Grid (16 Active Subdomains) */
.subdomains-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.subdomain-card {
  background: rgba(11, 19, 37, 0.85);
  border: 1px solid var(--border-subtle);
  border-radius: 13px;
  padding: 16px;
  transition: all 0.2s ease;
}

.subdomain-card:hover {
  border-color: #22d3ee;
  transform: translateY(-2px);
}

.sub-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.sub-host {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  color: #22d3ee;
}

.sub-badge {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  padding: 2px 7px;
  border-radius: 99px;
  background: rgba(16, 185, 129, 0.14);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.sub-name {
  font-size: 0.92rem;
  font-weight: 700;
  color: #f8fafc;
  margin-bottom: 4px;
}

.sub-desc {
  font-size: 0.78rem;
  color: #94a3b8;
  line-height: 1.4;
}

/* Command Center / AuraFlow Builder */
.command-center-wrapper {
  background: var(--bg-glass);
  border: 1px solid rgba(34, 211, 238, 0.3);
  border-radius: var(--radius-xl);
  padding: 28px;
  box-shadow: var(--shadow-lg);
}

.cc-grid {
  display: grid;
  grid-template-columns: 330px 1fr;
  gap: 24px;
}

.workflow-selector-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.wf-item {
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.wf-item.active {
  background: rgba(6, 182, 212, 0.15);
  border-color: var(--accent-cyan-light);
}

.wf-item-top {
  display: flex;
  justify-content: space-between;
  font-size: 0.74rem;
  font-family: var(--font-mono);
  color: var(--accent-cyan-light);
  margin-bottom: 5px;
}

.wf-item h4 {
  font-size: 0.94rem;
  margin-bottom: 4px;
}

.wf-canvas {
  background: rgba(4, 8, 20, 0.92);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 22px;
}

.canvas-nodes-flow {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin: 18px 0;
}

.flow-node-box {
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 13px;
}

.flow-node-box.running {
  border-color: var(--accent-cyan-light);
  box-shadow: 0 0 18px rgba(6, 182, 212, 0.35);
}

.flow-node-box.done {
  border-color: var(--accent-emerald);
}

.step-tag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--accent-cyan-light);
  text-transform: uppercase;
}

.flow-node-box h5 {
  font-size: 0.86rem;
  margin: 4px 0;
}

.flow-node-box p {
  font-size: 0.74rem;
  color: var(--text-muted);
}

.sim-controls {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}

.sim-input {
  flex: 1;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  color: var(--text-main);
  font-family: var(--font-mono);
  font-size: 0.83rem;
}

.terminal-console {
  background: #02050d;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: var(--radius-md);
  padding: 14px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  max-height: 200px;
  overflow-y: auto;
}

.log-line {
  padding: 4px 0;
  border-bottom: 1px dashed rgba(148, 163, 184, 0.08);
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.log-ok { color: var(--accent-emerald); }
.log-ms { color: var(--accent-cyan-light); }

/* ROI & WaBot Lab */
.dual-lab-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.slider-group {
  margin-bottom: 16px;
}

.slider-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.88rem;
  margin-bottom: 6px;
  font-weight: 600;
}

.slider-val {
  font-family: var(--font-mono);
  color: var(--accent-cyan-light);
}

input[type="range"] {
  width: 100%;
  accent-color: var(--accent-cyan);
  cursor: pointer;
}

.roi-results-box {
  background: rgba(6, 182, 212, 0.08);
  border: 1px solid rgba(34, 211, 238, 0.35);
  border-radius: var(--radius-md);
  padding: 18px;
  margin-top: 16px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.roi-stat span {
  font-size: 0.74rem;
  color: var(--text-secondary);
  display: block;
}

.roi-stat strong {
  font-size: 1.35rem;
  font-family: var(--font-mono);
  color: #ffffff;
}

/* Chat Window */
.chat-messages {
  height: 260px;
  overflow-y: auto;
  background: rgba(4, 8, 20, 0.85);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 12px;
}

.chat-bubble {
  max-width: 88%;
  padding: 11px 14px;
  border-radius: 13px;
  font-size: 0.86rem;
  line-height: 1.5;
}

.chat-ai {
  background: rgba(15, 27, 52, 0.95);
  border: 1px solid rgba(34, 211, 238, 0.3);
  align-self: flex-start;
}

.chat-user {
  background: linear-gradient(135deg, #06b6d4, #2563eb);
  color: white;
  align-self: flex-end;
}

.quick-prompts {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.chip-btn {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 5px 10px;
  border-radius: 99px;
  font-size: 0.74rem;
  cursor: pointer;
}

.chip-btn:hover {
  border-color: var(--accent-cyan-light);
  color: var(--text-main);
}

/* Pricing Grid */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.price-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
}

.price-card.featured {
  border: 2px solid #22d3ee;
  box-shadow: var(--shadow-cyan);
}

.popular-ribbon {
  position: absolute;
  top: -12px;
  right: 20px;
  background: var(--gradient-brand);
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 99px;
  text-transform: uppercase;
}

.price-amount {
  font-size: 2.1rem;
  font-weight: 800;
  font-family: var(--font-mono);
  margin: 12px 0 4px;
}

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

/* Forms */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}

.form-group {
  margin-bottom: 12px;
}

.form-group label {
  display: block;
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 5px;
  font-weight: 600;
}

.form-control {
  width: 100%;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 0.88rem;
}

.form-control:focus {
  outline: none;
  border-color: var(--accent-cyan-light);
}

.lead-item {
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 13px;
  margin-bottom: 10px;
}

/* Modals */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 16, 0.84);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 20px;
}

.modal-backdrop.open {
  display: flex;
}

.modal-content {
  background: #081124;
  border: 1.5px solid var(--border-glow);
  border-radius: var(--radius-lg);
  max-width: 540px;
  width: 100%;
  padding: 26px;
}

footer {
  border-top: 1px solid var(--border-subtle);
  padding: 36px 0;
  margin-top: 30px;
  color: var(--text-muted);
  font-size: 0.86rem;
}

@media (max-width: 980px) {
  .core-nodes-grid,
  .factura-sandbox-grid,
  .cc-grid,
  .dual-lab-grid,
  .pricing-grid {
    grid-template-columns: 1fr;
  }
  .metrics-grid,
  .subdomains-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .nav-links {
    display: none;
  }
}
