/* ==========================================================================
   Quloq.com - Main Stylesheet
   Design matches the iOS app aesthetic
   ========================================================================== */

/* --------------------------------------------------------------------------
   CSS Variables / Design Tokens
   -------------------------------------------------------------------------- */
:root {
  /* Primary Gradient */
  --gradient-start: #2563EB;
  --gradient-end: #8B5CF6;
  --gradient-primary: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));

  /* Accent Colors */
  --lavender: #9B7DD4;
  --mint: #7DD9B0;
  --sky-blue: #7DC4DE;
  --soft-pink: #FF9BAA;
  --peach: #FFBB8E;
  --pale-yellow: #FFE67E;

  /* Semantic Colors */
  --success: #22C55E;
  --warning: #F59E0B;
  --error: #EF4444;

  /* Neutrals - Light Mode */
  --text-primary: #1a1a1a;
  --text-secondary: #666666;
  --text-tertiary: #999999;
  --background: #ffffff;
  --surface: #f8f9fa;
  --surface-elevated: #ffffff;
  --border: #e5e7eb;

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;
  --space-4xl: 96px;

  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 50px rgba(0, 0, 0, 0.15);

  /* Typography */
  --font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
  --font-size-xs: 12px;
  --font-size-sm: 14px;
  --font-size-base: 16px;
  --font-size-lg: 18px;
  --font-size-xl: 20px;
  --font-size-2xl: 24px;
  --font-size-3xl: 32px;
  --font-size-4xl: 40px;
  --font-size-5xl: 48px;
  --font-size-6xl: 64px;

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 400ms ease;

  /* Layout */
  --max-width: 1200px;
  --nav-height: 72px;
}

/* Dark Mode */
@media (prefers-color-scheme: dark) {
  :root {
    --text-primary: #f5f5f5;
    --text-secondary: #a0a0a0;
    --text-tertiary: #6b6b6b;
    --background: #0a0a0a;
    --surface: #141414;
    --surface-elevated: #1a1a1a;
    --border: #2a2a2a;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.4);
    --shadow-xl: 0 20px 50px rgba(0, 0, 0, 0.5);
  }
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

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

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

a {
  color: var(--gradient-start);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--gradient-end);
}

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

h1 { font-size: var(--font-size-5xl); }
h2 { font-size: var(--font-size-4xl); }
h3 { font-size: var(--font-size-3xl); }
h4 { font-size: var(--font-size-2xl); }

@media (max-width: 768px) {
  h1 { font-size: var(--font-size-4xl); }
  h2 { font-size: var(--font-size-3xl); }
  h3 { font-size: var(--font-size-2xl); }
  h4 { font-size: var(--font-size-xl); }
}

.text-gradient {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

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

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

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

@media (prefers-color-scheme: dark) {
  .nav {
    background: rgba(10, 10, 10, 0.8);
  }
}

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

.nav-logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: var(--font-size-xl);
  font-weight: 700;
  color: var(--text-primary);
}

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

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

.nav-links a {
  color: var(--text-secondary);
  font-weight: 500;
  transition: color var(--transition-fast);
}

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

.nav-cta {
  display: none;
}

@media (min-width: 768px) {
  .nav-cta {
    display: block;
  }
}

/* Mobile Menu */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-sm);
}

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

  .nav-toggle {
    display: block;
  }

  .nav-links.active {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--background);
    padding: var(--space-lg);
    border-bottom: 1px solid var(--border);
    gap: var(--space-md);
  }
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-lg);
  font-size: var(--font-size-base);
  font-weight: 600;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all var(--transition-base);
  text-decoration: none;
}

.btn-primary {
  background: var(--gradient-primary);
  color: white;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
  color: white;
}

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

.btn-secondary:hover {
  background: var(--surface-elevated);
  border-color: var(--gradient-start);
}

.btn-lg {
  padding: var(--space-lg) var(--space-xl);
  font-size: var(--font-size-lg);
  border-radius: var(--radius-lg);
}

/* App Store Badge */
.app-store-badge {
  height: 54px;
  transition: transform var(--transition-base);
}

.app-store-badge:hover {
  transform: scale(1.05);
}

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

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(ellipse at 20% 20%, rgba(37, 99, 235, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 80%, rgba(139, 92, 246, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 50%, rgba(155, 125, 212, 0.05) 0%, transparent 70%);
  pointer-events: none;
}

.hero-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3xl);
  align-items: center;
  position: relative;
  z-index: 1;
}

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

.hero-text {
  max-width: 600px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  background: var(--surface);
  border-radius: var(--radius-full);
  font-size: var(--font-size-sm);
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: var(--space-lg);
  border: 1px solid var(--border);
}

.hero-badge-dot {
  width: 8px;
  height: 8px;
  background: var(--success);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.hero h1 {
  margin-bottom: var(--space-lg);
}

.hero-subtitle {
  font-size: var(--font-size-xl);
  color: var(--text-secondary);
  margin-bottom: var(--space-xl);
  line-height: 1.5;
}

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

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

.phone-mockup {
  max-width: 320px;
  filter: drop-shadow(0 25px 50px rgba(0, 0, 0, 0.15));
  animation: float 6s ease-in-out infinite;
}

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

@media (max-width: 1024px) {
  .hero-image {
    display: none;
  }
}

/* --------------------------------------------------------------------------
   Features Section
   -------------------------------------------------------------------------- */
.features {
  background: var(--surface);
}

.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto var(--space-3xl);
}

.section-header p {
  color: var(--text-secondary);
  font-size: var(--font-size-lg);
  margin-top: var(--space-md);
}

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

@media (min-width: 640px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

.feature-card {
  background: var(--surface-elevated);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  border: 1px solid var(--border);
  transition: all var(--transition-base);
}

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

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

.feature-icon.voice { background: linear-gradient(135deg, rgba(139, 92, 246, 0.15), rgba(155, 125, 212, 0.15)); }
.feature-icon.audio { background: linear-gradient(135deg, rgba(37, 99, 235, 0.15), rgba(125, 196, 222, 0.15)); }
.feature-icon.spaced { background: linear-gradient(135deg, rgba(125, 217, 176, 0.15), rgba(34, 197, 94, 0.15)); }
.feature-icon.offline { background: linear-gradient(135deg, rgba(255, 187, 142, 0.15), rgba(255, 155, 170, 0.15)); }

.feature-card h3 {
  font-size: var(--font-size-xl);
  margin-bottom: var(--space-sm);
}

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

/* --------------------------------------------------------------------------
   How It Works Section
   -------------------------------------------------------------------------- */
.how-it-works {
  background: var(--background);
}

.steps {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: var(--space-xl);
  max-width: 900px;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .steps {
    grid-template-columns: repeat(3, 1fr);
  }
}

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

.step-number {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--gradient-primary);
  color: white;
  font-size: var(--font-size-xl);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-md);
}

.step h3 {
  font-size: var(--font-size-lg);
  margin-bottom: var(--space-sm);
}

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

/* Connector line between steps */
@media (min-width: 768px) {
  .step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 24px;
    left: calc(50% + 40px);
    width: calc(100% - 80px);
    height: 2px;
    background: var(--border);
  }
}

/* --------------------------------------------------------------------------
   Pricing Section
   -------------------------------------------------------------------------- */
.pricing {
  background: var(--surface);
}

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

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

.pricing-card {
  background: var(--surface-elevated);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  border: 2px solid var(--border);
  position: relative;
}

.pricing-card.featured {
  border-color: var(--gradient-start);
}

.pricing-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--gradient-primary);
  color: white;
  padding: var(--space-xs) var(--space-md);
  border-radius: var(--radius-full);
  font-size: var(--font-size-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.pricing-header {
  text-align: center;
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid var(--border);
}

.pricing-header h3 {
  font-size: var(--font-size-2xl);
  margin-bottom: var(--space-sm);
}

.pricing-price {
  font-size: var(--font-size-4xl);
  font-weight: 700;
}

.pricing-price span {
  font-size: var(--font-size-base);
  font-weight: 400;
  color: var(--text-secondary);
}

.pricing-features {
  list-style: none;
  margin-bottom: var(--space-lg);
}

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

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

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

/* --------------------------------------------------------------------------
   CTA Section
   -------------------------------------------------------------------------- */
.cta-section {
  background: var(--gradient-primary);
  color: white;
  text-align: center;
}

.cta-section h2 {
  color: white;
  margin-bottom: var(--space-md);
}

.cta-section p {
  opacity: 0.9;
  font-size: var(--font-size-lg);
  margin-bottom: var(--space-xl);
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.cta-section .btn {
  background: white;
  color: var(--gradient-start);
}

.cta-section .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

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

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-lg);
  text-align: center;
}

@media (min-width: 768px) {
  .footer-content {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: var(--font-size-xl);
  font-weight: 700;
  color: var(--text-primary);
}

.footer-logo img {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
}

.footer-links {
  display: flex;
  gap: var(--space-xl);
}

.footer-links a {
  color: var(--text-secondary);
  font-size: var(--font-size-sm);
}

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

.footer-bottom {
  text-align: center;
  padding-top: var(--space-xl);
  margin-top: var(--space-xl);
  border-top: 1px solid var(--border);
  color: var(--text-tertiary);
  font-size: var(--font-size-sm);
}

/* --------------------------------------------------------------------------
   Privacy Policy Page
   -------------------------------------------------------------------------- */
.privacy-page {
  padding-top: calc(var(--nav-height) + var(--space-3xl));
  padding-bottom: var(--space-3xl);
  min-height: 100vh;
}

.privacy-content {
  max-width: 800px;
  margin: 0 auto;
}

.privacy-content h1 {
  margin-bottom: var(--space-sm);
}

.privacy-content .last-updated {
  color: var(--text-secondary);
  font-size: var(--font-size-sm);
  margin-bottom: var(--space-3xl);
}

.privacy-content h2 {
  font-size: var(--font-size-2xl);
  margin-top: var(--space-3xl);
  margin-bottom: var(--space-md);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--border);
}

.privacy-content h2:first-of-type {
  border-top: none;
  padding-top: 0;
}

.privacy-content h3 {
  font-size: var(--font-size-xl);
  margin-top: var(--space-xl);
  margin-bottom: var(--space-md);
}

.privacy-content p {
  margin-bottom: var(--space-md);
  color: var(--text-secondary);
}

.privacy-content ul, .privacy-content ol {
  margin-bottom: var(--space-md);
  padding-left: var(--space-xl);
  color: var(--text-secondary);
}

.privacy-content li {
  margin-bottom: var(--space-sm);
}

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

.privacy-content a {
  word-break: break-word;
}

.privacy-highlight {
  background: rgba(239, 68, 68, 0.1);
  border-left: 4px solid var(--error);
  padding: var(--space-md) var(--space-lg);
  margin: var(--space-lg) 0;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.privacy-highlight p {
  margin: 0;
  color: var(--text-primary);
}

/* --------------------------------------------------------------------------
   Utilities
   -------------------------------------------------------------------------- */
.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;
}

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

/* Scroll animations */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}
