/* ==========================================================================
   WEROGRAM — OFFICIAL STRICT DESIGN SYSTEM (V25)
   Minimalist, Ultra-Fast, Dark & Light Mode, No Clutter
   ========================================================================== */

:root {
  --bg: #090a0f;
  --bg-surface: #10121a;
  --bg-surface-hover: #161a24;
  --border: #1e222e;
  --border-focus: #3b82f6;
  --text: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-light: rgba(37, 99, 235, 0.12);
  --success: #10b981;
  --warning: #f59e0b;
  --nav-bg: rgba(9, 10, 15, 0.88);
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', Consolas, monospace;
}

[data-theme="light"] {
  --bg: #f8fafc;
  --bg-surface: #ffffff;
  --bg-surface-hover: #f1f5f9;
  --border: #e2e8f0;
  --border-focus: #2563eb;
  --text: #0f172a;
  --text-muted: #475569;
  --text-dim: #94a3b8;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-light: rgba(37, 99, 235, 0.08);
  --nav-bg: rgba(248, 250, 252, 0.92);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: var(--font-sans);
  background-color: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ==========================================================================
   NAVBAR (Supports both .nav-container and .navbar)
   ========================================================================== */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--nav-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.nav-container, .navbar {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand, .brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-brand-logo {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.nav-brand-title, .brand-name {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--text);
}

.nav-menu, .nav-links {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 4px;
}

.nav-item, .nav-links li {
  position: relative;
}

.nav-link, .nav-links a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  border-radius: 6px;
  transition: all 0.15s ease;
}

.nav-link:hover, .nav-link.active, .nav-links a:hover, .nav-links a.active {
  color: var(--text);
  background: var(--bg-surface-hover);
}

/* Documents Dropdown */
.nav-dropdown {
  position: relative;
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 260px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.4);
  flex-direction: column;
  gap: 2px;
  z-index: 200;
}

.nav-dropdown:hover .dropdown-menu,
.nav-dropdown.open .dropdown-menu {
  display: flex;
}

.dropdown-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-muted);
  border-radius: 6px;
  transition: all 0.15s ease;
}

.dropdown-item:hover {
  color: var(--text);
  background: var(--bg-surface-hover);
}

.dropdown-item.active {
  color: var(--accent);
  background: var(--accent-light);
}

.nav-controls, .nav-right-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-icon, .theme-toggle-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  width: 36px;
  height: 36px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.btn-icon:hover, .theme-toggle-btn:hover {
  color: var(--text);
  border-color: var(--text-muted);
  background: var(--bg-surface-hover);
}

.btn-mobile-menu, .mobile-menu-btn {
  display: none;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  width: 38px;
  height: 38px;
  border-radius: 6px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

/* Mobile Drawer */
.mobile-drawer, .mobile-nav-drawer {
  display: none;
  position: absolute;
  top: 64px;
  left: 0;
  right: 0;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  padding: 16px 24px;
  flex-direction: column;
  gap: 4px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.mobile-drawer.open, .mobile-nav-drawer.open {
  display: flex;
}

.mobile-drawer a, .mobile-nav-drawer a {
  padding: 12px 14px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-muted);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mobile-drawer a:hover, .mobile-drawer a.active,
.mobile-nav-drawer a:hover, .mobile-nav-drawer a.active {
  color: var(--text);
  background: var(--bg-surface-hover);
}

.mobile-drawer-divider, .mobile-group-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-dim);
  padding: 14px 14px 4px 14px;
  letter-spacing: 0.5px;
}

/* ==========================================================================
   BUTTONS & BADGES
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--accent);
  color: #ffffff !important;
}

.btn-primary:hover {
  background: var(--accent-hover);
}

.btn-secondary {
  background: var(--bg-surface);
  color: var(--text) !important;
  border-color: var(--border);
}

.btn-secondary:hover {
  background: var(--bg-surface-hover);
  border-color: var(--text-muted);
}

.btn-disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
  background: var(--bg-surface);
  border-color: var(--border);
  color: var(--text-dim) !important;
}

.btn-lg {
  padding: 14px 28px;
  font-size: 15px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.badge-success, .badge-available {
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.badge-warning, .badge-soon {
  background: rgba(245, 158, 11, 0.12);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.25);
}

/* ==========================================================================
   MAIN LAYOUT & HERO
   ========================================================================== */
.main-wrapper, .page-container, .doc-container, .content-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 24px 80px 24px;
  flex: 1;
  width: 100%;
}

.notice-banner, .disclaimer-banner {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 6px;
  padding: 14px 18px;
  margin-bottom: 32px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.55;
}

.notice-banner strong, .disclaimer-banner strong {
  color: var(--text);
}

.hero {
  text-align: center;
  padding: 24px 0 40px 0;
}

.hero-logo, .hero-icon {
  width: 96px;
  height: 96px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--bg-surface);
  margin: 0 auto 24px auto;
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-logo img, .hero-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero h1 {
  font-size: 44px;
  font-weight: 800;
  letter-spacing: -1.2px;
  margin-bottom: 14px;
}

.hero p, .hero-subtitle {
  font-size: 17px;
  color: var(--text-muted);
  max-width: 640px;
  margin: 0 auto 32px auto;
  line-height: 1.6;
}

.hero-actions, .hero-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.hero-meta, .hero-apk-badge {
  font-size: 12.5px;
  font-family: var(--font-mono);
  color: var(--text-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* ==========================================================================
   CARDS & GRIDS
   ========================================================================== */
.section-head, .section-title-wrap {
  text-align: center;
  margin: 56px 0 28px 0;
}

.section-head h2, .section-title-wrap h2 {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 8px;
}

.section-head p, .section-title-wrap p {
  font-size: 14.5px;
  color: var(--text-muted);
}

.grid-3, .feature-grid, .platform-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
  gap: 16px;
}

.card, .feature-card, .doc-card, .doc-box {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 24px;
  transition: all 0.15s ease;
}

.card:hover, .feature-card:hover {
  background: var(--bg-surface-hover);
  border-color: rgba(255, 255, 255, 0.16);
}

.card-title, .doc-card h2, .doc-box h2 {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
}

.card-desc, .doc-card p, .doc-box p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
}

.doc-card ul, .doc-box ul, .doc-card ol, .doc-box ol {
  margin: 10px 0 14px 24px;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.65;
}

.doc-card li, .doc-box li {
  margin-bottom: 6px;
}

.doc-code-block, .doc-quote-box {
  background: var(--bg);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 6px;
  padding: 16px;
  margin: 14px 0;
  font-size: 13.5px;
  color: var(--text);
  line-height: 1.6;
}

.doc-header h1 {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.8px;
  margin-bottom: 8px;
}

.doc-meta {
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 24px;
  display: flex;
  gap: 12px;
}

.doc-nav-pills {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.doc-pill {
  font-size: 12.5px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 6px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.doc-pill:hover {
  background: var(--bg-surface-hover);
  color: var(--text);
}

.doc-pill.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* Platform Cards */
.platform-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 20px;
}

.platform-card.active, .platform-card.highlight {
  border-color: rgba(37, 99, 235, 0.4);
}

.platform-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

/* FAQ Accordion */
.faq-item {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  margin-bottom: 10px;
  cursor: pointer;
  overflow: hidden;
}

.faq-q, .faq-question {
  padding: 16px 20px;
  font-weight: 600;
  font-size: 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
}

.faq-a, .faq-answer {
  max-height: 0;
  overflow: hidden;
  padding: 0 20px;
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
  transition: all 0.25s ease;
}

.faq-item.open .faq-a, .faq-item.active .faq-answer {
  max-height: 500px;
  padding: 0 20px 16px 20px;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  padding: 48px 24px 32px 24px;
  margin-top: auto;
}

.footer-container {
  max-width: 1100px;
  margin: 0 auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 36px;
  margin-bottom: 40px;
}

.footer-title, .footer-col h4 {
  font-size: 12.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text);
  margin-bottom: 14px;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a {
  font-size: 13.5px;
  color: var(--text-muted);
}

.footer-links a:hover {
  color: var(--text);
}

.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 12.5px;
  color: var(--text-dim);
}

/* Responsive */
@media (max-width: 860px) {
  .nav-menu, .nav-links { display: none; }
  .btn-mobile-menu, .mobile-menu-btn { display: flex; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .hero h1 { font-size: 32px; }
  .hero p { font-size: 15px; }
}

@media (max-width: 520px) {
  .footer-grid { grid-template-columns: 1fr; }
  .hero-actions, .hero-cta { flex-direction: column; }
  .hero-actions .btn, .hero-cta .btn { width: 100%; }
}
