/* ==========================================================================
   FlashDrive Pro — Marketing Website Styles
   Dark-first, responsive, vanilla CSS with custom properties
   ========================================================================== */

/* ---------- Google Fonts (loaded via <link> in HTML) ---------- */

/* ---------- CSS Custom Properties ---------- */
:root {
  /* Dark theme (default) */
  --bg-primary: #0F172A;
  --bg-secondary: #1E293B;
  --bg-card: #1E293B;
  --text-primary: #F8FAFC;
  --text-secondary: #94A3B8;
  --text-muted: #64748B;
  --border: #334155;

  /* Brand colors */
  --blue: #0EA5E9;
  --purple: #8B5CF6;
  --green: #22C55E;
  --amber: #F59E0B;

  /* Gradients */
  --gradient-hero: linear-gradient(135deg, #0EA5E9 0%, #8B5CF6 100%);

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 2rem;
  --space-xl: 4rem;
  --space-2xl: 6rem;

  /* Typography */
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 2rem;
  --text-4xl: 2.5rem;
  --text-5xl: 3.5rem;

  /* Layout */
  --max-width: 1200px;
  --header-height: 4rem;
  --radius: 0.75rem;
  --radius-lg: 1rem;
}

[data-theme="light"] {
  --bg-primary: #FFFFFF;
  --bg-secondary: #F8FAFC;
  --bg-card: #F1F5F9;
  --text-primary: #0F172A;
  --text-secondary: #475569;
  --text-muted: #94A3B8;
  --border: #E2E8F0;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
ul, ol { list-style: none; }

/* ---------- Utilities ---------- */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 1.5rem; }
.text-center { text-align: center; }
.text-gradient {
  background: var(--gradient-hero);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.flex-center { display: flex; align-items: center; justify-content: center; }

/* Grid */
.grid-2, .grid-3, .grid-4 { display: grid; gap: var(--space-lg); }
@media (min-width: 640px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 768px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  top: 0;
  width: 100%;
  height: var(--header-height);
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
  display: flex;
  align-items: center;
}
[data-theme="light"] .site-header {
  background: rgba(255, 255, 255, 0.85);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}
.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: var(--text-lg);
  color: var(--text-primary);
  text-decoration: none;
}
.logo img { border-radius: 8px; }

/* Nav */
.nav {
  display: none;
  gap: var(--space-sm);
}
.nav-link {
  padding: 0.5rem 0.75rem;
  color: var(--text-secondary);
  font-size: var(--text-sm);
  font-weight: 500;
  text-decoration: none;
  border-radius: var(--radius);
  transition: color 0.2s, background 0.2s;
}
.nav-link:hover, .nav-link.active {
  color: var(--text-primary);
  background: var(--bg-secondary);
  text-decoration: none;
}

/* Header actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}
.theme-toggle {
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.4rem;
  cursor: pointer;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  transition: color 0.2s, border-color 0.2s;
}
.theme-toggle:hover { color: var(--text-primary); border-color: var(--text-muted); }
.theme-toggle .icon-sun { display: none; }
[data-theme="light"] .theme-toggle .icon-moon { display: none; }
[data-theme="light"] .theme-toggle .icon-sun { display: block; }

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

/* Mobile nav open state */
.nav.nav-open {
  display: flex;
  flex-direction: column;
  position: absolute;
  top: var(--header-height);
  left: 0;
  right: 0;
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border);
  padding: var(--space-md);
  gap: 0;
}
.nav.nav-open .nav-link {
  padding: 0.75rem 1rem;
  font-size: var(--text-base);
}

/* Desktop nav */
@media (min-width: 768px) {
  .nav { display: flex; }
  .nav-toggle { display: none; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: 600;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s, background 0.2s;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-sm { padding: 0.375rem 0.875rem; font-size: 0.8125rem; }
.btn-lg { padding: 0.875rem 1.75rem; font-size: var(--text-base); }
.btn-primary {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 2px 8px rgba(14, 165, 233, 0.3);
}
.btn-primary:hover { box-shadow: 0 4px 16px rgba(14, 165, 233, 0.4); }
.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border);
}
.btn-secondary:hover { border-color: var(--blue); color: var(--blue); }
.btn-outline {
  background: transparent;
  color: var(--blue);
  border: 1px solid var(--blue);
}
.btn-outline:hover { background: var(--blue); color: #fff; }

/* ---------- Sections ---------- */
.section { padding: var(--space-2xl) 0; }
.section-dark { background: var(--bg-secondary); }
.section-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto var(--space-xl);
}
.section-header h2 {
  font-size: var(--text-3xl);
  font-weight: 700;
  margin-bottom: var(--space-sm);
}
.section-header p { color: var(--text-secondary); font-size: var(--text-lg); }

/* ---------- Cards ---------- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  transition: transform 0.2s, box-shadow 0.2s;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

/* Feature cards */
.feature-card { text-align: center; }
.feature-icon {
  width: 3.5rem;
  height: 3.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  margin-bottom: var(--space-md);
  background: color-mix(in srgb, var(--accent, var(--blue)) 15%, transparent);
  color: var(--accent, var(--blue));
}
.feature-icon svg { width: 24px; height: 24px; }
.feature-card h3 { font-size: var(--text-xl); margin-bottom: var(--space-sm); }
.feature-card p { color: var(--text-secondary); font-size: var(--text-sm); }

/* ---------- Badges ---------- */
.badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 2rem;
  font-size: var(--text-sm);
  font-weight: 600;
}
.badge-price {
  background: rgba(14, 165, 233, 0.15);
  color: var(--blue);
}
.badge-green {
  background: rgba(34, 197, 94, 0.15);
  color: var(--green);
}
.badge-feature {
  background: color-mix(in srgb, var(--badge-color, var(--blue)) 15%, transparent);
  color: var(--badge-color, var(--blue));
}

/* ---------- Hero ---------- */
.hero {
  padding: calc(var(--header-height) + var(--space-2xl)) 0 var(--space-2xl);
  min-height: 90vh;
  display: flex;
  align-items: center;
  background: radial-gradient(ellipse at top, rgba(14, 165, 233, 0.12) 0%, transparent 60%);
}
.hero .container { display: grid; grid-template-columns: 1fr; gap: var(--space-xl); align-items: center; }
.hero-content { max-width: 600px; }
.hero h1 { font-size: var(--text-4xl); font-weight: 700; line-height: 1.1; margin-bottom: var(--space-md); }
.hero-subtitle {
  font-size: var(--text-lg);
  color: var(--text-secondary);
  margin-bottom: var(--space-lg);
  line-height: 1.7;
}
.hero-cta { display: flex; gap: var(--space-md); flex-wrap: wrap; margin-bottom: var(--space-md); }
.hero-note { font-size: var(--text-sm); color: var(--text-muted); }
.hero-visual { display: flex; justify-content: center; }
.hero-visual img { max-width: 300px; max-height: 550px; width: auto; border-radius: var(--radius-lg); box-shadow: 0 16px 48px rgba(0, 0, 0, 0.3); }

@media (min-width: 768px) {
  .hero .container { grid-template-columns: 1fr 1fr; }
  .hero h1 { font-size: var(--text-5xl); }
}

/* ---------- Steps (Home 3-col) ---------- */
.step { text-align: center; padding: var(--space-lg); }
.step-num {
  display: inline-flex;
  width: 3rem;
  height: 3rem;
  align-items: center;
  justify-content: center;
  background: var(--gradient-hero);
  border-radius: 50%;
  font-weight: 700;
  font-size: var(--text-xl);
  color: #fff;
  margin-bottom: var(--space-md);
}
.step h3 { margin-bottom: var(--space-xs); }
.step p { color: var(--text-secondary); font-size: var(--text-sm); }

/* ---------- Privacy Banner ---------- */
.privacy-banner { text-align: center; max-width: 700px; margin: 0 auto; }
.privacy-banner h2 { font-size: var(--text-3xl); margin-bottom: var(--space-md); }
.privacy-banner p { color: var(--text-secondary); margin-bottom: var(--space-lg); }
.privacy-badges { display: flex; flex-wrap: wrap; gap: var(--space-sm); justify-content: center; }

/* ---------- CTA Section ---------- */
.section-cta {
  background: radial-gradient(ellipse at center, rgba(14, 165, 233, 0.1) 0%, transparent 70%);
}
.section-cta h2 { font-size: var(--text-3xl); font-weight: 700; margin-bottom: var(--space-md); }
.section-cta p { color: var(--text-secondary); font-size: var(--text-lg); margin-bottom: var(--space-lg); }
.cta-buttons { display: flex; gap: var(--space-md); justify-content: center; flex-wrap: wrap; }

/* ---------- Feature Detail (features page) ---------- */
.feature-detail { padding: var(--space-xl) 0; border-bottom: 1px solid var(--border); }
.feature-detail:last-of-type { border-bottom: none; }
.feature-detail .grid-2 { align-items: center; gap: var(--space-xl); }
.feature-detail:nth-child(even) .grid-2 { direction: rtl; }
.feature-detail:nth-child(even) .grid-2 > * { direction: ltr; }
.feature-text h2 { font-size: var(--text-2xl); margin: var(--space-sm) 0 var(--space-md); }
.feature-text p { color: var(--text-secondary); margin-bottom: var(--space-md); }
.feature-list { padding: 0; }
.feature-list li {
  padding: 0.375rem 0;
  color: var(--text-secondary);
  font-size: var(--text-sm);
}
.feature-list li::before { content: "✓ "; color: var(--green); font-weight: 700; }
.feature-image img { border-radius: var(--radius-lg); border: 1px solid var(--border); max-height: 500px; width: auto; margin: 0 auto; }
.feature-image { text-align: center; }

@media (max-width: 639px) {
  .feature-detail .grid-2 { grid-template-columns: 1fr; }
  .feature-detail:nth-child(even) .grid-2 { direction: ltr; }
}

/* ---------- Page Header ---------- */
.page-header {
  padding: calc(var(--header-height) + var(--space-xl)) 0 var(--space-xl);
  text-align: center;
  background: radial-gradient(ellipse at top, rgba(14, 165, 233, 0.1) 0%, transparent 50%);
}
.page-header h1 { font-size: var(--text-4xl); font-weight: 700; margin-bottom: var(--space-sm); }
.page-header p { color: var(--text-secondary); font-size: var(--text-lg); max-width: 600px; margin: 0 auto; }

/* ---------- Steps (How It Works page) ---------- */
.step-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  align-items: center;
  padding: var(--space-xl) 0;
  border-bottom: 1px solid var(--border);
}
.step-row:last-child { border-bottom: none; }
.step-row:nth-child(even) { direction: rtl; }
.step-row:nth-child(even) > * { direction: ltr; }
.step-badge {
  display: inline-block;
  padding: var(--space-xs) var(--space-md);
  background: var(--gradient-hero);
  border-radius: 2rem;
  font-weight: 600;
  font-size: var(--text-sm);
  color: #fff;
  margin-bottom: var(--space-md);
}
.step-content h2 { font-size: var(--text-2xl); margin-bottom: var(--space-sm); }
.step-content p { color: var(--text-secondary); }
.step-visual img { border-radius: var(--radius-lg); border: 1px solid var(--border); max-height: 500px; width: auto; margin: 0 auto; }
.step-visual { text-align: center; }

@media (max-width: 767px) {
  .step-row { grid-template-columns: 1fr; }
  .step-row:nth-child(even) { direction: ltr; }
}

/* ---------- Compatibility ---------- */
.compat-item { padding: var(--space-lg); }
.compat-item h3 { margin-bottom: var(--space-xs); }
.compat-item p { color: var(--text-secondary); font-size: var(--text-sm); }

/* ---------- Gallery ---------- */
.gallery-grid { gap: var(--space-lg); }
.gallery-item {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-card);
}
.gallery-item img { width: 100%; max-height: 500px; object-fit: contain; display: block; }
.gallery-item figcaption {
  padding: var(--space-sm) var(--space-md);
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

@media (max-width: 767px) {
  .gallery-grid.grid-3 { grid-template-columns: 1fr; }
}

/* ---------- FAQ Accordion ---------- */
.faq-container { max-width: 800px; margin: 0 auto; }
.faq-category { margin-bottom: var(--space-xl); }
.faq-category h2 { margin-bottom: var(--space-md); color: var(--blue); font-size: var(--text-2xl); }
.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: var(--space-sm);
  overflow: hidden;
}
.faq-item summary {
  padding: var(--space-md);
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.2s;
}
.faq-item summary:hover { background: var(--bg-secondary); }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-size: var(--text-xl);
  color: var(--text-muted);
  flex-shrink: 0;
  margin-left: var(--space-md);
}
.faq-item[open] summary::after { content: "−"; }
.faq-answer { padding: 0 var(--space-md) var(--space-md); color: var(--text-secondary); line-height: 1.7; }

/* ---------- Contact Form ---------- */
.contact-grid { gap: var(--space-xl); align-items: start; }
.form-group { margin-bottom: var(--space-md); }
.form-group label {
  display: block;
  margin-bottom: var(--space-xs);
  font-weight: 500;
  font-size: var(--text-sm);
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: var(--space-sm) var(--space-md);
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.2);
}
.contact-card {
  padding: var(--space-md);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: var(--space-md);
}
.contact-card h3 { margin-bottom: var(--space-xs); font-size: var(--text-base); }
.contact-card p, .contact-card a { color: var(--text-secondary); font-size: var(--text-sm); }

@media (max-width: 767px) {
  .contact-grid.grid-2 { grid-template-columns: 1fr; }
}

/* ---------- Legal Pages ---------- */
.legal-content {
  max-width: 800px;
  margin: 0 auto;
  line-height: 1.8;
}
.legal-content h2 {
  margin-top: var(--space-xl);
  margin-bottom: var(--space-md);
  font-size: var(--text-2xl);
}
.legal-content h3 {
  margin-top: var(--space-lg);
  margin-bottom: var(--space-sm);
}
.legal-content p,
.legal-content li {
  color: var(--text-secondary);
  margin-bottom: var(--space-md);
}
.legal-content ul { padding-left: var(--space-lg); list-style: disc; }
.legal-content a { color: var(--blue); }
.legal-meta {
  padding: var(--space-md);
  background: var(--bg-secondary);
  border-radius: var(--radius);
  margin-bottom: var(--space-xl);
  font-size: var(--text-sm);
  color: var(--text-muted);
}
.legal-meta p { margin-bottom: var(--space-xs); }
.legal-toc {
  padding: var(--space-md);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: var(--space-xl);
}
.legal-toc h3 { font-size: var(--text-base); margin-bottom: var(--space-sm); }
.legal-toc ol { padding-left: var(--space-lg); list-style: decimal; }
.legal-toc li { margin-bottom: var(--space-xs); }
.legal-toc a { font-size: var(--text-sm); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: var(--space-xl) 0 var(--space-lg);
  margin-top: var(--space-2xl);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-xl);
  margin-bottom: var(--space-xl);
}
.footer-col h4 { margin-bottom: var(--space-md); font-size: var(--text-base); }
.footer-col p { color: var(--text-secondary); font-size: var(--text-sm); line-height: 1.6; }
.footer-col a {
  display: block;
  color: var(--text-secondary);
  font-size: var(--text-sm);
  padding: 0.25rem 0;
  text-decoration: none;
  transition: color 0.2s;
}
.footer-col a:hover { color: var(--text-primary); }
.price-tag {
  margin-top: var(--space-sm);
  font-size: var(--text-sm);
  color: var(--blue);
  font-weight: 600;
}
.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: var(--space-lg);
  text-align: center;
}
.footer-bottom p { color: var(--text-muted); font-size: var(--text-sm); }

@media (max-width: 767px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* ---------- Misc ---------- */
.store-badge {
  display: inline-block;
  color: var(--text-secondary) !important;
}
