/* ================================================================
   AuthOS Marketing Site - Premium Design System
   Inspired by: Linear, Vercel, Stripe
   ================================================================ */

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

/* CSS Custom Properties */
:root {
  /* Core palette - deep navy to purple gradient */
  --color-bg: #0a0a0f;
  --color-bg-elevated: #12121a;
  --color-bg-surface: #1a1a24;
  --color-bg-hover: #22222e;

  /* Accent - electric purple */
  --color-accent: #8b5cf6;
  --color-accent-light: #a78bfa;
  --color-accent-dark: #7c3aed;
  --color-accent-glow: rgba(139, 92, 246, 0.4);

  /* Secondary accent - cyan */
  --color-cyan: #06b6d4;
  --color-cyan-glow: rgba(6, 182, 212, 0.3);

  /* Text hierarchy */
  --color-text-primary: #ffffff;
  --color-text-secondary: #a1a1aa;
  --color-text-muted: #71717a;

  /* Borders */
  --color-border: rgba(255, 255, 255, 0.08);
  --color-border-hover: rgba(255, 255, 255, 0.15);

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

  /* Spacing */
  --header-height: 72px;
  --section-padding: 120px;
  --container-max: 1200px;

  /* Animation */
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --duration-fast: 150ms;
  --duration-normal: 300ms;
}

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

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-text-primary);
  background: var(--color-bg);
}

/* Container */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}

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

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

h1 {
  font-size: clamp(40px, 8vw, 72px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
}

h2 {
  font-size: clamp(32px, 5vw, 48px);
  letter-spacing: -0.025em;
}

h3 {
  font-size: clamp(20px, 3vw, 24px);
}

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

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

/* ================================================================
   Header
   ================================================================ */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: rgba(10, 10, 15, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--color-border);
  z-index: 100;
}

.header-container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 700;
  color: var(--color-text-primary);
  text-decoration: none;
  transition: opacity var(--duration-fast) ease;
}

.logo:hover {
  opacity: 0.8;
}

.logo svg {
  color: var(--color-accent);
}

.nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-link {
  color: var(--color-text-secondary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color var(--duration-fast) ease;
}

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

@media (max-width: 768px) {
  .nav {
    display: none;
  }
}

/* Theme Toggle */
.theme-toggle {
  display: none;
  /* Dark mode only for now */
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  padding: 8px;
  color: var(--color-text-primary);
  cursor: pointer;
}

@media (max-width: 768px) {
  .mobile-menu-toggle {
    display: flex;
  }
}

.mobile-menu {
  display: none;
  position: fixed;
  top: var(--header-height);
  left: 0;
  right: 0;
  background: var(--color-bg-elevated);
  border-bottom: 1px solid var(--color-border);
  padding: 24px;
}

.mobile-menu.active {
  display: block;
}

.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mobile-nav-link {
  color: var(--color-text-primary);
  text-decoration: none;
  font-size: 16px;
  font-weight: 500;
  padding: 12px 16px;
  border-radius: 8px;
  transition: background var(--duration-fast) ease;
}

.mobile-nav-link:hover {
  background: var(--color-bg-hover);
}

/* ================================================================
   Buttons
   ================================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  text-decoration: none;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: all var(--duration-normal) var(--ease-out-expo);
}

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

.btn-primary:hover {
  background: var(--color-accent-light);
  box-shadow: 0 0 30px 0 var(--color-accent-glow);
  transform: translateY(-1px);
}

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

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

.btn-ghost {
  background: transparent;
  color: var(--color-text-secondary);
}

.btn-ghost:hover {
  color: var(--color-text-primary);
}

.btn-lg {
  padding: 16px 32px;
  font-size: 16px;
  border-radius: 10px;
}

/* ================================================================
   Hero Section
   ================================================================ */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: var(--header-height);
  overflow: hidden;
  background: linear-gradient(135deg, var(--color-bg) 0%, #0d0d1a 50%, #0a1628 100%);
}

.hero .container {
  width: 100%;
}

/* Globe as full background */
.hero-globe-bg {
  position: absolute;
  top: 0;
  right: -20%;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

@media (max-width: 968px) {
  .hero-globe-bg {
    right: -50%;
    opacity: 0.5;
  }
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 50%;
}

@media (max-width: 1024px) {
  .hero-content {
    margin-left: 0;
  }
}

.hero-label {
  display: inline-block;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-accent);
  margin-bottom: 24px;
  letter-spacing: 0.02em;
}

.hero h1 {
  margin-bottom: 24px;
  font-size: clamp(36px, 6vw, 56px);
}

.hero-subtitle {
  font-size: 18px;
  line-height: 1.7;
  color: var(--color-text-secondary);
  margin-bottom: 40px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-actions .btn-ghost {
  color: var(--color-text-secondary);
}

.hero-actions .btn-ghost:hover {
  color: var(--color-accent);
}

@media (max-width: 640px) {
  .hero-actions {
    flex-direction: column;
  }

  .hero-actions .btn {
    width: 100%;
  }
}

/* Stats row - positioned at bottom of hero */
.hero-stats {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1;
  background: linear-gradient(to top, rgba(10, 10, 15, 0.95) 0%, transparent 100%);
  padding: 40px 0;
}

.hero-stats .container,
.hero .hero-stats {
  display: flex;
  gap: 0;
  justify-content: flex-end;
}

.stat {
  display: flex;
  flex-direction: column;
  padding: 0 32px;
  border-left: 1px solid var(--color-border);
}

.stat:first-child {
  border-left: none;
  padding-left: 0;
}

.stat-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--color-text-primary);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.stat-label {
  font-size: 13px;
  color: var(--color-text-muted);
  margin-top: 4px;
  max-width: 160px;
}

@media (max-width: 1024px) {
  .hero {
    flex-direction: column;
    justify-content: center;
    padding-top: calc(var(--header-height) + 40px);
    /* Add some breathing room */
    height: auto;
    min-height: auto;
  }

  .hero-stats {
    position: relative;
    width: 100%;
    margin-top: 40px;
    background: var(--color-bg-elevated);
    border-top: 1px solid var(--color-border);
  }

  .stat {
    padding: 0 24px;
  }

  .hero-content {
    max-width: 100%;
    text-align: center;
    margin-bottom: 0;
  }

  .hero-actions {
    justify-content: center;
  }
}

@media (max-width: 768px) {
  .hero {
    min-height: auto;
    padding-bottom: 0;
  }

  .hero .hero-stats,
  .hero-stats .container {
    flex-wrap: wrap;
    gap: 16px;
    justify-content: center;
  }

  .stat {
    border-left: none;
    width: calc(50% - 12px);
    /* Allow 2 per row */
    max-width: none;
    /* Remove constraint */
    text-align: center;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.03);
  }
}

/* ================================================================
   Sections
   ================================================================ */
.section {
  padding: var(--section-padding) 0;
  position: relative;
}

@media (max-width: 768px) {
  .section {
    padding: 80px 0;
  }
}

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

@media (max-width: 768px) {
  .section-header {
    margin-bottom: 48px;
  }
}

.section-header h2 {
  margin-bottom: 16px;
}

.section-header p {
  font-size: 18px;
  color: var(--color-text-secondary);
}

.section-label {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-accent);
  margin-bottom: 16px;
}

/* ================================================================
   Feature Cards
   ================================================================ */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

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

@media (max-width: 640px) {
  .features-grid {
    grid-template-columns: 1fr;
  }
}

.feature-card {
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  padding: 32px;
  transition: all var(--duration-normal) var(--ease-out-expo);
}

.feature-card:hover {
  border-color: var(--color-border-hover);
  transform: translateY(-4px);
  box-shadow: 0 20px 40px -20px rgba(0, 0, 0, 0.5);
}

.feature-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-dark) 100%);
  border-radius: 12px;
  margin-bottom: 20px;
  color: white;
}

.feature-card h3 {
  margin-bottom: 12px;
  color: var(--color-text-primary);
}

.feature-card p {
  font-size: 15px;
  line-height: 1.6;
}

/* ================================================================
   Benchmark / Performance Section
   ================================================================ */
.benchmark-section {
  background: var(--color-bg-elevated);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.benchmark-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}

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

@media (max-width: 480px) {
  .benchmark-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
}

.benchmark-item {
  text-align: center;
  padding: 32px 24px;
  border-radius: 12px;
  background: var(--color-bg-surface);
  border: 1px solid var(--color-border);
}

.benchmark-value {
  font-size: 48px;
  font-weight: 700;
  color: var(--color-accent);
  letter-spacing: -0.02em;
  line-height: 1;
}

.benchmark-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-primary);
  margin-top: 12px;
}

.benchmark-detail {
  font-size: 13px;
  color: var(--color-text-muted);
  margin-top: 4px;
}

/* ================================================================
   Code Example
   ================================================================ */
.code-block {
  background: var(--color-bg-surface);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  overflow: hidden;
}

.code-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: var(--color-bg-elevated);
  border-bottom: 1px solid var(--color-border);
}

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

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

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

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

.code-content {
  padding: 24px;
  overflow-x: auto;
}

.code-content pre {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.7;
  color: var(--color-text-secondary);
}

.code-content .keyword {
  color: var(--color-accent-light);
}

.code-content .string {
  color: #a5d6ff;
}

.code-content .comment {
  color: var(--color-text-muted);
}

.code-content .function {
  color: var(--color-cyan);
}

/* ================================================================
   Pricing
   ================================================================ */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  align-items: stretch;
}

@media (max-width: 1024px) {
  .pricing-grid {
    grid-template-columns: 1fr;
    max-width: 400px;
    margin: 0 auto;
  }
}

.pricing-card {
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  padding: 40px 32px;
  display: flex;
  flex-direction: column;
  transition: all var(--duration-normal) var(--ease-out-expo);
}

.pricing-card:hover {
  border-color: var(--color-border-hover);
}

.pricing-card.featured {
  border-color: var(--color-accent);
  position: relative;
}

.pricing-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-accent);
  color: white;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 16px;
  border-radius: 100px;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.pricing-tier {
  font-size: 16px;
  font-weight: 600;
  color: var(--color-text-muted);
  margin-bottom: 8px;
}

.pricing-price {
  font-size: 48px;
  font-weight: 700;
  color: var(--color-text-primary);
  letter-spacing: -0.02em;
  line-height: 1;
}

.pricing-price span {
  font-size: 16px;
  color: var(--color-text-muted);
  font-weight: 500;
}

.pricing-description {
  font-size: 14px;
  color: var(--color-text-secondary);
  margin-top: 8px;
  margin-bottom: 32px;
}

.pricing-features {
  list-style: none;
  flex: 1;
  margin-bottom: 32px;
}

.pricing-features li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 0;
  font-size: 14px;
  color: var(--color-text-secondary);
  border-bottom: 1px solid var(--color-border);
}

.pricing-features li:last-child {
  border-bottom: none;
}

.pricing-features li svg {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  color: var(--color-accent);
  margin-top: 1px;
}

.pricing-card .btn {
  width: 100%;
}

/* ================================================================
   CTA Section
   ================================================================ */
.cta-section {
  text-align: center;
  padding: 160px 0;
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 1000px;
  height: 1000px;
  background: radial-gradient(circle, var(--color-accent-glow) 0%, transparent 60%);
  pointer-events: none;
  opacity: 0.4;
}

.cta-section h2 {
  position: relative;
  z-index: 1;
  margin-bottom: 16px;
}

.cta-section p {
  position: relative;
  z-index: 1;
  font-size: 18px;
  margin-bottom: 40px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.cta-section .btn {
  position: relative;
  z-index: 1;
}

/* ================================================================
   Footer
   ================================================================ */
.footer {
  background: var(--color-bg-elevated);
  border-top: 1px solid var(--color-border);
  padding: 80px 0 40px;
}

.footer-content {
  display: grid;
  grid-template-columns: 2fr repeat(4, 1fr);
  gap: 48px;
  margin-bottom: 64px;
}

@media (max-width: 1024px) {
  .footer-content {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .footer-content {
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
  }
}

.footer-brand {
  max-width: 280px;
}

.footer-brand .logo {
  margin-bottom: 16px;
}

.footer-brand p {
  font-size: 14px;
  line-height: 1.6;
}

.footer-section h4 {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-primary);
  margin-bottom: 20px;
}

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

.footer-link {
  display: block;
  font-size: 14px;
  color: var(--color-text-secondary);
  text-decoration: none;
  padding: 6px 0;
  transition: color var(--duration-fast) ease;
}

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

.footer-bottom {
  padding-top: 32px;
  border-top: 1px solid var(--color-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

@media (max-width: 640px) {
  .footer-bottom {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }
}

.footer-bottom p {
  font-size: 13px;
  color: var(--color-text-muted);
}

/* ================================================================
   Developer Experience
   ================================================================ */
.dev-exp-section {
  background: var(--color-bg-elevated);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.dev-exp-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.dev-exp-description {
  font-size: 18px;
  margin-top: 16px;
  margin-bottom: 24px;
}

@media (max-width: 1024px) {
  .dev-exp-grid {
    grid-template-columns: 1fr;
    gap: 48px;
    text-align: center;
  }

  .dev-exp-content {
    margin: 0 auto;
    max-width: 600px;
  }
}

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

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

.animate-fade-in-up {
  animation: fadeInUp 0.8s var(--ease-out-expo) forwards;
}

.animate-delay-1 {
  animation-delay: 0.1s;
}

.animate-delay-2 {
  animation-delay: 0.2s;
}

.animate-delay-3 {
  animation-delay: 0.3s;
}

/* Globe container */
#globe-container {
  position: absolute;
  inset: 0;
}

/* Dark mode only styles */
.dark .header {
  background: rgba(10, 10, 15, 0.8);
}

/* Hide light mode elements */
.sun-icon {
  display: none;
}

.moon-icon {
  display: block !important;
}

/* Content pages */
.content {
  max-width: 720px;
  margin: 0 auto;
  padding: calc(var(--header-height) + 80px) 24px 80px;
}

.content h1 {
  margin-bottom: 24px;
}

.content h2 {
  margin-top: 48px;
  margin-bottom: 16px;
}

.content h3 {
  margin-top: 32px;
  margin-bottom: 12px;
}

.content p {
  margin-bottom: 16px;
}

.content ul,
.content ol {
  margin-bottom: 16px;
  padding-left: 24px;
  color: var(--color-text-secondary);
}

.content li {
  margin-bottom: 8px;
}

.content a {
  color: var(--color-accent);
  text-decoration: none;
}

.content a:hover {
  text-decoration: underline;
}

/* Form styling */
input,
textarea,
select {
  width: 100%;
  padding: 12px 16px;
  background: var(--color-bg-surface);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  color: var(--color-text-primary);
  font-family: inherit;
  font-size: 15px;
  transition: border-color var(--duration-fast) ease;
}

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

label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-primary);
  margin-bottom: 8px;
}