/* RoadDrive Website - Mobile-First Responsive CSS */

/* CSS Custom Properties (Variables) */
/* Colors extracted from logo: Teal (#2a8a8a), Orange (#e8a02a), Dark Gray (#2d2d2d) */
:root {
  /* Light Theme (Default) */
  --bg-primary: #ffffff;
  --bg-secondary: #f7f7f7;
  --bg-tertiary: #eeeeee;
  --text-primary: #2d2d2d;
  --text-secondary: #5a5a5a;
  --text-muted: #8a8a8a;
  --accent-primary: #2a8a8a;
  --accent-secondary: #1f6b6b;
  --accent-highlight: #e8a02a;
  --accent-gradient: linear-gradient(135deg, #2a8a8a 0%, #1f6b6b 100%);
  --accent-gradient-warm: linear-gradient(135deg, #e8a02a 0%, #d4911f 100%);
  --border-color: #e0e0e0;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
  --radius-full: 9999px;
  --transition: all 0.3s ease;
}

[data-theme="dark"] {
  /* Dark theme using logo's dark gray background */
  --bg-primary: #202120;
  --bg-secondary: #2a2b2a;
  --bg-tertiary: #363736;
  --text-primary: #f5f5f5;
  --text-secondary: #c5c5c5;
  --text-muted: #8a8a8a;
  --accent-primary: #3aa0a0;
  --accent-secondary: #2a8a8a;
  --accent-highlight: #f0a830;
  --border-color: #4a4a4a;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.6);
}

/* 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: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  transition: var(--transition);
  overflow-x: hidden;
}

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

a:hover {
  color: var(--accent-secondary);
}

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

ul, ol {
  list-style: none;
}

/* Container */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

@media (min-width: 768px) {
  .container {
    padding: 0 2rem;
  }
}

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

h1 { font-size: 2rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

@media (min-width: 768px) {
  h1 { font-size: 3rem; }
  h2 { font-size: 2.5rem; }
  h3 { font-size: 2rem; }
  h4 { font-size: 1.5rem; }
}

@media (min-width: 1024px) {
  h1 { font-size: 3.5rem; }
}

p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}

.btn-primary {
  background: var(--accent-gradient);
  color: white;
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  color: white;
}

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

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

.btn-store {
  background: var(--text-primary);
  color: var(--bg-primary);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-lg);
}

.btn-store:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  color: var(--bg-primary);
}

.btn-store img {
  height: 40px;
  width: auto;
}

/* Header / Navigation */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-color);
  transition: var(--transition);
}

.header.scrolled {
  box-shadow: var(--shadow-md);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
  gap: 1rem;
}

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

.logo img {
  height: 40px;
  width: auto;
}

.logo-light { display: block; }
.logo-dark { display: none; }

[data-theme="dark"] .logo-light { display: none; }
[data-theme="dark"] .logo-dark { display: block; }

.nav-links {
  display: none;
  gap: 2rem;
}

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

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

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

.theme-toggle {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition);
}

.theme-toggle:hover {
  background: var(--bg-tertiary);
}

.theme-toggle svg {
  width: 20px;
  height: 20px;
  color: var(--text-primary);
}

.sun-icon { display: none; }
.moon-icon { display: block; }

[data-theme="dark"] .sun-icon { display: block; }
[data-theme="dark"] .moon-icon { display: none; }

.mobile-menu-btn {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
}

.mobile-menu-btn span {
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  transition: var(--transition);
}

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

  .mobile-menu-btn {
    display: none;
  }
}

/* Mobile Menu */
.mobile-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 80%;
  max-width: 300px;
  height: 100vh;
  background: var(--bg-primary);
  padding: 5rem 2rem 2rem;
  transition: var(--transition);
  z-index: 999;
  box-shadow: var(--shadow-xl);
}

.mobile-menu.active {
  right: 0;
}

.mobile-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  z-index: 998;
}

.mobile-menu-overlay.active {
  opacity: 1;
  visibility: visible;
}

.mobile-menu-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-secondary);
  border: none;
  border-radius: var(--radius-full);
  cursor: pointer;
  font-size: 1.5rem;
  color: var(--text-primary);
}

.mobile-menu-links {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.mobile-menu-links a {
  font-size: 1.125rem;
  color: var(--text-primary);
  font-weight: 500;
}

/* Hero Section */
.hero {
  padding: 8rem 0 4rem;
  background: var(--bg-secondary);
  overflow: hidden;
}

.hero-content {
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

.hero-text {
  text-align: center;
}

.hero-badge {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: rgba(232, 160, 42, 0.15);
  color: var(--accent-highlight);
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  margin-bottom: 1.5rem;
}

[data-theme="dark"] .hero-badge {
  background: rgba(240, 168, 48, 0.2);
}

.hero-title {
  margin-bottom: 1.5rem;
}

.hero-title .highlight {
  background: var(--accent-gradient-warm);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-description {
  font-size: 1.125rem;
  max-width: 600px;
  margin: 0 auto 2rem;
}

.hero-buttons {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
}

.store-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

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

.phone-mockup {
  position: relative;
  max-width: 280px;
  margin: 0 auto;
}

.phone-mockup img {
  border-radius: 2rem;
  box-shadow: var(--shadow-xl);
}

@media (min-width: 768px) {
  .hero {
    padding: 10rem 0 6rem;
  }

  .hero-buttons {
    flex-direction: row;
    justify-content: center;
  }
}

@media (min-width: 1024px) {
  .hero-content {
    flex-direction: row;
    align-items: center;
    gap: 4rem;
  }

  .hero-text {
    text-align: left;
    flex: 1;
  }

  .hero-description {
    margin: 0 0 2rem;
  }

  .hero-buttons {
    justify-content: flex-start;
  }

  .hero-image {
    flex: 1;
  }

  .phone-mockup {
    max-width: 320px;
  }
}

/* Features Section */
.features {
  padding: 5rem 0;
}

.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 3rem;
}

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

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

.features-grid {
  display: grid;
  gap: 1.5rem;
}

.feature-card {
  background: var(--bg-secondary);
  padding: 2rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  transition: var(--transition);
}

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

.feature-icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-gradient);
  border-radius: var(--radius-md);
  margin-bottom: 1.5rem;
}

/* Alternate feature icons with orange color */
.feature-card:nth-child(2) .feature-icon,
.feature-card:nth-child(4) .feature-icon,
.feature-card:nth-child(6) .feature-icon {
  background: var(--accent-gradient-warm);
}

.feature-icon svg {
  width: 28px;
  height: 28px;
  color: white;
}

.feature-card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

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

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

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

/* Screenshots Section */
.screenshots {
  padding: 5rem 0;
  background: var(--bg-secondary);
}

.screenshots-wrapper {
  position: relative;
  overflow: hidden;
}

.screenshots-track {
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 1rem 0;
}

.screenshots-track::-webkit-scrollbar {
  display: none;
}

.screenshot-item {
  flex: 0 0 auto;
  width: 220px;
  scroll-snap-align: center;
}

.screenshot-item img {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  transition: var(--transition);
}

.screenshot-item:hover img {
  transform: scale(1.02);
  box-shadow: var(--shadow-xl);
}

.screenshots-nav {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 2rem;
}

.screenshots-nav button {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition);
}

.screenshots-nav button:hover {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: white;
}

.screenshots-nav svg {
  width: 20px;
  height: 20px;
}

@media (min-width: 768px) {
  .screenshot-item {
    width: 260px;
  }
}

/* Perfect For Section */
.perfect-for {
  padding: 5rem 0;
}

.perfect-for-grid {
  display: grid;
  gap: 1rem;
}

.perfect-for-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.perfect-for-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(42, 138, 138, 0.1);
  border-radius: var(--radius-md);
  flex-shrink: 0;
}

[data-theme="dark"] .perfect-for-icon {
  background: rgba(58, 160, 160, 0.15);
}

/* Alternate perfect-for icons with orange color */
.perfect-for-item:nth-child(2) .perfect-for-icon,
.perfect-for-item:nth-child(4) .perfect-for-icon,
.perfect-for-item:nth-child(6) .perfect-for-icon {
  background: rgba(232, 160, 42, 0.1);
}

[data-theme="dark"] .perfect-for-item:nth-child(2) .perfect-for-icon,
[data-theme="dark"] .perfect-for-item:nth-child(4) .perfect-for-icon,
[data-theme="dark"] .perfect-for-item:nth-child(6) .perfect-for-icon {
  background: rgba(240, 168, 48, 0.15);
}

.perfect-for-item:nth-child(2) .perfect-for-icon svg,
.perfect-for-item:nth-child(4) .perfect-for-icon svg,
.perfect-for-item:nth-child(6) .perfect-for-icon svg {
  color: var(--accent-highlight);
}

.perfect-for-icon svg {
  width: 24px;
  height: 24px;
  color: var(--accent-primary);
}

.perfect-for-item span {
  font-weight: 500;
  color: var(--text-primary);
}

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

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

/* CTA Section */
.cta {
  padding: 5rem 0;
  background: linear-gradient(135deg, #2a8a8a 0%, #1f6b6b 50%, #d4911f 100%);
  text-align: center;
}

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

.cta p {
  color: rgba(255, 255, 255, 0.9);
  max-width: 600px;
  margin: 0 auto 2rem;
  font-size: 1.125rem;
}

.cta .store-buttons {
  justify-content: center;
}

.cta .btn-store {
  background: white;
  color: #2a8a8a;
}

.cta .btn-store:hover {
  background: #f5f5f5;
  color: #1f6b6b;
}

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

.footer-content {
  display: grid;
  gap: 2rem;
  margin-bottom: 3rem;
}

.footer-brand {
  text-align: center;
}

.footer-brand .logo {
  justify-content: center;
  margin-bottom: 1rem;
}

.footer-brand p {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  max-width: 300px;
  margin: 0 auto;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.footer-links-group h4 {
  font-size: 1rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.footer-links-group ul {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

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

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

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  text-align: center;
}

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

.social-links {
  display: flex;
  gap: 1rem;
}

.social-links a {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-tertiary);
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  transition: var(--transition);
}

.social-links a:hover {
  background: var(--accent-primary);
  color: white;
}

@media (min-width: 768px) {
  .footer-content {
    grid-template-columns: 1fr 2fr;
    text-align: left;
  }

  .footer-brand {
    text-align: left;
  }

  .footer-brand .logo {
    justify-content: flex-start;
  }

  .footer-brand p {
    margin: 0;
  }

  .footer-links {
    grid-template-columns: repeat(3, 1fr);
  }

  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
  }
}

/* Page Header (for inner pages) */
.page-header {
  padding: 8rem 0 3rem;
  background: var(--bg-secondary);
  text-align: center;
}

.page-header h1 {
  margin-bottom: 0.5rem;
}

.page-header p {
  color: var(--text-muted);
}

/* Content Pages (Privacy, Terms, Support) */
.content-page {
  padding: 4rem 0;
}

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

.content-wrapper h2 {
  font-size: 1.5rem;
  margin: 2.5rem 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--border-color);
}

.content-wrapper h3 {
  font-size: 1.25rem;
  margin: 2rem 0 0.75rem;
}

.content-wrapper p {
  margin-bottom: 1rem;
  line-height: 1.8;
}

.content-wrapper ul {
  margin: 1rem 0;
  padding-left: 1.5rem;
}

.content-wrapper ul li {
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
  position: relative;
  padding-left: 1rem;
}

.content-wrapper ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.7em;
  width: 6px;
  height: 6px;
  background: var(--accent-primary);
  border-radius: 50%;
}

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

.content-wrapper a {
  color: var(--accent-primary);
  text-decoration: underline;
}

.last-updated {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: var(--bg-tertiary);
  color: var(--text-muted);
  font-size: 0.875rem;
  border-radius: var(--radius-md);
  margin-bottom: 2rem;
}

/* Support Page Specific */
.support-options {
  display: grid;
  gap: 1.5rem;
  margin: 2rem 0;
}

.support-card {
  padding: 2rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  text-align: center;
  transition: var(--transition);
}

.support-card:hover {
  border-color: var(--accent-primary);
  box-shadow: var(--shadow-md);
}

.support-card svg {
  width: 48px;
  height: 48px;
  color: var(--accent-primary);
  margin-bottom: 1rem;
}

/* Second support card uses orange accent */
.support-card:nth-child(2) svg {
  color: var(--accent-highlight);
}

.support-card h3 {
  margin-bottom: 0.5rem;
}

.support-card p {
  margin-bottom: 1.5rem;
}

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

/* FAQ Section */
.faq-section {
  margin-top: 3rem;
}

.faq-item {
  border-bottom: 1px solid var(--border-color);
}

.faq-question {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 0;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.faq-question svg {
  width: 20px;
  height: 20px;
  transition: var(--transition);
  flex-shrink: 0;
  margin-left: 1rem;
}

.faq-item.active .faq-question svg {
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.faq-item.active .faq-answer {
  max-height: 500px;
}

.faq-answer p {
  padding-bottom: 1.25rem;
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fadeInUp {
  animation: fadeInUp 0.6s ease forwards;
}

.animate-delay-1 { animation-delay: 0.1s; }
.animate-delay-2 { animation-delay: 0.2s; }
.animate-delay-3 { animation-delay: 0.3s; }
.animate-delay-4 { animation-delay: 0.4s; }
.animate-delay-5 { animation-delay: 0.5s; }

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
