/* ============================================
   DeltaOptimizer Pro - Shared Design System
   Tech Minimalist · Dark · Refined
   ============================================ */

/* --- Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Sora:wght@300;400;600;700;800&family=Hanken+Grotesk:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

/* --- Reset --- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }

/* --- Design Tokens --- */
:root {
  /* Backgrounds */
  --bg-base: #08080b;
  --bg-surface: #0e0e14;
  --bg-elevated: #14141c;
  --bg-card: #111119;
  --bg-hover: #1a1a24;

  /* Accent */
  --accent: #00d4ff;
  --accent-bright: #22e0ff;
  --accent-dim: #0099bb;
  --accent-glow: rgba(0, 212, 255, 0.15);
  --accent-subtle: rgba(0, 212, 255, 0.06);

  /* Text */
  --text-primary: #f0f0f5;
  --text-secondary: #9a9aae;
  --text-tertiary: #5a5a6e;
  --text-muted: #3a3a4a;

  /* Borders */
  --border: rgba(255, 255, 255, 0.06);
  --border-hover: rgba(0, 212, 255, 0.25);
  --border-accent: rgba(0, 212, 255, 0.3);

  /* Gradients */
  --grad-accent: linear-gradient(135deg, #00d4ff 0%, #0066ff 100%);
  --grad-text: linear-gradient(180deg, #ffffff 0%, #9a9aae 100%);
  --grad-surface: linear-gradient(180deg, var(--bg-elevated) 0%, var(--bg-surface) 100%);

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 40px rgba(0, 212, 255, 0.1);

  /* Spacing */
  --nav-height: 64px;
  --max-width: 1200px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;

  /* Transitions */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out: cubic-bezier(0, 0, 0.2, 1);
}

/* --- Base --- */
body {
  font-family: 'Hanken Grotesk', sans-serif;
  background: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

/* Ambient background */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 800px 600px at 15% 5%, rgba(0, 212, 255, 0.05) 0%, transparent 60%),
    radial-gradient(ellipse 600px 400px at 85% 95%, rgba(0, 100, 255, 0.04) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: 0;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 30%, black 20%, transparent 80%);
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }

/* --- Typography --- */
h1, h2, h3, h4 {
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.font-display { font-family: 'Sora', sans-serif; }
.font-mono { font-family: 'JetBrains Mono', monospace; }

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

.text-accent { color: var(--accent); }
.text-secondary { color: var(--text-secondary); }
.text-tertiary { color: var(--text-tertiary); }

/* --- Layout --- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

.section { padding: 100px 0; position: relative; z-index: 1; }
.section-sm { padding: 60px 0; }

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}

.section-label::before {
  content: '';
  width: 24px;
  height: 1px;
  background: var(--accent);
}

.section-title {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 700;
  margin-bottom: 16px;
  letter-spacing: -0.03em;
}

.section-subtitle {
  font-size: 17px;
  color: var(--text-secondary);
  max-width: 580px;
  line-height: 1.7;
}

/* --- Navbar --- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: rgba(8, 8, 11, 0.7);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  transition: background 0.3s var(--ease);
}

.navbar.scrolled {
  background: rgba(8, 8, 11, 0.9);
}

.nav-content {
  max-width: var(--max-width);
  height: 100%;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.01em;
  transition: opacity 0.2s;
}

.nav-logo:hover { opacity: 0.85; }

.nav-logo-icon {
  width: 32px;
  height: 32px;
  background: var(--grad-accent);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 15px;
  color: #000;
  box-shadow: 0 0 20px var(--accent-glow);
}

.nav-logo-icon img {
  width: 100%;
  height: 100%;
}

.nav-logo span { color: var(--accent); }

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

.nav-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.2s;
  position: relative;
}

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

.nav-link.active {
  color: var(--text-primary);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -22px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent);
  border-radius: 1px;
}

.nav-cta {
  background: var(--accent);
  color: #000;
  padding: 8px 20px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  transition: all 0.2s var(--ease);
}

.nav-cta:hover {
  background: var(--accent-bright);
  box-shadow: 0 4px 20px var(--accent-glow);
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
}

.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 1px;
  transition: all 0.3s var(--ease);
}

.nav-toggle.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  transition: all 0.25s var(--ease);
  cursor: pointer;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: #000;
}

.btn-primary:hover {
  background: var(--accent-bright);
  box-shadow: 0 8px 30px var(--accent-glow);
  transform: translateY(-2px);
}

.btn-ghost {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  border-color: var(--border-hover);
  background: var(--accent-subtle);
}

.btn-lg { padding: 16px 36px; font-size: 16px; }

/* --- Cards --- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 28px;
  transition: all 0.3s var(--ease);
}

.card:hover {
  border-color: var(--border-hover);
  background: var(--bg-hover);
  transform: translateY(-4px);
}

/* --- Badge --- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 20px;
  letter-spacing: 0.05em;
}

.badge-accent {
  background: var(--accent-subtle);
  color: var(--accent);
  border: 1px solid var(--border-accent);
}

.badge-green {
  background: rgba(50, 200, 100, 0.1);
  color: #32c864;
  border: 1px solid rgba(50, 200, 100, 0.2);
}

/* --- Footer --- */
.footer {
  border-top: 1px solid var(--border);
  padding: 60px 0 30px;
  position: relative;
  z-index: 1;
}

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

.footer-brand p {
  color: var(--text-tertiary);
  font-size: 14px;
  line-height: 1.7;
  margin-top: 12px;
  max-width: 280px;
}

.footer-col h4 {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin-bottom: 16px;
}

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

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

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--text-muted);
}

.footer-bottom a { color: var(--text-tertiary); transition: color 0.2s; }
.footer-bottom a:hover { color: var(--accent); }

/* --- Animations --- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}

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

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }

/* --- Responsive --- */
@media (max-width: 900px) {
  .footer-content { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--bg-surface);
    flex-direction: column;
    align-items: flex-start;
    padding: 24px;
    gap: 16px;
    border-bottom: 1px solid var(--border);
    transform: translateY(-120%);
    transition: transform 0.3s var(--ease);
  }

  .nav-links.open { transform: translateY(0); }
  .nav-toggle { display: flex; }
  .section { padding: 60px 0; }
  .footer-content { grid-template-columns: 1fr; gap: 24px; }
  .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }
}