/* ===== CSS VARIABLES (from app_colors.dart) ===== */
:root {
  /* Primary palette */
  --color-primary: #2196F3;
  --color-primary-dark: #1976D2;
  --color-primary-light: #64B5F6;
  --color-primary-bg: #E3F2FD;

  /* Semantic colors */
  --color-success: #4CAF50;
  --color-success-bg: #E8F5E9;
  --color-warning: #FF9800;
  --color-warning-bg: #FFF3E0;
  --color-error: #F44336;
  --color-error-bg: #FFEBEE;

  /* Backgrounds & surfaces */
  --color-bg: #FFFFFF;
  --color-surface: #F5F5F5;
  --color-surface-elevated: #FFFFFF;
  --color-border: #E0E0E0;

  /* Text */
  --color-text-primary: #212121;
  --color-text-secondary: #757575;
  --color-text-hint: #BDBDBD;
  --color-text-on-primary: #FFFFFF;

  /* Spacing (from app_theme.dart) */
  --space-xs: 4px;
  --space-s: 8px;
  --space-m: 16px;
  --space-l: 24px;
  --space-xl: 32px;
  --space-xxl: 48px;
  --space-3xl: 64px;
  --space-4xl: 96px;

  /* Border radius */
  --radius-s: 8px;
  --radius-m: 12px;
  --radius-l: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
  --shadow-xl: 0 20px 60px rgba(0,0,0,0.15);

  /* Navbar */
  --navbar-height: 72px;
  --navbar-bg: rgba(255,255,255,0.92);
  --navbar-blur: 12px;

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;

  /* Font */
  --font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Dark theme */
[data-theme="dark"] {
  --color-bg: #121212;
  --color-surface: #1E1E1E;
  --color-surface-elevated: #2A2A2A;
  --color-border: #333333;
  --color-text-primary: #FFFFFF;
  --color-text-secondary: #B0B0B0;
  --color-text-hint: #666666;
  --color-primary: #64B5F6;
  --color-primary-bg: rgba(33,150,243,0.15);
  --color-success-bg: rgba(76,175,80,0.15);
  --color-warning-bg: rgba(255,152,0,0.15);
  --color-error-bg: rgba(244,67,54,0.15);
  --navbar-bg: rgba(18,18,18,0.92);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.5);
  --shadow-xl: 0 20px 60px rgba(0,0,0,0.6);
}

/* ===== RESET & BASE ===== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--navbar-height);
}

body {
  font-family: var(--font-family);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-text-primary);
  background-color: var(--color-bg);
  transition: background-color var(--transition-normal), color var(--transition-normal);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

h1, h2, h3, h4 {
  line-height: 1.25;
  color: var(--color-text-primary);
}
h1 { font-size: 3rem; font-weight: 700; }
h2 { font-size: 2.25rem; font-weight: 600; }
h3 { font-size: 1.5rem; font-weight: 600; }
h4 { font-size: 1.125rem; font-weight: 500; }

/* ===== LAYOUT ===== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-l);
}
.container-sm {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 var(--space-l);
}

.section {
  padding: var(--space-4xl) 0;
}
.section-alt {
  background-color: var(--color-surface);
}

.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto var(--space-3xl);
}
.section-header p {
  margin-top: var(--space-m);
  color: var(--color-text-secondary);
  font-size: 1.125rem;
}

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

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-s);
  padding: 12px 24px;
  border-radius: var(--radius-m);
  font-family: var(--font-family);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all var(--transition-fast);
  text-decoration: none;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); opacity: 1; }

.btn-primary {
  background: var(--color-primary);
  color: var(--color-text-on-primary);
}
.btn-primary:hover { background: var(--color-primary-dark); color: #fff; }

.btn-outline {
  background: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
}
.btn-outline:hover { background: var(--color-primary-bg); }

.btn-white {
  background: #FFFFFF;
  color: #212121;
  border-color: #FFFFFF;
}
.btn-white:hover { background: #F5F5F5; color: #212121; }

.btn-outline-white {
  background: transparent;
  color: #FFFFFF;
  border-color: rgba(255,255,255,0.5);
}
.btn-outline-white:hover { background: rgba(255,255,255,0.1); color: #fff; }

.btn-sm { padding: 8px 18px; font-size: 0.875rem; }
.btn-lg { padding: 14px 32px; font-size: 1.05rem; }
.btn-block { display: flex; justify-content: center; width: 100%; }

/* ===== BADGES ===== */
.section-badge {
  display: inline-block;
  padding: 6px 16px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: var(--space-m);
}
.badge-green { background: var(--color-success-bg); color: #2E7D32; }
.badge-blue { background: var(--color-primary-bg); color: #1565C0; }
.badge-orange { background: var(--color-warning-bg); color: #E65100; }
.badge-gold { background: linear-gradient(135deg, #FFD700, #FFA500); color: #fff; }

[data-theme="dark"] .badge-green { color: #66BB6A; }
[data-theme="dark"] .badge-blue { color: #64B5F6; }
[data-theme="dark"] .badge-orange { color: #FFB74D; }

/* ===== NAVBAR ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--navbar-height);
  background: var(--navbar-bg);
  backdrop-filter: blur(var(--navbar-blur));
  -webkit-backdrop-filter: blur(var(--navbar-blur));
  z-index: 1000;
  transition: background var(--transition-normal), box-shadow var(--transition-normal);
}
.navbar.scrolled {
  box-shadow: var(--shadow-sm);
}

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

.nav-logo img {
  height: 43px;
  width: auto;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: var(--space-xl);
}
.nav-links a {
  color: var(--color-text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color var(--transition-fast);
}
.nav-links a:hover { color: var(--color-primary); opacity: 1; }

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

/* Theme toggle */
.theme-toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-s);
  color: var(--color-text-secondary);
  display: flex;
  align-items: center;
  border-radius: var(--radius-s);
  transition: background var(--transition-fast);
}
.theme-toggle:hover { background: var(--color-surface); }

.icon-moon { display: none; }
[data-theme="dark"] .icon-sun { display: none; }
[data-theme="dark"] .icon-moon { display: block; }

/* Logo switching */
.logo-dark { display: none; }
[data-theme="dark"] .logo-light { display: none; }
[data-theme="dark"] .logo-dark { display: block; }

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-s);
}
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-text-primary);
  transition: all var(--transition-fast);
  border-radius: 2px;
}
.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ===== HERO ===== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding-top: var(--navbar-height);
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: url('../images/hero-bg-pharmacy.jpg') center/cover no-repeat;
  z-index: 0;
}
.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(25,118,210,0.85) 0%, rgba(33,150,243,0.80) 40%, rgba(21,101,192,0.88) 100%);
}

.hero-content {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: var(--space-3xl);
  max-width: 1200px;
  padding: var(--space-xxl) var(--space-l);
  width: 100%;
}

.hero-text {
  flex: 1;
  color: #FFFFFF;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: var(--space-l);
}

.gradient-text {
  background: linear-gradient(135deg, #FFD700, #FFA500);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.2rem;
  line-height: 1.7;
  opacity: 0.9;
  margin-bottom: var(--space-xl);
  max-width: 500px;
}

.hero-buttons {
  display: flex;
  gap: var(--space-m);
  flex-wrap: wrap;
}

.hero-mockup {
  flex-shrink: 0;
}

.hero-scroll-indicator {
  position: absolute;
  bottom: var(--space-xl);
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.6);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-s);
  font-size: 0.8rem;
  animation: bounce 2s infinite;
  z-index: 1;
}

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

/* ===== PHONE FRAME (CSS-only device mockup) ===== */
.phone-frame {
  position: relative;
  width: 280px;
  background: #000;
  border-radius: 40px;
  padding: 12px;
  box-shadow: var(--shadow-xl), 0 0 0 2px rgba(255,255,255,0.1);
  overflow: hidden;
}
.phone-frame::before {
  content: '';
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 28px;
  background: #000;
  border-radius: 0 0 16px 16px;
  z-index: 2;
}
.phone-frame img {
  border-radius: 28px;
  width: 100%;
  height: auto;
  display: block;
  max-height: 540px;
  object-fit: cover;
  object-position: top;
}

.phone-tilted {
  transform: perspective(1000px) rotateY(-8deg) rotateX(2deg);
  transition: transform var(--transition-slow);
}
.phone-tilted:hover { transform: perspective(1000px) rotateY(-3deg) rotateX(1deg); }

.phone-tilted-left {
  transform: perspective(1000px) rotateY(8deg) rotateX(2deg);
  transition: transform var(--transition-slow);
}
.phone-tilted-left:hover { transform: perspective(1000px) rotateY(3deg) rotateX(1deg); }

.phone-sm { width: 220px; border-radius: 32px; }
.phone-sm::before { width: 80px; height: 22px; }
.phone-sm img { border-radius: 22px; }

.phone-android { border-radius: 28px; }
.phone-android::before {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  top: 8px;
}

/* ===== LAPTOP FRAME ===== */
.laptop-frame {
  position: relative;
  width: 500px;
  background: #1a1a1a;
  border-radius: 12px 12px 0 0;
  padding: 8px 8px 0;
  box-shadow: var(--shadow-lg);
}
.laptop-frame img {
  border-radius: 6px 6px 0 0;
  width: 100%;
  height: auto;
}
.laptop-frame::after {
  content: '';
  display: block;
  width: 120%;
  height: 16px;
  background: linear-gradient(180deg, #333, #222);
  border-radius: 0 0 8px 8px;
  margin: 0 -10%;
}

/* ===== STATS BAR ===== */
.stats-bar {
  background: var(--color-surface);
  padding: var(--space-xl) 0;
  border-bottom: 1px solid var(--color-border);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-l);
  text-align: center;
}

.stat-item {}
.stat-number {
  display: block;
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-primary);
}
.stat-label {
  display: block;
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  margin-top: var(--space-xs);
}

/* ===== FEATURES GRID ===== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-l);
}

.feature-card {
  background: var(--color-surface-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-l);
  padding: var(--space-xl);
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}
.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.feature-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-m);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-m);
}

.feature-card h3 {
  font-size: 1.15rem;
  margin-bottom: var(--space-s);
}
.feature-card p {
  color: var(--color-text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* ===== SHOWCASE SECTIONS ===== */
.showcase {
  display: flex;
  align-items: center;
  gap: var(--space-3xl);
}
.showcase-right { flex-direction: row; }
.showcase-left { flex-direction: row; }

.showcase-text { flex: 1; }
.showcase-text h2 { margin-bottom: var(--space-m); }
.showcase-text > p {
  color: var(--color-text-secondary);
  font-size: 1.05rem;
  line-height: 1.7;
  margin-bottom: var(--space-l);
}

.showcase-mockup {
  flex-shrink: 0;
  display: flex;
  justify-content: center;
}

.feature-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-m);
}
.feature-list li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-m);
  font-size: 0.95rem;
}
.feature-list li svg { flex-shrink: 0; margin-top: 2px; }

/* ===== TUTORIAL ===== */
.tutorial-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: var(--space-m);
}

.tutorial-step {
  background: var(--color-surface-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-m);
  padding: var(--space-l) var(--space-m);
  text-align: center;
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}
.tutorial-step:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.tutorial-step-number {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--color-warning);
  color: #fff;
  font-weight: 700;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-m);
}

.tutorial-step h4 {
  margin-bottom: var(--space-xs);
  font-size: 0.95rem;
}
.tutorial-step p {
  color: var(--color-text-secondary);
  font-size: 0.8rem;
  line-height: 1.5;
}

/* ===== PLATFORM SHOWCASE ===== */
.platform-showcase {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: var(--space-xl);
  margin-bottom: var(--space-xl);
}

.platform-device { text-align: center; }

.device-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text-secondary);
  margin-bottom: var(--space-m);
}

.platform-badges {
  display: flex;
  justify-content: center;
  gap: var(--space-m);
  flex-wrap: wrap;
}

.store-badge { transition: transform var(--transition-fast); }
.store-badge:hover { transform: translateY(-2px); opacity: 1; }
.store-badge img,
.store-badge svg { height: 48px; width: auto; }

/* Light/dark badge switching */
.badge-dark { display: none; }
[data-theme="dark"] .badge-light { display: none; }
[data-theme="dark"] .badge-dark { display: block; }

/* ===== PRICING ===== */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-l);
  align-items: start;
}

.pricing-card {
  position: relative;
  background: var(--color-surface-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-l);
  padding: var(--space-xl);
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}
.pricing-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.pricing-featured {
  border-color: var(--color-primary);
  border-width: 2px;
  transform: scale(1.03);
}
.pricing-featured:hover { transform: scale(1.03) translateY(-4px); }

.pricing-badge {
  position: absolute;
  top: -12px;
  right: var(--space-l);
  background: var(--color-primary);
  color: #fff;
  padding: 4px 14px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
}
.pricing-badge.badge-gold {
  background: linear-gradient(135deg, #FFD700, #FFA500);
}

.pricing-header {
  text-align: center;
  margin-bottom: var(--space-l);
  padding-bottom: var(--space-l);
  border-bottom: 1px solid var(--color-border);
}
.pricing-header h3 {
  font-size: 1.25rem;
  margin-bottom: var(--space-s);
}

.pricing-price { display: flex; align-items: baseline; justify-content: center; gap: 4px; }
.price-amount { font-size: 2.5rem; font-weight: 700; color: var(--color-text-primary); }
.price-period { font-size: 0.9rem; color: var(--color-text-secondary); }
.price-savings {
  display: block;
  margin-top: var(--space-s);
  font-size: 0.8rem;
  color: var(--color-success);
  font-weight: 500;
}

.pricing-features {
  list-style: none;
  margin-bottom: var(--space-l);
  display: flex;
  flex-direction: column;
  gap: var(--space-s);
}
.pricing-features li {
  font-size: 0.9rem;
  padding-left: 28px;
  position: relative;
  color: var(--color-text-secondary);
}
.pricing-features li::before {
  position: absolute;
  left: 0;
  font-size: 1rem;
}
.pricing-features li.included::before {
  content: '\2713';
  color: var(--color-success);
  font-weight: 700;
}
.pricing-features li.not-included {
  opacity: 0.4;
}
.pricing-features li.not-included::before {
  content: '\2717';
  color: var(--color-text-hint);
}

/* ===== FAQ ===== */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-s);
}

.faq-item {
  background: var(--color-surface-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-m);
  overflow: hidden;
  transition: box-shadow var(--transition-normal);
}
.faq-item:hover { box-shadow: var(--shadow-sm); }

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-l);
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-family);
  font-size: 1rem;
  font-weight: 500;
  color: var(--color-text-primary);
  text-align: left;
}
.faq-question svg {
  flex-shrink: 0;
  transition: transform var(--transition-normal);
  color: var(--color-text-secondary);
}
.faq-item.active .faq-question svg { transform: rotate(180deg); }

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-normal), padding var(--transition-normal);
}
.faq-item.active .faq-answer {
  max-height: 300px;
}
.faq-answer p {
  padding: 0 var(--space-l) var(--space-l);
  color: var(--color-text-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* ===== CTA SECTION ===== */
.cta-section {
  background: linear-gradient(135deg, #1976D2 0%, #2196F3 50%, #1565C0 100%);
  text-align: center;
  padding: var(--space-4xl) 0;
}

.cta-content h2 {
  color: #FFFFFF;
  font-size: 2.5rem;
  margin-bottom: var(--space-m);
}
.cta-content p {
  color: rgba(255,255,255,0.85);
  font-size: 1.15rem;
  margin-bottom: var(--space-xl);
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}
.cta-buttons {
  display: flex;
  justify-content: center;
  gap: var(--space-m);
  flex-wrap: wrap;
}

/* ===== FOOTER ===== */
.footer {
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  padding: var(--space-3xl) 0 var(--space-xl);
}

.footer-content {
  display: grid;
  grid-template-columns: 1.5fr repeat(4, 1fr);
  gap: var(--space-xl);
  margin-bottom: var(--space-xl);
}

.footer-links {
  display: contents;
}

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

.footer-logo { height: 30px; width: auto; }

.footer-col {
  display: flex;
  flex-direction: column;
  gap: var(--space-s);
}
.footer-col h4 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--color-text-hint);
  margin-bottom: var(--space-s);
}
.footer-col a {
  color: var(--color-text-secondary);
  font-size: 0.9rem;
}
.footer-col a:hover { color: var(--color-primary); }

.footer-bottom {
  text-align: center;
  padding-top: var(--space-xl);
  border-top: 1px solid var(--color-border);
}
.footer-bottom p {
  color: var(--color-text-hint);
  font-size: 0.8rem;
}

/* ===== FEATURE CARD EXPAND ===== */
.feature-card {
  cursor: pointer;
  position: relative;
}
.feature-card::after {
  content: '';
  position: absolute;
  right: var(--space-l);
  top: var(--space-l);
  width: 20px;
  height: 20px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") center/contain no-repeat;
  transition: transform var(--transition-normal);
}
.feature-card.expanded::after {
  transform: rotate(180deg);
}

.feature-expand-panel {
  grid-column: 1 / -1;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.4s ease, opacity 0.3s ease;
  opacity: 0;
  background: var(--color-surface-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-l);
}
.feature-expand-panel.active {
  max-height: 600px;
  opacity: 1;
  padding: var(--space-l);
}

.feature-expand-content {
  display: flex;
  gap: var(--space-l);
  align-items: flex-start;
}

.feature-expand-screenshots {
  display: flex;
  gap: var(--space-m);
  flex: 1;
  overflow-x: auto;
  padding-bottom: var(--space-s);
}
.feature-expand-screenshots img {
  height: 320px;
  width: auto;
  border-radius: var(--radius-m);
  box-shadow: var(--shadow-md);
  flex-shrink: 0;
}

.feature-expand-text {
  flex: 0 0 280px;
}
.feature-expand-text h4 {
  margin-bottom: var(--space-s);
}
.feature-expand-text p {
  color: var(--color-text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* ===== CONTACT FORM ===== */
.contact-section {
  background: var(--color-surface);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3xl);
  align-items: start;
}

.contact-info h3 {
  margin-bottom: var(--space-m);
}
.contact-info p {
  color: var(--color-text-secondary);
  line-height: 1.7;
  margin-bottom: var(--space-l);
}
.contact-email-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-s);
  font-weight: 500;
  font-size: 1rem;
}

.contact-form {
  background: var(--color-surface-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-l);
  padding: var(--space-xl);
}

.form-group {
  margin-bottom: var(--space-m);
}
.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--color-text-secondary);
  margin-bottom: var(--space-xs);
}
.form-group select,
.form-group input,
.form-group textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-s);
  font-family: var(--font-family);
  font-size: 0.95rem;
  color: var(--color-text-primary);
  background: var(--color-bg);
  transition: border-color var(--transition-fast);
}
.form-group select:focus,
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-primary);
}
.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.form-success,
.form-error {
  display: none;
  padding: var(--space-m);
  border-radius: var(--radius-s);
  font-size: 0.9rem;
  margin-top: var(--space-m);
}
.form-success {
  background: var(--color-success-bg);
  color: #2E7D32;
}
.form-error {
  background: var(--color-error-bg);
  color: #C62828;
}
[data-theme="dark"] .form-success { color: #66BB6A; }
[data-theme="dark"] .form-error { color: #EF5350; }

.form-success.show,
.form-error.show { display: block; }

/* ===== TABLET DEVICES ===== */
.platform-tablet {
  text-align: center;
}
.tablet-frame {
  position: relative;
  width: 180px;
  background: #000;
  border-radius: 20px;
  padding: 10px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.tablet-frame img {
  border-radius: 12px;
  width: 100%;
  height: auto;
  display: block;
}

/* ===== SCROLL ANIMATIONS ===== */
.animate-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.animate-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children */
.features-grid .animate-in:nth-child(2) { transition-delay: 0.1s; }
.features-grid .animate-in:nth-child(3) { transition-delay: 0.2s; }
.features-grid .animate-in:nth-child(4) { transition-delay: 0.3s; }
.features-grid .animate-in:nth-child(5) { transition-delay: 0.4s; }
.features-grid .animate-in:nth-child(6) { transition-delay: 0.5s; }

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .animate-in {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .hero-scroll-indicator { animation: none; }
  html { scroll-behavior: auto; }
}

/* ===== RESPONSIVE — TABLET ===== */
@media (max-width: 1023px) {
  h1 { font-size: 2.5rem; }
  h2 { font-size: 1.875rem; }

  .hero-content { flex-direction: column; text-align: center; }
  .hero-text { max-width: 600px; }
  .hero-subtitle { margin-left: auto; margin-right: auto; }
  .hero-buttons { justify-content: center; }
  .hero-title { font-size: 2.75rem; }

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

  .showcase {
    flex-direction: column !important;
    text-align: center;
  }
  .showcase-text { order: 1; }
  .showcase-mockup { order: 2; }
  .feature-list { align-items: flex-start; max-width: 450px; margin: 0 auto; }

  .pricing-grid { grid-template-columns: repeat(2, 1fr); }
  .pricing-featured { transform: scale(1); }
  .pricing-featured:hover { transform: translateY(-4px); }

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

  .platform-showcase { flex-wrap: wrap; }
  .laptop-frame { width: 400px; }

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

  .feature-expand-content { flex-direction: column; }
  .feature-expand-text { flex: 1; }
}

/* ===== RESPONSIVE — MOBILE ===== */
@media (max-width: 767px) {
  :root { --space-4xl: 64px; }

  h1 { font-size: 2rem; }
  h2 { font-size: 1.5rem; }
  .section { padding: var(--space-3xl) 0; }

  /* Navbar mobile */
  .nav-links {
    display: none;
    position: fixed;
    top: var(--navbar-height);
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--color-bg);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-xl);
    z-index: 999;
  }
  .nav-links.active { display: flex; }
  .nav-links a { font-size: 1.25rem; }
  .nav-cta { display: none; }
  .hamburger { display: flex; }

  /* Hero */
  .hero-title { font-size: 2.25rem; }
  .hero-subtitle { font-size: 1rem; }
  .hero-buttons { flex-direction: column; align-items: center; }
  .hero-buttons .btn { width: 100%; max-width: 280px; justify-content: center; }
  .hero-scroll-indicator { display: none; }
  .phone-frame { width: 240px; }

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

  /* Features */
  .features-grid { grid-template-columns: 1fr; }

  /* Pricing */
  .pricing-grid { grid-template-columns: 1fr; max-width: 400px; margin: 0 auto; }

  /* Tutorial */
  .tutorial-steps { grid-template-columns: repeat(2, 1fr); }

  /* Platform */
  .platform-showcase { flex-direction: column; align-items: center; }
  .platform-device.platform-laptop { order: -1; }
  .laptop-frame { width: 100%; max-width: 350px; }
  .phone-sm { width: 180px; }
  .tablet-frame { width: 140px; }

  /* Contact */
  .contact-grid { grid-template-columns: 1fr; }

  /* Feature expand */
  .feature-expand-screenshots img { height: 240px; }
  .feature-expand-content { flex-direction: column; }
  .feature-expand-text { flex: 1; }

  /* Footer */
  .footer-content { grid-template-columns: 1fr; }
  .footer-brand { text-align: center; }
  .footer-brand p { margin-left: auto; margin-right: auto; }
  .footer-logo { margin: 0 auto; }
  .footer-col { align-items: center; }

  /* CTA */
  .cta-content h2 { font-size: 1.75rem; }
  .cta-buttons { flex-direction: column; align-items: center; }
}

/* ===== SMALL PHONES ===== */
@media (max-width: 380px) {
  .hero-title { font-size: 1.85rem; }
  .phone-frame { width: 200px; }
  .tutorial-steps { grid-template-columns: 1fr; }
}
