/* ============================================
   NORAPIX — Design Tokens
   ============================================ */
:root {
  --color-bg: #F8F9FC;
  --color-surface: #FFFFFF;
  --color-surface-hover: #F0F2FA;
  --color-border: rgba(79, 70, 229, 0.08);
  --color-text: #0F1729;
  --color-text-secondary: #475569;
  --color-text-muted: #94A3B8;
  --color-accent: #6366F1;
  --color-accent-hover: #4F46E5;
  --color-accent-soft: #EEF2FF;
  --color-accent-rgb: 99, 102, 241;
  --gradient-text: linear-gradient(135deg, #4F46E5 0%, #6366F1 50%, #2563EB 100%);
  --gradient-accent: linear-gradient(135deg, #4F46E5, #6366F1);
  --nav-bg: rgba(248, 249, 252, 0.88);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.06);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.08);
  --dot-color: rgba(99, 102, 241, 0.07);
  --nav-height: 72px;
  --section-gap: 120px;
  --container-max: 1180px;
  --radius-card: 18px;
  --radius-sm: 10px;
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Work Sans', sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

[data-theme="dark"] {
  --color-bg: #0B0F1A;
  --color-surface: #141928;
  --color-surface-hover: #1C2236;
  --color-border: rgba(129, 140, 248, 0.1);
  --color-text: #F1F5F9;
  --color-text-secondary: #94A3B8;
  --color-text-muted: #64748B;
  --color-accent: #818CF8;
  --color-accent-hover: #A5B4FC;
  --color-accent-soft: rgba(99, 102, 241, 0.12);
  --color-accent-rgb: 129, 140, 248;
  --gradient-text: linear-gradient(135deg, #818CF8 0%, #A5B4FC 50%, #60A5FA 100%);
  --gradient-accent: linear-gradient(135deg, #818CF8, #60A5FA);
  --nav-bg: rgba(11, 15, 26, 0.88);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.4);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.5);
  --dot-color: rgba(129, 140, 248, 0.05);
}

/* Plugin accent per card */
[data-accent="showcase"]    { --card-accent: #F59E0B; --card-accent-rgb: 245,158,11; }
[data-accent="safeslot"]    { --card-accent: #10B981; --card-accent-rgb: 16,185,129; }
[data-accent="ds-generator"]{ --card-accent: #6366F1; --card-accent-rgb: 99,102,241; }
[data-accent="renamer"]     { --card-accent: #EC4899; --card-accent-rgb: 236,72,153; }
[data-accent="annotatex"]   { --card-accent: #3B82F6; --card-accent-rgb: 59,130,246; }
[data-accent="cleaner"]     { --card-accent: #8B5CF6; --card-accent-rgb: 139,92,246; }

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-padding-top: var(--nav-height);
}

body {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--color-text);
  background: var(--color-bg);
  transition: background-color 0.4s var(--ease), color 0.4s var(--ease);
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font: inherit; color: inherit; }

/* ============================================
   Typography
   ============================================ */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.15;
  color: var(--color-text);
  letter-spacing: -0.02em;
}
h1 { font-size: clamp(42px, 6vw, 68px); }
h2 { font-size: clamp(30px, 4vw, 44px); }
h3 { font-size: 22px; }
p  { color: var(--color-text-secondary); }

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

.section-label {
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 12px;
}

/* ============================================
   Layout
   ============================================ */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}

.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 64px;
}
.section-header p {
  margin-top: 16px;
  font-size: 18px;
}

/* ============================================
   Buttons
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 15px;
  padding: 14px 28px;
  border-radius: 12px;
  transition: all 0.25s var(--ease);
  cursor: pointer;
  white-space: nowrap;
}
.btn-primary {
  background: var(--gradient-accent);
  color: #fff;
  box-shadow: 0 4px 16px rgba(var(--color-accent-rgb), 0.3);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(var(--color-accent-rgb), 0.4);
}
.btn-secondary {
  background: var(--color-surface);
  color: var(--color-text);
  border: 1.5px solid var(--color-border);
}
.btn-secondary:hover {
  background: var(--color-surface-hover);
  border-color: rgba(var(--color-accent-rgb), 0.2);
}
.btn-sm { padding: 10px 20px; font-size: 14px; border-radius: 10px; }
.btn-lg { padding: 18px 36px; font-size: 17px; border-radius: 14px; }

/* ============================================
   Navigation
   ============================================ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-height);
  background: var(--nav-bg);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--color-border);
  transition: background-color 0.4s var(--ease), border-color 0.4s var(--ease);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: 32px;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.02em;
  color: var(--color-text);
  flex-shrink: 0;
}
.logo-mark {
  width: 28px;
  height: 28px;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav-links a {
  font-size: 15px;
  font-weight: 500;
  color: var(--color-text-secondary);
  transition: color 0.2s;
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 2px;
  background: var(--color-accent);
  transition: width 0.3s var(--ease);
  border-radius: 1px;
}
.nav-links a:hover { color: var(--color-text); }
.nav-links a:hover::after { width: 100%; }
.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.theme-toggle {
  width: 40px; height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  color: var(--color-text-secondary);
}
.theme-toggle:hover { background: var(--color-accent-soft); color: var(--color-accent); }
.theme-toggle svg { width: 20px; height: 20px; }
.theme-toggle .icon-moon { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-moon { display: block; }

.nav-hamburger {
  display: none;
  width: 40px; height: 40px;
  border-radius: 10px;
  align-items: center;
  justify-content: center;
}
.nav-hamburger svg { width: 22px; height: 22px; }

/* Mobile menu */
.nav-mobile {
  display: none;
  position: fixed;
  top: var(--nav-height); left: 0; right: 0;
  background: var(--nav-bg);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--color-border);
  padding: 16px 24px 24px;
  flex-direction: column;
  gap: 8px;
  z-index: 99;
}
.nav-mobile.open { display: flex; }
.nav-mobile a {
  display: block;
  padding: 12px 16px;
  border-radius: 10px;
  font-weight: 500;
  font-size: 16px;
  color: var(--color-text-secondary);
  transition: all 0.2s;
}
.nav-mobile a:hover {
  background: var(--color-accent-soft);
  color: var(--color-accent);
}

/* ============================================
   Hero
   ============================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(var(--nav-height) + 40px) 0 80px;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(circle, var(--dot-color) 1px, transparent 1px);
  background-size: 28px 28px;
}
.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.35;
  animation: float 22s ease-in-out infinite;
}
.hero-orb-1 {
  width: 500px; height: 500px;
  background: rgba(var(--color-accent-rgb), 0.25);
  top: -15%; right: -8%;
}
.hero-orb-2 {
  width: 400px; height: 400px;
  background: rgba(59, 130, 246, 0.2);
  bottom: -10%; left: -5%;
  animation-delay: -8s;
}
.hero-orb-3 {
  width: 300px; height: 300px;
  background: rgba(236, 72, 153, 0.12);
  top: 30%; left: 50%;
  animation-delay: -14s;
}
.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 800px;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px;
  border-radius: 99px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--color-accent);
  background: var(--color-accent-soft);
  border: 1px solid rgba(var(--color-accent-rgb), 0.15);
  margin-bottom: 28px;
}
.hero-title {
  margin-bottom: 24px;
}
.hero-subtitle {
  font-size: 19px;
  max-width: 580px;
  margin: 0 auto 36px;
  line-height: 1.7;
}
.hero-ctas {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 48px;
}
.hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  flex-wrap: wrap;
}
.stat {
  font-size: 14px;
  color: var(--color-text-muted);
  font-weight: 500;
}
.stat strong {
  color: var(--color-text);
  font-weight: 700;
  font-family: var(--font-heading);
}
.stat-dot {
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--color-text-muted);
  opacity: 0.5;
}

/* ============================================
   Plugin Showcase — Tab Layout
   ============================================ */
.plugins-section {
  padding: var(--section-gap) 0;
}

/* Tab Bar */
.plugin-tabs {
  display: flex;
  gap: 6px;
  padding: 6px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 14px;
  margin-bottom: 32px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.plugin-tabs::-webkit-scrollbar { display: none; }

.plugin-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: 10px;
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-muted);
  white-space: nowrap;
  transition: all 0.25s var(--ease);
  flex-shrink: 0;
}
.plugin-tab svg {
  width: 18px; height: 18px;
  flex-shrink: 0;
}
.plugin-tab:hover {
  color: var(--color-text-secondary);
  background: var(--color-surface-hover);
}
.plugin-tab.active {
  color: var(--card-accent);
  background: rgba(var(--card-accent-rgb), 0.1);
}

/* Tab Panels */
.plugin-panels {
  position: relative;
}
.plugin-panel {
  display: none;
  grid-template-columns: 1fr 1.2fr;
  gap: 48px;
  align-items: center;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  padding: 48px;
  animation: panelFadeIn 0.4s var(--ease);
}
.plugin-panel.active {
  display: grid;
}

@keyframes panelFadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Panel Info (left) */
.panel-info {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.plugin-icon-box {
  width: 52px; height: 52px;
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(var(--card-accent-rgb), 0.1);
}
.plugin-icon-box svg {
  width: 26px; height: 26px;
  stroke: var(--card-accent);
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.plugin-title {
  font-size: 26px;
  font-family: var(--font-heading);
  font-weight: 700;
}
.plugin-desc {
  font-size: 16px;
  color: var(--color-text-secondary);
  line-height: 1.65;
}
.plugin-features {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 4px 0;
}
.plugin-features li {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  color: var(--color-text-secondary);
}
.plugin-features li svg {
  width: 18px; height: 18px;
  color: var(--card-accent);
  flex-shrink: 0;
}
.plugin-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.plugin-tag {
  padding: 4px 12px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 500;
  background: rgba(var(--card-accent-rgb), 0.08);
  color: var(--card-accent);
}
.panel-info .btn {
  align-self: flex-start;
  margin-top: 8px;
}

/* Panel Video (right) */
.panel-video {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  aspect-ratio: 16 / 10;
}
.panel-video video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.video-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--color-text-muted);
  background: var(--color-bg);
}
.video-placeholder svg {
  width: 40px; height: 40px;
  opacity: 0.3;
}
.video-placeholder span {
  font-size: 14px;
  font-weight: 500;
}
/* Hide placeholder when video has loaded */
.panel-video.has-video .video-placeholder {
  display: none;
}

/* ============================================
   CTA
   ============================================ */
.cta-section {
  padding: var(--section-gap) 0;
}
.cta-content {
  background: var(--gradient-accent);
  border-radius: 24px;
  padding: 80px 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-content::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,0.08) 1px, transparent 1px);
  background-size: 24px 24px;
}
.cta-content h2 {
  color: #fff;
  margin-bottom: 16px;
  position: relative;
}
.cta-content p {
  color: rgba(255,255,255,0.8);
  font-size: 18px;
  max-width: 480px;
  margin: 0 auto 32px;
  position: relative;
}
.cta-content .btn {
  background: #fff;
  color: var(--color-accent-hover);
  font-weight: 700;
  position: relative;
}
.cta-content .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}

/* ============================================
   Footer
   ============================================ */
.footer {
  padding: 48px 0 32px;
  border-top: 1px solid var(--color-border);
}
.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  text-align: center;
}
.footer-brand p {
  font-size: 14px;
  color: var(--color-text-muted);
  margin-top: 8px;
}
.footer-links {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  justify-content: center;
}
.footer-links a {
  font-size: 14px;
  color: var(--color-text-secondary);
  font-weight: 500;
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--color-accent); }
.footer-copy {
  font-size: 13px;
  color: var(--color-text-muted);
}

/* ============================================
   Scroll Reveal
   ============================================ */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }

/* ============================================
   Keyframes
   ============================================ */
@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -20px) scale(1.05); }
  66% { transform: translate(-20px, 15px) scale(0.95); }
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 1024px) {
  :root { --section-gap: 96px; }
  .plugin-panel { grid-template-columns: 1fr; gap: 32px; padding: 32px; }
  .panel-video { aspect-ratio: 16 / 9; }
}

@media (max-width: 768px) {
  :root { --section-gap: 72px; }
  .nav-links { display: none; }
  .nav-actions .btn { display: none; }
  .nav-hamburger { display: flex; }
  h1 { font-size: clamp(34px, 8vw, 48px); }
  .hero { min-height: auto; padding: calc(var(--nav-height) + 48px) 0 64px; }
  .hero-subtitle { font-size: 17px; }
  .plugin-tab span { display: none; }
  .plugin-tab { padding: 10px 14px; }
  .plugin-panel { padding: 24px; }
  .plugin-title { font-size: 22px; }
  .cta-content { padding: 56px 28px; border-radius: 18px; }
  .section-header { margin-bottom: 40px; }
}

@media (max-width: 640px) {
  .hero-ctas { flex-direction: column; align-items: center; }
  .hero-stats { flex-direction: column; gap: 8px; }
  .stat-dot { display: none; }
  .footer-links { flex-direction: column; gap: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero-orb { animation: none; }
  .plugin-panel { animation: none; }
  html { scroll-behavior: auto; }
}
