/* DoseCue Web - Modern Design System */
:root {
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-light: #eff6ff;
  --primary-glow: rgba(37, 99, 235, 0.2);
  
  --premium: #7c3aed;
  --premium-glow: rgba(124, 58, 237, 0.2);
  --premium-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  
  --success: #10b981;
  --success-light: #ecfdf5;
  --warning: #f59e0b;
  --warning-light: #fffbebfb;
  --danger: #ef4444;
  --danger-light: #fef2f2;
  
  --bg-page: #f8fafc;
  --surface-card: #ffffff;
  --surface-subtle: #f1f5f9;
  
  --text-main: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  
  --border-light: #e2e8f0;
  --border-focus: #93c5fd;
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-full: 9999px;
  
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.03);
  --shadow-card: 0 10px 25px -5px rgba(15, 23, 42, 0.05), 0 8px 10px -6px rgba(15, 23, 42, 0.02);
  --shadow-hover: 0 20px 30px -10px rgba(37, 99, 235, 0.12);
  --shadow-glass: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
  
  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Inter", "Segoe UI", Roboto, sans-serif;
  color: var(--text-main);
  background-color: var(--bg-page);
  line-height: 1.6;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

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

/* Header & Navigation */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-light);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text-main);
  text-decoration: none;
}

.brand-icon {
  width: 38px;
  height: 38px;
  background: var(--primary);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  box-shadow: 0 4px 12px var(--primary-glow);
}

.brand-icon img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border-radius: inherit;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

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

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

.cta-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--primary);
  color: white !important;
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.9rem;
  box-shadow: 0 4px 14px var(--primary-glow);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.cta-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px var(--primary-glow);
}

/* Mobile Nav Toggle */
.mobile-nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: var(--text-main);
}

/* Main Container */
.main-content {
  flex: 1;
}

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

/* Hero Section */
.hero-section {
  padding: 4rem 1.5rem 5rem;
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--primary-light);
  color: var(--primary);
  padding: 0.4rem 1rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(37, 99, 235, 0.15);
}

.hero-title {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 1.25rem;
  color: var(--text-main);
}

.hero-title span {
  background: linear-gradient(135deg, var(--primary) 0%, #1e40af 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  max-width: 540px;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--surface-card);
  color: var(--text-main);
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-fast);
}

.btn-secondary:hover {
  background: var(--surface-subtle);
  color: var(--text-main);
}

.support-section {
  margin: 0 0 4rem;
  padding: 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
}

.support-title {
  margin-bottom: 0.5rem;
  font-size: 1.5rem;
  line-height: 1.25;
}

.support-text {
  max-width: 700px;
  color: var(--text-secondary);
}

.support-section .btn-secondary {
  flex-shrink: 0;
  overflow-wrap: anywhere;
}

/* Actual App Screenshots */
.hero-screenshots {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr);
  align-items: start;
  gap: 1.25rem;
  width: 100%;
  max-width: 500px;
  min-width: 0;
  margin: 0 auto;
  padding: 1rem 0.75rem 2rem;
}

.hero-screenshots::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 12% 0 8%;
  background: linear-gradient(135deg, var(--primary-glow), var(--premium-glow));
  border-radius: 50%;
  filter: blur(32px);
}

.app-screenshot {
  display: block;
  width: 100%;
  height: auto;
  border: 6px solid #111827;
  border-radius: 32px;
  box-shadow: 0 0 0 1px #475569, 0 24px 48px -16px rgba(15, 23, 42, 0.3);
}

.app-screenshot-today {
  transform: rotate(-3deg);
}

.app-screenshot-report {
  margin-top: 3rem;
  transform: rotate(4deg);
}

/* Features Grid */
.section-header {
  text-align: center;
  max-width: 650px;
  margin: 0 auto 3.5rem;
}

.section-tag {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.5rem;
}

.section-title {
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin-bottom: 1rem;
}

.section-desc {
  font-size: 1.05rem;
  color: var(--text-secondary);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.75rem;
  margin-bottom: 4rem;
}

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

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

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

.feature-icon-wrapper.purple {
  background: #f3e8ff;
  color: var(--premium);
}

.feature-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
}

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

/* Privacy & Disclaimer Banner */
.disclaimer-card {
  background: linear-gradient(135deg, #eff6ff 0%, #e0e7ff 100%);
  border: 1px solid #bfdbfe;
  border-radius: var(--radius-lg);
  padding: 2rem;
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  margin-bottom: 4rem;
}

.disclaimer-icon {
  width: 48px;
  height: 48px;
  background: white;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}

.disclaimer-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #1e3a8a;
  margin-bottom: 0.4rem;
}

.disclaimer-text {
  font-size: 0.925rem;
  color: #1e40af;
  line-height: 1.55;
}

/* Legal Documents Layout (Privacy & Terms) */
.doc-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 3rem;
  align-items: start;
}

.doc-sidebar {
  position: sticky;
  top: 100px;
  background: var(--surface-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
}

.doc-sidebar-title {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.toc-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.toc-list a {
  display: block;
  font-size: 0.875rem;
  color: var(--text-secondary);
  padding: 0.4rem 0.6rem;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.toc-list a:hover,
.toc-list a.active {
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 600;
}

.doc-article {
  background: var(--surface-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 3rem;
  box-shadow: var(--shadow-card);
}

.doc-header {
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 1.75rem;
  margin-bottom: 2rem;
}

.doc-title {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin-bottom: 0.5rem;
}

.doc-meta {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.doc-section {
  margin-bottom: 2.5rem;
  scroll-margin-top: 100px;
}

.doc-section-h2 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 1rem;
  padding-bottom: 0.4rem;
  border-bottom: 2px solid var(--surface-subtle);
}

.doc-section p {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 1rem;
}

.doc-section ul, .doc-section ol {
  margin-left: 1.5rem;
  margin-bottom: 1rem;
  color: var(--text-secondary);
}

.doc-section li {
  margin-bottom: 0.5rem;
  line-height: 1.6;
}

/* Callout Box for Legal Docs */
.doc-callout {
  background: var(--surface-subtle);
  border-left: 4px solid var(--primary);
  padding: 1rem 1.25rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 1.25rem 0;
  font-size: 0.925rem;
  color: var(--text-main);
}

/* Footer */
.footer {
  background: var(--surface-card);
  border-top: 1px solid var(--border-light);
  padding: 3rem 1.5rem 2rem;
  margin-top: auto;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.footer-nav {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}

.footer-nav a {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.footer-bottom {
  border-top: 1px solid var(--border-light);
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  flex-wrap: wrap;
  gap: 1rem;
}

/* Responsive Media Queries */
@media (max-width: 900px) {
  .hero-section {
    grid-template-columns: 1fr;
    gap: 3rem;
    text-align: center;
    padding-top: 2rem;
  }

  .hero-subtitle {
    margin-left: auto;
    margin-right: auto;
  }

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

  .doc-layout {
    grid-template-columns: 1fr;
  }

  .doc-sidebar {
    display: none; /* Hide TOC on mobile for clean scrolling */
  }

  .doc-article {
    padding: 1.75rem;
  }
}

@media (max-width: 640px) {
  .hero-screenshots {
    max-width: 420px;
    gap: 0.75rem;
  }

  .app-screenshot {
    border-width: 4px;
    border-radius: 22px;
  }

  .nav-links {
    display: none;
  }

  .support-section {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero-title {
    font-size: 2.2rem;
  }

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

  .disclaimer-card {
    flex-direction: column;
  }
}
