/* HSA Vault Landing Page Styles */
/* Dark-first design inspired by modern SaaS */

/* ===== Theme Variables ===== */
:root {
  /* Dark theme (default) */
  --bg-primary: #0a0a0a;
  --bg-secondary: #111111;
  --bg-card: #161616;
  --bg-card-hover: #1a1a1a;
  --text-primary: #ffffff;
  --text-secondary: #a0a0a0;
  --text-muted: #666666;
  --border-color: #222222;
  --accent-primary: #22c55e;
  --accent-primary-hover: #16a34a;
  --accent-secondary: #3b82f6;
  --gradient-start: #22c55e;
  --gradient-end: #16a34a;
}

[data-theme="light"] {
  --bg-primary: #ffffff;
  --bg-secondary: #f8f9fa;
  --bg-card: #ffffff;
  --bg-card-hover: #f1f5f9;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --border-color: #e2e8f0;
  --accent-primary: #16a34a;
  --accent-primary-hover: #15803d;
}

/* ===== Base Styles ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

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

h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
}

h2 {
  font-size: clamp(2rem, 4vw, 3rem);
}

h3 {
  font-size: 1.25rem;
}

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

/* ===== Buttons ===== */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 2rem;
  background: var(--accent-primary);
  color: #000000;
  font-weight: 600;
  font-size: 1rem;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.2s ease;
  border: none;
  cursor: pointer;
}

.btn-primary:hover {
  background: var(--accent-primary-hover);
  transform: translateY(-1px);
}

.btn-lg {
  padding: 1rem 2.5rem;
  font-size: 1.125rem;
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  padding: 0.75rem 1.25rem;
  background: transparent;
  color: var(--text-primary);
  font-weight: 500;
  font-size: 0.9375rem;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-ghost:hover {
  background: var(--bg-card);
  color: var(--accent-primary);
}

.btn-disabled {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 2rem;
  background: var(--bg-card);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 1rem;
  border-radius: 8px;
  cursor: not-allowed;
}

/* ===== Navigation ===== */
.landing-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(10, 10, 10, 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
}

[data-theme="light"] .landing-nav {
  background: rgba(255, 255, 255, 0.9);
}

.landing-nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--text-primary);
}

.logo-icon {
  font-size: 1.5rem;
}

.logo-text {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  cursor: pointer;
  font-size: 1.25rem;
  transition: all 0.2s ease;
}

.theme-toggle:hover {
  background: var(--bg-card);
  border-color: var(--text-muted);
}

/* Dark mode: show moon, on hover show sun */
.theme-icon-light {
  display: none;
}

.theme-toggle:hover .theme-icon-dark {
  display: none;
}

.theme-toggle:hover .theme-icon-light {
  display: block;
}

/* Light mode: show sun, on hover show moon */
[data-theme="light"] .theme-icon-dark {
  display: none;
}

[data-theme="light"] .theme-icon-light {
  display: block;
}

[data-theme="light"] .theme-toggle:hover .theme-icon-dark {
  display: block;
}

[data-theme="light"] .theme-toggle:hover .theme-icon-light {
  display: none;
}

/* ===== Hero Section ===== */
.hero {
  padding: 10rem 0 6rem;
  background: var(--bg-primary);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  height: 100%;
  background: radial-gradient(ellipse at top center, rgba(34, 197, 94, 0.08) 0%, transparent 60%);
  pointer-events: none;
}

.hero .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.hero-content h1 {
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.25rem;
  line-height: 1.7;
  margin-bottom: 2.5rem;
  color: var(--text-secondary);
}

.hero-cta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.75rem;
}

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

/* App Preview Mock */
.app-preview {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.preview-header {
  background: var(--bg-secondary);
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-color);
}

.preview-dots {
  display: flex;
  gap: 6px;
}

.preview-dots span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--border-color);
}

.preview-dots span:nth-child(1) {
  background: #ff5f57;
}

.preview-dots span:nth-child(2) {
  background: #febc2e;
}

.preview-dots span:nth-child(3) {
  background: #28c840;
}

.preview-content {
  padding: 1.5rem;
}

.preview-stat {
  background: linear-gradient(135deg, var(--accent-primary), var(--gradient-end));
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1rem;
  text-align: center;
}

.preview-stat-value {
  display: block;
  font-size: 2rem;
  font-weight: 700;
  color: #000;
}

.preview-stat-label {
  display: block;
  font-size: 0.875rem;
  color: rgba(0, 0, 0, 0.7);
  margin-top: 0.25rem;
}

.preview-receipt {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 1rem;
  margin-bottom: 0.75rem;
}

.preview-receipt-icon {
  font-size: 1.5rem;
}

.preview-receipt-info {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.preview-receipt-provider {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.9375rem;
}

.preview-receipt-amount {
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.preview-receipt-badge {
  padding: 0.25rem 0.75rem;
  background: rgba(251, 191, 36, 0.2);
  color: #fbbf24;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}

.preview-receipt-badge.reimbursed {
  background: rgba(34, 197, 94, 0.2);
  color: var(--accent-primary);
}

/* ===== Features Section ===== */
.features {
  padding: 6rem 0;
  background: var(--bg-secondary);
}

.section-title {
  text-align: center;
  margin-bottom: 1rem;
}

.section-subtitle {
  text-align: center;
  color: var(--text-secondary);
  margin-bottom: 3rem;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-top: 3rem;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 2rem;
  transition: all 0.3s ease;
}

.feature-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent-primary);
  transform: translateY(-4px);
}

.feature-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

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

.feature-card p {
  font-size: 0.9375rem;
  line-height: 1.6;
}

/* ===== How It Works Section ===== */
.how-it-works {
  padding: 6rem 0;
  background: var(--bg-primary);
}

.steps {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 2rem;
  margin-top: 3rem;
}

.step {
  flex: 1;
  max-width: 300px;
  text-align: center;
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: var(--accent-primary);
  color: #000;
  font-size: 1.25rem;
  font-weight: 700;
  border-radius: 50%;
  margin-bottom: 1.5rem;
}

.step h3 {
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.step p {
  font-size: 0.9375rem;
}

.step-arrow {
  color: var(--text-muted);
  font-size: 2rem;
  padding-top: 0.5rem;
}

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

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 3rem;
}

.pricing-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 2rem;
  position: relative;
  display: flex;
  flex-direction: column;
}

.pricing-card.current {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 1px var(--accent-primary);
}

.pricing-card.disabled {
  opacity: 0.5;
}

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

.pricing-card h3 {
  color: var(--text-primary);
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.pricing-price {
  margin-bottom: 1.5rem;
}

.pricing-price .price {
  font-size: 3rem;
  font-weight: 700;
  color: var(--text-primary);
}

.pricing-price .period {
  color: var(--text-muted);
  font-size: 1rem;
}

.pricing-features {
  list-style: none;
  margin-bottom: 2rem;
  flex: 1;
}

.pricing-features li {
  padding: 0.5rem 0;
  color: var(--text-secondary);
  font-size: 0.9375rem;
}

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

/* ===== Final CTA Section ===== */
.final-cta {
  padding: 6rem 0;
  background: var(--bg-primary);
  text-align: center;
  position: relative;
}

.final-cta::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  height: 100%;
  background: radial-gradient(ellipse at bottom center, rgba(34, 197, 94, 0.08) 0%, transparent 60%);
  pointer-events: none;
}

.final-cta h2 {
  margin-bottom: 1rem;
}

.final-cta p {
  font-size: 1.125rem;
  margin-bottom: 2rem;
  color: var(--text-secondary);
}

/* ===== Footer ===== */
.landing-footer {
  padding: 3rem 0;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
}

.landing-footer .container {
  text-align: center;
}

.footer-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.footer-tagline {
  color: var(--text-muted);
  font-size: 0.875rem;
  margin-bottom: 1.5rem;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 1.5rem;
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9375rem;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--accent-primary);
}

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

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

  .pricing-grid {
    grid-template-columns: 1fr;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
  }
}

@media (max-width: 768px) {
  .hero .container {
    grid-template-columns: 1fr;
    gap: 3rem;
    text-align: center;
  }

  .hero-content {
    order: 1;
  }

  .hero-visual {
    order: 2;
  }

  .hero-cta {
    align-items: center;
  }

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

  .steps {
    flex-direction: column;
    align-items: center;
  }

  .step-arrow {
    transform: rotate(90deg);
    padding: 0;
  }

  .nav-actions .btn-ghost {
    display: none;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 1rem;
  }

  .hero {
    padding: 8rem 0 4rem;
  }

  .landing-nav .container {
    padding: 0.75rem 1rem;
  }

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

  .btn-primary {
    padding: 0.75rem 1.5rem;
  }

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

/* ===== Landing Nav Tools ===== */
.nav-tools {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-tool-link {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 0.875rem;
  color: var(--text-secondary);
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
  border-radius: 6px;
  transition: all 0.2s;
}

.nav-tool-link:hover {
  color: var(--text-primary);
  background: var(--bg-card);
}

.nav-badge {
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 0.125rem 0.375rem;
  background: var(--accent-primary);
  color: #000;
  border-radius: 8px;
}

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

/* ===== Tools Showcase Section ===== */
.tools-showcase {
  padding: 6rem 0;
  background: var(--bg-primary);
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-top: 2rem;
}

.tool-card {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.5rem;
  text-decoration: none;
  transition: all 0.2s ease;
}

.tool-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent-primary);
  transform: translateY(-2px);
}

.tool-card .tool-icon {
  font-size: 2.5rem;
  flex-shrink: 0;
}

.tool-card .tool-info {
  flex: 1;
}

.tool-card .tool-info h3 {
  color: var(--text-primary);
  font-size: 1.125rem;
  margin-bottom: 0.25rem;
}

.tool-card .tool-info p {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  margin: 0;
}

.tool-card .tool-badge {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 0.25rem 0.625rem;
  background: var(--accent-primary);
  color: #000;
  border-radius: 10px;
  flex-shrink: 0;
}

.tool-card .tool-arrow {
  color: var(--text-muted);
  font-size: 1.25rem;
  transition: transform 0.2s;
}

.tool-card:hover .tool-arrow {
  color: var(--accent-primary);
  transform: translateX(4px);
}

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

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

  .tool-card .tool-badge {
    order: 3;
  }

  .tool-card .tool-arrow {
    display: none;
  }
}
