/* =====================================================
   Magic Box — Global Design System
   Dark theme · Glassmorphism · Lavender/Purple palette
   ===================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
  --bg:        #0a0a1a;
  --bg2:       #0f0f2a;
  --surface:   rgba(255,255,255,0.05);
  --surface2:  rgba(255,255,255,0.08);
  --border:    rgba(255,255,255,0.1);
  --accent:    #8b5cf6;
  --accent2:   #6d28d9;
  --accent-glow: rgba(139,92,246,0.35);
  --pink:      #ec4899;
  --cyan:      #06b6d4;
  --text:      #f1f5f9;
  --text2:     #94a3b8;
  --text3:     #64748b;
  --radius:    16px;
  --radius-sm: 10px;
  --transition: 0.3s cubic-bezier(.4,0,.2,1);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--accent2); border-radius: 3px; }

/* ── Typography ── */
h1,h2,h3,h4 { line-height: 1.2; font-weight: 700; }
a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: #a78bfa; }

/* ── Gradient text utility ── */
.gradient-text {
  background: linear-gradient(135deg, #a78bfa 0%, #ec4899 50%, #06b6d4 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Glassmorphism card ── */
.glass {
  background: var(--surface);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.glass:hover { background: var(--surface2); border-color: rgba(139,92,246,0.3); }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 50px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
  letter-spacing: 0.3px;
}
.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0);
  transition: background var(--transition);
}
.btn:hover::after { background: rgba(255,255,255,0.08); }

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff;
  box-shadow: 0 4px 24px var(--accent-glow);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px var(--accent-glow);
}
.btn-primary:active { transform: translateY(0); }

.btn-outline {
  background: transparent;
  color: var(--accent);
  border: 1.5px solid var(--accent);
}
.btn-outline:hover { background: rgba(139,92,246,0.12); transform: translateY(-2px); }

.btn-success {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  box-shadow: 0 4px 20px rgba(16,185,129,0.35);
}
.btn-success:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(16,185,129,0.45); }

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* ── Nav ── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 16px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(10,10,26,0.8);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
.nav-brand {
  font-size: 22px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 10px;
}
.nav-brand .logo-icon {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--accent), var(--pink));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}
.nav-links { display: flex; gap: 28px; }
.nav-links a { font-size: 14px; font-weight: 500; color: var(--text2); transition: color var(--transition); }
.nav-links a:hover { color: var(--text); }

/* ── Hero ── */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 24px 60px;
  position: relative;
  overflow: hidden;
}

/* Animated gradient bg orbs */
.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.18;
  animation: float 8s ease-in-out infinite;
}
.hero-orb-1 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, #8b5cf6, transparent);
  top: -100px; left: -100px;
  animation-delay: 0s;
}
.hero-orb-2 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, #ec4899, transparent);
  bottom: -80px; right: -80px;
  animation-delay: -4s;
}
.hero-orb-3 {
  width: 300px; height: 300px;
  background: radial-gradient(circle, #06b6d4, transparent);
  top: 40%; left: 60%;
  animation-delay: -2s;
}
@keyframes float {
  0%, 100% { transform: translate(0,0) scale(1); }
  33% { transform: translate(20px,-20px) scale(1.05); }
  66% { transform: translate(-15px,15px) scale(0.95); }
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: 50px;
  border: 1px solid rgba(139,92,246,0.4);
  background: rgba(139,92,246,0.1);
  font-size: 13px;
  color: #a78bfa;
  font-weight: 500;
  margin-bottom: 28px;
  animation: fadeInDown 0.6s ease;
}
.hero-badge .dot { width: 7px; height: 7px; border-radius: 50%; background: #8b5cf6; animation: pulse 2s infinite; }
@keyframes pulse { 0%,100% { opacity:1; } 50% { opacity:0.4; } }
@keyframes fadeInDown { from { opacity:0; transform:translateY(-16px); } to { opacity:1; transform:translateY(0); } }
@keyframes fadeInUp { from { opacity:0; transform:translateY(24px); } to { opacity:1; transform:translateY(0); } }
@keyframes fadeIn { from { opacity:0; } to { opacity:1; } }

.hero h1 {
  font-size: clamp(52px, 8vw, 96px);
  font-weight: 800;
  letter-spacing: -2px;
  margin-bottom: 20px;
  animation: fadeInDown 0.7s ease 0.1s both;
}
.hero p.tagline {
  font-size: clamp(16px, 2.5vw, 22px);
  color: var(--text2);
  max-width: 540px;
  margin: 0 auto 40px;
  font-weight: 400;
  animation: fadeInUp 0.7s ease 0.2s both;
}
.hero-cta { animation: fadeInUp 0.7s ease 0.35s both; display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }

/* ── Tools Section ── */
.tools-section {
  padding: 80px 32px;
  max-width: 1200px;
  margin: 0 auto;
}
.section-title {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 700;
  text-align: center;
  margin-bottom: 12px;
}
.section-sub {
  text-align: center;
  color: var(--text2);
  margin-bottom: 56px;
  font-size: 16px;
}

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

.tool-card {
  background: var(--surface);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 28px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  color: var(--text);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  position: relative;
  overflow: hidden;
  animation: fadeInUp 0.6s ease both;
}
.tool-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(139,92,246,0) 0%, rgba(139,92,246,0.06) 100%);
  opacity: 0;
  transition: opacity var(--transition);
}
.tool-card:hover::before { opacity: 1; }
.tool-card:hover {
  transform: translateY(-6px);
  border-color: rgba(139,92,246,0.4);
  box-shadow: 0 20px 60px rgba(139,92,246,0.15);
}

.tool-card-icon {
  width: 64px; height: 64px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  transition: all var(--transition);
}
.tool-card:hover .tool-card-icon { transform: scale(1.1) rotate(-5deg); }

.tool-card h3 { font-size: 18px; font-weight: 600; }
.tool-card p { font-size: 13px; color: var(--text2); line-height: 1.5; }
.tool-card .arrow {
  font-size: 18px;
  color: var(--accent);
  opacity: 0;
  transform: translateX(-8px);
  transition: all var(--transition);
}
.tool-card:hover .arrow { opacity: 1; transform: translateX(0); }

/* Tool specific gradient icons */
.icon-resume    { background: linear-gradient(135deg,#4f46e5,#7c3aed); }
.icon-cover     { background: linear-gradient(135deg,#0369a1,#0ea5e9); }
.icon-cert      { background: linear-gradient(135deg,#a16207,#d97706); }
.icon-id        { background: linear-gradient(135deg,#15803d,#4ade80); }
.icon-wedding   { background: linear-gradient(135deg,#be185d,#ec4899); }

/* ── Features Section ── */
.features-section {
  padding: 60px 32px;
  background: linear-gradient(to bottom, transparent, rgba(139,92,246,0.04), transparent);
}
.features-grid {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
  margin-top: 48px;
}
.feature-item {
  text-align: center;
  padding: 24px;
}
.feature-item .fi { font-size: 34px; margin-bottom: 14px; }
.feature-item h4 { font-size: 17px; margin-bottom: 8px; }
.feature-item p { font-size: 14px; color: var(--text2); }

/* ── Footer ── */
.footer {
  border-top: 1px solid var(--border);
  padding: 32px;
  text-align: center;
  color: var(--text3);
  font-size: 13px;
}
.footer strong { color: var(--accent); }

/* ── Animations stagger ── */
.tool-card:nth-child(1) { animation-delay: 0.05s; }
.tool-card:nth-child(2) { animation-delay: 0.1s; }
.tool-card:nth-child(3) { animation-delay: 0.15s; }
.tool-card:nth-child(4) { animation-delay: 0.2s; }
.tool-card:nth-child(5) { animation-delay: 0.25s; }

/* ── Responsive ── */
@media (max-width: 768px) {
  .nav { padding: 14px 20px; }
  .nav-links { display: none; }
  .tools-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .tools-grid { grid-template-columns: 1fr; }
  .hero-cta { flex-direction: column; align-items: center; }
}
