/* ==========================================================================
   Mobile App Studio — Static Website Template (iOS & Android Store Ready)
   ========================================================================== */

:root {
  --bg-body: #f8fafc;
  --bg-surface: #ffffff;
  --bg-subtle: #f1f5f9;
  --bg-glass: rgba(255, 255, 255, 0.82);

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;

  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-soft: rgba(37, 99, 235, 0.1);
  --accent-gradient: linear-gradient(135deg, #2563eb 0%, #4f46e5 100%);

  --border-color: #e2e8f0;
  --border-strong: #cbd5e1;

  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 10px 30px -10px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 20px 45px -15px rgba(15, 23, 42, 0.12);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-pill: 9999px;

  --container-width: 1120px;
  --reading-width: 820px;
  --header-height: 70px;
}

[data-theme="dark"] {
  --bg-body: #090d16;
  --bg-surface: #111827;
  --bg-subtle: #1e293b;
  --bg-glass: rgba(17, 24, 39, 0.82);

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --accent: #3b82f6;
  --accent-hover: #60a5fa;
  --accent-soft: rgba(59, 130, 246, 0.15);

  --border-color: #1f2937;
  --border-strong: #334155;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 10px 30px -10px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 20px 45px -15px rgba(0, 0, 0, 0.6);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-body);
  color: var(--text-primary);
  line-height: 1.65;
  font-size: 16px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background-color 0.2s ease, color 0.2s ease;
}

main {
  flex: 1;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.15s ease, opacity 0.15s ease;
}

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

img,
svg {
  display: block;
  max-width: 100%;
}

.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 24px;
}

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

/* Empty Slot Helper: Hiển thị gọn gàng khi thông tin đang để trống */
.info-slot:empty::before {
  content: "—";
  color: var(--text-muted);
  font-weight: 400;
}

.brand-name:empty {
  display: none;
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  background: var(--bg-glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-color);
}

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text-primary);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.brand:hover {
  color: var(--text-primary);
  opacity: 0.9;
}

.brand-logo {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}

.nav-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
}

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

.nav-links a {
  display: inline-block;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.92rem;
  font-weight: 500;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--text-primary);
  background-color: var(--bg-subtle);
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: var(--bg-surface);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
}

.icon-btn:hover {
  color: var(--text-primary);
  border-color: var(--border-strong);
}

.menu-toggle {
  display: none;
}

/* Theme Icon States */
[data-theme="dark"] .icon-sun {
  display: block;
}
[data-theme="dark"] .icon-moon {
  display: none;
}
:root:not([data-theme="dark"]) .icon-sun {
  display: none;
}
:root:not([data-theme="dark"]) .icon-moon {
  display: block;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
  position: relative;
  overflow: hidden;
  padding: 88px 0 72px;
  border-bottom: 1px solid var(--border-color);
  background:
    radial-gradient(circle at 15% 15%, var(--accent-soft), transparent 42%),
    radial-gradient(circle at 85% 25%, rgba(79, 70, 229, 0.08), transparent 40%);
}

.hero-inner {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}

.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  margin-bottom: 22px;
}

.badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

.hero h1 {
  font-size: clamp(2.1rem, 4.8vw, 3.35rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 18px;
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.15rem);
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 32px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 12px 22px;
  border-radius: 11px;
  font-size: 0.95rem;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--accent-gradient);
  color: #ffffff;
  box-shadow: 0 8px 20px -6px rgba(37, 99, 235, 0.45);
}

.btn-primary:hover {
  color: #ffffff;
  opacity: 0.95;
}

.btn-secondary {
  background: var(--bg-surface);
  color: var(--text-primary);
  border-color: var(--border-color);
  box-shadow: var(--shadow-sm);
}

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

/* ==========================================================================
   Sections & Cards
   ========================================================================== */
.section {
  padding: 72px 0;
}

.section--alt {
  background: var(--bg-subtle);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 44px;
}

.section-header h2 {
  font-size: clamp(1.55rem, 3vw, 2.05rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  margin-bottom: 10px;
}

.section-header p {
  color: var(--text-secondary);
}

/* Empty State Showcase (Khi chưa có sản phẩm trên chợ) */
.empty-showcase {
  max-width: 680px;
  margin: 0 auto;
  padding: 48px 32px;
  background: var(--bg-surface);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  text-align: center;
  box-shadow: var(--shadow-md);
}

.empty-icon-wrap {
  width: 68px;
  height: 68px;
  margin: 0 auto 20px;
  border-radius: 18px;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
}

.empty-showcase h3 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.empty-showcase p {
  color: var(--text-secondary);
  max-width: 480px;
  margin: 0 auto 26px;
  font-size: 0.96rem;
}

.store-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  border-radius: 11px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.store-badge--disabled {
  opacity: 0.78;
  cursor: default;
  user-select: none;
}

.store-badge strong {
  display: block;
  color: var(--text-primary);
  font-size: 0.92rem;
  line-height: 1.2;
}

.store-badge span {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* App Grid (Sẵn sàng khi mở comment thêm sản phẩm sau này) */
.app-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 24px;
}

.app-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.app-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.app-card-head {
  display: flex;
  align-items: center;
  gap: 16px;
}

.app-icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  object-fit: cover;
  flex-shrink: 0;
}

.app-meta h3 {
  font-size: 1.12rem;
  font-weight: 700;
}

.app-category {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.app-desc {
  color: var(--text-secondary);
  font-size: 0.93rem;
  flex: 1;
}

.app-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* Info Grid (Developer / Compliance Quick Links) */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.info-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 26px;
  box-shadow: var(--shadow-sm);
}

.info-card-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.info-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.info-card p {
  color: var(--text-secondary);
  font-size: 0.92rem;
  margin-bottom: 14px;
}

.info-card-link {
  font-size: 0.9rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* Developer Info Table */
.meta-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 28px;
  box-shadow: var(--shadow-sm);
}

.meta-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.meta-item dt {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.meta-item dd {
  font-size: 0.96rem;
  font-weight: 500;
  color: var(--text-primary);
  word-break: break-word;
}

/* ==========================================================================
   Legal & Content Pages (Privacy, Terms, Support, Delete Data)
   ========================================================================== */
.page-hero {
  padding: 52px 0 36px;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-subtle);
}

.page-hero h1 {
  font-size: clamp(1.75rem, 3.5vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  margin-bottom: 10px;
}

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

.legal-body {
  padding: 48px 0 80px;
}

.legal-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: clamp(24px, 4vw, 44px);
  box-shadow: var(--shadow-sm);
}

.legal-card h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-top: 32px;
  margin-bottom: 12px;
  padding-top: 24px;
  border-top: 1px solid var(--border-color);
}

.legal-card h2:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.legal-card h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-top: 20px;
  margin-bottom: 8px;
}

.legal-card p {
  color: var(--text-secondary);
  margin-bottom: 14px;
}

.legal-card ul,
.legal-card ol {
  color: var(--text-secondary);
  padding-left: 22px;
  margin-bottom: 16px;
}

.legal-card li {
  margin-bottom: 8px;
}

/* Forms (Support & Data Deletion - Netlify Forms Ready) */
.form-stack {
  display: grid;
  gap: 18px;
  margin-top: 20px;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}

.form-group label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-primary);
}

.form-control {
  width: 100%;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--bg-body);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.95rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

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

.hidden-honeypot {
  display: none !important;
}

/* FAQ Accordion */
.faq-list {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.faq-item {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--bg-body);
  overflow: hidden;
}

.faq-item summary {
  padding: 15px 18px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  font-size: 1.2rem;
  color: var(--text-muted);
  font-weight: 400;
}

.faq-item[open] summary::after {
  content: "−";
}

.faq-answer {
  padding: 0 18px 16px;
  color: var(--text-secondary);
  font-size: 0.94rem;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border-color);
  padding: 40px 0;
  margin-top: auto;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.footer-copy {
  color: var(--text-muted);
  font-size: 0.88rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  list-style: none;
}

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

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

/* ==========================================================================
   Responsive Mobile
   ========================================================================== */
@media (max-width: 768px) {
  .menu-toggle {
    display: inline-flex;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    padding: 16px 24px;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
  }

  .nav-links.is-open {
    display: flex;
  }

  .nav-links a {
    padding: 11px 14px;
  }

  .hero {
    padding: 60px 0 52px;
  }

  .section {
    padding: 52px 0;
  }

  .empty-showcase {
    padding: 36px 20px;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

