/* ==========================================================================
   JaWa Android Landing Page — Reusable Components
   ========================================================================== */

/* --------------------------------------------------------------------------
   Container & Section Headers
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-lg);
  padding-right: var(--space-lg);
}

.container-narrow {
  max-width: var(--container-narrow);
}

.section-header {
  text-align: center;
  max-width: 760px;
  margin: 0 auto var(--space-3xl) auto;
}

.section-header.text-left {
  text-align: left;
  margin-left: 0;
}

.section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 0.35rem 0.85rem;
  background: var(--color-brand-gradient-subtle);
  border: 1px solid var(--color-border-accent);
  border-radius: var(--radius-full);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-brand-light);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-md);
}

.section-title {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 3.8vw, 3rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.025em;
  color: var(--color-text-primary);
  margin-bottom: var(--space-md);
}

.section-title .gradient-text {
  background: var(--color-brand-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.section-desc {
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--color-text-secondary);
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1;
  padding: 0.85rem 1.6rem;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  transition: all var(--transition-normal);
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
  text-decoration: none;
}

.btn-primary {
  background: var(--color-brand-gradient);
  color: var(--color-text-inverted);
  box-shadow: 0 4px 18px rgba(16, 185, 129, 0.35);
  font-weight: 700;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 26px rgba(16, 185, 129, 0.5);
  filter: brightness(1.06);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: var(--color-bg-surface-elevated);
  border-color: var(--color-border-default);
  color: var(--color-text-primary);
}

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

.btn-outline {
  background: transparent;
  border-color: var(--color-border-accent);
  color: var(--color-brand-light);
}

.btn-outline:hover {
  background: rgba(16, 185, 129, 0.1);
  border-color: var(--color-brand-primary);
  transform: translateY(-2px);
}

.btn-lg {
  padding: 1.1rem 2.2rem;
  font-size: 1.05rem;
  border-radius: var(--radius-lg);
}

.btn-sm {
  padding: 0.5rem 0.95rem;
  font-size: 0.825rem;
  border-radius: var(--radius-sm);
}

/* --------------------------------------------------------------------------
   Badges & Tags
   -------------------------------------------------------------------------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.badge-emerald {
  background: var(--color-success-bg);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: var(--color-brand-light);
}

.badge-cyan {
  background: rgba(6, 182, 212, 0.12);
  border: 1px solid rgba(6, 182, 212, 0.3);
  color: #67E8F9;
}

.badge-amber {
  background: var(--color-warning-bg);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #FCD34D;
}

.badge-neutral {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--color-border-subtle);
  color: var(--color-text-secondary);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--color-brand-primary);
  box-shadow: 0 0 10px var(--color-brand-primary);
  animation: pulseAnimation 2s infinite ease-in-out;
}

@keyframes pulseAnimation {
  0%, 100% {
    transform: scale(0.9);
    opacity: 0.7;
  }
  50% {
    transform: scale(1.25);
    opacity: 1;
  }
}

/* --------------------------------------------------------------------------
   Cards
   -------------------------------------------------------------------------- */
.card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: var(--shadow-md);
  position: relative;
  transition: all var(--transition-normal);
}

.card-interactive:hover {
  transform: translateY(-4px);
  border-color: var(--color-border-accent);
  background: var(--color-bg-card-hover);
  box-shadow: var(--shadow-lg), 0 0 25px -5px rgba(16, 185, 129, 0.15);
}

.card-feature {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.feature-icon-wrapper {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-lg);
  background: var(--color-brand-gradient-subtle);
  border: 1px solid var(--color-border-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-brand-light);
  flex-shrink: 0;
  transition: all var(--transition-normal);
}

.card-feature:hover .feature-icon-wrapper {
  transform: scale(1.08);
  border-color: var(--color-brand-primary);
  box-shadow: var(--glow-emerald-sm);
}

.feature-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-text-primary);
}

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

.feature-status-tag {
  margin-top: auto;
  align-self: flex-start;
}

/* --------------------------------------------------------------------------
   Code Windows & Syntax
   -------------------------------------------------------------------------- */
.code-window {
  background: var(--color-bg-code);
  border: 1px solid var(--color-border-default);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
}

.code-window-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.25rem;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--color-border-subtle);
}

.code-dots {
  display: flex;
  gap: 6px;
}

.code-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.dot-red { background: #EF4444; }
.dot-yellow { background: #F59E0B; }
.dot-green { background: #10B981; }

.code-title {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--color-text-muted);
}

.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.65rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--color-border-subtle);
  color: var(--color-text-secondary);
  font-size: 0.75rem;
  font-family: var(--font-body);
  transition: all var(--transition-fast);
}

.copy-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--color-text-primary);
}

.copy-btn.copied {
  background: var(--color-success-bg);
  border-color: var(--color-brand-primary);
  color: var(--color-brand-light);
}

.code-pre {
  padding: 1.25rem;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  line-height: 1.65;
  color: #E2E8F0;
}

/* Syntax highlight simulation classes */
.code-kw { color: #F472B6; font-weight: 600; }
.code-str { color: #34D399; }
.code-num { color: #FBBF24; }
.code-fn { color: #60A5FA; }
.code-comm { color: #64748B; font-style: italic; }
.code-key { color: #93C5FD; }
.code-var { color: #CBD5E1; }

/* --------------------------------------------------------------------------
   Tabs
   -------------------------------------------------------------------------- */
.tabs-nav {
  display: flex;
  gap: var(--space-xs);
  padding: 4px;
  background: var(--color-bg-surface);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-md);
  width: fit-content;
  overflow-x: auto;
}

.tab-btn {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  color: var(--color-text-secondary);
  transition: all var(--transition-fast);
}

.tab-btn:hover {
  color: var(--color-text-primary);
}

.tab-btn.active {
  background: var(--color-bg-card-hover);
  color: var(--color-brand-light);
  border: 1px solid var(--color-border-accent);
  box-shadow: var(--shadow-sm);
}

.tab-pane {
  display: none;
}
.tab-pane.active {
  display: block;
}

/* --------------------------------------------------------------------------
   FAQ Accordion
   -------------------------------------------------------------------------- */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.faq-item {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color var(--transition-fast);
}

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

.faq-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  text-align: left;
  font-family: var(--font-heading);
  font-size: 1.075rem;
  font-weight: 600;
  color: var(--color-text-primary);
  background: none;
  cursor: pointer;
  gap: var(--space-md);
}

.faq-trigger:hover {
  color: var(--color-brand-light);
}

.faq-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  transition: transform var(--transition-normal);
  color: var(--color-text-muted);
}

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

.faq-content {
  display: none;
  padding: 0 1.5rem 1.5rem 1.5rem;
  color: var(--color-text-secondary);
  font-size: 0.975rem;
  line-height: 1.7;
  border-top: 1px solid transparent;
}

.faq-item.open .faq-content {
  display: block;
  border-top-color: var(--color-border-subtle);
}

/* --------------------------------------------------------------------------
   Tables
   -------------------------------------------------------------------------- */
.table-wrapper {
  overflow-x: auto;
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-lg);
  background: var(--color-bg-card);
}

.spec-table {
  width: 100%;
  text-align: left;
  font-size: 0.9rem;
}

.spec-table th {
  padding: 1rem 1.25rem;
  background: rgba(255, 255, 255, 0.03);
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--color-text-primary);
  border-bottom: 1px solid var(--color-border-default);
}

.spec-table td {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--color-border-subtle);
  color: var(--color-text-secondary);
}

.spec-table tr:last-child td {
  border-bottom: none;
}

.spec-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

/* --------------------------------------------------------------------------
   Toast Notifications
   -------------------------------------------------------------------------- */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  padding: 0.85rem 1.4rem;
  background: var(--color-bg-surface-elevated);
  border: 1px solid var(--color-brand-primary);
  border-radius: var(--radius-md);
  color: var(--color-text-primary);
  font-size: 0.875rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg), var(--glow-emerald-sm);
  display: flex;
  align-items: center;
  gap: 0.65rem;
  transform: translateY(20px);
  opacity: 0;
  transition: all var(--transition-normal);
  pointer-events: auto;
}

.toast.toast-show {
  transform: translateY(0);
  opacity: 1;
}
