/* ============================================
   DesiTool v2 — Complete Redesign
   Better fonts | Mobile-first | Smooth nav
   ============================================ */

@import url("https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Outfit:wght@300;400;500;600;700;800&display=swap");

/* ── CSS Variables ── */
:root {
  --font-head: "Outfit", sans-serif;
  --font-body: "Plus Jakarta Sans", sans-serif;

  /* Light Mode */
  --bg: #f7f6f2;
  --bg2: #eeece6;
  --card: #ffffff;
  --card2: #faf9f6;
  --border: #e2dfd6;
  --text: #18160f;
  --text2: #52504a;
  --text3: #96948e;
  --accent: #e05c2a;
  --accent2: #f0784a;
  --accent-bg: #fdf0ea;
  --accent-border: #f5c4ac;
  --green: #1d9e5c;
  --green-bg: #e8f7f0;
  --blue: #2563eb;
  --blue-bg: #eff4ff;
  --shadow: 0 1px 8px rgba(0, 0, 0, 0.06), 0 4px 16px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 4px 24px rgba(0, 0, 0, 0.09), 0 12px 40px rgba(0, 0, 0, 0.06);
  --radius: 16px;
  --radius-sm: 10px;
  --radius-xs: 6px;
  --nav-h: 60px;
  --transition: 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
  --bg: #0f0e0c;
  --bg2: #181714;
  --card: #1e1d1a;
  --card2: #252420;
  --border: #2e2c28;
  --text: #f2efe8;
  --text2: #a8a49c;
  --text3: #68655e;
  --accent: #f07040;
  --accent2: #ff8c58;
  --accent-bg: #251810;
  --accent-border: #5a2810;
  --green: #34d578;
  --green-bg: #0d2018;
  --blue: #60a5fa;
  --blue-bg: #0f1928;
  --shadow: 0 1px 8px rgba(0, 0, 0, 0.4), 0 4px 16px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 4px 24px rgba(0, 0, 0, 0.5), 0 12px 40px rgba(0, 0, 0, 0.4);
}

/* ── Reset ── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  transition:
    background var(--transition),
    color var(--transition);
  line-height: 1.6;
  min-height: 100vh;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}
img {
  max-width: 100%;
  display: block;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  cursor: pointer;
  font-family: var(--font-body);
  border: none;
  background: none;
}
input,
select,
textarea {
  font-family: var(--font-body);
}

/* ── Scrollbar ── */
::-webkit-scrollbar {
  width: 5px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 99px;
}

/* ── Page Transition Overlay ── */
#page-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--accent);
  transform: translateY(-100%);
  transition: transform 0.42s cubic-bezier(0.76, 0, 0.24, 1);
  pointer-events: none;
}
#page-overlay.slide-in {
  transform: translateY(0);
}
#page-overlay.slide-out {
  transform: translateY(100%);
}

/* ═══════════════════════════════════════
   NAVBAR — Mobile-first redesign
   ═══════════════════════════════════════ */
.navbar {
  position: sticky;
  top: 0;
  z-index: 500;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  height: var(--nav-h);
  transition:
    background var(--transition),
    border-color var(--transition);
}
[data-theme="dark"] .navbar {
  background: rgba(30, 29, 26, 0.92);
}
.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0 1rem;
  height: 100%;
}
.nav-logo {
  font-family: var(--font-head);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -0.5px;
  flex-shrink: 0;
  margin-right: 0.25rem;
}
.nav-logo span {
  color: var(--text);
}

/* Desktop nav links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 0.125rem;
  list-style: none;
}
.nav-links a {
  padding: 0.45rem 0.8rem;
  border-radius: var(--radius-xs);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text2);
  transition: all 0.18s;
  white-space: nowrap;
}
.nav-links a:hover {
  color: var(--accent);
  background: var(--accent-bg);
}
.nav-links a.active {
  color: var(--accent);
  background: var(--accent-bg);
}

/* Nav search */
.nav-search {
  flex: 1;
  max-width: 260px;
  margin-left: auto;
  position: relative;
}
.nav-search input {
  width: 100%;
  padding: 0.45rem 0.9rem 0.45rem 2.1rem;
  border-radius: 99px;
  border: 1.5px solid var(--border);
  background: var(--bg2);
  color: var(--text);
  font-size: 0.84rem;
  font-weight: 500;
  transition: all 0.2s;
}
.nav-search input:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--card);
  box-shadow: 0 0 0 3px var(--accent-bg);
}
.nav-search input::placeholder {
  color: var(--text3);
}
.nav-search .search-icon {
  position: absolute;
  left: 0.65rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.8rem;
  pointer-events: none;
}
.search-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  max-height: 300px;
  overflow-y: auto;
  display: none;
  z-index: 600;
}
.search-dropdown.open {
  display: block;
  animation: slideDown 0.18s ease;
}
.search-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 0.9rem;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
  cursor: pointer;
}
.search-item:last-child {
  border-bottom: none;
}
.search-item:hover {
  background: var(--bg2);
}
.search-item .si-icon {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  background: var(--accent-bg);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  flex-shrink: 0;
}
.search-item .si-name {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text);
}
.search-item .si-cat {
  font-size: 0.74rem;
  color: var(--text3);
}

/* Theme toggle */
.theme-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg2);
  border: 1.5px solid var(--border);
  color: var(--text2);
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  flex-shrink: 0;
}
.theme-btn:hover {
  background: var(--accent-bg);
  color: var(--accent);
  border-color: var(--accent-border);
}

/* Hamburger */
.ham-btn {
  display: none;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-xs);
  background: var(--bg2);
  border: 1.5px solid var(--border);
  color: var(--text);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: all 0.2s;
  flex-shrink: 0;
}
.ham-btn:hover {
  background: var(--accent-bg);
  border-color: var(--accent-border);
}
.ham-btn .bar {
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transform-origin: center;
}
.ham-btn.open .bar:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}
.ham-btn.open .bar:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.ham-btn.open .bar:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* ── Mobile Drawer (slide from top, below navbar) ── */
.mobile-drawer {
  display: none; /* shown via JS on mobile */
  position: fixed;
  top: var(--nav-h);
  left: 0;
  right: 0;
  z-index: 400;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  padding: 1rem;
  /* slide-down animation */
  transform: translateY(-110%);
  opacity: 0;
  transition:
    transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.mobile-drawer.open {
  transform: translateY(0);
  opacity: 1;
}
.drawer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-bottom: 1rem;
}
.drawer-links a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text2);
  transition: all 0.18s;
}
.drawer-links a:hover,
.drawer-links a.active {
  color: var(--accent);
  background: var(--accent-bg);
}
.drawer-links .dlink-icon {
  font-size: 1rem;
  width: 28px;
  text-align: center;
}
.drawer-search {
  position: relative;
  margin-bottom: 0.75rem;
}
.drawer-search input {
  width: 100%;
  padding: 0.65rem 1rem 0.65rem 2.25rem;
  border-radius: 99px;
  border: 1.5px solid var(--border);
  background: var(--bg2);
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s;
}
.drawer-search input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-bg);
}
.drawer-search .ds-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.85rem;
  pointer-events: none;
}
.drawer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}
.drawer-bottom span {
  font-size: 0.8rem;
  color: var(--text3);
}
/* Drawer search results */
.drawer-search .search-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
}

/* Backdrop */
.nav-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(2px);
  opacity: 0;
  transition: opacity 0.3s;
}
.nav-backdrop.show {
  display: block;
  opacity: 1;
}

/* ═══════════════════════════════════════
   HERO
   ═══════════════════════════════════════ */
.hero {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  padding: 4rem 1.25rem 3.5rem;
  text-align: center;
  position: relative;
  overflow: visible;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse 70% 55% at 50% 0%,
    var(--accent-bg),
    transparent 70%
  );
  pointer-events: none;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--accent-bg);
  color: var(--accent);
  border: 1px solid var(--accent-border);
  border-radius: 99px;
  padding: 0.28rem 0.9rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  margin-bottom: 1.25rem;
  animation: fadeUp 0.5s ease both;
}
.hero h1 {
  font-family: var(--font-head);
  font-size: clamp(1.9rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -0.5px;
  animation: fadeUp 0.5s 0.08s ease both;
}
.hero h1 em {
  color: var(--accent);
  font-style: normal;
}
.hero p {
  font-size: clamp(0.92rem, 2.5vw, 1.05rem);
  color: var(--text2);
  max-width: 480px;
  margin: 0.85rem auto 1.75rem;
  line-height: 1.65;
  animation: fadeUp 0.5s 0.16s ease both;
}
.hero-search {
  max-width: 500px;
  margin: 0 auto;
  z-index: 10;
  position: relative;
  animation: fadeUp 0.5s 0.24s ease both;
}
.hero-search input {
  width: 100%;
  padding: 0.9rem 1.25rem 0.9rem 2.75rem;
  border-radius: 99px;
  border: 2px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  transition: all 0.2s;
}
.hero-search input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow:
    0 0 0 4px var(--accent-bg),
    var(--shadow-lg);
}
.hero-search .hs-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.95rem;
  pointer-events: none;
}
.hero-search .hs-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  max-height: 320px;
  overflow-y: auto;
  display: none;
  z-index: 200;
  text-align: left;
}
.hero-search .hs-dropdown.open {
  display: block;
  animation: slideDown 0.2s ease;
}
.hero-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.45rem;
  margin-top: 1.4rem;
  animation: fadeUp 0.5s 0.32s ease both;
}
.hero-tag {
  padding: 0.32rem 0.8rem;
  border-radius: 99px;
  border: 1.5px solid var(--border);
  background: var(--card2);
  color: var(--text2);
  font-size: 0.8rem;
  font-weight: 600;
  transition: all 0.18s;
}
.hero-tag:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-bg);
}

/* ═══════════════════════════════════════
   SECTIONS & LAYOUT
   ═══════════════════════════════════════ */
.section {
  padding: 2.5rem 1.25rem;
  max-width: 1200px;
  margin: 0 auto;
}
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}
.section-head h2 {
  font-family: var(--font-head);
  font-size: 1.3rem;
  font-weight: 700;
}
.section-head a {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--accent);
  transition: opacity 0.2s;
}
.section-head a:hover {
  opacity: 0.7;
}

/* ═══════════════════════════════════════
   TOOL CARDS
   ═══════════════════════════════════════ */
.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
  gap: 0.85rem;
}
.tool-card {
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem;
  transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  display: block;
}
.tool-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--accent-bg);
  opacity: 0;
  transition: opacity 0.22s;
}
.tool-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}
.tool-card:hover::after {
  opacity: 1;
}
.tool-card > * {
  position: relative;
  z-index: 1;
}
.tc-icon {
  width: 40px;
  height: 40px;
  border-radius: 9px;
  background: var(--accent-bg);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
  transition: all 0.22s;
}
.tool-card:hover .tc-icon {
  background: var(--accent);
  color: #fff;
  transform: scale(1.08);
}
.tc-name {
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--text);
  margin-bottom: 0.25rem;
}
.tc-desc {
  font-size: 0.76rem;
  color: var(--text3);
  line-height: 1.5;
}
.tc-badge {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  background: var(--green-bg);
  color: var(--green);
  border-radius: 99px;
  padding: 0.12rem 0.5rem;
  font-size: 0.68rem;
  font-weight: 700;
  z-index: 2;
}
.tc-icon.blue {
  background: var(--blue-bg);
  color: var(--blue);
}
.tc-icon.green {
  background: var(--green-bg);
  color: var(--green);
}
.tool-card:hover .tc-icon.blue {
  background: var(--blue);
  color: #fff;
}
.tool-card:hover .tc-icon.green {
  background: var(--green);
  color: #fff;
}

/* ═══════════════════════════════════════
   CATEGORIES
   ═══════════════════════════════════════ */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1rem;
}
.cat-card {
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  transition: all 0.22s;
}
.cat-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow);
}
.cat-head {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 0.9rem;
}
.cat-icon {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}
.cat-head h3 {
  font-family: var(--font-head);
  font-size: 0.95rem;
  font-weight: 700;
}
.cat-tools {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.cat-tool {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.48rem 0.7rem;
  border-radius: var(--radius-xs);
  font-size: 0.84rem;
  color: var(--text2);
  transition: all 0.15s;
}
.cat-tool:hover {
  background: var(--bg2);
  color: var(--accent);
}
.cat-tool::before {
  content: "›";
  font-size: 0.8rem;
  color: var(--text3);
  transition: transform 0.15s;
}
.cat-tool:hover::before {
  transform: translateX(2px);
  color: var(--accent);
}

/* ═══════════════════════════════════════
   TOOL PAGE
   ═══════════════════════════════════════ */
.tool-page {
  max-width: 860px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 4rem;
}
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: var(--text3);
  padding: 1rem 1.25rem;
  max-width: 860px;
  margin: 0 auto;
}
.breadcrumb a {
  color: var(--text3);
  transition: color 0.18s;
}
.breadcrumb a:hover {
  color: var(--accent);
}
.breadcrumb span {
  color: var(--text);
  font-weight: 600;
}

.tool-header {
  text-align: center;
  padding: 2rem 1.25rem;
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 1.25rem;
  position: relative;
  overflow: hidden;
}
.tool-header::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse 90% 65% at 50% 0%,
    var(--accent-bg),
    transparent 72%
  );
  pointer-events: none;
}
.tool-header > * {
  position: relative;
}
.tool-header .th-icon {
  width: 58px;
  height: 58px;
  border-radius: 14px;
  background: var(--accent);
  color: #fff;
  font-size: 1.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 0.9rem;
  box-shadow: 0 4px 18px rgba(224, 92, 42, 0.3);
}
.tool-header h1 {
  font-family: var(--font-head);
  font-size: clamp(1.6rem, 4vw, 2rem);
  font-weight: 800;
  margin-bottom: 0.4rem;
}
.tool-header p {
  color: var(--text2);
  font-size: 0.93rem;
}

/* Tool Widget */
.tool-widget {
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow);
}
.form-row {
  margin-bottom: 1.1rem;
}
.form-label {
  display: block;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--text2);
  margin-bottom: 0.45rem;
}
.form-input {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: var(--bg2);
  color: var(--text);
  font-size: 0.93rem;
  font-weight: 500;
  transition: all 0.2s;
}
.form-input:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--card);
  box-shadow: 0 0 0 3px var(--accent-bg);
}
.range-wrap {
  position: relative;
  padding-top: 1.6rem;
}
.range-val {
  position: absolute;
  right: 0;
  top: 0;
  font-weight: 800;
  font-size: 0.88rem;
  color: var(--accent);
  font-family: var(--font-head);
}
input[type="range"] {
  width: 100%;
  height: 5px;
  border-radius: 3px;
  -webkit-appearance: none;
  appearance: none;
  background: var(--bg2);
  border: 1px solid var(--border);
  cursor: pointer;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--card);
  box-shadow: 0 2px 8px rgba(224, 92, 42, 0.3);
  cursor: pointer;
}
input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--card);
  cursor: pointer;
}
.calc-btn {
  width: 100%;
  padding: 0.85rem 1.5rem;
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius-sm);
  font-family: var(--font-head);
  font-size: 0.97rem;
  font-weight: 700;
  transition: all 0.2s;
  margin-top: 0.25rem;
  letter-spacing: 0.2px;
}
.calc-btn:hover {
  background: var(--accent2);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(224, 92, 42, 0.3);
}
.calc-btn:active {
  transform: translateY(0);
}

/* Result Box */
.result-box {
  background: var(--accent-bg);
  border: 1.5px solid var(--accent-border);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-top: 1.25rem;
  display: none;
}
.result-box.visible {
  display: block;
  animation: fadeUp 0.35s ease both;
}
.result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 1rem;
}
.result-item {
  text-align: center;
}
.result-item .ri-val {
  font-family: var(--font-head);
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1.1;
}
.result-item .ri-label {
  font-size: 0.76rem;
  color: var(--text2);
  margin-top: 0.25rem;
  font-weight: 600;
}
.result-note {
  margin-top: 1rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--accent-border);
  font-size: 0.78rem;
  color: var(--text3);
  text-align: center;
  line-height: 1.55;
}

/* Tool Content */
.tool-content {
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.25rem;
}
.tool-content h2 {
  font-family: var(--font-head);
  font-size: 1.2rem;
  font-weight: 800;
  margin-bottom: 0.9rem;
}
.tool-content h3 {
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 700;
  margin: 1.1rem 0 0.55rem;
}
.tool-content p {
  color: var(--text2);
  line-height: 1.78;
  margin-bottom: 0.65rem;
  font-size: 0.91rem;
}
.tool-content ul {
  padding-left: 1.2rem;
  color: var(--text2);
  font-size: 0.91rem;
}
.tool-content li {
  margin-bottom: 0.38rem;
  line-height: 1.65;
}

/* Steps */
.steps {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin: 0.9rem 0;
}
.step {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
  background: var(--bg2);
  border-radius: var(--radius-sm);
  padding: 0.9rem;
}
.step-num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-head);
}
.step-text {
  font-size: 0.88rem;
  color: var(--text2);
  line-height: 1.6;
}
.step-text strong {
  color: var(--text);
}

/* FAQ */
.faq {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.faq-item {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.faq-q {
  width: 100%;
  text-align: left;
  padding: 0.9rem 1.1rem;
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--text);
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: background 0.18s;
  gap: 0.75rem;
}
.faq-q:hover {
  background: var(--card2);
}
.faq-q .faq-arrow {
  transition: transform 0.3s;
  color: var(--text3);
  flex-shrink: 0;
  font-size: 0.75rem;
}
.faq-item.open .faq-q .faq-arrow {
  transform: rotate(180deg);
  color: var(--accent);
}
.faq-a {
  max-height: 0;
  overflow: hidden;
  transition:
    max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1),
    padding 0.3s;
  font-size: 0.87rem;
  color: var(--text2);
  line-height: 1.72;
}
.faq-item.open .faq-a {
  max-height: 350px;
  padding: 0 1.1rem 1rem;
}

/* Ad Box */
.ad-box {
  background: var(--bg2);
  border: 1.5px dashed var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  text-align: center;
  color: var(--text3);
  font-size: 0.78rem;
  margin-bottom: 1.25rem;
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ═══════════════════════════════════════
   INFO BAR
   ═══════════════════════════════════════ */
.info-bar {
  background: var(--green-bg);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 1.25rem;
}
.info-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.1rem;
}
.info-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}
.info-icon {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: var(--green-bg);
  color: var(--green);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}
.info-item strong {
  font-size: 0.86rem;
  display: block;
  font-weight: 700;
}
.info-item small {
  font-size: 0.76rem;
  color: var(--text3);
}

/* ═══════════════════════════════════════
   BLOG
   ═══════════════════════════════════════ */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}
.blog-card {
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all 0.22s;
  display: flex;
  flex-direction: column;
}
.blog-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}
.blog-thumb {
  height: 160px;
  background: var(--accent-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.75rem;
}
.blog-body {
  padding: 1.1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.blog-tag {
  display: inline-block;
  margin-bottom: 0.55rem;
  background: var(--accent-bg);
  color: var(--accent);
  border-radius: 99px;
  padding: 0.18rem 0.6rem;
  font-size: 0.72rem;
  font-weight: 700;
}
.blog-title {
  font-family: var(--font-head);
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.45rem;
  line-height: 1.35;
}
.blog-excerpt {
  font-size: 0.82rem;
  color: var(--text2);
  line-height: 1.6;
  flex: 1;
  margin-bottom: 0.85rem;
}
.blog-meta {
  font-size: 0.75rem;
  color: var(--text3);
  display: flex;
  gap: 0.65rem;
}
.read-more {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--accent);
  font-size: 0.84rem;
  font-weight: 700;
  margin-top: 0.7rem;
  transition: gap 0.2s;
}
.read-more:hover {
  gap: 0.6rem;
}

/* ═══════════════════════════════════════
   ABOUT
   ═══════════════════════════════════════ */
.about-hero {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  padding: 3.5rem 1.25rem;
  text-align: center;
}
.about-hero h1 {
  font-family: var(--font-head);
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  font-weight: 800;
  margin-bottom: 0.65rem;
}
.about-hero p {
  font-size: 1rem;
  color: var(--text2);
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.65;
}
.stats-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 1px;
  background: var(--border);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.stat-item {
  background: var(--card);
  padding: 1.6rem 1rem;
  text-align: center;
}
.stat-val {
  font-family: var(--font-head);
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--accent);
}
.stat-label {
  font-size: 0.8rem;
  color: var(--text2);
  margin-top: 0.2rem;
  font-weight: 600;
}
.about-section {
  max-width: 760px;
  margin: 0 auto;
  padding: 2.5rem 1.25rem;
}
.about-section h2 {
  font-family: var(--font-head);
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 0.85rem;
}
.about-section p {
  color: var(--text2);
  line-height: 1.78;
  margin-bottom: 0.85rem;
  font-size: 0.93rem;
}
.team-grid {
  display: grid;
  place-items: center;
  /* grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); */
  gap: 1rem;
  margin-top: 1.25rem;
  margin-bottom: 1.25rem;
}
.team-card {
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  text-align: center;
  cursor: pointer;
}

.team-card:hover {
  left: 130%;
  transition: left 0.55s ease;
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.team-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  margin: 0 auto 0.65rem;
  background: var(--accent);
  color: #fff;
  font-size: 1.3rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-head);
}
.team-name {
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 0.2rem;
}
.team-role {
  font-size: 0.78rem;
  color: var(--text3);
  font-weight: 600;
}

/* ═══════════════════════════════════════
   CONTACT
   ═══════════════════════════════════════ */
.contact-wrap {
  max-width: 680px;
  margin: 0 auto;
  padding: 2.5rem 1.25rem;
}
.contact-card {
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
}
.contact-card h1 {
  font-family: var(--font-head);
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 0.4rem;
}
.contact-card > p {
  color: var(--text2);
  margin-bottom: 1.75rem;
  font-size: 0.93rem;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
  margin-bottom: 0.85rem;
}
textarea.form-input {
  resize: vertical;
  min-height: 120px;
}
.submit-btn {
  width: 100%;
  padding: 0.85rem;
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius-sm);
  font-family: var(--font-head);
  font-size: 0.97rem;
  font-weight: 700;
  transition: all 0.2s;
  margin-top: 0.4rem;
}
.submit-btn:hover {
  background: var(--accent2);
  transform: translateY(-1px);
}
.success-msg {
  display: none;
  background: var(--green-bg);
  border: 1px solid var(--green);
  border-radius: var(--radius-sm);
  padding: 0.9rem;
  color: var(--green);
  font-weight: 700;
  margin-top: 1rem;
  text-align: center;
  font-size: 0.9rem;
}
.success-msg.show {
  display: block;
  animation: fadeUp 0.35s ease;
}
.contact-info {
  margin-top: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.ci-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--text2);
  font-size: 0.88rem;
}
.ci-icon {
  color: var(--accent);
  font-size: 1rem;
}

/* ═══════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════ */
footer {
  background: var(--card);
  border-top: 1px solid var(--border);
  padding: 2.5rem 1.25rem 1.25rem;
  margin-top: 2rem;
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}
.footer-brand .logo {
  font-family: var(--font-head);
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--accent);
  margin-bottom: 0.65rem;
}
.footer-brand p {
  font-size: 0.83rem;
  color: var(--text3);
  line-height: 1.65;
  max-width: 260px;
}
.footer-col h4 {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 0.85rem;
  margin-bottom: 0.65rem;
}
.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.footer-col li a {
  font-size: 0.83rem;
  color: var(--text3);
  transition: color 0.18s;
  font-weight: 500;
}
.footer-col li a:hover {
  color: var(--accent);
}
.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.79rem;
  color: var(--text3);
}
.footer-bottom a {
  color: var(--text3);
  margin-left: 0.9rem;
  font-weight: 500;
}
.footer-bottom a:hover {
  color: var(--accent);
}

/* ═══════════════════════════════════════
   LEGAL PAGES
   ═══════════════════════════════════════ */
.legal-wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 2.5rem 1.25rem;
}
.legal-wrap h1 {
  font-family: var(--font-head);
  font-size: 1.9rem;
  font-weight: 800;
  margin-bottom: 0.4rem;
}
.legal-meta {
  color: var(--text3);
  font-size: 0.83rem;
  margin-bottom: 1.75rem;
}
.legal-wrap h2 {
  font-family: var(--font-head);
  font-size: 1.1rem;
  font-weight: 800;
  margin: 1.75rem 0 0.65rem;
}
.legal-wrap p {
  color: var(--text2);
  line-height: 1.78;
  margin-bottom: 0.65rem;
  font-size: 0.9rem;
}
.legal-wrap ul {
  padding-left: 1.2rem;
  color: var(--text2);
  font-size: 0.9rem;
  margin-bottom: 0.9rem;
}
.legal-wrap li {
  margin-bottom: 0.35rem;
  line-height: 1.65;
}

/* ═══════════════════════════════════════
   ANIMATIONS
   ═══════════════════════════════════════ */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.fade-in {
  animation: fadeUp 0.45s ease both;
}
.fade-in-2 {
  animation: fadeUp 0.45s 0.09s ease both;
}
.fade-in-3 {
  animation: fadeUp 0.45s 0.18s ease both;
}

/* ═══════════════════════════════════════
   RESPONSIVE — MOBILE FIRST
   ═══════════════════════════════════════ */
@media (max-width: 900px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
  }
  .footer-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 768px) {
  /* Show hamburger, hide desktop nav, search & navbar theme btn */
  .nav-links {
    display: none !important;
  }
  .nav-search {
    display: none;
  }
  .navbar .theme-btn {
    display: none;
  } /* theme btn lives in drawer on mobile */
  .ham-btn {
    display: flex;
    margin-left: auto;
  } /* push ham to far right */
  /* Show mobile drawer */
  .mobile-drawer {
    display: block;
  }

  .hero {
    padding: 3rem 1.25rem 2.75rem;
  }
  .section {
    padding: 2rem 1.25rem;
  }
  .tool-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.7rem;
  }
  .tool-page {
    padding: 1.25rem 1rem 3rem;
  }
  .tool-widget {
    padding: 1.25rem;
  }
  .tool-content {
    padding: 1.25rem;
  }
  .tool-header {
    padding: 1.5rem 1rem;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .blog-grid {
    grid-template-columns: 1fr;
  }
  .contact-card {
    padding: 1.5rem;
  }
  .result-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 480px) {
  :root {
    --nav-h: 56px;
  }
  body {
    font-size: 14px;
  }
  .hero h1 {
    font-size: 1.75rem;
  }
  .hero p {
    font-size: 0.88rem;
  }
  .hero-search input {
    font-size: 0.88rem;
    padding: 0.8rem 1rem 0.8rem 2.5rem;
  }
  .nav-logo {
    font-size: 1.2rem;
  }
  .tool-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.6rem;
  }
  .tc-name {
    font-size: 0.82rem;
  }
  .tc-desc {
    display: none;
  } /* hide on tiny screens to save space */
  .tc-icon {
    width: 36px;
    height: 36px;
    font-size: 1rem;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .footer-brand {
    grid-column: 1 / -1;
  }
  .cat-grid {
    grid-template-columns: 1fr;
  }
  .tool-header h1 {
    font-size: 1.5rem;
  }
  .result-item .ri-val {
    font-size: 1.25rem;
  }
  .info-inner {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 360px) {
  .tool-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
  }
  .hero h1 {
    font-size: 1.55rem;
  }
}

/* ═══════════════════════════════════════
   COOL TRANSITIONS & MICRO-INTERACTIONS
   ═══════════════════════════════════════ */

/* Ripple effect on buttons */
.calc-btn,
.submit-btn,
.rb-add-btn {
  position: relative;
  overflow: hidden;
}
.calc-btn::after,
.submit-btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.3) 0%,
    transparent 70%
  );
  opacity: 0;
  transition: opacity 0.4s;
}
.calc-btn:active::after,
.submit-btn:active::after {
  opacity: 1;
}

/* Tool card shimmer on hover */
.tool-card::before {
  content: "";
  position: absolute;
  top: -100%;
  left: -60%;
  width: 40%;
  height: 300%;
  background: linear-gradient(
    105deg,
    transparent,
    rgba(255, 255, 255, 0.15),
    transparent
  );
  transition: none;
  pointer-events: none;
}
.tool-card:hover::before {
  left: 130%;
  transition: left 0.55s ease;
}

/* Navbar scroll shadow */
.navbar.scrolled {
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
}
[data-theme="dark"] .navbar.scrolled {
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.35);
}

/* Input focus ring animation */
.form-input {
  transition:
    border-color 0.2s,
    box-shadow 0.2s,
    background 0.2s,
    transform 0.15s;
}
.form-input:focus {
  transform: translateY(-1px);
}

/* Result box number counter animation */
.ri-val {
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Blog card image zoom */
.blog-thumb {
  transition:
    transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
    background 0.3s;
  overflow: hidden;
}
.blog-card:hover .blog-thumb {
  transform: scale(1.04);
}

/* Hero search pulse on focus */
.hero-search input:focus {
  animation: searchPulse 0.4s ease;
}
@keyframes searchPulse {
  0% {
    box-shadow:
      0 0 0 0 var(--accent-bg),
      var(--shadow-lg);
  }
  50% {
    box-shadow:
      0 0 0 8px transparent,
      var(--shadow-lg);
  }
  100% {
    box-shadow:
      0 0 0 4px var(--accent-bg),
      var(--shadow-lg);
  }
}

/* Stagger animation for tool grids */
.tool-grid .tool-card:nth-child(1) {
  animation-delay: 0s;
}
.tool-grid .tool-card:nth-child(2) {
  animation-delay: 0.04s;
}
.tool-grid .tool-card:nth-child(3) {
  animation-delay: 0.08s;
}
.tool-grid .tool-card:nth-child(4) {
  animation-delay: 0.12s;
}
.tool-grid .tool-card:nth-child(5) {
  animation-delay: 0.16s;
}
.tool-grid .tool-card:nth-child(6) {
  animation-delay: 0.2s;
}
.tool-grid .tool-card:nth-child(7) {
  animation-delay: 0.24s;
}
.tool-grid .tool-card:nth-child(8) {
  animation-delay: 0.28s;
}

/* Page load hero animation */
.hero-badge {
  animation: popIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
@keyframes popIn {
  from {
    opacity: 0;
    transform: scale(0.8) translateY(10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Dark mode toggle spin */
.theme-btn {
  transition:
    all 0.25s,
    transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.theme-btn:active {
  transform: rotate(30deg) scale(0.9);
}

/* Smooth result box reveal with slide */
@keyframes resultReveal {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
.result-box.visible {
  animation: resultReveal 0.38s cubic-bezier(0.4, 0, 0.2, 1) both;
}

/* Nav link underline slide */
.nav-links a {
  position: relative;
}
.nav-links a::after {
  content: "";
  position: absolute;
  bottom: 2px;
  left: 0.8rem;
  right: 0.8rem;
  height: 2px;
  border-radius: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}
.nav-links a:hover::after,
.nav-links a.active::after {
  transform: scaleX(1);
}

/* Drawer link slide-in stagger */
.mobile-drawer.open .drawer-links li {
  animation: drawerItem 0.3s ease both;
}
.mobile-drawer.open .drawer-links li:nth-child(1) {
  animation-delay: 0.06s;
}
.mobile-drawer.open .drawer-links li:nth-child(2) {
  animation-delay: 0.1s;
}
.mobile-drawer.open .drawer-links li:nth-child(3) {
  animation-delay: 0.14s;
}
.mobile-drawer.open .drawer-links li:nth-child(4) {
  animation-delay: 0.18s;
}
.mobile-drawer.open .drawer-links li:nth-child(5) {
  animation-delay: 0.22s;
}
@keyframes drawerItem {
  from {
    opacity: 0;
    transform: translateX(-12px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Smooth category card hover */
.cat-card {
  transition:
    border-color 0.22s,
    box-shadow 0.22s,
    transform 0.22s;
}
.cat-card:hover {
  transform: translateY(-2px);
}

/* Footer link hover arrow effect */
.footer-col li a {
  display: inline-flex;
  align-items: center;
  gap: 0;
  transition:
    color 0.18s,
    gap 0.18s;
}
.footer-col li a:hover {
  gap: 4px;
}
.footer-col li a:hover::before {
  content: "›";
  font-size: 0.9rem;
}
