/* ============================================
   Take Action Challenge — Design System
   Apple-tier dark mode, glassmorphism, premium
   ============================================ */

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Display',
    'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}

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

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

ul, ol {
  list-style: none;
}

/* --- Design Tokens (CSS Custom Properties) --- */
:root {
  /* Colors — Dark Mode Palette */
  --bg-primary: #0A0E1A;
  --bg-secondary: #000000;
  --bg-gradient: linear-gradient(180deg, #0A0E1A 0%, #000000 100%);

  --accent: #389AF4;
  --accent-hover: #5AAFFF;
  --accent-glow: rgba(56, 154, 244, 0.4);
  --accent-subtle: rgba(56, 154, 244, 0.12);

  --text-primary: #FFFFFF;
  --text-secondary: #8B95A5;
  --text-muted: #5A6374;

  --surface: rgba(255, 255, 255, 0.06);
  --surface-hover: rgba(255, 255, 255, 0.10);
  --surface-border: rgba(255, 255, 255, 0.08);

  --success: #34D399;
  --success-glow: rgba(52, 211, 153, 0.3);
  --error: #F87171;
  --error-muted: rgba(248, 113, 113, 0.15);

  /* Typography Scale */
  --font-display: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Display', sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Text', sans-serif;
  --font-mono: 'SF Mono', 'Fira Code', 'Consolas', monospace;

  --text-hero: clamp(2.5rem, 8vw, 4.5rem);
  --text-h2: clamp(1.75rem, 5vw, 2.75rem);
  --text-h3: clamp(1.25rem, 3vw, 1.75rem);
  --text-body-lg: clamp(1.05rem, 2.5vw, 1.25rem);
  --text-body: 1rem;
  --text-sm: 0.875rem;
  --text-xs: 0.75rem;

  --weight-regular: 400;
  --weight-medium: 500;
  --weight-semibold: 600;
  --weight-bold: 700;
  --weight-extrabold: 800;

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 6rem;
  --space-5xl: 8rem;

  /* Layout */
  --max-width: 1120px;
  --content-padding: 1.25rem;

  /* Radii */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-pill: 28px;
  --radius-full: 9999px;

  /* Glassmorphism */
  --glass-bg: rgba(255, 255, 255, 0.06);
  --glass-border: 1px solid rgba(255, 255, 255, 0.08);
  --glass-blur: blur(20px);
  --glass-blur-heavy: blur(40px);

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 30px var(--accent-glow);

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-spring: 500ms cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Z-index scale */
  --z-base: 1;
  --z-sticky: 100;
  --z-overlay: 200;
  --z-modal: 300;
}

/* --- Responsive Overrides --- */
@media (min-width: 768px) {
  :root {
    --content-padding: 2rem;
  }
}

@media (min-width: 1024px) {
  :root {
    --content-padding: 2.5rem;
  }
}

/* --- Utility Classes --- */

/* Container */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--content-padding);
}

/* Glass Card */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: var(--glass-border);
  border-radius: var(--radius-lg);
}

/* Text Utilities */
.text-accent { color: var(--accent); }
.text-secondary { color: var(--text-secondary); }
.text-muted { color: var(--text-muted); }
.text-success { color: var(--success); }
.text-error { color: var(--error); }
.text-center { text-align: center; }

/* Spacing Utilities */
.section-padding {
  padding: var(--space-4xl) 0;
}

@media (max-width: 767px) {
  .section-padding {
    padding: var(--space-3xl) 0;
  }
}

/* --- Button System --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  font-family: var(--font-display);
  font-weight: var(--weight-semibold);
  font-size: var(--text-body);
  line-height: 1;
  border-radius: var(--radius-pill);
  padding: 1rem 2rem;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: var(--text-primary);
  box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
  background: var(--accent-hover);
  box-shadow: 0 0 40px var(--accent-glow), 0 0 80px rgba(56, 154, 244, 0.2);
  transform: translateY(-2px);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: var(--shadow-glow);
}

.btn-full {
  width: 100%;
}

.btn-lg {
  padding: 1.125rem 2.5rem;
  font-size: var(--text-body-lg);
}

/* Arrow icon inside CTA */
.btn .arrow {
  display: inline-block;
  transition: transform var(--transition-fast);
}
.btn:hover .arrow {
  transform: translateX(4px);
}

/* --- Section Divider --- */
.section-divider {
  width: 60px;
  height: 3px;
  background: var(--accent);
  border-radius: var(--radius-full);
  margin: 0 auto var(--space-lg);
}

/* --- Inter Font Face (self-hosted) --- */
/* If using self-hosted Inter, uncomment and adjust paths:
@font-face {
  font-family: 'Inter';
  src: url('../assets/fonts/Inter-Variable.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
  font-style: normal;
}
*/

/* Fallback: Load Inter from Google Fonts via <link> in HTML */

/* --- Scrollbar Styling (Webkit) --- */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--surface-hover);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

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