/* ==========================================================================
   Neil Studio - Main Stylesheet
   Ultra-fast, Modern & Responsive Design for Cloudflare Pages
   Domain: neilstudio.io.vn
   ========================================================================== */

:root {
  --bg-main: #0a0e17;
  --bg-card: #121826;
  --bg-card-hover: #182032;
  --bg-nav: rgba(10, 14, 23, 0.85);
  --border-subtle: #1e293b;
  --border-focus: #3b82f6;
  
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-faint: #64748b;
  
  --primary: #3b82f6;
  --primary-hover: #2563eb;
  --primary-light: #60a5fa;
  --accent-purple: #8b5cf6;
  --accent-emerald: #10b981;
  --gradient-brand: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
  --gradient-glow: radial-gradient(circle at 50% 0%, rgba(59, 130, 246, 0.15) 0%, transparent 70%);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 30px -10px rgba(0, 0, 0, 0.5);

  --container-max: 1140px;
  --font-stack: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

html {
  scroll-behavior: smooth;
  font-family: var(--font-stack);
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  background-image: var(--gradient-glow);
  background-repeat: no-repeat;
  background-position: top center;
  background-size: 100% 600px;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--primary-light);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: #93c5fd;
}

/* Layout Utilities */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: 20px;
  padding-right: 20px;
}

/* Navigation Bar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-nav);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
  transition: background 0.3s ease;
}

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

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

.nav-logo {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  border: 1px solid var(--border-subtle);
}

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

.nav-link {
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.2s ease;
}

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

.nav-cta {
  background: var(--gradient-brand);
  color: #fff !important;
  padding: 8px 18px;
  border-radius: 9999px;
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.nav-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.45);
}

/* Mobile Toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-main);
  cursor: pointer;
  padding: 8px;
}

/* Hero Section */
.hero-section {
  padding: 75px 0 60px;
  text-align: center;
  position: relative;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.25);
  border-radius: 9999px;
  font-size: 0.85rem;
  color: var(--primary-light);
  font-weight: 500;
  margin-bottom: 24px;
}

.hero-title {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
}

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

.hero-desc {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: var(--text-muted);
  max-width: 760px;
  margin: 0 auto 36px;
  line-height: 1.6;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 26px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
}

.btn-primary {
  background: var(--gradient-brand);
  color: #fff;
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(59, 130, 246, 0.5);
  color: #fff;
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
}

.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: #334155;
  color: #fff;
}

/* Stats / Highlights */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin: 50px 0;
  padding: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}

.stat-item {
  text-align: center;
}

.stat-num {
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary-light);
  margin-bottom: 4px;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Section Common */
.section {
  padding: 60px 0;
}

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

.section-tag {
  color: var(--primary-light);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}

.section-title {
  font-size: clamp(1.8rem, 3.5vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
}

.section-desc {
  color: var(--text-muted);
  font-size: 1rem;
}

/* Cards Grid */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

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

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(59, 130, 246, 0.4);
  box-shadow: 0 12px 28px -8px rgba(0, 0, 0, 0.4);
}

.card-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(59, 130, 246, 0.1);
  color: var(--primary-light);
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
  font-size: 1.4rem;
}

.card-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text-main);
}

.card-desc {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.6;
  flex-grow: 1;
}

/* Featured Apps Section */
.apps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 28px;
}

.app-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform 0.2s ease, border-color 0.2s ease;
  display: flex;
  flex-direction: column;
}

.app-card:hover {
  transform: translateY(-3px);
  border-color: rgba(59, 130, 246, 0.35);
}

.app-banner {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-bottom: 1px solid var(--border-subtle);
  background-color: #0d121c;
}

.app-content {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.app-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.app-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  object-fit: cover;
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-sm);
}

.app-title-area h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 4px;
}

.app-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 8px;
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-emerald);
  border-radius: 4px;
}

.app-desc {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.6;
  margin-bottom: 20px;
  flex-grow: 1;
}

.app-features {
  list-style: none;
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.app-features li {
  font-size: 0.88rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.app-features li::before {
  content: "✓";
  color: var(--primary-light);
  font-weight: bold;
}

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

/* Contact / Feedback Box */
.contact-box {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 40px;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.contact-box h3 {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.contact-box p {
  color: var(--text-muted);
  margin-bottom: 24px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.email-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 24px;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 9999px;
  color: var(--primary-light);
  font-weight: 600;
  font-size: 1.05rem;
  transition: all 0.2s ease;
}

.email-pill:hover {
  background: rgba(59, 130, 246, 0.2);
  border-color: var(--primary);
  transform: translateY(-2px);
  color: #fff;
}

/* ==========================================================================
   Policy & Legal Documentation Pages
   ========================================================================== */
.policy-wrapper {
  padding: 50px 0 80px;
}

.policy-header {
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 24px;
  margin-bottom: 36px;
}

.policy-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 12px;
  flex-wrap: wrap;
}

.policy-tag {
  background: rgba(59, 130, 246, 0.12);
  color: var(--primary-light);
  padding: 3px 10px;
  border-radius: 4px;
  font-weight: 600;
}

.policy-content {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 36px;
  font-size: 0.98rem;
  line-height: 1.75;
  color: #cbd5e1;
}

.policy-content h2 {
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--text-main);
  margin-top: 36px;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-subtle);
}

.policy-content h2:first-of-type {
  margin-top: 0;
}

.policy-content h3 {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-main);
  margin-top: 24px;
  margin-bottom: 10px;
}

.policy-content p {
  margin-bottom: 16px;
}

.policy-content ul, .policy-content ol {
  margin-bottom: 20px;
  padding-left: 24px;
}

.policy-content li {
  margin-bottom: 8px;
}

.policy-alert {
  background: rgba(59, 130, 246, 0.08);
  border-left: 4px solid var(--primary);
  padding: 16px 20px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 24px 0;
  color: #e2e8f0;
}

.policy-alert strong {
  color: #fff;
}

.policy-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  margin-top: 32px;
}

.policy-hub-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 28px;
  display: flex;
  flex-direction: column;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.policy-hub-card:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
  box-shadow: var(--shadow-lg);
}

.policy-hub-card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 10px;
}

.policy-hub-card p {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.6;
  margin-bottom: 20px;
  flex-grow: 1;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 20px;
  transition: color 0.2s ease;
}

.back-link:hover {
  color: var(--primary-light);
}

/* Footer */
.footer {
  margin-top: auto;
  background: #070a10;
  border-top: 1px solid var(--border-subtle);
  padding: 50px 0 30px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand h4 {
  color: var(--text-main);
  font-size: 1.2rem;
  margin-bottom: 12px;
}

.footer-brand p {
  max-width: 380px;
  line-height: 1.6;
  font-size: 0.9rem;
}

.footer-col h5 {
  color: var(--text-main);
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a {
  color: var(--text-muted);
  transition: color 0.2s ease;
}

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

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

/* Responsive */
@media (max-width: 768px) {
  .nav-menu {
    display: none;
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-subtle);
    flex-direction: column;
    padding: 24px;
    gap: 16px;
    box-shadow: var(--shadow-lg);
  }

  .nav-menu.is-active {
    display: flex;
  }

  .nav-toggle {
    display: block;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .policy-content {
    padding: 22px;
  }
}

