/**
 * madestool Landing Page — Styles
 * Extends shared theme with landing-specific components
 */

/* ── HEADER / NAV ── */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--overlay);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

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

.logo {
  display: flex;
  align-items: center;
  gap: var(--gap-md);
  text-decoration: none;
}

.logo-icon {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  object-fit: contain;
}

.logo-text {
  font-size: 22px;
  font-weight: var(--font-weight-bold);
  color: var(--white);
  letter-spacing: -0.5px;
}

.logo-text span {
  color: var(--blue-400);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--gap-sm);
  list-style: none;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: var(--font-weight-medium);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  transition: color var(--transition-base), background var(--transition-base);
}

.nav-links a:hover {
  color: var(--white);
  background: var(--navy-700);
}

.nav-links .btn-nav {
  color: white;
  background: var(--blue-500);
  padding: 7px 16px;
  border-radius: var(--radius-sm);
}

.nav-links .btn-nav:hover {
  background: var(--blue-400);
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--gap-md);
  color: var(--white);
  font-size: 0;
}

/* ── HERO ── */
.hero {
  padding: 100px 0 80px;
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--gap-md);
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: var(--blue-300);
  font-size: 13px;
  font-weight: var(--font-weight-semibold);
  padding: 6px 16px;
  border-radius: var(--radius-full);
  margin-bottom: 28px;
  letter-spacing: 0.5px;
}

.hero-badge .dot {
  width: 6px;
  height: 6px;
  background: var(--blue-400);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

.hero-title {
  font-size: clamp(40px, 6vw, 72px);
  font-weight: var(--font-weight-extrabold);
  line-height: 1.1;
  letter-spacing: -2px;
  margin-bottom: 20px;
}

.hero-title .highlight {
  background: linear-gradient(135deg, var(--blue-400), var(--blue-300));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 520px;
  margin: 0 auto 40px;
  line-height: 1.6;
}

.hero-cta {
  display: flex;
  justify-content: center;
  gap: var(--gap-md);
  flex-wrap: wrap;
}

/* ── STATS ── */
.stats {
  display: flex;
  justify-content: center;
  gap: var(--gap-3xl);
  padding: var(--gap-3xl) 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.stat {
  text-align: center;
}

.stat-num {
  font-size: 32px;
  font-weight: var(--font-weight-extrabold);
  color: white;
  letter-spacing: -1px;
}

.stat-num span {
  color: var(--blue-400);
}

.stat-label {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ── SEARCH SECTION ── */
.search-section {
  padding: var(--gap-3xl) 0 var(--gap-xl);
}

.search-wrap {
  position: relative;
  max-width: 560px;
  margin: 0 auto;
}

.search-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  pointer-events: none;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

#search-input {
  width: 100%;
  padding: 16px 20px 16px 50px;
  background: var(--navy-800);
  border: 1px solid var(--navy-600);
  border-radius: var(--radius-lg);
  color: var(--white);
  font-size: 15px;
  font-family: var(--font-sans);
  outline: none;
  transition: border-color var(--transition-base), box-shadow var(--transition-base);
}

#search-input::placeholder {
  color: var(--text-dim);
}

#search-input:focus {
  border-color: var(--blue-500);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

/* ── CATEGORY TABS ── */
.category-tabs {
  display: flex;
  justify-content: center;
  gap: var(--gap-md);
  margin-top: var(--gap-lg);
  flex-wrap: wrap;
}

.tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: var(--radius-full);
  font-size: 14px;
  font-weight: var(--font-weight-semibold);
  border: 1px solid var(--navy-600);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition-base);
  font-family: var(--font-sans);
}

.tab-btn:hover {
  border-color: var(--blue-500);
  color: var(--white);
}

.tab-btn.active {
  background: var(--blue-500);
  border-color: var(--blue-500);
  color: white;
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.35);
}

/* ── TOOLS SECTION ── */
.tools-section {
  padding: var(--gap-xl) 0 var(--gap-3xl);
}

.section-title {
  font-size: 13px;
  font-weight: var(--font-weight-bold);
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 20px;
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

/* ── TOOL CARDS ── */
.tool-card {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 20px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: inherit;
  backdrop-filter: blur(8px);
  transition: all 0.25s;
  position: relative;
  overflow: hidden;
}

.tool-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.05) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.25s;
}

.tool-card:hover {
  border-color: rgba(59, 130, 246, 0.4);
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(59, 130, 246, 0.2);
}

.tool-card:hover::before {
  opacity: 1;
}

.tool-icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.cat-convert {
  background: rgba(59, 130, 246, 0.15);
}

.cat-generate {
  background: rgba(139, 92, 246, 0.15);
}

.cat-calculate {
  background: rgba(16, 185, 129, 0.15);
}

.cat-optimize {
  background: rgba(245, 158, 11, 0.15);
}

.tool-info {
  flex: 1;
  min-width: 0;
}

.tool-name {
  font-size: 15px;
  font-weight: var(--font-weight-bold);
  color: var(--white);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tool-desc {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.5;
}

.tool-tag {
  font-size: 11px;
  font-weight: var(--font-weight-semibold);
  padding: 3px 8px;
  border-radius: var(--radius-full);
  align-self: flex-start;
  flex-shrink: 0;
  white-space: nowrap;
}

.tag-convert {
  background: rgba(59, 130, 246, 0.15);
  color: var(--blue-400);
}

.tag-generate {
  background: rgba(139, 92, 246, 0.15);
  color: #a78bfa;
}

.tag-calculate {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
}

.tag-optimize {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
}

.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: var(--text-dim);
}

.empty-state svg {
  margin-bottom: 16px;
  opacity: 0.4;
}

.empty-state p {
  font-size: 15px;
}

/* ── FEATURES ── */
.features {
  padding: var(--gap-3xl) 0;
  border-top: 1px solid var(--border);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--gap-2xl);
}

.feature {
  display: flex;
  flex-direction: column;
  gap: var(--gap-md);
}

.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.feature h3 {
  font-size: 16px;
  font-weight: var(--font-weight-bold);
}

.feature p {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ── FOOTER ── */
footer {
  border-top: 1px solid var(--border);
  padding: 40px 0;
}

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

.footer-logo {
  display: flex;
  align-items: center;
  gap: var(--gap-md);
  text-decoration: none;
  color: var(--white);
  font-size: 16px;
  font-weight: var(--font-weight-bold);
}

.footer-logo span {
  color: var(--blue-400);
}

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

.footer-links a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 13px;
  transition: color var(--transition-base);
}

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

.footer-copy {
  font-size: 12px;
  color: var(--text-dim);
}

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--navy-950);
    border-bottom: 1px solid var(--border);
    padding: 16px;
    gap: 4px;
    z-index: 99;
  }

  .menu-toggle {
    display: block;
  }

  header {
    position: relative;
  }

  .stats {
    gap: var(--gap-2xl);
  }

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

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

@media (max-width: 480px) {
  .tools-grid {
    grid-template-columns: 1fr;
  }

  .category-tabs {
    gap: 6px;
  }

  .tab-btn {
    font-size: 12px;
    padding: 7px 14px;
  }
}
