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

/* --- Theme Variables & Design System Tokens --- */
:root {
  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  /* Sleek Dark Mode Palette - Direct App Harmony */
  --bg-dark: #161616;
  --bg-darker: #0E0E0E;
  --surface: #222222;
  --surface-hover: #2A2A2A;
  --surface-accent: #2D2D2D;
  --border: #303030;
  --border-focus: #4A8FFF;
  
  --primary: #3B82F6; /* Perfect Solid Blue from Kidu App */
  --primary-hover: #2563EB;
  --primary-glow: rgba(59, 130, 246, 0.15);
  
  --text-primary: #F0F0F0;
  --text-secondary: #909090;
  --text-muted: #666666;
  
  --success: #10B981;
  --error: #EF4444;
  --warning: #F59E0B;
  
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 12px 36px rgba(0, 0, 0, 0.6);
  --glass-bg: rgba(22, 22, 22, 0.85);
  --glass-border: rgba(255, 255, 255, 0.04);
}

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

html {
  scroll-behavior: smooth;
  background-color: var(--bg-darker);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
}

body {
  background-color: var(--bg-dark);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
  transition: all 0.2s ease;
}

button, input, textarea {
  font-family: inherit;
  font-size: inherit;
  background: none;
  border: none;
  outline: none;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-darker);
}
::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* --- Layout Elements --- */
.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
}

/* --- Navigation Header (Flat & Modern) --- */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: all 0.3s ease;
}

.nav-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 76px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-size: 23px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text-primary);
}

.logo svg {
  width: 28px;
  height: 28px;
  fill: var(--primary);
}

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

.nav-links a {
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 14px;
}

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

.cta-btn {
  background-color: var(--primary);
  color: white;
  padding: 10px 18px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.cta-btn:hover {
  background-color: var(--primary-hover);
  transform: translateY(-1px);
}

/* Mobile Menu Button */
.menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  z-index: 1001;
}

.menu-btn span {
  width: 22px;
  height: 2px;
  background-color: var(--text-primary);
  transition: all 0.3s ease;
}

/* --- Hero Section & Global Content Styling --- */
main {
  flex: 1;
  padding-top: 100px;
}

.hero {
  padding: 60px 0;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 60px;
}

.hero-content h1 {
  font-family: var(--font-heading);
  font-size: 52px;
  line-height: 1.15;
  font-weight: 900;
  letter-spacing: -1px;
  margin-bottom: 20px;
}

.gradient-text {
  color: var(--primary);
}

.hero-content p {
  color: var(--text-secondary);
  font-size: 17px;
  margin-bottom: 32px;
  max-width: 500px;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  gap: 14px;
}

.secondary-btn {
  border: 1.5px solid var(--border);
  color: var(--text-primary);
  padding: 12px 22px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

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

/* Feature Showcase Cards (Flat & Elegant) */
.features {
  padding: 80px 0;
  background-color: var(--bg-darker);
}

.section-header {
  text-align: center;
  margin-bottom: 50px;
}

.section-header h2 {
  font-family: var(--font-heading);
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 12px;
}

.section-header p {
  color: var(--text-secondary);
  font-size: 15px;
  max-width: 540px;
  margin: 0 auto;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.card:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
}

.card-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background-color: var(--primary-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.card-icon svg {
  width: 20px;
  height: 20px;
  fill: var(--primary);
}

.card h3 {
  font-family: var(--font-heading);
  font-size: 19px;
  font-weight: 750;
  margin-bottom: 10px;
}

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

/* Mockup Display (Flat) */
.hero-mockup {
  display: flex;
  align-items: center;
  justify-content: center;
}

.mockup-inner {
  width: 100%;
  max-width: 290px;
  border-radius: 36px;
  border: 6px solid var(--border);
  overflow: hidden;
  background-color: var(--bg-darker);
  aspect-ratio: 9/19;
  box-shadow: var(--shadow-md);
}

.mockup-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* --- Document Views (Privacy & Terms - Side Nav Highlighting) --- */
.doc-section {
  padding: 50px 0 80px;
}

.doc-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 50px;
}

.doc-sidebar {
  position: sticky;
  top: 110px;
  height: fit-content;
}

.doc-sidebar h4 {
  font-family: var(--font-heading);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.doc-menu {
  list-style: none;
}

.doc-menu li {
  margin-bottom: 10px;
}

.doc-menu a {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-secondary);
  display: block;
  border-left: 2px solid transparent;
  padding-left: 14px;
}

.doc-menu a:hover {
  color: var(--primary);
  border-left-color: var(--border);
}

.doc-menu a.active {
  color: var(--primary);
  border-left-color: var(--primary);
  font-weight: 700;
}

.doc-body {
  max-width: 740px;
}

.doc-body h1 {
  font-family: var(--font-heading);
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 12px;
}

.doc-meta {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 30px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 12px;
}

.doc-body h2 {
  font-family: var(--font-heading);
  font-size: 21px;
  font-weight: 750;
  margin: 32px 0 12px;
  color: var(--text-primary);
  scroll-margin-top: 90px;
}

.doc-body p {
  color: var(--text-secondary);
  margin-bottom: 14px;
  font-size: 14px;
  line-height: 1.65;
}

.doc-body ul {
  list-style: disc;
  color: var(--text-secondary);
  margin: 14px 0 20px 20px;
  font-size: 14px;
}

.doc-body li {
  margin-bottom: 6px;
}

/* --- Support Page Layout (Flat Forms) --- */
.support-layout {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 50px;
  padding: 30px 0 60px;
}

.support-info h2 {
  font-family: var(--font-heading);
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 20px;
}

/* Accordion FAQs Drawer */
.faq-section {
  margin-top: 36px;
}

.faq-section h3 {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 750;
  margin-bottom: 20px;
}

.faq-item {
  border-bottom: 1px solid var(--border);
  margin-bottom: 10px;
  overflow: hidden;
}

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
  cursor: pointer;
  user-select: none;
}

.faq-question h4 {
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  transition: color 0.2s ease;
}

.faq-icon {
  width: 18px;
  height: 18px;
  position: relative;
  transition: transform 0.25s ease;
}

.faq-icon::before,
.faq-icon::after {
  content: '';
  position: absolute;
  background-color: var(--text-secondary);
  transition: background-color 0.2s ease;
}
.faq-icon::before {
  top: 8px;
  left: 3px;
  width: 12px;
  height: 2px;
}
.faq-icon::after {
  top: 3px;
  left: 8px;
  width: 2px;
  height: 12px;
}

.faq-item.active .faq-icon {
  transform: rotate(45deg);
}

.faq-item.active .faq-icon::before,
.faq-item.active .faq-icon::after {
  background-color: var(--primary);
}

.faq-item.active .faq-question h4 {
  color: var(--primary);
}

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

.faq-answer p {
  padding-bottom: 16px;
  color: var(--text-secondary);
  font-size: 13.5px;
}

/* Glassmorphism Support Form */
.support-form-wrapper {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 32px;
  align-self: start;
  box-shadow: var(--shadow-sm);
}

.support-form-wrapper h3 {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 10px;
}

.support-form-wrapper p {
  color: var(--text-secondary);
  font-size: 13.5px;
  margin-bottom: 24px;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  background-color: var(--bg-darker);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 12px 16px;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 13.5px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.form-control::placeholder {
  color: var(--text-muted);
}

.form-control:focus {
  border-color: var(--primary);
  background-color: var(--surface);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

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

.form-btn {
  width: 100%;
  background-color: var(--primary);
  color: white;
  padding: 14px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
}

.form-btn:hover {
  background-color: var(--primary-hover);
  transform: translateY(-1px);
}

.form-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.form-alert {
  padding: 10px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 16px;
  display: none;
}

.form-alert.success {
  background-color: rgba(16, 185, 129, 0.1);
  border: 1px solid var(--success);
  color: var(--success);
  display: block;
}

.form-alert.error {
  background-color: rgba(239, 68, 68, 0.1);
  border: 1px solid var(--error);
  color: var(--error);
  display: block;
}

/* --- Footer Layout (No Social Links as requested) --- */
footer {
  background-color: var(--bg-darker);
  border-top: 1px solid var(--border);
  padding: 50px 0 30px;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: 40px;
  margin-bottom: 30px;
}

.footer-brand p {
  color: var(--text-secondary);
  font-size: 13.5px;
  margin-top: 12px;
  max-width: 260px;
}

.footer-links-col h5 {
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.footer-links-col ul {
  list-style: none;
}

.footer-links-col li {
  margin-bottom: 10px;
}

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

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

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

.copyright {
  font-size: 13px;
  color: var(--text-muted);
}

/* --- Responsive Adjustments --- */
@media (max-width: 992px) {
  .hero-grid,
  .support-layout {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  
  .hero-mockup {
    order: -1;
  }
  
  .doc-layout {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  
  .doc-sidebar {
    position: static;
  }
  
  .doc-menu {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }
  
  .doc-menu li {
    margin-bottom: 0;
  }
  
  .doc-menu a {
    border-left: none;
    border-bottom: 2px solid transparent;
    padding: 4px 10px;
  }
  
  .doc-menu a.active {
    border-bottom-color: var(--primary);
  }
}

@media (max-width: 768px) {
  .hero-content h1 {
    font-size: 36px;
  }
  
  .section-header h2 {
    font-size: 28px;
  }
  
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  
  .nav-links {
    display: none;
  }
  
  .menu-btn {
    display: flex;
  }
  
  .nav-wrapper.mobile-open .nav-links {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 76px;
    left: 0;
    width: 100%;
    background-color: var(--bg-dark);
    padding: 24px;
    border-bottom: 1px solid var(--border);
    gap: 16px;
    align-items: flex-start;
  }
  
  .nav-wrapper.mobile-open .menu-btn span:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
  }
  
  .nav-wrapper.mobile-open .menu-btn span:nth-child(2) {
    opacity: 0;
  }
  
  .nav-wrapper.mobile-open .menu-btn span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }
}

@media (max-width: 480px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
  
  .hero-actions {
    flex-direction: column;
  }
}
