/* =============================================
   DEFINITAI — BASE STYLES & DESIGN SYSTEM
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;500;600;700;800&family=DM+Mono:wght@300;400;500&family=Instrument+Sans:wght@400;500;600&display=swap');

/* --- CSS Variables --- */
:root {
  /* Colors */
  --bg-primary:     #0b0d18;
  --bg-secondary:   #131526;
  --bg-card:        #191b31;
  --bg-card-hover:  #20223d;

  --border-subtle:  rgba(255,255,255,0.06);
  --border-glow:    rgba(99,102,241,0.35);

  --accent-violet:  #6366f1;
  --accent-cyan:    #22d3ee;
  --accent-green:   #4ade80;
  --accent-amber:   #fbbf24;

  --glow-violet:    rgba(99,102,241,0.15);
  --glow-cyan:      rgba(34,211,238,0.12);

  --text-primary:   #f1f0ff;
  --text-secondary: #9896b8;
  --text-muted:     #5a5878;

  /* Typography */
  --font-display:   'Syne', sans-serif;
  --font-body:      'Instrument Sans', sans-serif;
  --font-mono:      'DM Mono', monospace;

  /* Spacing */
  --section-pad:    120px;
  --card-radius:    16px;
  --max-width:      1200px;

  /* Transitions */
  --transition:     all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

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

/* --- Background Grid --- */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(99,102,241,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(99,102,241,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: 0;
}

/* --- Noise Texture Overlay --- */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
  opacity: 0.4;
  pointer-events: none;
  z-index: 0;
}

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

/* --- Section Base --- */
section {
  padding: var(--section-pad) 0;
  position: relative;
}

/* --- Typography Scale --- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.display-xl {
  font-size: clamp(48px, 6vw, 88px);
  font-weight: 800;
  line-height: 1.0;
}

.display-lg {
  font-size: clamp(36px, 4vw, 60px);
  font-weight: 700;
}

.display-md {
  font-size: clamp(28px, 3vw, 44px);
  font-weight: 700;
}

.display-sm {
  font-size: clamp(20px, 2vw, 28px);
  font-weight: 600;
}

.body-lg {
  font-size: 18px;
  line-height: 1.7;
  color: var(--text-secondary);
}

.body-md {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-secondary);
}

.mono {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.05em;
}

/* --- Gradient Text --- */
.gradient-text {
  background: linear-gradient(135deg, var(--accent-violet), var(--accent-cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.gradient-text-warm {
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-green));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 10px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  border: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent-violet);
  color: white;
  box-shadow: 0 0 24px rgba(99,102,241,0.4);
}

.btn-primary:hover {
  background: #7274f3;
  box-shadow: 0 0 40px rgba(99,102,241,0.6);
  transform: translateY(-1px);
}

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

.btn-secondary:hover {
  border-color: var(--border-glow);
  background: var(--glow-violet);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--accent-cyan);
  padding: 10px 0;
  font-size: 14px;
}

.btn-ghost:hover {
  gap: 12px;
}

.btn-ghost .arrow {
  transition: transform 0.2s ease;
}

.btn-ghost:hover .arrow {
  transform: translateX(4px);
}

/* --- Cards --- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--card-radius);
  padding: 28px;
  transition: var(--transition);
}

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

/* --- Section Labels --- */
.section-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-violet);
  margin-bottom: 20px;
}

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

/* --- Divider --- */
.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-subtle), transparent);
  margin: 0;
}

/* --- Glow Orbs --- */
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
}

.orb-violet {
  background: rgba(99,102,241,0.12);
}

.orb-cyan {
  background: rgba(34,211,238,0.08);
}

/* --- Scroll Reveal --- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.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; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* --- Tag / Badge --- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 100px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tag-violet {
  background: rgba(99,102,241,0.12);
  color: var(--accent-violet);
  border: 1px solid rgba(99,102,241,0.2);
}

.tag-cyan {
  background: rgba(34,211,238,0.08);
  color: var(--accent-cyan);
  border: 1px solid rgba(34,211,238,0.15);
}

.tag-green {
  background: rgba(74,222,128,0.08);
  color: var(--accent-green);
  border: 1px solid rgba(74,222,128,0.15);
}

/* --- Responsive --- */
@media (max-width: 1024px) {
  .container { padding: 0 28px; }
  :root { --section-pad: 80px; }
}

@media (max-width: 768px) {
  .container { padding: 0 20px; }
  :root { --section-pad: 64px; }
  .btn { padding: 12px 22px; font-size: 14px; }
}
