:root {
  /* ---- JugaadBox brand palette ----------------------------------------
     Sampled from the logo artwork: charcoal ink and jugaad orange, set on
     the cream paper background. The palette is deliberately warm and
     paper-like so the hand-drawn logo sits naturally on the page. */
  --cream: #F0EFC6;
  --cream-deep: #E6E4B0;
  --cream-soft: #F7F6E2;
  --paper: #FDFCF1;
  --ink: #292929;
  --ink-soft: #3D3D3A;
  --orange: #F68827;
  --orange-deep: #D96F14;
  --orange-soft: #FBB35F;
  /* Orange is bright on cream, so text and small UI use the darker tone to
     stay above the WCAG AA contrast ratio. */
  --orange-text: #A8500A;

  /* Semantic aliases used across the stylesheet. */
  --primary-blue: var(--orange);
  --primary-purple: var(--orange-deep);
  --dark-bg: var(--cream);
  --dark-surface: var(--cream-soft);
  --dark-elevated: var(--paper);
  --text-primary: var(--ink);
  --text-secondary: #5A5A52;
  --text-muted: #6E6E62;
  --gradient-primary: linear-gradient(135deg, #E2760F 0%, #B85A0C 100%);
  --gradient-card: linear-gradient(145deg, var(--paper) 0%, var(--cream-soft) 100%);
  --border-subtle: rgba(41, 41, 41, 0.14);
  --border-strong: rgba(41, 41, 41, 0.28);
  --glow-blue: 0 6px 18px rgba(41, 41, 41, 0.12);
  --shadow-ink: 0 4px 0 rgba(41, 41, 41, 0.14);
  --success: #2F8F5B;
  --warning: #D98C0B;

  /* Typography: Baloo 2 is a rounded display face that echoes the marker
     lettering in the logo and ships Devanagari for जुगाड़. Plus Jakarta Sans
     keeps body copy clean and readable. */
  --font-display: 'Baloo 2', 'Segoe UI', system-ui, sans-serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

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

body {
  font-family: var(--font-body);
  background: var(--cream);
  color: var(--text-primary);
  overflow-x: hidden;
  min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  letter-spacing: -0.01em;
}

/* Inline links default to the darker orange so they stay readable on cream.
   Components that set their own link colour still win over this rule. */
a {
  color: var(--orange-text);
}

/* Custom Cursor Glow */
.cursor-glow {
  position: fixed;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(246, 136, 39, 0.20) 0%, rgba(246, 136, 39, 0.06) 45%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%);
  z-index: 9999;
  transition: opacity 0.3s ease;
  mix-blend-mode: multiply;
}

/* Interactive background shapes, painted by jugaadbox-ambience.js. */
.jb-ambience {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.5;
}

/* Keep page content above the background canvas. */
.navbar,
.hero,
.quick-picks,
.all-tools-section,
.footer,
main,
.wrap {
  position: relative;
  z-index: 1;
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Navbar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(240, 239, 198, 0.92);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
  transition: all 0.3s ease;
}

.nav-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 700;
  font-size: 1.25rem;
  transition: transform 0.3s ease;
}

.logo:hover {
  transform: scale(1.05);
}

.logo-icon {
  font-size: 1.75rem;
}

/* The wordmark logo already contains the brand name, so the adjacent text
   label is hidden everywhere it still appears in the markup. */
.logo-text {
  display: none;
}

/* Logo Image: the full wordmark, sized by height so the aspect ratio holds. */
.logo-image {
  height: 46px;
  width: auto;
  object-fit: contain;
}

.nav-menu {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.3s ease;
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-primary);
  transition: width 0.3s ease;
}

.nav-link:hover {
  color: var(--orange-text);
}

.nav-link:hover::after {
  width: 100%;
}

.mobile-menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
}

.mobile-menu-btn span {
  width: 25px;
  height: 3px;
  background: var(--text-primary);
  border-radius: 3px;
  transition: all 0.3s ease;
}

/* Hero Section (COMPACT) */
.hero {
  position: relative;
  padding: 6rem 0 3rem;
  overflow: hidden;
  margin-top: 60px;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 0;
}

.hero-gradient {
  position: absolute;
  top: -30%;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  height: 150%;
  background: radial-gradient(circle, rgba(246,136,39,0.10) 0%, transparent 50%);
  animation: heroGlow 8s ease-in-out infinite;
}

@keyframes heroGlow {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 0.8; }
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.hero-title {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1rem;
  background: var(--gradient-primary);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-description {
  font-size: 1.15rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.hero-badges {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.badge {
  padding: 0.6rem 1.25rem;
  background: var(--paper);
  border: 2px solid var(--border-subtle);
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.3s ease;
}

.badge:hover {
  border-color: var(--orange);
  box-shadow: 0 6px 18px rgba(246,136,39,0.28);
  transform: translateY(-2px);
}

/* Section Titles */
.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 2.5rem;
  background: var(--gradient-primary);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Quick Picks strip (replaces the old Featured Tools grid) */
.quick-picks {
  padding: 1rem 0 3rem;
}

.quick-picks-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

.quick-picks-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary);
}

.quick-picks-all {
  color: var(--orange-text);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
}

.quick-picks-all:hover {
  text-decoration: underline;
}

.quick-picks-row {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.quick-pick {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.7rem 1.1rem;
  background: var(--paper);
  border: 2px solid var(--border-subtle);
  border-radius: 50px;
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  box-shadow: 0 2px 0 rgba(41, 41, 41, 0.08);
  transition: all 0.25s ease;
}

.quick-pick:hover {
  border-color: var(--orange);
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(41, 41, 41, 0.12);
}

.quick-pick-emoji {
  font-size: 1.25rem;
  line-height: 1;
}

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

/* Tool Card */
.tool-card {
  background: var(--paper);
  border: 2px solid var(--border-subtle);
  border-radius: 20px;
  padding: 2rem;
  text-decoration: none;
  color: var(--text-primary);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-shadow: 0 2px 0 rgba(41, 41, 41, 0.10);
}

.tool-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--gradient-primary);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 0;
}

.tool-card:hover {
  transform: translateY(-8px);
  border-color: var(--orange);
  box-shadow: 0 14px 30px rgba(41,41,41,0.14);
}

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

.tool-card > * {
  position: relative;
  z-index: 1;
}

.tool-emoji {
  font-size: 3.5rem;
  margin-bottom: 1rem;
  display: block;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.tool-name {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.tool-description {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Most Used Badge */
.most-used-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: var(--gradient-primary);
  color: white;
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  z-index: 2;
}

/* All Tools Section */
.all-tools-section {
  padding: 3rem 0 4rem;
  background: var(--cream-soft);
  border-top: 2px solid var(--border-subtle);
  border-bottom: 2px solid var(--border-subtle);
}

/* Category Filter Pills */
.category-filter {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}

.category-pill {
  padding: 0.75rem 1.5rem;
  background: var(--paper);
  border: 2px solid var(--border-subtle);
  border-radius: 50px;
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.category-pill:hover {
  border-color: var(--orange);
  color: var(--text-primary);
  transform: translateY(-2px);
}

.category-pill.active {
  background: var(--gradient-primary);
  border-color: var(--orange-deep);
  color: white;
  box-shadow: 0 6px 18px rgba(246,136,39,0.35);
}

.category-emoji {
  font-size: 1.2rem;
}

/* All Tools Grid */
.all-tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  min-height: 200px;
}

.all-tools-grid .tool-card {
  padding: 1.75rem;
}

.all-tools-grid .tool-emoji {
  font-size: 3rem;
}

.all-tools-grid .tool-name {
  font-size: 1.25rem;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 3rem;
  color: var(--text-muted);
  grid-column: 1 / -1;
}

/* Footer (CLEAN - 2 COLUMN) */
.footer {
  background: var(--cream-deep);
  border-top: 2px solid var(--border-subtle);
  padding: 3rem 0 1.5rem;
}

.footer-content {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 3rem;
  margin-bottom: 2rem;
}

.footer-branding {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  font-size: 1.25rem;
}

.footer-logo .logo-image {
  height: 52px;
}

.footer-tagline {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
  max-width: 500px;
}

.footer-links {
  display: flex;
  justify-content: flex-end;
}

.footer-column {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-column h4 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.footer-column a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.3s ease;
}

.footer-column a:hover {
  color: var(--orange-text);
}

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* Responsive */
@media (max-width: 768px) {
  .nav-menu {
    display: none;
  }

  .mobile-menu-btn {
    display: flex;
  }

  .hero {
    padding: 5rem 0 2.5rem;
  }

  .hero-title {
    font-size: 2rem;
  }

  .hero-description {
    font-size: 1rem;
  }

  .section-title {
    font-size: 2rem;
  }

  .tools-grid, .all-tools-grid {
    grid-template-columns: 1fr;
  }

  .category-filter {
    gap: 0.75rem;
  }

  .category-pill {
    padding: 0.6rem 1.2rem;
    font-size: 0.85rem;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer-links {
    justify-content: flex-start;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }
}

/* Loading Animation */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.loading {
  animation: pulse 1.5s ease-in-out infinite;
}

/* MOBILE MENU FIX */
@media (max-width: 768px) {
  .nav-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--paper);
    flex-direction: column;
    padding: 1rem 0;
    border-top: 1px solid rgba(41,41,41,0.14);
    box-shadow: 0 12px 24px rgba(41, 41, 41, 0.10);
    display: none; /* Hidden by default */
  }
  
  .nav-menu.active {
    display: flex; /* Show when hamburger is clicked */
  }
  
  .nav-link {
    padding: 1rem 2rem;
    border-bottom: 1px solid rgba(41,41,41,0.08);
  }
  
  .mobile-menu-btn {
    display: flex;
  }
}

/* ===== Tool Search ===== */
.tool-search-wrap {
  max-width: 560px;
  margin: 0 auto 2rem;
  padding: 0 1rem;
}

.tool-search {
  width: 100%;
  padding: 0.9rem 1.25rem;
  font-size: 1rem;
  font-family: inherit;
  color: var(--text-primary);
  background: var(--paper);
  border: 2px solid var(--border-subtle);
  border-radius: 50px;
  outline: none;
  transition: all 0.3s ease;
}

.tool-search::placeholder {
  color: var(--text-muted);
}

.tool-search:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 4px rgba(246,136,39,0.18);
}

/* ===== Coming Soon badge & card ===== */
.coming-soon-badge {
  background: linear-gradient(135deg, #D98C0B 0%, #f97316 100%) !important;
}

.tool-card.is-coming-soon {
  opacity: 0.85;
}

.tool-card.is-coming-soon:hover {
  opacity: 1;
}
