/* ==========================================================================
   main.css - Design System Tokens, Resets, and Global Layout
   Product: 𝕏 (Twitter) Auto Reply & Post Creator No API
   ========================================================================== */

:root {
  /* Color Palette */
  --bg-primary: #090a0f;
  --bg-secondary: #0e1017;
  --bg-card: #131622;
  --bg-card-hover: #181c2b;
  --bg-card-elevated: #1a1e2f;
  --bg-glass: rgba(14, 16, 23, 0.75);

  /* Brand & Accents */
  --accent-purple: #be8ef2;
  --accent-purple-light: #d6b5fa;
  --accent-purple-dark: #9a5cd6;
  --accent-glow: rgba(190, 142, 242, 0.18);
  --accent-glow-strong: rgba(190, 142, 242, 0.35);

  --twitter-blue: #1d9bf0;
  --twitter-blue-glow: rgba(29, 155, 240, 0.2);

  --color-success: #10b981;
  --color-success-glow: rgba(16, 185, 129, 0.18);
  --color-warning: #f59e0b;

  /* Typography Colors */
  --text-primary: #f3f5f9;
  --text-secondary: #9aa1b3;
  --text-tertiary: #687082;
  --text-inverse: #090a0f;

  /* Borders & Dividers */
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-medium: rgba(255, 255, 255, 0.14);
  --border-focus: rgba(190, 142, 242, 0.6);
  --border-accent: rgba(190, 142, 242, 0.3);

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.6);
  --shadow-purple: 0 8px 32px rgba(190, 142, 242, 0.2);
  --shadow-glow: 0 0 40px rgba(190, 142, 242, 0.15);

  /* Radii */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Fonts */
  --font-heading: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  /* Layout */
  --max-width: 1200px;
  --nav-height: 72px;

  /* Transitions */
  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-height) + 24px);
  color-scheme: dark;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
}

/* Background Ambient Glow Gradients */
body::before {
  content: '';
  position: fixed;
  top: -10vw;
  left: 50%;
  transform: translateX(-50%);
  width: 90vw;
  max-width: 1100px;
  height: 550px;
  background: radial-gradient(circle, rgba(190, 142, 242, 0.12) 0%, rgba(29, 155, 240, 0.05) 45%, transparent 70%);
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
}

body::after {
  content: '';
  position: fixed;
  bottom: 5%;
  right: -5%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(190, 142, 242, 0.06) 0%, transparent 65%);
  filter: blur(100px);
  pointer-events: none;
  z-index: 0;
}

/* Typography Defaults */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--text-primary);
  line-height: 1.2;
  letter-spacing: -0.02em;
  font-weight: 700;
}

p {
  color: var(--text-secondary);
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

img, svg {
  display: block;
  max-width: 100%;
}

button, input, select, textarea {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
}

button {
  cursor: pointer;
}

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

.section {
  padding: 100px 0;
  position: relative;
}

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

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(190, 142, 242, 0.1);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-purple);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 18px;
}

.section-tag svg, .section-tag span.icon {
  font-size: 14px;
}

.section-title {
  font-size: clamp(2rem, 3.5vw, 2.75rem);
  margin-bottom: 16px;
  letter-spacing: -0.025em;
}

.section-title .text-gradient {
  background: linear-gradient(135deg, #ffffff 30%, var(--accent-purple) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.section-subtitle {
  font-size: 1.125rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Common Components & Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 24px;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.9375rem;
  transition: all var(--transition-fast);
  white-space: nowrap;
  user-select: none;
  text-decoration: none;
}

.btn:focus-visible {
  outline: 2px solid var(--accent-purple);
  outline-offset: 3px;
}

.btn-primary {
  background: linear-gradient(135deg, #1d9bf0 0%, #be8ef2 100%);
  color: #ffffff;
  box-shadow: 0 4px 18px rgba(190, 142, 242, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 26px rgba(190, 142, 242, 0.42);
  filter: brightness(1.06);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-medium);
  color: var(--text-primary);
  backdrop-filter: blur(8px);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--border-focus);
  color: #ffffff;
  transform: translateY(-1px);
}

.btn-lg {
  padding: 15px 32px;
  font-size: 1.05rem;
}

.btn-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* Screen reader only */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Selection */
::selection {
  background: var(--accent-purple);
  color: var(--bg-primary);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.18);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-purple);
}
