:root {
  --bg-main: #080c14;
  --bg-card: rgba(16, 22, 36, 0.85);
  --bg-card-hover: rgba(24, 32, 52, 0.95);
  --bg-input: rgba(12, 17, 28, 0.9);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-focus: #6366f1;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --cyan: #06b6d4;
  --emerald: #10b981;
  --amber: #f59e0b;
  --rose: #f43f5e;
  --indigo-glow: rgba(99, 102, 241, 0.35);
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --shadow-card: 0 16px 36px -12px rgba(0, 0, 0, 0.6), 0 0 1px 1px rgba(255, 255, 255, 0.06);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-main);
  background-image: 
    radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.15) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(6, 182, 212, 0.1) 0px, transparent 50%);
  background-attachment: fixed;
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.font-mono {
  font-family: var(--font-mono);
}

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

/* Header & Navigation */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(8, 12, 20, 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 16px 0;
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-main);
}

.brand-badge {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--primary), var(--cyan));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 4px 16px var(--indigo-glow);
}

.brand-badge.small {
  width: 32px;
  height: 32px;
}

.brand-name {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.nav-links {
  display: flex;
  gap: 28px;
}

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.2s ease;
}

.nav-link:hover {
  color: var(--text-main);
}

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

.mobile-toggle {
  display: none;
  background: transparent;
  border: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 6px;
}

.mobile-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-main);
  transition: all 0.3s;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
}

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

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

.btn-primary {
  background: linear-gradient(135deg, var(--primary), #4f46e5);
  color: #fff;
  box-shadow: 0 4px 14px var(--indigo-glow);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px var(--indigo-glow);
}

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

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
}

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

/* Typography & Hero */
.hero-section {
  padding: 80px 0 100px;
}

.hero-container {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 60px;
  align-items: center;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: 9999px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #a5b4fc;
  margin-bottom: 24px;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background: var(--emerald);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--emerald);
}

.hero-title {
  font-size: 3.25rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
}

.gradient-text {
  background: linear-gradient(135deg, #818cf8, #38bdf8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-description {
  font-size: 1.15rem;
  color: var(--text-muted);
  margin-bottom: 32px;
  max-width: 580px;
}

.hero-cta-group {
  display: flex;
  gap: 16px;
  margin-bottom: 48px;
}

.hero-stats {
  display: flex;
  gap: 40px;
  border-top: 1px solid var(--border-subtle);
  padding-top: 24px;
}

.hero-stat-item strong {
  display: block;
  font-size: 1.25rem;
  color: var(--text-main);
}

.hero-stat-item span {
  font-size: 0.82rem;
  color: var(--text-dim);
}

/* Interactive Simulator Terminal */
.terminal-card {
  background: rgba(14, 19, 32, 0.95);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.terminal-header {
  background: rgba(8, 12, 20, 0.8);
  padding: 12px 18px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--border-subtle);
}

.terminal-controls {
  display: flex;
  gap: 6px;
  margin-right: 14px;
}

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

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

.terminal-title {
  font-size: 0.8rem;
  color: var(--text-muted);
  flex: 1;
}

.terminal-badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(16, 185, 129, 0.2);
  color: var(--emerald);
}

.scale-display-panel {
  padding: 28px 24px 20px;
  text-align: center;
  background: rgba(8, 12, 22, 0.6);
  border-bottom: 1px solid var(--border-subtle);
}

.scale-metric-label {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  margin-bottom: 8px;
}

.scale-metric-value {
  font-size: 2.85rem;
  font-weight: 700;
  color: #38bdf8;
  letter-spacing: -0.02em;
}

.scale-metric-value .unit {
  font-size: 1.25rem;
  color: var(--text-muted);
}

.scale-status-row {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 14px;
}

.status-indicator {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-dim);
}

.status-indicator.active {
  background: rgba(16, 185, 129, 0.15);
  color: var(--emerald);
}

.terminal-slider-group {
  padding: 18px 24px;
  background: rgba(14, 20, 34, 0.8);
  border-bottom: 1px solid var(--border-subtle);
}

.slider-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  margin-bottom: 8px;
}

.weight-slider {
  width: 100%;
  accent-color: var(--primary);
  cursor: pointer;
}

.terminal-log-box {
  padding: 16px 20px;
  font-size: 0.76rem;
  height: 120px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.log-line {
  white-space: nowrap;
}

/* Sections */
.section {
  padding: 100px 0;
}

.bg-card-section {
  background: rgba(12, 16, 26, 0.6);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

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

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

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

.section-title {
  font-size: 2.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.section-subtitle {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 640px;
  margin: 0 auto;
}

/* Features Grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 28px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 32px 28px;
  box-shadow: var(--shadow-card);
  transition: all 0.25s ease;
}

.feature-card:hover {
  background: var(--bg-card-hover);
  transform: translateY(-4px);
  border-color: rgba(99, 102, 241, 0.3);
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.icon-indigo { background: rgba(99, 102, 241, 0.15); color: #818cf8; }
.icon-cyan { background: rgba(6, 182, 212, 0.15); color: #38bdf8; }
.icon-emerald { background: rgba(16, 185, 129, 0.15); color: #34d399; }
.icon-amber { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }
.icon-purple { background: rgba(168, 85, 247, 0.15); color: #c084fc; }
.icon-rose { background: rgba(244, 63, 94, 0.15); color: #fb7185; }

.feature-card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.feature-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Steps Grid */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}

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

.step-number {
  font-size: 2rem;
  font-weight: 800;
  color: rgba(99, 102, 241, 0.4);
  margin-bottom: 14px;
}

.step-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.step-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* App Spotlight */
.app-spotlight-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 60px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  box-shadow: var(--shadow-card);
}

.app-spotlight-text h2 {
  font-size: 2.25rem;
  font-weight: 800;
  margin-bottom: 16px;
}

.app-spotlight-text p {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-bottom: 24px;
}

.app-spec-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 32px;
}

.app-spec-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
}

.spec-check {
  color: var(--emerald);
  font-weight: 700;
}

.app-btn-row {
  display: flex;
  gap: 16px;
}

/* Mockup Frame */
.mockup-frame {
  background: #090e18;
  border: 1px solid var(--border-subtle);
  border-radius: 28px;
  padding: 16px;
  box-shadow: 0 20px 50px -15px rgba(0, 0, 0, 0.7);
}

.mockup-top-bar {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-dim);
  padding: 4px 12px 12px;
}

.mockup-app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  background: rgba(18, 24, 40, 0.8);
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
}

.mockup-app-header h3 {
  font-size: 0.95rem;
  font-weight: 600;
}

.badge-active {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(16, 185, 129, 0.2);
  color: var(--emerald);
}

.mockup-weight-box {
  background: rgba(8, 12, 20, 0.9);
  padding: 24px;
  border-radius: var(--radius-md);
  text-align: center;
  font-size: 2rem;
  font-weight: 700;
  color: #38bdf8;
  margin-bottom: 16px;
}

.mockup-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 16px;
}

.mockup-tile {
  background: rgba(255, 255, 255, 0.04);
  padding: 10px;
  border-radius: var(--radius-sm);
  font-size: 0.72rem;
  text-align: center;
  color: var(--text-dim);
}

.mockup-tile.active {
  background: rgba(99, 102, 241, 0.15);
  color: #a5b4fc;
}

.mockup-sub-box {
  background: rgba(255, 255, 255, 0.02);
  padding: 10px 12px;
  border-radius: var(--radius-sm);
}

/* Documentation Cards */
.doc-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 32px;
}

.code-block {
  background: rgba(8, 12, 20, 0.9);
  padding: 20px;
  border-radius: var(--radius-sm);
  margin-top: 14px;
  font-size: 0.85rem;
  border: 1px solid var(--border-subtle);
}

.code-comment { color: var(--text-dim); }

.specs-table-wrapper {
  overflow-x: auto;
  margin-top: 16px;
}

.specs-table {
  width: 100%;
  border-collapse: collapse;
}

.specs-table th, .specs-table td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.9rem;
}

.specs-table th {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-muted);
}

/* Security Pillars */
.security-pillars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.sec-pillar {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 32px 24px;
}

.sec-pillar-icon {
  font-size: 2rem;
  margin-bottom: 16px;
}

.sec-pillar h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.sec-pillar p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Contact */
.contact-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 60px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
}

.contact-info h2 {
  font-size: 2.25rem;
  font-weight: 800;
  margin-bottom: 16px;
}

.contact-info p {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-bottom: 32px;
}

.contact-meta {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 16px;
}

.contact-icon {
  font-size: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}

.form-input {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.95rem;
  transition: border-color 0.2s;
}

.form-input:focus {
  outline: none;
  border-color: var(--border-focus);
}

.feedback-msg {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
}

.feedback-msg.success {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
}

.feedback-msg.hidden { display: none; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--border-subtle);
  padding: 60px 0;
  background: #060910;
}

.footer-container {
  display: flex;
  justify-content: space-between;
  gap: 40px;
}

.footer-tagline {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 12px;
  max-width: 320px;
}

.footer-copy {
  color: var(--text-dim);
  font-size: 0.8rem;
  margin-top: 24px;
}

.footer-nav {
  display: flex;
  gap: 60px;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col strong {
  font-size: 0.85rem;
  color: var(--text-main);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

.footer-col a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.88rem;
  transition: color 0.2s;
}

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

/* Utilities */
.text-cyan { color: var(--cyan); }
.text-emerald { color: var(--emerald); }
.text-muted { color: var(--text-muted); }
.text-indigo { color: #818cf8; }
.link-cyan { color: var(--cyan); text-decoration: none; }
.link-cyan:hover { text-decoration: underline; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 20px; }

/* Responsive */
@media (max-width: 992px) {
  .hero-container, .app-spotlight-card, .contact-card {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .hero-title { font-size: 2.65rem; }
  .footer-container { flex-direction: column; }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .mobile-toggle { display: flex; }
  .nav-links.active {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: rgba(8, 12, 20, 0.98);
    padding: 24px;
    border-bottom: 1px solid var(--border-subtle);
  }
  .hero-cta-group { flex-direction: column; }
}
