/* ==========================================================================
   Calculead - Modern Vanilla CSS Stylesheet
   Matches exact Tailwind design tokens & themes from the main application
   ========================================================================== */

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

/* --- CSS Variables & Theming --- */
:root, .theme-light {
  --color-bg-primary: #ffffff;
  --color-text-primary: #111827;
  --color-bg-secondary: #f9fafb;
  --color-text-secondary: #4b5563;
  --color-text-muted: #6b7280;
  --color-border-primary: #e5e7eb;
  --color-border-secondary: #d1d5db;
  --color-bg-accent: #2563eb;
  --color-bg-accent-hover: #1d4ed8;
  --color-text-accent: #ffffff;
  --color-accent-light: #eff6ff;
  --color-accent-badge: #dbeafe;
  --color-success: #10b981;
  --color-success-bg: #dcfce7;
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;
  --radius-full: 9999px;
  --header-height: 72px;
}

.theme-night {
  --color-bg-primary: #0f172a;
  --color-text-primary: #f8fafc;
  --color-bg-secondary: #1e293b;
  --color-text-secondary: #94a3b8;
  --color-text-muted: #64748b;
  --color-border-primary: #334155;
  --color-border-secondary: #475569;
  --color-bg-accent: #3b82f6;
  --color-bg-accent-hover: #2563eb;
  --color-text-accent: #ffffff;
  --color-accent-light: #1e293b;
  --color-accent-badge: #1e3a8a;
  --color-success: #10b981;
  --color-success-bg: #064e3b;
}

.theme-contrast {
  --color-bg-primary: #000000;
  --color-text-primary: #ffffff;
  --color-bg-secondary: #121212;
  --color-text-secondary: #d1d5db;
  --color-text-muted: #9ca3af;
  --color-border-primary: #ffffff;
  --color-border-secondary: #ffffff;
  --color-bg-accent: #0088ff;
  --color-bg-accent-hover: #0066cc;
  --color-text-accent: #000000;
  --color-accent-light: #222222;
  --color-accent-badge: #003366;
}

/* Accessible Screen-Reader Utility */
.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;
}

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

html {
  font-family: var(--font-family);
  font-size: 16px;
  line-height: 1.5;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background-color: var(--color-bg-primary);
  color: var(--color-text-primary);
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Accessible focus ring for keyboard navigation */
:focus-visible {
  outline: 2px solid var(--color-bg-accent);
  outline-offset: 2px;
}

/* Offset for fixed header navigation */
section[id] {
  scroll-margin-top: calc(var(--header-height) + 1.5rem);
}

a {
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}

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

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

img, svg {
  display: block;
}

/* --- Layout --- */
.container {
  width: 100%;
  max-width: 1240px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  color: var(--color-text-primary);
  font-weight: 700;
  line-height: 1.2;
}

h1, h2 {
  letter-spacing: -0.025em;
}

.hero__stat-val,
.demo-stats__val,
.calc-total-val,
.pricing-card__price,
.stat-metric {
  font-variant-numeric: tabular-nums;
}

.text-gradient {
  background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* --- Header / Navigation --- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background-color: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border-primary);
  z-index: 100;
  transition: background-color 0.3s, border-color 0.3s;
}

.theme-night .header {
  background-color: rgba(15, 23, 42, 0.9);
}

.theme-contrast .header {
  background-color: rgba(0, 0, 0, 0.95);
  border-bottom: 2px solid #ffffff;
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.header__logo {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--color-text-primary);
}

.header__logo svg {
  width: 2rem;
  height: 2rem;
  color: var(--color-bg-accent);
}

.header__nav {
  display: none;
  align-items: center;
  gap: 2rem;
}

@media (min-width: 768px) {
  .header__nav {
    display: flex;
  }
}

.header__link {
  font-weight: 500;
  color: var(--color-text-secondary);
  transition: color 0.2s ease;
}

.header__link:hover {
  color: var(--color-bg-accent);
}

.header__actions {
  display: none;
  align-items: center;
  gap: 1rem;
}

@media (min-width: 768px) {
  .header__actions {
    display: flex;
  }
}

/* Language Dropdown */
.lang-dropdown {
  position: relative;
}

.lang-dropdown__btn {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-md);
  color: var(--color-text-secondary);
  font-weight: 500;
  font-size: 0.875rem;
  transition: color 0.2s, background-color 0.2s;
}

.lang-dropdown__btn:hover {
  color: var(--color-bg-accent);
  background-color: var(--color-bg-secondary);
}

.lang-dropdown__btn svg {
  width: 1rem;
  height: 1rem;
}

.lang-dropdown__menu {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  background-color: var(--color-bg-primary);
  border: 1px solid var(--color-border-primary);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  min-width: 160px;
  padding: 0.375rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all 0.2s ease;
  z-index: 110;
}

.lang-dropdown.open .lang-dropdown__menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.lang-dropdown__item {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  width: 100%;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  border-radius: var(--radius-md);
  transition: background-color 0.15s, color 0.15s;
}

.lang-dropdown__item:hover, .lang-dropdown__item.active {
  background-color: var(--color-bg-secondary);
  color: var(--color-bg-accent);
  font-weight: 600;
}

.lang-dropdown__item-symbol {
  font-weight: 700;
  font-size: 0.75rem;
  padding: 0.125rem 0.375rem;
  background: var(--color-bg-secondary);
  border-radius: var(--radius-sm);
}

/* Mobile Toggle */
.header__mobile-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  color: var(--color-text-primary);
}

@media (min-width: 768px) {
  .header__mobile-toggle {
    display: none;
  }
}

.header__mobile-menu {
  position: fixed;
  top: var(--header-height);
  left: 0;
  right: 0;
  background-color: var(--color-bg-primary);
  border-bottom: 1px solid var(--color-border-primary);
  box-shadow: var(--shadow-xl);
  padding: 1.5rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  transform: translateY(-100%);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 90;
}

.header__mobile-menu.open {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 600;
  border-radius: var(--radius-xl);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  text-align: center;
  white-space: nowrap;
}

.btn:active {
  transform: translateY(1px);
  box-shadow: none;
}

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

.btn--md {
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
}

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

.btn--primary {
  background-color: var(--color-bg-accent);
  color: var(--color-text-accent);
  box-shadow: 0 4px 14px 0 rgba(37, 99, 235, 0.39);
}

.btn--primary:hover {
  background-color: var(--color-bg-accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.45);
}

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

.btn--secondary:hover {
  background-color: var(--color-bg-secondary);
  border-color: var(--color-border-primary);
  transform: translateY(-2px);
}

.btn--gradient {
  background: linear-gradient(135deg, #2563eb 0%, #4f46e5 100%);
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(37, 99, 235, 0.35);
}

.btn--gradient:hover {
  background: linear-gradient(135deg, #1d4ed8 0%, #4338ca 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(37, 99, 235, 0.5);
}

/* --- Hero Section --- */
.hero {
  position: relative;
  padding-top: calc(var(--header-height) + 5rem);
  padding-bottom: 6rem;
  background: linear-gradient(135deg, var(--color-bg-secondary) 0%, var(--color-bg-primary) 100%);
  overflow: hidden;
  text-align: center;
}

.hero__decoration {
  position: absolute;
  border-radius: var(--radius-full);
  pointer-events: none;
}

.hero__blob-1 {
  top: 6rem;
  left: 4rem;
  width: 5rem;
  height: 5rem;
  background-color: rgba(59, 130, 246, 0.2);
  animation: pulse 3s infinite;
}

.hero__blob-2 {
  top: 10rem;
  right: 5rem;
  width: 4.5rem;
  height: 4.5rem;
  background-color: rgba(168, 85, 247, 0.2);
  animation: bounce 4s infinite;
}

.hero__blob-3 {
  bottom: 5rem;
  left: 20%;
  width: 3.5rem;
  height: 3.5rem;
  background-color: rgba(34, 197, 94, 0.2);
  animation: ping 4s cubic-bezier(0, 0, 0.2, 1) infinite;
}

.hero__title {
  font-size: 2.75rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  max-width: 900px;
  margin: 0 auto 1.5rem;
}

@media (min-width: 1024px) {
  .hero__title {
    font-size: 3.75rem;
  }
}

.hero__subtitle {
  display: block;
  color: var(--color-bg-accent);
  margin-top: 0.5rem;
}

.hero__description {
  font-size: 1.25rem;
  color: var(--color-text-secondary);
  max-width: 720px;
  margin: 0 auto 2.5rem;
  line-height: 1.6;
}

.hero__actions {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  justify-content: center;
  align-items: center;
  margin-bottom: 3.5rem;
}

@media (min-width: 640px) {
  .hero__actions {
    flex-direction: row;
  }
}

.hero__stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--color-border-primary);
  max-width: 600px;
  margin: 0 auto;
}

.hero__stat-val {
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--color-text-primary);
}

.hero__stat-label {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  font-weight: 500;
}

/* --- Calculator Demo Section --- */
.demo-section {
  padding: 6rem 0;
  background: linear-gradient(135deg, #eef2ff 0%, #faf5ff 100%);
  position: relative;
  overflow: hidden;
}

.theme-night .demo-section {
  background: linear-gradient(135deg, #1e1b4b 0%, #2e1065 100%);
}

.demo-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3.5rem;
  align-items: center;
}

@media (min-width: 1024px) {
  .demo-grid {
    grid-template-columns: 1fr 1.1fr;
  }
}

.demo-content__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--color-bg-accent);
  font-weight: 700;
  font-size: 1.125rem;
  margin-bottom: 1rem;
}

.demo-content__title {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 1.25rem;
}

@media (min-width: 1024px) {
  .demo-content__title {
    font-size: 3rem;
  }
}

.demo-content__desc {
  font-size: 1.125rem;
  color: var(--color-text-secondary);
  line-height: 1.7;
  margin-bottom: 2rem;
}

.feature-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}

.feature-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.feature-icon-wrap {
  flex-shrink: 0;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 0.125rem;
}

.feature-icon-wrap--blue {
  background-color: #dbeafe;
  color: #2563eb;
}

.feature-icon-wrap--green {
  background-color: #dcfce7;
  color: #16a34a;
}

.feature-icon-wrap--purple {
  background-color: #f3e8ff;
  color: #9333ea;
}

.feature-text h4 {
  font-size: 1.0625rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

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

.demo-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--color-border-primary);
  text-align: center;
}

.demo-stats__val {
  font-size: 1.75rem;
  font-weight: 800;
}

.demo-stats__label {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  font-weight: 500;
}

/* Calculator Interactive Component */
.calc-wrapper {
  position: relative;
  max-width: 500px;
  margin: 0 auto;
}

.calc-glow {
  position: absolute;
  inset: -1rem;
  background: linear-gradient(135deg, #60a5fa 0%, #c084fc 100%);
  border-radius: var(--radius-2xl);
  filter: blur(24px);
  opacity: 0.35;
  animation: pulse 4s infinite;
}

.calc-card {
  position: relative;
  background-color: var(--color-bg-primary);
  border-radius: 1.75rem;
  box-shadow: var(--shadow-2xl);
  padding: 2rem;
  transition: transform 0.15s ease-out, box-shadow 0.3s ease;
  z-index: 10;
  border: 1px solid var(--color-border-primary);
}

.theme-night .calc-card {
  background-color: #1e293b;
  border: 1px solid var(--color-border-primary);
}

.theme-contrast .calc-card {
  background-color: #121212;
  border: 2px solid #ffffff;
}

.calc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.calc-header__title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--color-text-primary);
}

.calc-header__dots {
  display: flex;
  gap: 0.375rem;
}

.calc-dot {
  width: 0.75rem;
  height: 0.75rem;
  border-radius: var(--radius-full);
}

.calc-dot--red { background-color: #f87171; }
.calc-dot--yellow { background-color: #facc15; }
.calc-dot--green { background-color: #4ade80; animation: pulse 2s infinite; }

.calc-group {
  margin-bottom: 1.25rem;
}

.calc-label {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-text-secondary);
  margin-bottom: 0.5rem;
}

.calc-select, .calc-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--color-border-primary);
  border-radius: var(--radius-lg);
  background-color: var(--color-bg-primary);
  color: var(--color-text-primary);
  font-weight: 500;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.calc-select:focus, .calc-input:focus {
  outline: none;
  border-color: var(--color-bg-accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.calc-addons {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.calc-checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  cursor: pointer;
  user-select: none;
}

.calc-checkbox-custom {
  position: relative;
  width: 1.25rem;
  height: 1.25rem;
  border: 2px solid var(--color-border-secondary);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

input[type="checkbox"]:checked + .calc-checkbox-custom {
  background-color: var(--color-bg-accent);
  border-color: var(--color-bg-accent);
}

input[type="checkbox"]:focus-visible + .calc-checkbox-custom {
  outline: 2px solid var(--color-bg-accent);
  outline-offset: 2px;
}

.calc-checkbox-custom svg {
  display: none;
  width: 0.875rem;
  height: 0.875rem;
  color: #ffffff;
}

input[type="checkbox"]:checked + .calc-checkbox-custom svg {
  display: block;
}

.calc-total-box {
  background: linear-gradient(135deg, #eff6ff 0%, #e0e7ff 100%);
  border: 1px solid #bfdbfe;
  border-radius: var(--radius-xl);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

.theme-night .calc-total-box {
  background: linear-gradient(135deg, #1e293b 0%, #312e81 100%);
  border-color: #4338ca;
}

.theme-contrast .calc-total-box {
  background: #1a1a1a;
  border: 1px solid #ffffff;
}

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

.calc-total-val {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--color-bg-accent);
  animation: pulse 2.5s infinite;
}

.calc-total-breakdown {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  margin-top: 0.5rem;
}

.calc-powered {
  text-align: center;
  padding-top: 1rem;
  border-top: 1px solid var(--color-border-primary);
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

/* Floating badges around calculator */
.calc-badge-floating {
  position: absolute;
  top: -1.25rem;
  left: -1.25rem;
  background-color: var(--color-bg-primary);
  border-radius: var(--radius-full);
  padding: 0.625rem 1rem;
  box-shadow: var(--shadow-lg);
  font-weight: 700;
  color: #16a34a;
  display: flex;
  align-items: center;
  gap: 0.375rem;
  animation: bounce 3s infinite;
  z-index: 20;
  border: 1px solid var(--color-border-primary);
}

.theme-night .calc-badge-floating {
  background-color: #1e293b;
  border: 1px solid var(--color-border-primary);
}

.theme-contrast .calc-badge-floating {
  background-color: #121212;
  color: #00ff66;
  border: 1px solid #ffffff;
}

/* --- Benefits Section --- */
.benefits-section {
  padding: 6rem 0;
  background-color: var(--color-bg-primary);
}

.section-header {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 4rem;
}

.section-header__title {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 1rem;
}

.section-header__subtitle {
  font-size: 1.25rem;
  color: var(--color-text-secondary);
  line-height: 1.6;
}

.benefits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
}

.benefit-card {
  position: relative;
  background: var(--color-bg-secondary);
  border: 1px solid var(--color-border-primary);
  border-radius: var(--radius-2xl);
  padding: 2.25rem;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  overflow: hidden;
}

.theme-night .benefit-card {
  background: #1e293b;
}

.theme-contrast .benefit-card {
  background: #121212;
  border-color: #ffffff;
}

.benefit-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-xl);
  border-color: rgba(37, 99, 235, 0.4);
}

.benefit-card__icon {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: var(--radius-xl);
  background-color: #dbeafe;
  color: var(--color-bg-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  transition: background-color 0.3s ease;
}

.benefit-card:hover .benefit-card__icon {
  background-color: #bfdbfe;
}

.benefit-card__title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

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

.benefit-card__bar {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 3px;
  background: linear-gradient(90deg, #2563eb, #8b5cf6);
  transition: width 0.4s ease;
}

.benefit-card:hover .benefit-card__bar {
  width: 100%;
}

/* --- Use Cases Section --- */
.usecases-section {
  padding: 6rem 0;
  background: linear-gradient(135deg, var(--color-bg-secondary) 0%, var(--color-accent-light) 100%);
}

.theme-night .usecases-section {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
}

.theme-contrast .usecases-section {
  background: #000000;
}

.theme-contrast .usecase-card {
  background-color: #121212;
  border: 1px solid #ffffff;
}

.usecases-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

@media (min-width: 1024px) {
  .usecases-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.usecase-card {
  position: relative;
  background-color: var(--color-bg-primary);
  border: 1px solid var(--color-border-primary);
  border-radius: var(--radius-xl);
  padding: 1.75rem;
  box-shadow: var(--shadow-md);
  transition: transform 0.3s, box-shadow 0.3s;
  cursor: pointer;
  display: flex;
  flex-direction: column;
}

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

.usecase-card__icon {
  width: 3.25rem;
  height: 3.25rem;
  border-radius: var(--radius-lg);
  background-color: var(--color-bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-primary);
  margin-bottom: 1.25rem;
}

.usecase-card__title {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.usecase-card__desc {
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  line-height: 1.5;
  margin-bottom: 1.25rem;
  flex-grow: 1;
}

.usecase-card__preview {
  background-color: var(--color-bg-secondary);
  border-radius: var(--radius-md);
  padding: 0.75rem;
}

.usecase-card__preview-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

.usecase-card__preview-bars {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.skeleton-bar {
  height: 6px;
  background-color: #cbd5e1;
  border-radius: var(--radius-full);
}

/* --- Pricing Section --- */
.pricing-section {
  padding: 6rem 0;
  background-color: var(--color-bg-primary);
}

.pricing-billing-toggle {
  display: inline-flex;
  align-items: center;
  background-color: var(--color-bg-secondary);
  padding: 0.375rem;
  border-radius: var(--radius-full);
  margin-bottom: 3.5rem;
  gap: 0.25rem;
  border: 1px solid var(--color-border-primary);
  flex-wrap: wrap;
  justify-content: center;
}

.pricing-toggle-btn {
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-text-secondary);
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.pricing-toggle-btn.active {
  background-color: var(--color-bg-primary);
  color: var(--color-text-primary);
  box-shadow: var(--shadow-sm);
}

.pricing-badge {
  font-size: 0.6875rem;
  padding: 0.125rem 0.5rem;
  border-radius: var(--radius-full);
  font-weight: 700;
}

.pricing-badge--green {
  background-color: #dcfce7;
  color: #15803d;
}

.pricing-badge--purple {
  background-color: #f3e8ff;
  color: #7e22ce;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
  margin-bottom: 4rem;
}

@media (min-width: 1024px) {
  .pricing-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.pricing-card {
  position: relative;
  background-color: var(--color-bg-primary);
  border: 1px solid var(--color-border-primary);
  border-radius: var(--radius-2xl);
  padding: 2.25rem;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  transition: transform 0.3s, box-shadow 0.3s;
}

.pricing-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-2xl);
}

.pricing-card--popular {
  background: linear-gradient(135deg, #eff6ff 0%, #f5f3ff 100%);
  border: 2px solid #3b82f6;
  box-shadow: var(--shadow-xl);
}

.theme-night .pricing-card--popular {
  background: linear-gradient(135deg, #1e293b 0%, #312e81 100%);
}

.theme-contrast .pricing-card {
  background-color: #121212;
  border: 2px solid #ffffff;
}

.theme-contrast .pricing-card--popular {
  background: #1a1a1a;
  border: 2px solid #0088ff;
}

.pricing-card__popular-badge {
  position: absolute;
  top: -1rem;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(90deg, #2563eb, #7c3aed);
  color: #ffffff;
  padding: 0.25rem 1rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  white-space: nowrap;
}

.pricing-card__name {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
  text-align: center;
}

.pricing-card__price-box {
  text-align: center;
  margin-bottom: 1.5rem;
}

.pricing-card__price {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--color-text-primary);
}

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

.pricing-card__calcs {
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  text-align: center;
  font-weight: 500;
  margin-bottom: 1.75rem;
}

.pricing-card__features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
  margin-bottom: 2rem;
  flex-grow: 1;
}

.pricing-card__feature-item {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  font-size: 0.9375rem;
  color: var(--color-text-secondary);
}

.pricing-card__feature-item svg {
  width: 1.125rem;
  height: 1.125rem;
  color: #10b981;
  flex-shrink: 0;
  margin-top: 0.1875rem;
}

/* Compare Table */
.compare-table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--color-border-primary);
  background-color: var(--color-bg-primary);
}

.theme-contrast .compare-table-wrap {
  background-color: #121212;
  border-color: #ffffff;
}

.compare-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.compare-table th, .compare-table td {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--color-border-primary);
}

.compare-table th {
  background-color: var(--color-bg-secondary);
  font-weight: 700;
  font-size: 0.9375rem;
}

.compare-table td {
  font-size: 0.875rem;
  color: var(--color-text-secondary);
}

.compare-table td:first-child {
  font-weight: 600;
  color: var(--color-text-primary);
}

.compare-table tr:last-child td {
  border-bottom: none;
}

/* --- FAQ Section --- */
.faq-section {
  padding: 6rem 0;
  background: linear-gradient(135deg, var(--color-bg-secondary) 0%, var(--color-accent-light) 100%);
}

.theme-night .faq-section {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
}

.theme-contrast .faq-section {
  background: #000000;
}

.theme-contrast .faq-item {
  background-color: #121212;
  border: 1px solid #ffffff;
}

.faq-list {
  max-width: 800px;
  margin: 0 auto 3rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.faq-item {
  background-color: var(--color-bg-primary);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  border: 1px solid var(--color-border-primary);
  transition: box-shadow 0.2s;
}

.faq-item:hover {
  box-shadow: var(--shadow-lg);
}

.faq-question {
  width: 100%;
  padding: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  text-align: left;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--color-text-primary);
}

.faq-question svg {
  width: 1.25rem;
  height: 1.25rem;
  color: var(--color-text-muted);
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

.faq-item.open .faq-question svg {
  transform: rotate(180deg);
  color: var(--color-bg-accent);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s cubic-bezier(0, 1, 0, 1), padding 0.3s ease;
  padding: 0 1.5rem;
}

.faq-item.open .faq-answer {
  max-height: 500px;
  padding: 0 1.5rem 1.5rem;
  transition: max-height 0.4s ease-in-out;
}

.faq-answer p {
  color: var(--color-text-secondary);
  line-height: 1.7;
  font-size: 0.9375rem;
  border-top: 1px solid var(--color-border-primary);
  padding-top: 1rem;
}

.faq-support-box {
  background-color: var(--color-bg-primary);
  border-radius: var(--radius-2xl);
  padding: 2.5rem;
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--color-border-primary);
}

.faq-support-box h3 {
  font-size: 1.375rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
}

.faq-support-box p {
  color: var(--color-text-secondary);
  margin-bottom: 1.5rem;
}

/* --- Footer --- */
.footer {
  background-color: var(--color-bg-secondary);
  border-top: 1px solid var(--color-border-primary);
  padding: 4.5rem 0 2rem;
  color: var(--color-text-primary);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  margin-bottom: 3.5rem;
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr;
  }
}

.footer__brand-desc {
  color: var(--color-text-secondary);
  font-size: 0.9375rem;
  line-height: 1.6;
  max-width: 420px;
  margin: 1rem 0 1.5rem;
}

.footer__madewith {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

.footer__madewith svg {
  color: #ef4444;
}

.footer__col-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  color: var(--color-text-primary);
}

.footer__links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer__links a {
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  transition: color 0.2s;
}

.footer__links a:hover {
  color: var(--color-bg-accent);
}

.footer__bottom {
  border-top: 1px solid var(--color-border-primary);
  padding-top: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
}

@media (min-width: 768px) {
  .footer__bottom {
    flex-direction: row;
  }
}

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

.footer__bottom-right {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.footer__status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--color-text-secondary);
}

.status-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: var(--radius-full);
  background-color: var(--color-success);
  animation: pulse 2s infinite;
}

.theme-selector {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--color-text-secondary);
}

.theme-selector select {
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border-primary);
  background-color: var(--color-bg-primary);
  color: var(--color-text-primary);
}

/* --- Cookie Consent Banner --- */
.cookie-banner {
  position: fixed;
  bottom: 1.5rem;
  left: 1.25rem;
  right: 1.25rem;
  max-width: 440px;
  background-color: var(--color-bg-primary);
  border: 1px solid var(--color-border-primary);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-2xl);
  padding: 1.5rem;
  z-index: 1000;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  transform: translateY(120%);
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
}

@media (min-width: 768px) {
  .cookie-banner {
    left: auto;
    right: 1.5rem;
  }
}

.cookie-banner.show {
  transform: translateY(0);
  opacity: 1;
}

.cookie-banner__icon {
  width: 1.75rem;
  height: 1.75rem;
  color: #f97316;
  flex-shrink: 0;
  margin-top: 0.25rem;
}

.cookie-banner__title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.375rem;
}

.cookie-banner__desc {
  font-size: 0.8125rem;
  color: var(--color-text-secondary);
  line-height: 1.5;
  margin-bottom: 1rem;
}

.cookie-banner__actions {
  display: flex;
  gap: 0.625rem;
}

/* --- RTL (Arabic) Support --- */
[dir="rtl"] {
  text-align: right;
}

[dir="rtl"] .header__logo {
  direction: ltr;
}

[dir="rtl"] .lang-dropdown__menu {
  right: auto;
  left: 0;
}

[dir="rtl"] .pricing-card__period {
  margin-left: 0;
  margin-right: 0.25rem;
}

[dir="rtl"] .faq-question {
  text-align: right;
}

[dir="rtl"] .compare-table {
  text-align: right;
}

