/* ==========================================================================
   MailHelm WordPress Theme — Main Stylesheet
   SaaS landing page for AI email management desktop app
   Dark theme with indigo/violet gradient accents
   ========================================================================== */

/* ==========================================================================
   1. CSS Custom Properties
   ========================================================================== */

:root {
  /* Brand colors */
  --color-primary: #6366f1;
  --color-primary-light: #818cf8;
  --color-primary-dark: #4f46e5;
  --color-accent: #8b5cf6;
  --color-success: #22c55e;
  --color-warning: #f59e0b;
  --color-error: #ef4444;

  /* Backgrounds */
  --bg-dark: #0f172a;
  --bg-card: #1e293b;
  --bg-lighter: #334155;
  --bg-input: #1e293b;

  /* Text */
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  /* Borders */
  --border-color: #334155;
  --border-color-light: #475569;

  /* Gradients */
  --gradient-primary: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
  --gradient-hero: linear-gradient(180deg, #0f172a 0%, #1a1040 50%, #0f172a 100%);
  --gradient-card-hover: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 30px rgba(99, 102, 241, 0.3);
  --shadow-glow-lg: 0 0 60px rgba(99, 102, 241, 0.2);

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

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

  /* Layout */
  --container-max: 1280px;
  --container-narrow: 960px;
  --header-height: 72px;
  --border-radius: 8px;
  --border-radius-lg: 12px;
  --border-radius-xl: 16px;
  --border-radius-full: 9999px;

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 400ms ease;
}


/* ==========================================================================
   2. Reset / Normalize
   ========================================================================== */

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  scrollbar-color: var(--bg-lighter) var(--bg-dark);
}

body {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-dark);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

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

a:hover {
  color: var(--color-primary);
}

ul,
ol {
  list-style: none;
}

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

input,
textarea,
select {
  font-family: inherit;
  font-size: inherit;
}

/* Dark scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

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

::-webkit-scrollbar-thumb {
  background: var(--bg-lighter);
  border-radius: var(--border-radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--border-color-light);
}

::selection {
  background: rgba(99, 102, 241, 0.4);
  color: var(--text-primary);
}


/* ==========================================================================
   3. Typography
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

h1 {
  font-size: 3rem;
}

h2 {
  font-size: 2.25rem;
}

h3 {
  font-size: 1.5rem;
}

h4 {
  font-size: 1.25rem;
}

h5 {
  font-size: 1.125rem;
}

h6 {
  font-size: 1rem;
}

p {
  color: var(--text-secondary);
  margin-bottom: var(--space-md);
}

p:last-child {
  margin-bottom: 0;
}

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

.lead {
  font-size: 1.25rem;
  line-height: 1.7;
  color: var(--text-secondary);
}

small,
.text-sm {
  font-size: 0.875rem;
}

.text-xs {
  font-size: 0.75rem;
}

.text-lg {
  font-size: 1.125rem;
}

.text-xl {
  font-size: 1.25rem;
}

.text-2xl {
  font-size: 1.5rem;
}

.text-3xl {
  font-size: 2rem;
}

.text-4xl {
  font-size: 2.5rem;
}

strong {
  font-weight: 600;
  color: var(--text-primary);
}


/* ==========================================================================
   4. Layout Utilities
   ========================================================================== */

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-lg);
  padding-right: var(--space-lg);
}

.container--narrow {
  max-width: var(--container-narrow);
}

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

.section--sm {
  padding-top: var(--space-3xl);
  padding-bottom: var(--space-3xl);
}

/* Grid */
.grid {
  display: grid;
  gap: var(--space-xl);
}

.grid--2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid--3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid--4 {
  grid-template-columns: repeat(4, 1fr);
}

/* Flex */
.flex {
  display: flex;
}

.flex--center {
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.flex--col {
  display: flex;
  flex-direction: column;
}

.flex--wrap {
  flex-wrap: wrap;
}

.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }
.gap-xl { gap: var(--space-xl); }
.gap-2xl { gap: var(--space-2xl); }


/* ==========================================================================
   5. Navigation
   ========================================================================== */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--header-height);
  display: flex;
  align-items: center;
  transition: background-color var(--transition-base), box-shadow var(--transition-base);
}

.site-header--scrolled {
  background-color: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(51, 65, 85, 0.5);
}

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

.site-logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
}

.site-logo img {
  height: 32px;
  width: auto;
}

.site-logo:hover {
  color: var(--text-primary);
}

/* Desktop nav */
.main-nav {
  display: none;
  align-items: center;
  gap: var(--space-xl);
}

.main-nav a {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-secondary);
  padding: var(--space-sm) 0;
  position: relative;
  transition: color var(--transition-fast);
}

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

.main-nav a:hover,
.main-nav a.active {
  color: var(--text-primary);
}

.main-nav a:hover::after,
.main-nav a.active::after {
  width: 100%;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

/* Mobile menu toggle */
.mobile-menu-toggle {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: var(--space-sm);
}

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

.mobile-menu-toggle.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

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

.mobile-menu-toggle.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile nav overlay */
.mobile-nav {
  position: fixed;
  top: var(--header-height);
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.98);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  padding: var(--space-2xl) var(--space-lg);
  transform: translateX(100%);
  transition: transform var(--transition-base);
  z-index: 999;
}

.mobile-nav.open {
  transform: translateX(0);
}

.mobile-nav a {
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--text-secondary);
  padding: var(--space-md) 0;
  border-bottom: 1px solid var(--border-color);
  transition: color var(--transition-fast);
}

.mobile-nav a:hover,
.mobile-nav a.active {
  color: var(--text-primary);
}

.mobile-nav .btn {
  margin-top: var(--space-xl);
}


/* ==========================================================================
   6. Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 0.75rem 1.5rem;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1;
  border-radius: var(--border-radius);
  transition: all var(--transition-base);
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none;
}

.btn--primary {
  background: var(--gradient-primary);
  color: #fff;
  box-shadow: var(--shadow-md), 0 0 20px rgba(99, 102, 241, 0.25);
}

.btn--primary:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg), 0 0 30px rgba(99, 102, 241, 0.35);
  color: #fff;
}

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

.btn--secondary:hover {
  border-color: var(--color-primary-light);
  color: var(--color-primary-light);
  background: rgba(99, 102, 241, 0.1);
}

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

.btn--ghost:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.btn--sm {
  padding: 0.5rem 1rem;
  font-size: 0.8125rem;
}

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

.btn--icon {
  padding: 0.625rem;
  border-radius: var(--border-radius);
}

.btn--full {
  width: 100%;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}


/* ==========================================================================
   7. Hero Section
   ========================================================================== */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: var(--gradient-hero);
  padding-top: calc(var(--header-height) + var(--space-3xl));
  padding-bottom: var(--space-4xl);
  overflow: hidden;
}

/* Decorative gradient orbs */
.hero::before,
.hero::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.4;
  pointer-events: none;
}

.hero::before {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, var(--color-primary) 0%, transparent 70%);
  top: 10%;
  left: -10%;
}

.hero::after {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, var(--color-accent) 0%, transparent 70%);
  bottom: 10%;
  right: -5%;
}

.hero__content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 0.375rem 1rem;
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: var(--border-radius-full);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-primary-light);
  margin-bottom: var(--space-xl);
}

.hero__title {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: var(--space-lg);
  letter-spacing: -0.03em;
}

.hero__subtitle {
  font-size: 1.25rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: var(--space-2xl);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* Typing cursor for animated subtitle */
.hero__subtitle .typing-cursor {
  display: inline-block;
  width: 2px;
  height: 1.2em;
  background: var(--color-primary-light);
  vertical-align: text-bottom;
  animation: blink 0.8s step-end infinite;
}

.hero__actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  flex-wrap: wrap;
  margin-bottom: var(--space-3xl);
}

/* Hero mockup / screenshot */
.hero__mockup {
  position: relative;
  z-index: 2;
  max-width: 960px;
  margin: 0 auto;
  border-radius: var(--border-radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-xl), var(--shadow-glow-lg);
  border: 1px solid rgba(99, 102, 241, 0.2);
  animation: float 6s ease-in-out infinite;
}

.hero__mockup img {
  width: 100%;
  display: block;
}

/* Floating email cards (decorative) */
.hero__floating-card {
  position: absolute;
  z-index: 3;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  padding: var(--space-md) var(--space-lg);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
}

.hero__floating-card--1 {
  top: 20%;
  left: -5%;
  animation: floatCard1 8s ease-in-out infinite 0.5s;
}

.hero__floating-card--2 {
  top: 40%;
  right: -5%;
  animation: floatCard2 7s ease-in-out infinite 1s;
}

.hero__floating-card--3 {
  bottom: 15%;
  left: 5%;
  animation: floatCard3 9s ease-in-out infinite 1.5s;
}

/* Stats bar below hero */
.hero__stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3xl);
  margin-top: var(--space-3xl);
  position: relative;
  z-index: 2;
}

.hero__stat {
  text-align: center;
}

.hero__stat-number {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
}

.hero__stat-label {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-top: var(--space-xs);
}


/* ==========================================================================
   8. Feature Cards
   ========================================================================== */

.features {
  position: relative;
}

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

.section__header h2 {
  margin-bottom: var(--space-md);
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  padding: var(--space-2xl);
  transition: all var(--transition-base);
}

.feature-card:hover {
  border-color: rgba(99, 102, 241, 0.3);
  background: var(--gradient-card-hover);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg), 0 0 30px rgba(99, 102, 241, 0.1);
}

.feature-card__icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--border-radius);
  background: rgba(99, 102, 241, 0.15);
  color: var(--color-primary-light);
  font-size: 1.5rem;
  margin-bottom: var(--space-lg);
}

.feature-card__icon img,
.feature-card__icon svg {
  width: 24px;
  height: 24px;
}

.feature-card__title {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: var(--space-sm);
}

.feature-card__desc {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  line-height: 1.6;
}


/* ==========================================================================
   9. Pricing Cards
   ========================================================================== */

.pricing {
  position: relative;
}

/* Monthly / Annual toggle */
.pricing-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  margin-bottom: var(--space-3xl);
}

.pricing-toggle__label {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  transition: color var(--transition-fast);
}

.pricing-toggle__label.active {
  color: var(--text-primary);
  font-weight: 600;
}

.pricing-toggle__switch {
  position: relative;
  width: 48px;
  height: 26px;
  background: var(--bg-lighter);
  border-radius: var(--border-radius-full);
  cursor: pointer;
  transition: background var(--transition-base);
}

.pricing-toggle__switch.active {
  background: var(--color-primary);
}

.pricing-toggle__switch::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  background: #fff;
  border-radius: 50%;
  transition: transform var(--transition-base);
}

.pricing-toggle__switch.active::after {
  transform: translateX(22px);
}

.pricing-toggle__badge {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-success);
  background: rgba(34, 197, 94, 0.15);
  padding: 0.125rem 0.5rem;
  border-radius: var(--border-radius-full);
}

/* Pricing card */
.pricing-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-xl);
  padding: var(--space-2xl);
  display: flex;
  flex-direction: column;
  position: relative;
  transition: all var(--transition-base);
}

.pricing-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

/* Popular / highlighted card */
.pricing-card--popular {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-glow);
  transform: scale(1.03);
}

.pricing-card--popular:hover {
  transform: scale(1.03) translateY(-4px);
}

.pricing-card__badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--gradient-primary);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 1rem;
  border-radius: var(--border-radius-full);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.pricing-card__name {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: var(--space-sm);
}

.pricing-card__desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: var(--space-lg);
}

.pricing-card__price {
  display: flex;
  align-items: baseline;
  gap: var(--space-xs);
  margin-bottom: var(--space-xl);
}

.pricing-card__amount {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1;
  color: var(--text-primary);
}

.pricing-card__currency {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.pricing-card__period {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.pricing-card__features {
  flex: 1;
  margin-bottom: var(--space-xl);
}

.pricing-card__features li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  font-size: 0.9375rem;
  color: var(--text-secondary);
  padding: var(--space-sm) 0;
}

.pricing-card__features li::before {
  content: '\2713';
  color: var(--color-success);
  font-weight: 700;
  flex-shrink: 0;
}

.pricing-card__features li.disabled {
  opacity: 0.4;
}

.pricing-card__features li.disabled::before {
  content: '\2717';
  color: var(--text-muted);
}


/* ==========================================================================
   10. Testimonials
   ========================================================================== */

.testimonials {
  position: relative;
}

.testimonial-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  padding: var(--space-2xl);
  transition: all var(--transition-base);
}

.testimonial-card:hover {
  border-color: rgba(99, 102, 241, 0.2);
}

.testimonial-card__stars {
  display: flex;
  gap: 2px;
  color: var(--color-warning);
  margin-bottom: var(--space-md);
}

.testimonial-card__text {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: var(--space-lg);
  font-style: italic;
}

.testimonial-card__author {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.testimonial-card__avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
}

.testimonial-card__name {
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--text-primary);
}

.testimonial-card__role {
  font-size: 0.8125rem;
  color: var(--text-muted);
}


/* ==========================================================================
   11. FAQ Accordion
   ========================================================================== */

.faq {
  position: relative;
}

.faq-list {
  max-width: 768px;
  margin: 0 auto;
}

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

.faq-item__question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: var(--space-lg) 0;
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--text-primary);
  text-align: left;
  cursor: pointer;
  transition: color var(--transition-fast);
}

.faq-item__question:hover {
  color: var(--color-primary-light);
}

.faq-item__icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.25rem;
  color: var(--text-muted);
  transition: transform var(--transition-base);
}

.faq-item.active .faq-item__icon {
  transform: rotate(45deg);
}

.faq-item__answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-slow), padding var(--transition-slow);
}

.faq-item.active .faq-item__answer {
  max-height: 500px;
}

.faq-item__answer p {
  padding-bottom: var(--space-lg);
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--text-secondary);
}


/* ==========================================================================
   12. Forms
   ========================================================================== */

.form-group {
  margin-bottom: var(--space-lg);
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: var(--space-sm);
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 0.9375rem;
  color: var(--text-primary);
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  outline: none;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--text-muted);
}

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

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2394a3b8' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

.form-error {
  font-size: 0.8125rem;
  color: var(--color-error);
  margin-top: var(--space-xs);
}

.form-help {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: var(--space-xs);
}

/* Newsletter form (inline) */
.newsletter-form {
  display: flex;
  gap: var(--space-sm);
  max-width: 440px;
}

.newsletter-form .form-input {
  flex: 1;
}


/* ==========================================================================
   13. Badge / Pill Components
   ========================================================================== */

.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: var(--border-radius-full);
}

.badge--primary {
  background: rgba(99, 102, 241, 0.15);
  color: var(--color-primary-light);
}

.badge--success {
  background: rgba(34, 197, 94, 0.15);
  color: var(--color-success);
}

.badge--warning {
  background: rgba(245, 158, 11, 0.15);
  color: var(--color-warning);
}

.badge--accent {
  background: rgba(139, 92, 246, 0.15);
  color: var(--color-accent);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 0.5rem 1rem;
  font-size: 0.8125rem;
  font-weight: 500;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-full);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.pill:hover,
.pill.active {
  border-color: var(--color-primary);
  color: var(--color-primary-light);
  background: rgba(99, 102, 241, 0.1);
}


/* ==========================================================================
   14. Footer
   ========================================================================== */

.site-footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border-color);
  padding-top: var(--space-4xl);
  padding-bottom: var(--space-xl);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-3xl);
  margin-bottom: var(--space-3xl);
}

.footer-brand p {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  margin-top: var(--space-md);
  max-width: 300px;
}

.footer-brand .site-logo {
  margin-bottom: var(--space-sm);
}

.footer-social {
  display: flex;
  gap: var(--space-md);
  margin-top: var(--space-lg);
}

.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--border-radius);
  background: var(--bg-lighter);
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.footer-social a:hover {
  background: var(--color-primary);
  color: #fff;
}

.footer-column__title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-lg);
}

.footer-column a {
  display: block;
  font-size: 0.9375rem;
  color: var(--text-secondary);
  padding: var(--space-xs) 0;
  transition: color var(--transition-fast);
}

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

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-md);
  padding-top: var(--space-xl);
  border-top: 1px solid var(--border-color);
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.footer-bottom a {
  color: var(--text-muted);
}

.footer-bottom a:hover {
  color: var(--text-secondary);
}

.footer-legal {
  display: flex;
  gap: var(--space-lg);
}


/* ==========================================================================
   15. Download Page — Platform Cards
   ========================================================================== */

.download-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-xl);
}

.download-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-xl);
  padding: var(--space-2xl);
  text-align: center;
  transition: all var(--transition-base);
}

.download-card:hover {
  border-color: rgba(99, 102, 241, 0.3);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.download-card.recommended {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-glow);
}

.download-card.recommended::before {
  content: 'Recommended for your system';
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-primary-light);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-md);
}

.download-card__icon {
  font-size: 3rem;
  margin-bottom: var(--space-lg);
}

.download-card__platform {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: var(--space-sm);
}

.download-card__version {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: var(--space-xl);
}

.download-card__requirements {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: var(--space-lg);
}


/* ==========================================================================
   16. Documentation Page
   ========================================================================== */

.docs-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: var(--space-3xl);
  padding-top: calc(var(--header-height) + var(--space-2xl));
  min-height: 100vh;
}

.docs-sidebar {
  position: sticky;
  top: calc(var(--header-height) + var(--space-xl));
  height: fit-content;
  max-height: calc(100vh - var(--header-height) - var(--space-2xl));
  overflow-y: auto;
  padding-right: var(--space-md);
}

.docs-sidebar__section {
  margin-bottom: var(--space-xl);
}

.docs-sidebar__title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: var(--space-sm);
}

.docs-sidebar a {
  display: block;
  font-size: 0.9375rem;
  color: var(--text-secondary);
  padding: var(--space-xs) var(--space-md);
  border-left: 2px solid transparent;
  transition: all var(--transition-fast);
}

.docs-sidebar a:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.03);
}

.docs-sidebar a.active {
  color: var(--color-primary-light);
  border-left-color: var(--color-primary);
  background: rgba(99, 102, 241, 0.08);
}

/* Content area */
.docs-content {
  max-width: 800px;
  padding-bottom: var(--space-4xl);
}

.docs-content h1 {
  font-size: 2rem;
  margin-bottom: var(--space-lg);
}

.docs-content h2 {
  font-size: 1.5rem;
  margin-top: var(--space-3xl);
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid var(--border-color);
}

.docs-content h3 {
  font-size: 1.25rem;
  margin-top: var(--space-2xl);
  margin-bottom: var(--space-md);
}

.docs-content p {
  margin-bottom: var(--space-md);
  line-height: 1.8;
}

.docs-content ul,
.docs-content ol {
  margin-bottom: var(--space-md);
  padding-left: var(--space-xl);
}

.docs-content ul {
  list-style: disc;
}

.docs-content ol {
  list-style: decimal;
}

.docs-content li {
  color: var(--text-secondary);
  margin-bottom: var(--space-sm);
  line-height: 1.7;
}

.docs-content a {
  color: var(--color-primary-light);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.docs-content img {
  border-radius: var(--border-radius-lg);
  border: 1px solid var(--border-color);
  margin: var(--space-xl) 0;
}

/* Code blocks */
.docs-content code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background: var(--bg-lighter);
  color: var(--color-primary-light);
  padding: 0.15em 0.4em;
  border-radius: 4px;
}

.docs-content pre {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  padding: var(--space-lg);
  overflow-x: auto;
  margin-bottom: var(--space-xl);
}

.docs-content pre code {
  background: none;
  padding: 0;
  color: var(--text-secondary);
  font-size: 0.875rem;
  line-height: 1.7;
}

/* Blockquote / callout */
.docs-content blockquote {
  border-left: 3px solid var(--color-primary);
  background: rgba(99, 102, 241, 0.08);
  padding: var(--space-md) var(--space-lg);
  border-radius: 0 var(--border-radius) var(--border-radius) 0;
  margin-bottom: var(--space-xl);
}

.docs-content blockquote p {
  color: var(--text-secondary);
  margin-bottom: 0;
}

/* Table in docs */
.docs-content table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: var(--space-xl);
}

.docs-content th,
.docs-content td {
  padding: var(--space-md);
  text-align: left;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.9375rem;
}

.docs-content th {
  font-weight: 600;
  color: var(--text-primary);
  background: var(--bg-card);
}

.docs-content td {
  color: var(--text-secondary);
}


/* ==========================================================================
   17. WooCommerce Overrides
   ========================================================================== */

/* Products */
.woocommerce ul.products li.product {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  padding: var(--space-lg);
}

.woocommerce ul.products li.product .woocommerce-loop-product__title {
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 600;
}

.woocommerce ul.products li.product .price {
  color: var(--color-primary-light);
  font-weight: 700;
}

/* Buttons */
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce .button {
  background: var(--gradient-primary) !important;
  color: #fff !important;
  border: none !important;
  border-radius: var(--border-radius) !important;
  font-family: var(--font-sans) !important;
  font-weight: 600 !important;
  padding: 0.75rem 1.5rem !important;
  transition: all var(--transition-base) !important;
}

.woocommerce a.button:hover,
.woocommerce button.button:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md), 0 0 20px rgba(99, 102, 241, 0.25) !important;
}

/* Cart */
.woocommerce-cart table.cart {
  background: var(--bg-card);
  border-radius: var(--border-radius-lg);
  border: 1px solid var(--border-color);
}

.woocommerce-cart table.cart th,
.woocommerce-cart table.cart td {
  border-color: var(--border-color);
  color: var(--text-secondary);
}

.woocommerce-cart .cart-collaterals .cart_totals {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  padding: var(--space-xl);
}

/* Checkout */
.woocommerce-checkout .woocommerce-form-login,
.woocommerce-checkout .checkout_coupon,
.woocommerce-checkout .woocommerce-checkout {
  background: var(--bg-card);
  border-radius: var(--border-radius-lg);
  border: 1px solid var(--border-color);
}

.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce form .form-row select {
  background: var(--bg-input) !important;
  border: 1px solid var(--border-color) !important;
  color: var(--text-primary) !important;
  border-radius: var(--border-radius) !important;
  padding: 0.75rem 1rem !important;
}

.woocommerce form .form-row input.input-text:focus,
.woocommerce form .form-row textarea:focus,
.woocommerce form .form-row select:focus {
  border-color: var(--color-primary) !important;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2) !important;
}

.woocommerce form .form-row label {
  color: var(--text-secondary) !important;
}

/* Order review */
.woocommerce-checkout-review-order-table {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
}

.woocommerce-checkout-review-order-table th,
.woocommerce-checkout-review-order-table td {
  border-color: var(--border-color) !important;
  color: var(--text-secondary) !important;
}

/* Notices */
.woocommerce-message {
  background: rgba(34, 197, 94, 0.1) !important;
  border-color: var(--color-success) !important;
  color: var(--color-success) !important;
  border-radius: var(--border-radius) !important;
}

.woocommerce-error {
  background: rgba(239, 68, 68, 0.1) !important;
  border-color: var(--color-error) !important;
  color: var(--color-error) !important;
  border-radius: var(--border-radius) !important;
}

.woocommerce-info {
  background: rgba(99, 102, 241, 0.1) !important;
  border-color: var(--color-primary) !important;
  color: var(--color-primary-light) !important;
  border-radius: var(--border-radius) !important;
}


/* ==========================================================================
   18. Scroll to Top Button
   ========================================================================== */

.scroll-top {
  position: fixed;
  bottom: var(--space-xl);
  right: var(--space-xl);
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  color: var(--text-secondary);
  font-size: 1.25rem;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all var(--transition-base);
  z-index: 100;
}

.scroll-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.scroll-top:hover {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}


/* ==========================================================================
   19. Animations
   ========================================================================== */

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

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

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

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.6;
  }
}

@keyframes blink {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
}

@keyframes floatCard1 {
  0%, 100% {
    opacity: 0.8;
    transform: translate(0, 0) rotate(-3deg);
  }
  50% {
    opacity: 0.9;
    transform: translate(10px, -15px) rotate(-1deg);
  }
}

@keyframes floatCard2 {
  0%, 100% {
    opacity: 0.8;
    transform: translate(0, 0) rotate(2deg);
  }
  50% {
    opacity: 0.9;
    transform: translate(-10px, -20px) rotate(4deg);
  }
}

@keyframes floatCard3 {
  0%, 100% {
    opacity: 0.7;
    transform: translate(0, 0) rotate(1deg);
  }
  50% {
    opacity: 0.85;
    transform: translate(15px, -10px) rotate(-2deg);
  }
}

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

/* Scroll-triggered animation classes */
.animate-on-scroll {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.js-ready .animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
}

.js-ready .animate-on-scroll.animated {
  opacity: 1;
  transform: translateY(0);
}

.animate-on-scroll[data-delay="100"] { transition-delay: 100ms; }
.animate-on-scroll[data-delay="200"] { transition-delay: 200ms; }
.animate-on-scroll[data-delay="300"] { transition-delay: 300ms; }
.animate-on-scroll[data-delay="400"] { transition-delay: 400ms; }
.animate-on-scroll[data-delay="500"] { transition-delay: 500ms; }


/* ==========================================================================
   20. Utility Classes
   ========================================================================== */

/* Text alignment */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

/* Text color */
.text-primary { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-muted { color: var(--text-muted); }
.text-accent { color: var(--color-primary-light); }
.text-success { color: var(--color-success); }
.text-warning { color: var(--color-warning); }
.text-error { color: var(--color-error); }

/* Display */
.d-none { display: none; }
.d-block { display: block; }
.d-flex { display: flex; }
.d-grid { display: grid; }
.d-inline { display: inline; }
.d-inline-block { display: inline-block; }

/* Margin */
.mt-0 { margin-top: 0; }
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }
.mt-2xl { margin-top: var(--space-2xl); }
.mt-3xl { margin-top: var(--space-3xl); }

.mb-0 { margin-bottom: 0; }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }
.mb-2xl { margin-bottom: var(--space-2xl); }
.mb-3xl { margin-bottom: var(--space-3xl); }

.mx-auto { margin-left: auto; margin-right: auto; }

/* Padding */
.p-0 { padding: 0; }
.p-sm { padding: var(--space-sm); }
.p-md { padding: var(--space-md); }
.p-lg { padding: var(--space-lg); }
.p-xl { padding: var(--space-xl); }
.p-2xl { padding: var(--space-2xl); }

.py-sm { padding-top: var(--space-sm); padding-bottom: var(--space-sm); }
.py-md { padding-top: var(--space-md); padding-bottom: var(--space-md); }
.py-lg { padding-top: var(--space-lg); padding-bottom: var(--space-lg); }
.py-xl { padding-top: var(--space-xl); padding-bottom: var(--space-xl); }

.px-sm { padding-left: var(--space-sm); padding-right: var(--space-sm); }
.px-md { padding-left: var(--space-md); padding-right: var(--space-md); }
.px-lg { padding-left: var(--space-lg); padding-right: var(--space-lg); }
.px-xl { padding-left: var(--space-xl); padding-right: var(--space-xl); }

/* Width */
.w-full { width: 100%; }
.max-w-sm { max-width: 24rem; }
.max-w-md { max-width: 28rem; }
.max-w-lg { max-width: 32rem; }
.max-w-xl { max-width: 36rem; }
.max-w-2xl { max-width: 42rem; }

/* Position */
.relative { position: relative; }
.absolute { position: absolute; }
.sticky { position: sticky; }

/* Overflow */
.overflow-hidden { overflow: hidden; }
.overflow-auto { overflow: auto; }

/* Border radius */
.rounded { border-radius: var(--border-radius); }
.rounded-lg { border-radius: var(--border-radius-lg); }
.rounded-xl { border-radius: var(--border-radius-xl); }
.rounded-full { border-radius: var(--border-radius-full); }

/* Visibility for screen readers */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}


/* ==========================================================================
   21. Responsive Breakpoints (Mobile First)
   ========================================================================== */

/* sm: 640px */
@media (min-width: 640px) {
  h1 { font-size: 3.5rem; }
  h2 { font-size: 2.5rem; }

  .hero__title {
    font-size: 4rem;
  }

  .newsletter-form {
    flex-direction: row;
  }
}

/* md: 768px */
@media (min-width: 768px) {
  .grid--2,
  .grid--3,
  .grid--4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .download-cards {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr;
  }

  .hero__stats {
    gap: var(--space-3xl);
  }
}

/* lg: 1024px */
@media (min-width: 1024px) {
  .main-nav {
    display: flex;
  }

  .mobile-menu-toggle {
    display: none;
  }

  .grid--3 {
    grid-template-columns: repeat(3, 1fr);
  }

  .grid--4 {
    grid-template-columns: repeat(3, 1fr);
  }

  .download-cards {
    grid-template-columns: repeat(3, 1fr);
  }

  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr 1fr;
  }

  .hero__title {
    font-size: 4.5rem;
  }
}

/* xl: 1280px */
@media (min-width: 1280px) {
  .grid--4 {
    grid-template-columns: repeat(4, 1fr);
  }

  .container {
    padding-left: var(--space-xl);
    padding-right: var(--space-xl);
  }
}

/* Mobile-specific overrides */
@media (max-width: 639px) {
  h1 { font-size: 2.25rem; }
  h2 { font-size: 1.75rem; }
  h3 { font-size: 1.25rem; }

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

  .hero__title {
    font-size: 2.5rem;
  }

  .hero__subtitle {
    font-size: 1.0625rem;
  }

  .hero__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero__stats {
    flex-direction: column;
    gap: var(--space-lg);
  }

  .hero__floating-card {
    display: none;
  }

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

  .grid--2,
  .grid--3,
  .grid--4 {
    grid-template-columns: 1fr;
  }

  .download-cards {
    grid-template-columns: 1fr;
  }

  .pricing-card--popular {
    transform: none;
  }

  .pricing-card--popular:hover {
    transform: translateY(-4px);
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--space-2xl);
  }

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

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

  .docs-layout {
    grid-template-columns: 1fr;
  }

  .docs-sidebar {
    position: relative;
    top: 0;
    max-height: none;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: var(--space-xl);
    margin-bottom: var(--space-xl);
  }

  .newsletter-form {
    flex-direction: column;
  }
}

/* Tablet pricing layout */
@media (min-width: 768px) and (max-width: 1023px) {
  .pricing .grid--3 {
    grid-template-columns: 1fr;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }

  .animate-on-scroll {
    opacity: 1;
    transform: none;
  }

  .hero__mockup {
    animation: none;
  }
}
