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

/* Modern CSS Variables */
:root {
  --primary: #c42424;
  --primary-light: #ff6b6b;
  --primary-dark: #a01f1f;
  --secondary: #4f46e5;
  --accent: #06b6d4;
  --success: #10b981;
  --warning: #f59e0b;
  --error: #ef4444;
  
  --dark: #0f172a;
  --dark-light: #1e293b;
  --light: #ffffff;
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1e293b;
  --gray-900: #0f172a;
  
  --max-width: 1200px;
  --border-radius: 16px;
  --border-radius-sm: 8px;
  --border-radius-lg: 24px;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-md: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);
  --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);
  
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  :root {
    --light: #ffffff;
    --dark: #0f172a;
    --gray-50: #1e293b;
    --gray-100: #334155;
    --gray-200: #475569;
    --gray-300: #64748b;
    --gray-400: #94a3b8;
    --gray-500: #cbd5e1;
    --gray-600: #e2e8f0;
    --gray-700: #f1f5f9;
    --gray-800: #f8fafc;
    --gray-900: #0f172a;
    
    /* Dark mode specific adjustments */
    --shadow-sm: 0 1px 2px 0 rgb(255 255 255 / 0.05);
    --shadow: 0 4px 6px -1px rgb(255 255 255 / 0.1), 0 2px 4px -2px rgb(255 255 255 / 0.1);
    --shadow-md: 0 10px 15px -3px rgb(255 255 255 / 0.1), 0 4px 6px -4px rgb(255 255 255 / 0.1);
    --shadow-lg: 0 20px 25px -5px rgb(255 255 255 / 0.1), 0 8px 10px -6px rgb(255 255 255 / 0.1);
    --shadow-xl: 0 25px 50px -12px rgb(255 255 255 / 0.25);
    --shadow-2xl: 0 25px 50px -12px rgb(255 255 255 / 0.25);
  }
  
  /* Dark mode specific overrides */
  header {
    background: rgba(15, 23, 42, 0.95) !important;
    border-bottom-color: var(--gray-200);
  }
  
  .hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 50%, #1e293b 100%);
  }
  
  .badge {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
  }
  
  .badge:hover {
    border-color: rgba(255, 255, 255, 0.4);
  }
  
  .screen-placeholder {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    border-color: rgba(255, 255, 255, 0.2);
  }
  
  .screen-placeholder:hover {
    border-color: rgba(255, 255, 255, 0.4);
  }
  
  body {
    background: var(--dark);
    color: var(--light);
  }
  
  .card {
    background: var(--gray-100) !important;
    border-color: var(--gray-200) !important;
    color: var(--light) !important;
  }
  
  .card h3 {
    color: var(--light) !important;
  }
  
  .card p {
    color: var(--gray-400) !important;
  }
  
  main {
    background: var(--gray-50) !important;
  }
  
  footer {
    background: var(--gray-900);
    color: var(--gray-400);
  }
  
  footer .wrap {
    border-top-color: var(--gray-200);
  }
}

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

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

body {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
  color: var(--dark);
  background: var(--light);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  height: 100%;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

/* Smooth animations */
* {
  transition: var(--transition-fast);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.025em;
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2.5rem); }
h3 { 
  font-size: clamp(1.25rem, 3vw, 1.875rem);
  margin-top: 2rem;
  margin-bottom: 0.5rem;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: var(--transition);
  position: relative;
}

a:hover {
  color: var(--primary-light);
  transform: translateY(-1px);
}

a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -4px;
  left: 0;
  background: linear-gradient(45deg, var(--primary), var(--primary-light));
  transition: var(--transition);
}

a:hover::after {
  width: 100%;
}

/* Layout utilities */
.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header */
header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--gray-200);
  transition: var(--transition);
}

header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  gap: 1rem;
}

header img.logo {
  width: 48px;
  height: 48px;
  border-radius: var(--border-radius-sm);
  transition: var(--transition);
}

header img.logo:hover {
  transform: rotate(5deg) scale(1.05);
}

header h1 {
  font-size: 1.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

header nav {
  display: flex;
  gap: 2rem;
  align-items: center;
}

header nav a {
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: var(--border-radius-sm);
  transition: var(--transition);
}

header nav a:hover {
  background: var(--gray-100);
  transform: translateY(-2px);
}

/* Hero Section */
.hero {
  position: relative;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 50%, var(--accent) 100%);
  color: var(--light);
  padding: 6rem 0;
  overflow: hidden;
  min-height: 70vh;
  display: flex;
  align-items: center;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg width="60" height="60" viewBox="0 0 60 60" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><g fill="%23ffffff" fill-opacity="0.1"><circle cx="30" cy="30" r="1"/></g></g></svg>');
  animation: float 20s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-20px) rotate(180deg); }
}

.hero .wrap {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 2rem;
}

.hero .logo-container {
  position: relative;
  animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.hero .logo-container img {
  width: 120px;
  height: 120px;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-2xl);
  transition: var(--transition);
}

.hero .logo-container:hover img {
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 35px 80px rgba(0, 0, 0, 0.3);
}

.hero h2 {
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 800;
  margin: 0;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  animation: fadeInUp 0.8s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero p {
  font-size: 1.25rem;
  opacity: 0.9;
  max-width: 600px;
  animation: fadeInUp 0.8s ease-out 0.2s both;
}

/* CTA Buttons */
.cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 2rem;
  animation: fadeInUp 0.8s ease-out 0.4s both;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 2rem;
  border-radius: var(--border-radius);
  background: rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--light);
  font-weight: 600;
  font-size: 1.1rem;
  transition: var(--transition);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.badge::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: var(--transition);
}

.badge:hover::before {
  left: 100%;
}

.badge:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(255, 255, 255, 0.4);
}

.badge[aria-disabled="true"] {
  opacity: 0.7;
  cursor: not-allowed;
}

/* App Screenshots */
.screens {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-top: 3rem;
  max-width: 1000px;
  animation: fadeInUp 0.8s ease-out 0.6s both;
}

@media (max-width: 1024px) {
  .screens {
    grid-template-columns: repeat(2, 1fr);
    max-width: 600px;
  }
}

@media (max-width: 600px) {
  .screens {
    grid-template-columns: 1fr;
    max-width: 300px;
  }
}

.screens img {
  width: 100%;
  height: auto;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-lg);
  transition: var(--transition);
}

.screens img:hover {
  transform: translateY(-10px) scale(1.05);
  box-shadow: var(--shadow-2xl);
}

/* Main Content */
main {
  padding: 5rem 0;
  background: var(--gray-50);
}

/* Grid Layout */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

/* Cards */
.card {
  background: var(--light);
  border: 1px solid var(--gray-200);
  border-radius: var(--border-radius);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--primary-light), var(--accent));
  transform: translateX(-100%);
  transition: var(--transition);
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}

.card:hover::before {
  transform: translateX(0);
}

.card h3 {
  color: var(--dark);
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

.card p {
  color: var(--gray-600);
  line-height: 1.8;
}

/* Utilities */
.muted {
  color: var(--gray-500);
}

/* Forms */
form {
  display: grid;
  gap: 1.5rem;
  max-width: 500px;
}

label {
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 0.5rem;
  display: block;
}

input,
textarea,
select {
  width: 100%;
  padding: 1rem;
  border: 2px solid var(--gray-200);
  border-radius: var(--border-radius-sm);
  font: inherit;
  background: var(--light);
  transition: var(--transition);
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(196, 36, 36, 0.1);
  transform: translateY(-2px);
}

button {
  appearance: none;
  border: none;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: var(--light);
  padding: 1rem 2rem;
  border-radius: var(--border-radius-sm);
  font-weight: 700;
  font-size: 1.1rem;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

button::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: var(--transition);
}

button:hover::before {
  width: 300px;
  height: 300px;
}

button:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

button:active {
  transform: translateY(-1px);
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Alerts */
.alert {
  padding: 1rem 1.5rem;
  border-radius: var(--border-radius-sm);
  border: 2px solid;
  font-weight: 500;
}

.alert.success {
  background: rgba(16, 185, 129, 0.1);
  color: var(--success);
  border-color: var(--success);
}

.alert.error {
  background: rgba(239, 68, 68, 0.1);
  color: var(--error);
  border-color: var(--error);
}

/* Footer */
footer {
  background: var(--dark);
  color: var(--gray-400);
  padding: 2rem 0;
  text-align: center;
}

footer .wrap {
  border-top: 1px solid var(--gray-700);
  padding-top: 2rem;
}

/* Responsive Design */
@media (max-width: 768px) {
  .hero {
    padding: 4rem 0;
  }
  
  .hero h2 {
    font-size: 2.5rem;
  }
  
  .screens {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .cta {
    flex-direction: column;
    align-items: center;
  }
  
  .badge {
    width: 100%;
    max-width: 300px;
    justify-content: center;
  }
  
  header .wrap {
    flex-direction: column;
    gap: 1rem;
  }
  
  header nav {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .wrap {
    padding: 0 1rem;
  }
  
  .card {
    padding: 1.5rem;
  }
  
  .hero .logo-container img {
    width: 80px;
    height: 80px;
  }
}

/* Animations for scroll-triggered elements */
@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

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

/* Loading animation */
@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.loading {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Glassmorphism effect */
.glass {
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

/* Screen placeholders */
.screen-placeholder {
  aspect-ratio: 9/19.5;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.1));
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--border-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 600;
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-lg);
  transition: var(--transition);
}

.screen-placeholder:hover {
  transform: translateY(-10px) scale(1.05);
  box-shadow: var(--shadow-2xl);
  border-color: rgba(255, 255, 255, 0.5);
}