@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

/* --- Theme Variables --- */
:root {
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --bg-card: #ffffff;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --border-color: #e2e8f0;
  
  --accent-primary: #4f46e5;
  --accent-primary-hover: #4338ca;
  --accent-rgb: 79, 70, 229;
  
  --accent-secondary: #10b981;
  --accent-secondary-hover: #059669;
  --accent-secondary-rgb: 16, 185, 129;
  
  --header-bg: rgba(255, 255, 255, 0.85);
  
  --card-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.01);
  --shadow-hover: 0 20px 40px -15px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.02);
  
  --transition-speed: 0.3s;
  --max-width: 1200px;
}

[data-theme="dark"] {
  --bg-primary: #090d16;
  --bg-secondary: #0f172a;
  --bg-card: #151f32;
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --border-color: #1e293b;
  
  --accent-primary: #6366f1;
  --accent-primary-hover: #818cf8;
  --accent-rgb: 99, 102, 241;
  
  --accent-secondary: #34d399;
  --accent-secondary-hover: #6ee7b7;
  --accent-secondary-rgb: 52, 211, 153;
  
  --header-bg: rgba(9, 13, 22, 0.85);
  
  --card-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.3), 0 1px 3px rgba(0, 0, 0, 0.1);
  --shadow-hover: 0 20px 40px -15px rgba(0, 0, 0, 0.5), 0 1px 3px rgba(0, 0, 0, 0.15);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  transition: background-color var(--transition-speed) ease, color var(--transition-speed) ease;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  line-height: 1.25;
  color: var(--text-primary);
}

a {
  text-decoration: none;
  color: inherit;
  transition: color var(--transition-speed) ease;
}

ul {
  list-style: none;
}

/* --- Accessibility Skip Link --- */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--accent-primary);
  color: white;
  padding: 8px;
  z-index: 100;
  transition: top 0.2s;
}
.skip-link:focus {
  top: 0;
}

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

main {
  padding-top: 80px; /* Offset for sticky header */
  min-height: calc(100vh - 80px - 250px);
}

/* --- Header / Navigation --- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 80px;
  background-color: var(--header-bg);
  border-bottom: 1px solid var(--border-color);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 1000;
  transition: background-color var(--transition-speed) ease, border-color var(--transition-speed) ease;
}

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

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

.logo-img {
  width: 40px;
  height: 40px;
  border-radius: 10px;
}

.logo-text {
  font-family: 'Outfit', sans-serif;
  font-size: 1.4rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.5px;
}

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

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

.nav-link {
  font-weight: 500;
  color: var(--text-secondary);
  font-size: 0.95rem;
  position: relative;
  padding: 0.5rem 0;
}

.nav-link:hover, .nav-link.active {
  color: var(--text-primary);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
  transition: width 0.3s ease;
  border-radius: 2px;
}

.nav-link:hover::after, .nav-link.active::after {
  width: 100%;
}

/* --- Theme Toggle & Mobile Buttons --- */
.controls {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.theme-toggle {
  background: none;
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color var(--transition-speed) ease, border-color var(--transition-speed) ease;
}

.theme-toggle:hover {
  background-color: var(--bg-secondary);
  border-color: var(--text-secondary);
}

.theme-toggle svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

/* Hide dark icon by default, show in light theme; visa versa */
[data-theme="dark"] .theme-toggle .sun-icon {
  display: block;
}
[data-theme="dark"] .theme-toggle .moon-icon {
  display: none;
}
.theme-toggle .sun-icon {
  display: none;
}
.theme-toggle .moon-icon {
  display: block;
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: var(--text-primary);
}

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

/* --- Hero Section (Home) --- */
.hero {
  padding: 5rem 0 4rem 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -10%;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(var(--accent-rgb), 0.08) 0%, rgba(var(--accent-secondary-rgb), 0) 70%);
  z-index: -1;
  border-radius: 50%;
  pointer-events: none;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 800;
  letter-spacing: -1.5px;
  margin-bottom: 1.5rem;
  animation: fadeInUp 0.8s ease-out;
}

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

.hero-desc {
  font-size: 1.25rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 2.5rem auto;
  animation: fadeInUp 0.8s ease-out 0.1s both;
}

.hero-buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  animation: fadeInUp 0.8s ease-out 0.2s both;
}

/* --- Button Styles --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.75rem;
  border-radius: 12px;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.2s ease;
  cursor: pointer;
}

.btn-primary {
  background-color: var(--accent-primary);
  color: #ffffff;
  box-shadow: 0 4px 14px 0 rgba(var(--accent-rgb), 0.3);
}

.btn-primary:hover {
  background-color: var(--accent-primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px 0 rgba(var(--accent-rgb), 0.4);
}

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

.btn-secondary:hover {
  background-color: var(--bg-secondary);
  border-color: var(--text-secondary);
  transform: translateY(-2px);
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  border-radius: 8px;
}

/* --- About Section --- */
.section {
  padding: 5rem 0;
  border-top: 1px solid var(--border-color);
}

.section-header {
  text-align: center;
  margin-bottom: 3.5rem;
}

.section-title {
  font-size: 2.25rem;
  letter-spacing: -0.5px;
  margin-bottom: 1rem;
}

.section-desc {
  color: var(--text-secondary);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto;
}

/* About Grid */
.about-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.about-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 2.5rem 2rem;
  border-radius: 20px;
  box-shadow: var(--card-shadow);
  transition: all 0.3s ease;
  text-align: left;
}

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

.about-card-icon {
  background: rgba(var(--accent-rgb), 0.1);
  color: var(--accent-primary);
  width: 50px;
  height: 50px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.about-card-icon svg {
  width: 24px;
  height: 24px;
}

.about-card-title {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

.about-card-desc {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* --- Featured Apps Section --- */
.apps-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2.5rem;
  margin-top: 1.5rem;
}

.app-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  box-shadow: var(--card-shadow);
  overflow: hidden;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

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

.app-card-body {
  padding: 2.5rem;
  flex-grow: 1;
  display: flex;
  gap: 2rem;
}

.app-icon-wrapper {
  flex-shrink: 0;
  width: 96px;
  height: 96px;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08);
}

.app-icon-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.app-info {
  flex-grow: 1;
}

.app-status {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.app-status.available {
  background-color: rgba(var(--accent-secondary-rgb), 0.1);
  color: var(--accent-secondary);
}

.app-status.upcoming {
  background-color: rgba(var(--accent-rgb), 0.1);
  color: var(--accent-primary);
}

.app-name {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  letter-spacing: -0.3px;
}

.app-desc {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

.app-card-footer {
  padding: 1.5rem 2.5rem;
  background-color: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  display: flex;
  gap: 1rem;
  justify-content: flex-start;
  flex-wrap: wrap;
}

/* --- Support & FAQ Accordion --- */
.support-container {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 4rem;
  margin-top: 2rem;
}

.support-info-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 2.5rem;
  box-shadow: var(--card-shadow);
  height: fit-content;
}

.support-meta-item {
  margin-bottom: 2rem;
}

.support-meta-item:last-child {
  margin-bottom: 0;
}

.support-meta-label {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent-primary);
  margin-bottom: 0.5rem;
}

.support-meta-val {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.support-meta-val a:hover {
  color: var(--accent-primary);
  text-decoration: underline;
}

/* FAQ Accordion */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.faq-item {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.faq-question-btn {
  width: 100%;
  background: none;
  border: none;
  padding: 1.25rem 1.5rem;
  text-align: left;
  font-family: 'Outfit', sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.faq-question-btn:hover {
  background-color: var(--bg-secondary);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out, padding 0.3s ease;
  padding: 0 1.5rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.faq-item.active {
  border-color: var(--accent-primary);
}

.faq-item.active .faq-answer {
  padding-bottom: 1.25rem;
  max-height: 300px; /* Arbitrary high height to allow auto expansion */
}

.faq-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  transition: transform 0.3s ease;
  color: var(--text-secondary);
}

.faq-item.active .faq-icon {
  transform: rotate(180deg);
  color: var(--accent-primary);
}

/* Bug Reporting / Contact Form */
.form-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 2.5rem;
  box-shadow: var(--card-shadow);
  margin-top: 3rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.95rem;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  transition: border-color 0.2s ease, outline 0.2s ease;
}

.form-control:focus {
  outline: 2px solid rgba(var(--accent-rgb), 0.2);
  border-color: var(--accent-primary);
}

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

/* --- Contact Page Card --- */
.contact-container {
  max-width: 650px;
  margin: 2rem auto;
}

/* --- Terms & Privacy Policy Pages --- */
.doc-container {
  max-width: 800px;
  margin: 3rem auto;
  padding: 0 1.5rem;
}

.doc-header {
  margin-bottom: 3rem;
  text-align: center;
}

.doc-header h1 {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
}

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

.doc-content h2 {
  font-size: 1.5rem;
  margin: 2.5rem 0 1rem 0;
  letter-spacing: -0.3px;
}

.doc-content p {
  margin-bottom: 1.25rem;
  color: var(--text-secondary);
}

.doc-content ul {
  list-style: disc;
  margin-left: 1.5rem;
  margin-bottom: 1.5rem;
  color: var(--text-secondary);
}

.doc-content li {
  margin-bottom: 0.5rem;
}

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

.doc-content a:hover {
  color: var(--accent-primary-hover);
}

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

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 4rem;
  margin-bottom: 3rem;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-desc {
  color: var(--text-secondary);
  font-size: 0.95rem;
  max-width: 320px;
}

.footer-nav-title {
  font-family: 'Outfit', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 1.25rem;
}

.footer-nav-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

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

.footer-nav-link:hover {
  color: var(--text-primary);
}

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

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

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

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* --- Responsive Media Queries --- */
@media (max-width: 1024px) {
  .about-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  html {
    font-size: 15px;
  }
  
  .header {
    height: 70px;
  }
  
  main {
    padding-top: 70px;
  }
  
  .nav {
    position: fixed;
    top: 70px;
    left: 0;
    width: 100%;
    height: calc(100vh - 70px);
    background-color: var(--bg-primary);
    flex-direction: column;
    align-items: flex-start;
    padding: 2.5rem 1.5rem;
    gap: 2rem;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    border-top: 1px solid var(--border-color);
  }
  
  .nav.open {
    transform: translateX(0);
  }
  
  .nav-list {
    flex-direction: column;
    gap: 1.5rem;
    width: 100%;
  }
  
  .nav-link {
    font-size: 1.25rem;
    display: block;
    width: 100%;
  }
  
  .mobile-menu-btn {
    display: block;
  }
  
  .hero-title {
    font-size: 2.5rem;
    letter-spacing: -1px;
  }
  
  .about-grid {
    grid-template-columns: 1fr;
  }
  
  .apps-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .app-card-body {
    flex-direction: column;
    gap: 1.5rem;
    padding: 2rem;
  }
  
  .app-icon-wrapper {
    width: 80px;
    height: 80px;
    border-radius: 18px;
  }
  
  .app-card-footer {
    padding: 1.25rem 2rem;
  }
  
  .support-container {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
}
