/* Base CSS - Shared design tokens and utilities */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Light Mode Colors */
  --color-background: hsl(0, 0%, 100%);
  --color-foreground: hsl(0, 0%, 9%);
  --color-border: hsl(0, 0%, 9%);
  --color-card: hsl(0, 0%, 98%);
  --color-card-border: hsl(0, 0%, 9%);
  --color-primary: hsl(0, 0%, 9%);
  --color-primary-foreground: hsl(0, 0%, 98%);
  --color-accent: hsl(0, 0%, 9%);
  --color-accent-foreground: hsl(0, 0%, 98%);
  --color-muted: hsl(0, 0%, 96%);
  --color-muted-foreground: hsl(0, 0%, 45%);
  --color-input: hsl(0, 0%, 60%);
  
  /* Typography */
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  
  /* Spacing */
  --spacing-xs: 0.5rem;
  --spacing-sm: 0.75rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-2xl: 3rem;
  --spacing-3xl: 4rem;
  --spacing-4xl: 5rem;
  
  /* Border Radius */
  --radius-sm: 0.1875rem;
  --radius-md: 0.375rem;
  --radius-lg: 0.5625rem;
  --radius-full: 9999px;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.dark {
  /* Dark Mode Colors */
  --color-background: hsl(0, 0%, 9%);
  --color-foreground: hsl(0, 0%, 98%);
  --color-border: hsl(0, 0%, 100%);
  --color-card: hsl(0, 0%, 12%);
  --color-card-border: hsl(0, 0%, 100%);
  --color-primary: hsl(0, 0%, 98%);
  --color-primary-foreground: hsl(0, 0%, 9%);
  --color-accent: hsl(0, 0%, 100%);
  --color-accent-foreground: hsl(0, 0%, 9%);
  --color-muted: hsl(0, 0%, 15%);
  --color-muted-foreground: hsl(0, 0%, 65%);
  --color-input: hsl(0, 0%, 40%);
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -1px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -2px rgba(0, 0, 0, 0.4);
}

html {
  overflow-x: hidden;
  max-width: 100vw;
  background-color: var(--color-background);
  transition: background-color 0.3s ease;
}

body {
  font-family: var(--font-sans);
  background-color: var(--color-background);
  color: var(--color-foreground);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.3s, color 0.3s;
  overflow-x: hidden;
  max-width: 100vw;
}

/* Sections */
section {
  background-color: var(--color-background);
  position: relative;
}

/* Container */
.container {
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 3rem;
}

@media (max-width: 768px) {
  .container {
    padding: 0 1.5rem;
  }
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.2;
}

h1 { font-size: 3rem; }
h2 { font-size: 2.25rem; }
h3 { font-size: 1.875rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1.125rem; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.625rem 2rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 50px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  position: relative;
  overflow: hidden;
  background: rgba(30, 64, 175, 0.2);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  color: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(96, 165, 250, 0.3);
  box-shadow: 
    0 0 20px rgba(59, 130, 246, 0.2),
    inset 0 1px 1px rgba(147, 197, 253, 0.2);
}

.btn-primary:hover {
  background: rgba(30, 64, 175, 0.3);
  border-color: rgba(96, 165, 250, 0.5);
  box-shadow: 
    0 0 30px rgba(59, 130, 246, 0.4),
    inset 0 1px 1px rgba(147, 197, 253, 0.3);
}

.btn-text {
  display: inline-block;
  transition: opacity 0.3s ease;
}

.btn-primary .btn-arrow {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  opacity: 0;
  font-size: 1.5rem;
  transition: opacity 0.3s ease;
}

.btn-primary:hover .btn-text {
  opacity: 0;
}

.btn-primary:hover .btn-arrow {
  opacity: 1;
}

.btn-outline {
  background-color: transparent;
  color: var(--color-foreground);
  border-color: var(--color-border);
}

.btn-outline:hover {
  background-color: var(--color-muted);
}

.btn-lg {
  padding: 0.875rem 2rem;
  font-size: 1rem;
}

/* Cards */
.card {
  background-color: var(--color-card);
  border: 0.5px solid var(--color-card-border);
  border-radius: var(--radius-lg);
  padding: var(--spacing-xl);
  transition: all 0.3s;
  position: relative;
}

.card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  padding: 0.5px;
  background: linear-gradient(
    var(--gradient-angle, 0deg),
    transparent 0%,
    var(--color-accent) 50%,
    transparent 100%
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}

.card:hover::before {
  opacity: 1;
}

.card:hover {
  box-shadow: var(--shadow-md);
}

/* Input Fields */
.input,
.textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background-color: var(--color-background);
  color: var(--color-foreground);
  font-family: inherit;
  transition: border-color 0.2s;
}

.input:focus,
.textarea:focus {
  outline: none;
  border-color: var(--color-input);
}

.textarea {
  resize: vertical;
  min-height: 120px;
}

.label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--color-foreground);
}

/* Utility Classes */
.text-muted {
  color: var(--color-muted-foreground);
}

.text-center {
  text-align: center;
}

.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mb-12 { margin-bottom: 3rem; }

.mt-20 { margin-top: 5rem; }

.py-8 { padding-top: 2rem; padding-bottom: 2rem; }
.py-12 { padding-top: 3rem; padding-bottom: 3rem; }
.py-20 { padding-top: 5rem; padding-bottom: 5rem; }

.border-t {
  border-top: 1px solid var(--color-border);
}

.border-b {
  border-bottom: 1px solid var(--color-border);
}

/* Theme Toggle */
.theme-toggle {
  position: relative;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50px;
  background-color: var(--color-muted);
  border: 1px solid var(--color-border);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  flex-shrink: 0;
}

.theme-toggle:hover {
  background-color: var(--color-card);
}

.theme-toggle svg {
  width: 1.125rem;
  height: 1.125rem;
  color: var(--color-foreground);
}

/* Page Transition Animations */
.page-wrapper {
  position: relative;
  overflow: hidden;
}

.page-transition {
  animation-duration: 0.3s;
  animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  animation-fill-mode: both;
}

.slide-out-left {
  animation-name: slideOutLeft;
}

.slide-in-right {
  animation-name: slideInRight;
}

.slide-out-right {
  animation-name: slideOutRight;
}

.slide-in-left {
  animation-name: slideInLeft;
}

@keyframes slideOutLeft {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(-30%);
    opacity: 0;
  }
}

@keyframes slideInRight {
  from {
    transform: translateX(30%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOutRight {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(30%);
    opacity: 0;
  }
}

@keyframes slideInLeft {
  from {
    transform: translateX(-30%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Responsive */
@media (max-width: 768px) {
  h1 { font-size: 2.25rem; }
  h2 { font-size: 1.875rem; }
  h3 { font-size: 1.5rem; }
}
