/* ============================================
   CleanSnap Website - Stylesheet
   ============================================ */

/* --- CSS Custom Properties --- */
:root {
  --primary: #2196F3;
  --primary-dark: #1976D2;
  --primary-light: #BBDEFB;
  --secondary: #7C4DFF;
  --secondary-dark: #651FFF;
  --accent: #FFD740;
  --accent-dark: #FFC400;
  --success: #4CAF50;
  --warning: #FF9800;
  --error: #F44336;

  --bg: #F8F9FA;
  --bg-surface: #FFFFFF;
  --bg-surface-alt: #F0F2F5;
  --bg-hero: linear-gradient(135deg, #2196F3 0%, #7C4DFF 100%);
  --text-primary: #1A1A2E;
  --text-secondary: #555770;
  --text-tertiary: #8B8DA3;
  --text-on-primary: #FFFFFF;
  --border: #E0E0E0;
  --border-light: #F0F0F0;

  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;
  --space-4xl: 96px;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  --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);

  --transition: 0.3s ease;
  --max-width: 1200px;
  --nav-height: 72px;
}

[data-theme="dark"] {
  --bg: #0F0F1A;
  --bg-surface: #1A1A2E;
  --bg-surface-alt: #252540;
  --text-primary: #F0F0F5;
  --text-secondary: #B0B0C0;
  --text-tertiary: #707085;
  --border: #333348;
  --border-light: #2A2A40;
  --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);
}

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

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

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

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

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

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

ul, ol {
  list-style: none;
}

h1, h2, h3, h4, h5, h6 {
  line-height: 1.2;
  color: var(--text-primary);
}

/* --- Layout --- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

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

.section-title {
  font-size: 2.25rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: var(--space-md);
}

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

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: rgba(248, 249, 250, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-light);
  z-index: 1000;
  transition: background var(--transition);
}

[data-theme="dark"] .nav {
  background: rgba(15, 15, 26, 0.85);
}

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

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

.nav-brand img {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
}

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

.nav-links a {
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.95rem;
  transition: color var(--transition);
  position: relative;
}

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

.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--primary);
  border-radius: 1px;
}

.theme-toggle {
  background: var(--bg-surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.2rem;
  transition: all var(--transition);
}

.theme-toggle:hover {
  background: var(--primary-light);
  border-color: var(--primary);
}

[data-theme="dark"] .theme-toggle:hover {
  background: var(--bg-surface-alt);
}

.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-sm);
}

.hamburger {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  position: relative;
  transition: background var(--transition);
}

.hamburger::before,
.hamburger::after {
  content: '';
  position: absolute;
  left: 0;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  transition: transform var(--transition);
}

.hamburger::before { top: -7px; }
.hamburger::after { top: 7px; }

.nav-open .hamburger { background: transparent; }
.nav-open .hamburger::before { transform: rotate(45deg) translate(5px, 5px); }
.nav-open .hamburger::after { transform: rotate(-45deg) translate(5px, -5px); }

/* --- Hero --- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: var(--bg-hero);
  padding-top: var(--nav-height);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 80%;
  height: 200%;
  background: radial-gradient(ellipse, rgba(255,255,255,0.08) 0%, transparent 70%);
  pointer-events: none;
}

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

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

.hero-content h1 {
  font-size: 3.5rem;
  font-weight: 800;
  color: var(--text-on-primary);
  margin-bottom: var(--space-lg);
  letter-spacing: -0.02em;
}

.hero-content p {
  font-size: 1.25rem;
  opacity: 0.9;
  margin-bottom: var(--space-xl);
  line-height: 1.7;
}

.hero-cta {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.btn-appstore {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  background: #000;
  color: #fff;
  padding: 14px 28px;
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-weight: 600;
  transition: transform var(--transition), box-shadow var(--transition);
  text-decoration: none;
}

.btn-appstore:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.3);
  color: #fff;
}

.btn-appstore svg {
  width: 24px;
  height: 24px;
}

.hero-note {
  font-size: 0.875rem;
  opacity: 0.7;
}

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

.hero-mascot {
  max-width: 420px;
  animation: float 3s ease-in-out infinite;
  filter: drop-shadow(0 20px 40px rgba(0,0,0,0.2));
}

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

/* --- Trust Bar --- */
.trust-bar {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-light);
  padding: var(--space-xl) 0;
}

.trust-items {
  display: flex;
  justify-content: center;
  gap: var(--space-3xl);
  flex-wrap: wrap;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

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

/* --- Features --- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}

.feature-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  transition: transform var(--transition), box-shadow var(--transition);
}

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

.feature-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  margin-bottom: var(--space-md);
  background: var(--primary-light);
}

[data-theme="dark"] .feature-icon {
  background: rgba(33, 150, 243, 0.15);
}

.feature-card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: var(--space-sm);
}

.feature-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* --- How It Works --- */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-xl);
  position: relative;
}

.steps::before {
  content: '';
  position: absolute;
  top: 40px;
  left: 15%;
  right: 15%;
  height: 2px;
  background: var(--border);
}

.step {
  text-align: center;
  position: relative;
}

.step-number {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--bg-hero);
  color: var(--text-on-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  font-weight: 800;
  margin: 0 auto var(--space-lg);
  position: relative;
  z-index: 1;
}

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

.step p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* --- Privacy Highlight --- */
.privacy-section {
  background: var(--bg-surface-alt);
}

.privacy-content {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--space-2xl);
  align-items: center;
  max-width: 800px;
  margin: 0 auto;
}

.privacy-mascot {
  width: 180px;
  filter: drop-shadow(0 10px 20px rgba(0,0,0,0.1));
}

.privacy-text h2 {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: var(--space-md);
}

.privacy-text p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.7;
  margin-bottom: var(--space-md);
}

.privacy-link {
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
}

/* --- Pricing --- */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
  max-width: 960px;
  margin: 0 auto;
}

.pricing-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  text-align: center;
  transition: transform var(--transition), box-shadow var(--transition);
  position: relative;
}

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

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

.pricing-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-hero);
  color: var(--text-on-primary);
  padding: 4px 16px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.pricing-card h3 {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: var(--space-sm);
}

.pricing-card .price {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-lg);
}

.pricing-features {
  text-align: left;
}

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

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

/* --- CTA --- */
.cta-section {
  text-align: center;
  background: var(--bg-hero);
  color: var(--text-on-primary);
}

.cta-section h2 {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--text-on-primary);
  margin-bottom: var(--space-md);
}

.cta-section p {
  font-size: 1.15rem;
  opacity: 0.9;
  margin-bottom: var(--space-xl);
}

.cta-mascot {
  width: 160px;
  margin: 0 auto var(--space-xl);
  filter: drop-shadow(0 10px 20px rgba(0,0,0,0.2));
}

/* --- Footer --- */
.footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border-light);
  padding: var(--space-2xl) 0 var(--space-lg);
}

[data-theme="dark"] .footer {
  background: #0A0A15;
}

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

.footer-brand {
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
}

.footer-mascot {
  width: 60px;
  flex-shrink: 0;
}

.footer-brand-text h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: var(--space-xs);
}

.footer-brand-text p {
  color: var(--text-tertiary);
  font-size: 0.875rem;
}

.footer-links h4 {
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-tertiary);
  margin-bottom: var(--space-md);
}

.footer-links a {
  display: block;
  color: var(--text-secondary);
  padding: var(--space-xs) 0;
  font-size: 0.95rem;
}

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

.footer-bottom {
  border-top: 1px solid var(--border-light);
  padding-top: var(--space-lg);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-md);
}

.footer-bottom p {
  color: var(--text-tertiary);
  font-size: 0.8rem;
}

/* --- Legal Pages --- */
.legal-page {
  padding-top: calc(var(--nav-height) + var(--space-3xl));
  padding-bottom: var(--space-4xl);
}

.legal-header {
  text-align: center;
  margin-bottom: var(--space-3xl);
}

.legal-header h1 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: var(--space-sm);
}

.legal-header p {
  color: var(--text-tertiary);
  font-size: 0.95rem;
}

.legal-content {
  max-width: 780px;
  margin: 0 auto;
}

.legal-toc {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  margin-bottom: var(--space-2xl);
}

.legal-toc h2 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: var(--space-md);
}

.legal-toc ol {
  list-style: decimal;
  padding-left: var(--space-lg);
}

.legal-toc li {
  padding: var(--space-xs) 0;
}

.legal-toc a {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

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

.legal-section {
  margin-bottom: var(--space-2xl);
}

.legal-section h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-sm);
  border-bottom: 2px solid var(--primary);
}

.legal-section h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-top: var(--space-lg);
  margin-bottom: var(--space-sm);
}

.legal-section p {
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: var(--space-md);
}

.legal-section ul,
.legal-section ol {
  padding-left: var(--space-lg);
  margin-bottom: var(--space-md);
}

.legal-section ul {
  list-style: disc;
}

.legal-section ol {
  list-style: decimal;
}

.legal-section li {
  color: var(--text-secondary);
  line-height: 1.7;
  padding: var(--space-xs) 0;
}

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

.legal-section table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: var(--space-md);
  font-size: 0.95rem;
}

.legal-section th,
.legal-section td {
  text-align: left;
  padding: var(--space-sm) var(--space-md);
  border: 1px solid var(--border);
}

.legal-section th {
  background: var(--bg-surface-alt);
  font-weight: 600;
  color: var(--text-primary);
}

.legal-section td {
  color: var(--text-secondary);
}

/* --- Contact Page --- */
.contact-page {
  padding-top: calc(var(--nav-height) + var(--space-3xl));
  padding-bottom: var(--space-4xl);
}

.contact-content {
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
}

.contact-mascot {
  width: 200px;
  margin: 0 auto var(--space-2xl);
  filter: drop-shadow(0 10px 20px rgba(0,0,0,0.1));
}

.contact-content h1 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: var(--space-md);
}

.contact-content > p {
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin-bottom: var(--space-2xl);
}

.contact-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
  text-align: left;
}

.contact-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
}

.contact-card .card-icon {
  font-size: 2rem;
  margin-bottom: var(--space-md);
}

.contact-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: var(--space-sm);
}

.contact-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
}

.contact-card a {
  font-weight: 600;
}

/* --- Contact Form --- */
.contact-form {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  margin-bottom: var(--space-2xl);
  text-align: left;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
}

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

.form-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-xs);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px var(--space-md);
  font-family: var(--font-family);
  font-size: 0.95rem;
  color: var(--text-primary);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}

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

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.15);
}

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

.form-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-hero);
  color: var(--text-on-primary);
  border: none;
  border-radius: var(--radius-sm);
  padding: 14px 32px;
  font-family: var(--font-family);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
  width: 100%;
}

.form-submit:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* --- Animations --- */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* --- Responsive --- */
@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: var(--space-lg);
    gap: var(--space-md);
    box-shadow: var(--shadow-lg);
  }

  .nav-open .nav-links {
    display: flex;
  }

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

  .hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
    padding: var(--space-2xl) 0;
  }

  .hero-content h1 {
    font-size: 2.25rem;
  }

  .hero-content p {
    font-size: 1.05rem;
  }

  .hero-cta {
    justify-content: center;
  }

  .hero-image {
    order: -1;
  }

  .hero-mascot {
    max-width: 240px;
  }

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

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

  .steps::before {
    display: none;
  }

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

  .privacy-content {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .privacy-mascot {
    margin: 0 auto;
  }

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

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

  .trust-items {
    gap: var(--space-lg);
  }

  .section-title {
    font-size: 1.75rem;
  }

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

  .form-row {
    grid-template-columns: 1fr;
  }

  .legal-header h1 {
    font-size: 2rem;
  }
}

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

  .hero-content h1 {
    font-size: 1.85rem;
  }

  .trust-items {
    flex-direction: column;
    align-items: center;
    gap: var(--space-md);
  }

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

  .container {
    padding: 0 var(--space-md);
  }
}
