/* ============================================
   Strivelin Design System
   ============================================ */

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

/* --- Custom Properties --- */
:root {
  /* Colors */
  --bg-primary: #0a0a1a;
  --bg-secondary: #0f0f2a;
  --bg-card: rgba(255, 255, 255, 0.04);
  --bg-card-hover: rgba(255, 255, 255, 0.07);
  --bg-glass: rgba(255, 255, 255, 0.06);
  --bg-glass-border: rgba(255, 255, 255, 0.1);

  --text-primary: #f0f0f5;
  --text-secondary: #a0a0c0;
  --text-muted: #6a6a8a;

  --accent-purple: #7c3aed;
  --accent-blue: #3b82f6;
  --accent-gradient: linear-gradient(135deg, #7c3aed, #3b82f6);
  --accent-gradient-hover: linear-gradient(135deg, #8b5cf6, #60a5fa);
  --accent-glow: rgba(124, 58, 237, 0.4);
  --accent-glow-blue: rgba(59, 130, 246, 0.3);

  --success: #22c55e;
  --warning: #f59e0b;

  /* Typography */
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;

  /* 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;

  /* Border Radius */
  --radius-sm: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);

  /* Shadows */
  --shadow-glow: 0 0 30px rgba(124, 58, 237, 0.15);
  --shadow-glow-strong: 0 0 60px rgba(124, 58, 237, 0.25);
  --shadow-card: 0 4px 30px rgba(0, 0, 0, 0.3);
  --shadow-elevated: 0 20px 60px rgba(0, 0, 0, 0.5);

  /* Layout */
  --max-width: 1200px;
  --nav-height: 4.5rem;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  scrollbar-color: var(--accent-purple) var(--bg-secondary);
}

html::-webkit-scrollbar {
  width: 8px;
}

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

html::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--accent-purple), var(--accent-blue));
  border-radius: var(--radius-full);
}

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

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

ul {
  list-style: none;
}

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

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  line-height: 1.2;
  font-weight: 700;
}

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

.gradient-text {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.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;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 0.8rem 1.8rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  border: none;
  cursor: pointer;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent-gradient);
  color: #fff;
  box-shadow: 0 4px 20px var(--accent-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 40px var(--accent-glow), 0 0 80px rgba(124, 58, 237, 0.15);
}

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

.btn-secondary {
  background: var(--bg-glass);
  color: var(--text-primary);
  border: 1px solid var(--bg-glass-border);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.btn-large {
  padding: 1rem 2.5rem;
  font-size: 1.05rem;
}

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  transition: background var(--transition-slow), box-shadow var(--transition-slow);
}

.nav.scrolled {
  background: rgba(10, 10, 26, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05);
}

.nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
}

.nav-link {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  position: relative;
  padding: var(--space-xs) 0;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent-gradient);
  border-radius: var(--radius-full);
  transition: width var(--transition-base);
}

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

.nav-link:hover::after {
  width: 100%;
}

.nav-cta {
  margin-left: var(--space-md);
}

/* Mobile menu toggle */
.mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-sm);
  z-index: 1001;
}

.mobile-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: var(--radius-full);
  transition: all var(--transition-base);
}

.mobile-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.mobile-toggle.active span:nth-child(2) {
  opacity: 0;
}

.mobile-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* --- Hero Section --- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: calc(var(--nav-height) + var(--space-3xl)) var(--space-lg) var(--space-4xl);
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #0a0a1a 0%, #1a0a3a 30%, #0a1a3a 60%, #0a0a1a 100%);
  z-index: 0;
}

.hero-bg::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 800px;
  height: 800px;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(124, 58, 237, 0.12) 0%, transparent 70%);
  animation: heroGlow 8s ease-in-out infinite alternate;
}

/* Floating shapes */
.hero-shape {
  position: absolute;
  border-radius: 50%;
  opacity: 0.08;
  z-index: 1;
  pointer-events: none;
}

.hero-shape-1 {
  width: 400px;
  height: 400px;
  top: 10%;
  left: -5%;
  background: var(--accent-purple);
  animation: float1 12s ease-in-out infinite;
}

.hero-shape-2 {
  width: 250px;
  height: 250px;
  bottom: 15%;
  right: -3%;
  background: var(--accent-blue);
  animation: float2 10s ease-in-out infinite;
}

.hero-shape-3 {
  width: 150px;
  height: 150px;
  top: 25%;
  right: 15%;
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-blue));
  animation: float3 14s ease-in-out infinite;
}

.hero-shape-4 {
  width: 100px;
  height: 100px;
  bottom: 30%;
  left: 10%;
  background: var(--accent-blue);
  animation: pulse 6s ease-in-out infinite;
}

.hero-shape-5 {
  width: 60px;
  height: 60px;
  top: 40%;
  left: 25%;
  background: var(--accent-purple);
  border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
  animation: morph 16s ease-in-out infinite;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 750px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 0.4rem 1rem;
  border-radius: var(--radius-full);
  background: var(--bg-glass);
  border: 1px solid var(--bg-glass-border);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: var(--space-xl);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  animation: fadeInUp 0.8s ease-out;
}

.hero-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
  animation: pulse 2s ease-in-out infinite;
}

.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: var(--space-lg);
  animation: fadeInUp 0.8s ease-out 0.1s both;
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto var(--space-2xl);
  line-height: 1.8;
  animation: fadeInUp 0.8s ease-out 0.2s both;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  flex-wrap: wrap;
  animation: fadeInUp 0.8s ease-out 0.3s both;
}

/* --- Section Base --- */
.section {
  padding: var(--space-5xl) 0;
  position: relative;
}

.section-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto var(--space-3xl);
}

.section-label {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent-purple);
  margin-bottom: var(--space-md);
}

.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-md);
}

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

/* --- Glass Card --- */
.glass-card {
  background: var(--bg-card);
  border: 1px solid var(--bg-glass-border);
  border-radius: var(--radius-lg);
  padding: var(--space-2xl);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: all var(--transition-slow);
  position: relative;
  overflow: hidden;
}

.glass-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.05), transparent 60%);
  opacity: 0;
  transition: opacity var(--transition-slow);
}

.glass-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(124, 58, 237, 0.2);
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow);
}

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

/* --- Products Section --- */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: var(--space-xl);
}

.product-card {
  position: relative;
}

.product-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-lg);
  font-size: 1.5rem;
}

.product-card h3 {
  font-size: 1.4rem;
  margin-bottom: var(--space-sm);
}

.product-card p {
  color: var(--text-secondary);
  margin-bottom: var(--space-lg);
  line-height: 1.7;
}

.product-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--accent-blue);
  transition: gap var(--transition-base), color var(--transition-base);
}

.product-link:hover {
  gap: var(--space-md);
  color: #60a5fa;
}

.product-card.disabled {
  opacity: 0.45;
  pointer-events: none;
}

.product-card.disabled .product-icon {
  background: linear-gradient(135deg, #3a3a5a, #2a2a4a);
}

/* --- Features Section --- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-xl);
}

.feature-card {
  display: flex;
  gap: var(--space-lg);
  align-items: flex-start;
}

.feature-number {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--bg-glass);
  border: 1px solid var(--bg-glass-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.1rem;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  transition: all var(--transition-base);
}

.feature-card:hover .feature-number {
  background: var(--accent-gradient);
  -webkit-text-fill-color: #fff;
  box-shadow: 0 0 20px var(--accent-glow);
}

.feature-text h3 {
  font-size: 1.15rem;
  margin-bottom: var(--space-xs);
}

.feature-text p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* --- How It Works Section --- */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-xl);
  position: relative;
}

.steps-grid::before {
  content: '';
  position: absolute;
  top: 40px;
  left: calc(16.67% + 24px);
  right: calc(16.67% + 24px);
  height: 2px;
  background: linear-gradient(90deg, var(--accent-purple), var(--accent-blue), var(--accent-purple));
  opacity: 0.3;
}

.step-card {
  text-align: center;
  padding: var(--space-2xl) var(--space-lg);
}

.step-number {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.2rem;
  color: #fff;
  margin: 0 auto var(--space-lg);
  position: relative;
  z-index: 2;
  box-shadow: 0 0 30px var(--accent-glow);
  transition: all var(--transition-base);
}

.step-card:hover .step-number {
  transform: scale(1.1);
  box-shadow: 0 0 50px var(--accent-glow);
}

.step-card h3 {
  font-size: 1.2rem;
  margin-bottom: var(--space-sm);
}

.step-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* --- CTA Section --- */
.cta-section {
  text-align: center;
  padding: var(--space-5xl) 0;
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 600px;
  height: 600px;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(124, 58, 237, 0.1) 0%, transparent 70%);
  pointer-events: none;
}

.cta-section h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  margin-bottom: var(--space-md);
  position: relative;
}

.cta-section p {
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin-bottom: var(--space-2xl);
  position: relative;
}

/* --- Footer --- */
.footer {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding: var(--space-2xl) 0;
}

.footer .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-md);
}

.footer-copy {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  gap: var(--space-xl);
}

.footer-link {
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: color var(--transition-fast);
}

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

/* --- Blog Styles --- */
.blog-hero {
  padding: calc(var(--nav-height) + var(--space-4xl)) 0 var(--space-3xl);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.blog-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  width: 600px;
  height: 400px;
  transform: translateX(-50%);
  background: radial-gradient(ellipse, rgba(124, 58, 237, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.blog-hero h1 {
  font-size: clamp(2.2rem, 4vw, 3.5rem);
  font-weight: 800;
  margin-bottom: var(--space-md);
}

.blog-hero p {
  color: var(--text-secondary);
  font-size: 1.1rem;
  max-width: 500px;
  margin: 0 auto;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: var(--space-xl);
  padding-bottom: var(--space-5xl);
}

.blog-card {
  display: flex;
  flex-direction: column;
}

.blog-card-date {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: var(--space-sm);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.blog-card h3 {
  font-size: 1.25rem;
  margin-bottom: var(--space-sm);
  transition: color var(--transition-fast);
}

.blog-card:hover h3 {
  color: #a78bfa;
}

.blog-card-excerpt {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: var(--space-lg);
  flex: 1;
}

.blog-card-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--accent-blue);
  transition: gap var(--transition-base), color var(--transition-base);
}

.blog-card-link:hover {
  gap: var(--space-md);
  color: #60a5fa;
}

/* --- Animations --- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes heroGlow {
  0% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }
  100% {
    transform: translate(-50%, -50%) scale(1.3);
    opacity: 0.6;
  }
}

@keyframes float1 {
  0%, 100% {
    transform: translate(0, 0) scale(1);
  }
  33% {
    transform: translate(30px, -40px) scale(1.05);
  }
  66% {
    transform: translate(-20px, 20px) scale(0.95);
  }
}

@keyframes float2 {
  0%, 100% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(-40px, -30px) scale(1.1);
  }
}

@keyframes float3 {
  0%, 100% {
    transform: translate(0, 0) rotate(0deg);
  }
  25% {
    transform: translate(20px, -30px) rotate(90deg);
  }
  50% {
    transform: translate(-15px, -50px) rotate(180deg);
  }
  75% {
    transform: translate(25px, -20px) rotate(270deg);
  }
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
    opacity: 0.08;
  }
  50% {
    transform: scale(1.15);
    opacity: 0.15;
  }
}

@keyframes morph {
  0%, 100% {
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    transform: rotate(0deg);
  }
  25% {
    border-radius: 58% 42% 75% 25% / 76% 46% 54% 24%;
  }
  50% {
    border-radius: 50% 50% 33% 67% / 55% 27% 73% 45%;
    transform: rotate(180deg);
  }
  75% {
    border-radius: 33% 67% 58% 42% / 63% 68% 32% 37%;
  }
}

/* Fade-in on scroll (used via JS class toggle) */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Responsive: Tablet --- */
@media (max-width: 900px) {
  .features-grid {
    grid-template-columns: 1fr;
  }

  .steps-grid {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }

  .steps-grid::before {
    display: none;
  }

  .section {
    padding: var(--space-4xl) 0;
  }
}

/* --- Responsive: Mobile --- */
@media (max-width: 640px) {
  .nav-links {
    position: fixed;
    inset: 0;
    background: rgba(10, 10, 26, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    justify-content: center;
    gap: var(--space-2xl);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-slow);
  }

  .nav-links.open {
    opacity: 1;
    visibility: visible;
  }

  .nav-links .nav-link {
    font-size: 1.2rem;
  }

  .nav-links .nav-cta {
    margin-left: 0;
  }

  .mobile-toggle {
    display: flex;
  }

  .hero {
    padding-top: calc(var(--nav-height) + var(--space-2xl));
    min-height: auto;
    padding-bottom: var(--space-3xl);
  }

  .hero h1 {
    font-size: 2.2rem;
  }

  .hero-actions {
    flex-direction: column;
  }

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

  .products-grid {
    grid-template-columns: 1fr;
  }

  .feature-card {
    flex-direction: column;
    text-align: center;
    align-items: center;
  }

  .blog-grid {
    grid-template-columns: 1fr;
  }

  .footer .container {
    flex-direction: column;
    text-align: center;
  }

  .footer-links {
    justify-content: center;
  }

  .section {
    padding: var(--space-3xl) 0;
  }
}
