/* ============================================
   naifix.xyz - Custom Styles
   ============================================ */

:root {
  --color-bg: #ffffff;
  --color-bg-soft: #f7f8fa;
  --color-text: #0a0e1a;
  --color-text-soft: #4a5568;
  --color-text-muted: #94a3b8;
  --color-accent: #0066ff;
  --color-accent-hover: #0052cc;
  --color-accent-soft: #e6f0ff;
  --color-border: #e5e7eb;
  --color-success: #10b981;
  --color-warning: #f59e0b;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.08);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--color-text);
}

h1 { font-size: clamp(2.25rem, 5vw, 3.5rem); line-height: 1.15; }
h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); line-height: 1.2; }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.5rem); line-height: 1.3; }

/* Custom container */
.container-custom {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

@media (min-width: 768px) {
  .container-custom { padding: 0 2rem; }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: var(--radius-md);
  transition: var(--transition);
  cursor: pointer;
  border: 1px solid transparent;
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--color-text);
  color: #fff;
}
.btn-primary:hover {
  background: var(--color-accent);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: #fff;
  color: var(--color-text);
  border-color: var(--color-border);
}
.btn-secondary:hover {
  border-color: var(--color-text);
  transform: translateY(-1px);
}

.btn-accent {
  background: var(--color-accent);
  color: #fff;
}
.btn-accent:hover {
  background: var(--color-accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 102, 255, 0.25);
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: 1rem;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 500;
  border-radius: var(--radius-full);
  background: var(--color-accent-soft);
  color: var(--color-accent);
}

.badge-dot::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-accent);
  display: inline-block;
}

/* Cards */
.card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: var(--transition);
}
.card:hover {
  border-color: var(--color-text);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.card-soft {
  background: var(--color-bg-soft);
  border: 1px solid transparent;
}
.card-soft:hover {
  background: #fff;
  border-color: var(--color-text);
}

/* Section */
.section {
  padding: 4rem 0;
}
@media (min-width: 768px) {
  .section { padding: 6rem 0; }
}

.section-sm {
  padding: 2.5rem 0;
}

.section-title {
  text-align: center;
  margin-bottom: 3rem;
}
.section-title .eyebrow {
  display: inline-block;
  margin-bottom: 1rem;
}
.section-title p {
  color: var(--color-text-soft);
  max-width: 600px;
  margin: 1rem auto 0;
  font-size: 1.05rem;
}

/* Navbar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--color-border);
}

.nav-link {
  color: var(--color-text-soft);
  font-size: 0.95rem;
  font-weight: 500;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  text-decoration: none;
}
.nav-link:hover {
  color: var(--color-text);
  background: var(--color-bg-soft);
}
.nav-link.active {
  color: var(--color-text);
}

/* Hero */
.hero {
  padding: 5rem 0 4rem;
  position: relative;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at top, rgba(0, 102, 255, 0.08) 0%, transparent 60%);
  z-index: 0;
  pointer-events: none;
}

.hero > .container-custom {
  position: relative;
  z-index: 1;
}

.hero-title {
  max-width: 800px;
  margin: 0 auto 1.5rem;
  text-align: center;
}
.hero-subtitle {
  max-width: 600px;
  margin: 0 auto 2.5rem;
  text-align: center;
  color: var(--color-text-soft);
  font-size: 1.15rem;
}
.hero-cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Hero visual */
.hero-visual {
  margin-top: 4rem;
  position: relative;
  border-radius: var(--radius-lg);
  background: var(--color-bg-soft);
  border: 1px solid var(--color-border);
  padding: 2rem;
  min-height: 320px;
  overflow: hidden;
}

@media (min-width: 768px) {
  .hero-visual { padding: 3rem; min-height: 400px; }
}

/* Pain points / Features */
.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--color-accent-soft);
  color: var(--color-accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

/* Product grid */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.product-card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
  text-decoration: none;
  color: inherit;
  display: block;
}
.product-card:hover {
  border-color: var(--color-text);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.product-image {
  aspect-ratio: 4 / 3;
  background: var(--color-bg-soft);
  position: relative;
  overflow: hidden;
}

.product-image img,
.product-image svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-body {
  padding: 1.25rem 1.5rem 1.5rem;
}

.product-price {
  font-weight: 700;
  color: var(--color-text);
  font-size: 1.1rem;
}

.product-rating {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.85rem;
  color: var(--color-text-soft);
}

/* Footer */
.footer {
  background: var(--color-text);
  color: #fff;
  padding: 4rem 0 2rem;
  margin-top: 6rem;
}
.footer a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  transition: var(--transition);
}
.footer a:hover {
  color: #fff;
}
.footer-bottom {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.85rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

/* Stats */
.stat {
  text-align: center;
}
.stat-value {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  color: var(--color-text);
  letter-spacing: -0.02em;
  line-height: 1;
  margin-bottom: 0.5rem;
}
.stat-label {
  color: var(--color-text-soft);
  font-size: 0.9rem;
}

/* Forms */
.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  background: #fff;
  transition: var(--transition);
  font-family: inherit;
}
.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px var(--color-accent-soft);
}
.form-textarea {
  resize: vertical;
  min-height: 120px;
}
.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--color-text);
}

/* FAQ */
.faq-item {
  border-bottom: 1px solid var(--color-border);
  padding: 1.25rem 0;
}
.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  font-weight: 600;
  font-size: 1.05rem;
  user-select: none;
  gap: 1rem;
}
.faq-question .icon {
  flex-shrink: 0;
  transition: transform 0.2s;
  color: var(--color-text-soft);
}
.faq-item.open .faq-question .icon {
  transform: rotate(180deg);
}
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  color: var(--color-text-soft);
}
.faq-item.open .faq-answer {
  max-height: 500px;
  margin-top: 0.75rem;
}

/* Stars */
.stars {
  color: #fbbf24;
  letter-spacing: 1px;
}

/* Utility */
.eyebrow {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-accent);
}

.text-muted { color: var(--color-text-soft); }
.text-tiny { font-size: 0.85rem; }

.divider {
  height: 1px;
  background: var(--color-border);
  margin: 2rem 0;
}

/* Mobile menu */
.mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  z-index: 100;
  padding: 5rem 2rem 2rem;
  flex-direction: column;
  gap: 1rem;
}
.mobile-menu.open {
  display: flex;
}
.mobile-menu a {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--color-text);
  text-decoration: none;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--color-border);
}

.menu-button {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: var(--color-text);
}
@media (max-width: 768px) {
  .nav-links { display: none !important; }
  .nav-cta { display: none !important; }
  .menu-button { display: block; }
}

/* Animations */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.animate-fade-up {
  animation: fadeUp 0.6s ease-out backwards;
}
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
