/* ============================================
   TARGETLY WEBSITE - DESIGN SYSTEM
   ============================================ */

/* ===== IMPORTS ===== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=JetBrains+Mono:wght@400;600&display=swap');

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

/* ===== CSS VARIABLES (Design Tokens) ===== */
:root {
  /* Colors - ALPIC-inspired softer palette */
  --bg-primary: #0f0515;
  /* Deep purple-black */
  --bg-secondary: #1a0a28;
  /* Rich purple */
  --bg-light: #fef3f0;
  /* Soft peachy-white */
  --bg-elevated: #2d1b3d;
  /* Mid purple */

  --text-primary: #ffffff;
  --text-secondary: #e8d4f2;
  /* Light purple tint */
  --text-tertiary: #b8a8c8;
  --text-dark: #2d1b3d;
  /* Dark purple for light backgrounds */
  --text-muted: #6b5a7a;
  /* Muted purple for secondary text on light */

  --accent-purple: #a78bfa;
  /* Softer purple */
  --accent-pink: #f472b6;
  /* Bright pink */
  --accent-red: #ef4444;
  /* ALPIC-style red accent */
  --accent-teal: #2dd4bf;
  /* Teal accent */

  --border-subtle: rgba(255, 255, 255, 0.1);
  --border-light: rgba(45, 27, 61, 0.12);
  --glass-bg: rgba(255, 255, 255, 0.06);
  --glass-border: rgba(255, 255, 255, 0.12);
  --glass-light-bg: rgba(255, 255, 255, 0.75);
  --glass-light-border: rgba(45, 27, 61, 0.1);

  /* Typography */
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Courier New', monospace;

  --text-xs: 0.75rem;
  /* 12px */
  --text-sm: 0.875rem;
  /* 14px */
  --text-base: 1rem;
  /* 16px */
  --text-lg: 1.125rem;
  /* 18px */
  --text-xl: 1.25rem;
  /* 20px */
  --text-2xl: 1.5rem;
  /* 24px */
  --text-3xl: 1.875rem;
  /* 30px */
  --text-4xl: 2.25rem;
  /* 36px */
  --text-5xl: 3rem;
  /* 48px */
  --text-6xl: 3.75rem;
  /* 60px */
  --text-7xl: 4.5rem;
  /* 72px */

  /* Spacing */
  --space-1: 0.25rem;
  /* 4px */
  --space-2: 0.5rem;
  /* 8px */
  --space-3: 0.75rem;
  /* 12px */
  --space-4: 1rem;
  /* 16px */
  --space-6: 1.5rem;
  /* 24px */
  --space-8: 2rem;
  /* 32px */
  --space-12: 3rem;
  /* 48px */
  --space-16: 4rem;
  /* 64px */
  --space-24: 6rem;
  /* 96px */
  --space-32: 8rem;
  /* 128px */

  /* Layout */
  --container-max: 1200px;
  --section-padding: var(--space-16);

  /* Effects */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.5);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 20px rgba(139, 92, 246, 0.3);

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 400ms ease;
}

/* ===== BASE STYLES ===== */
html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

/* ===== TYPOGRAPHY ===== */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h1 {
  font-size: var(--text-6xl);
  font-weight: 900;
}

h2 {
  font-size: var(--text-5xl);
}

h3 {
  font-size: var(--text-3xl);
}

p {
  font-size: var(--text-lg);
  line-height: 1.7;
  color: var(--text-secondary);
}

.text-gradient {
  background: linear-gradient(135deg, var(--accent-purple) 0%, var(--accent-pink) 50%, var(--accent-red) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-glow {
  text-shadow: 0 0 30px rgba(139, 92, 246, 0.5);
}

/* ===== LAYOUT UTILITIES ===== */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-6);
}

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

.section-dark {
  background: var(--bg-primary);
}

.section-darker {
  background: var(--bg-secondary);
}

.section-light {
  background: var(--bg-light);
  color: var(--text-dark);
}

.section-light h1,
.section-light h2,
.section-light h3,
.section-light h4,
.section-light h5,
.section-light h6 {
  color: var(--text-dark);
}

.section-light p {
  color: var(--text-muted);
}

.section-light .text-secondary {
  color: var(--text-muted);
}

.section-light .card {
  background: var(--glass-light-bg);
  backdrop-filter: blur(10px);
  border: 1px solid var(--glass-light-border);
}

.section-light .card:hover {
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(27, 38, 59, 0.2);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-4) var(--space-8);
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 600;
  text-decoration: none;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all var(--transition-base);
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-pink));
  color: white;
  border: none;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 40px rgba(167, 139, 250, 0.4);
}

.section-light .btn-primary {
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-pink));
  box-shadow: 0 4px 15px rgba(167, 139, 250, 0.3);
}

.section-light .btn-primary:hover {
  box-shadow: 0 8px 25px rgba(167, 139, 250, 0.4);
}

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

.btn-secondary:hover {
  background: var(--glass-bg);
  border-color: var(--accent-purple);
}

.section-light .btn-secondary {
  color: var(--text-dark);
  border-color: var(--border-light);
}

.section-light .btn-secondary:hover {
  background: rgba(167, 139, 250, 0.1);
  border-color: var(--accent-purple);
  color: var(--accent-purple);
}

/* ===== CARDS ===== */
.card {
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  border-radius: 1rem;
  padding: var(--space-8);
  transition: all var(--transition-base);
}

.card:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}

/* ===== CODE BLOCKS ===== */
.code-block {
  background: #000000;
  border: 1px solid var(--border-subtle);
  border-radius: 0.75rem;
  padding: var(--space-6);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  overflow-x: auto;
  position: relative;
}

.code-block code {
  color: var(--text-primary);
  line-height: 1.8;
}

.terminal {
  background: linear-gradient(to bottom, #1e1e1e 0%, #0a0a0b 100%);
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: var(--shadow-xl);
}

.terminal-header {
  background: rgba(255, 255, 255, 0.05);
  padding: var(--space-3) var(--space-4);
  display: flex;
  gap: var(--space-2);
  border-bottom: 1px solid var(--border-subtle);
}

.terminal-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.terminal-dot.red {
  background: #ff5f56;
}

.terminal-dot.yellow {
  background: #ffbd2e;
}

.terminal-dot.green {
  background: #27c93f;
}

.terminal-body {
  padding: var(--space-6);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  line-height: 1.8;
}

.terminal-line {
  display: flex;
  gap: var(--space-3);
  margin-bottom: var(--space-2);
}

.terminal-prompt {
  color: var(--accent-cyan);
  user-select: none;
}

.terminal-command {
  color: var(--text-primary);
}

.terminal-output {
  color: var(--text-secondary);
  margin-left: 0;
}

.terminal-success {
  color: #10b981;
}

.terminal-url {
  color: var(--accent-purple);
  text-decoration: underline;
}

/* Light section terminal styling */
.section-light .terminal {
  background: linear-gradient(to bottom, #2d1b3d 0%, #1a0a28 100%);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.section-light .code-block {
  background: #2d1b3d;
  border-color: rgba(45, 27, 61, 0.3);
}

/* ===== NAVIGATION ===== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(15, 5, 21, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-subtle);
}

.nav-container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: var(--space-4) var(--space-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-size: var(--text-2xl);
  font-weight: 900;
  text-decoration: none;
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: flex;
  align-items: center;
}

.logo img {
  height: 40px;
  width: auto;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-8);
  list-style: none;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
  display: inline-flex;
  align-items: center;
}

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

.btn-login {
  padding: 0.75rem 1.5rem;
  background: linear-gradient(135deg, var(--accent-purple) 0%, var(--accent-pink) 100%);
  border-radius: 2rem;
  color: var(--text-primary) !important;
  font-weight: 600;
}

.btn-login:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(167, 139, 250, 0.4);
}

/* ===== HERO SECTION ===== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  overflow: hidden;
  padding-top: var(--space-24);
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(ellipse at top, rgba(139, 92, 246, 0.15), transparent 50%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 900px;
}

.hero h1 {
  margin-bottom: var(--space-6);
  animation: fadeInUp 0.8s ease;
}

.hero p {
  font-size: var(--text-xl);
  margin-bottom: var(--space-8);
  animation: fadeInUp 0.8s ease 0.2s backwards;
}

.hero-cta {
  display: flex;
  gap: var(--space-4);
  justify-content: center;
  flex-wrap: wrap;
  animation: fadeInUp 0.8s ease 0.4s backwards;
}

/* ===== GRID LAYOUTS ===== */
.grid {
  display: grid;
  gap: var(--space-8);
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

/* ===== FEATURE CARDS ===== */
.feature-icon {
  width: 48px;
  height: 48px;
  margin-bottom: var(--space-4);
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-cyan));
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-2xl);
}

.feature-title {
  font-size: var(--text-2xl);
  margin-bottom: var(--space-3);
  color: var(--text-primary);
}

.feature-description {
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease;
}

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

/* ===== FOOTER ===== */
.footer {
  background: var(--bg-secondary);
  color: var(--text-secondary);
  padding: var(--space-16) 0 var(--space-8);
  border-top: 1px solid var(--border-subtle);
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-8);
  margin-bottom: var(--space-8);
}

.footer-section h4 {
  font-size: var(--text-lg);
  margin-bottom: var(--space-4);
  color: var(--text-primary);
}

.footer-links {
  list-style: none;
}

.footer-link {
  color: var(--text-secondary);
  text-decoration: none;
  display: block;
  padding: var(--space-2) 0;
  transition: color var(--transition-fast);
}

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

.footer-bottom {
  text-align: center;
  padding-top: var(--space-8);
  border-top: 1px solid var(--border-subtle);
  color: var(--text-tertiary);
  font-size: var(--text-sm);
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
  :root {
    --text-6xl: 2.5rem;
    /* 40px */
    --text-5xl: 2rem;
    /* 32px */
    --section-padding: var(--space-12);
  }

  .hero {
    min-height: 80vh;
    padding-top: var(--space-16);
  }

  .hero h1 {
    font-size: var(--text-4xl);
  }

  .hero p {
    font-size: var(--text-base);
  }

  .hero-cta {
    flex-direction: column;
  }

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

  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }

  .nav-links {
    display: none;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 var(--space-4);
  }

  .card {
    padding: var(--space-6);
  }
}