@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Sora:wght@600;700;800&display=swap');

/* ═══════════════════════════════════════════════════════════
   MB Calculators — Main Stylesheet
   Updated fonts: Inter (body) + Sora (headings)
   ═══════════════════════════════════════════════════════════ */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --primary: #4f46e5;
  --primary-dark: #3730a3;
  --secondary: #7c3aed;
  --text: #111827;
  --text-muted: #6b7280;
  --text-light: #9ca3af;
  --bg: #f7f8ff;
  --bg-white: #ffffff;
  --border: #e5e7eb;
  --border-light: #f0f0f8;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.07);
  --shadow-hover: 0 12px 40px rgba(79, 70, 229, 0.13);

  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-heading: "Sora", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 15px;
  font-weight: 400;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

input,
button,
textarea,
select {
  font: inherit;
}

a {
  text-decoration: none;
  color: inherit;
}

img {
  max-width: 100%;
  display: block;
}

/* ── HEADER ─────────────────────────────────────────────── */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0);
  transition: background .3s, box-shadow .3s, border-color .3s;
  border-bottom: 1px solid transparent;
}

.site-header.scrolled {
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(20px);
  border-color: rgba(0, 0, 0, 0.07);
  box-shadow: 0 1px 20px rgba(0, 0, 0, 0.06);
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 28px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Logo */
.logo-link {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.logo-icon {
  display: block;
  flex-shrink: 0;
}

.logo-words {
  display: flex;
  align-items: baseline;
  gap: 3px;
}

.logo-mb {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 800;
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.5px;
}

.logo-calc {
  font-size: 15px;
  font-weight: 500;
  color: #6b7280;
}

/* Nav */
.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.main-nav a {
  padding: 8px 14px;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 500;
  color: #374151;
  transition: background .18s, color .18s;
}

.main-nav a:hover {
  background: #f0f0fe;
  color: var(--primary);
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: #1f2937;
  border-radius: 2px;
  transition: all .28s cubic-bezier(.4, 0, .2, 1);
}

.hamburger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger.open span:nth-child(2) {
  opacity: 0;
}

.hamburger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile nav */
.mobile-nav {
  display: none;
  position: fixed;
  top: 68px;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, .98);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding: 12px 20px 20px;
  flex-direction: column;
  gap: 2px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
  z-index: 999;
}

.mobile-nav.open {
  display: flex;
}

.mobile-nav a {
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 500;
  color: #374151;
  transition: all .18s;
}

.mobile-nav a:hover {
  background: #f0f0fe;
  color: var(--primary);
}

/* ── HERO ────────────────────────────────────────────────── */
.hero {
  background: #f8f8ff;
  padding: 120px 28px 72px;
  position: relative;
  overflow: hidden;
}

.hero-bg-gradient {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 60% 70% at 0% 50%, rgba(255, 220, 180, 0.35) 0%, transparent 55%),
    radial-gradient(ellipse 50% 60% at 100% 30%, rgba(200, 180, 255, 0.3) 0%, transparent 55%),
    radial-gradient(ellipse 40% 50% at 50% 100%, rgba(180, 210, 255, 0.2) 0%, transparent 50%);
}

.hero-dots {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(rgba(79, 70, 229, 0.08) 1px, transparent 1px);
  background-size: 28px 28px;
}

.hero-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 48px;
  align-items: center;
  position: relative;
  z-index: 2;
}

.hero-left h1 {
  font-family: var(--font-heading);
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 800;
  line-height: 1.15;
  color: #0f1240;
  margin-bottom: 4px;
}

.hero-left h1 .hero-count {
  color: var(--primary);
  font-size: clamp(36px, 5vw, 56px);
}

.hero-left h1 .hero-free {
  color: var(--primary);
}

.hero-calc-icon {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 6px;
  vertical-align: middle;
}

/* Search box */
.hero-search {
  position: relative;
  max-width: 100%;
}

.hero-search input {
  width: 100%;
  padding: 18px 60px 18px 22px;
  border: 2px solid transparent;
  border-radius: 18px;
  background: #fff;
  font-size: 15px;
  font-family: var(--font-body);
  color: var(--text);
  outline: none;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.09);
  transition: border-color .2s, box-shadow .2s;
}

.hero-search input::placeholder {
  color: #adb5bd;
}

.hero-search input:focus {
  border-color: var(--primary);
  box-shadow: 0 4px 24px rgba(79, 70, 229, 0.14);
}

.hero-search-btn {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--primary);
  display: flex;
  align-items: center;
}

/* ── CATEGORIES SECTION ─────────────────────────────────── */
.section {
  padding: 80px 28px;
}

.section-white {
  background: #fff;
}

.section-inner {
  max-width: 1280px;
  margin: 0 auto;
}

.section-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 8px;
}

.section-title {
  font-family: var(--font-heading);
  font-size: clamp(26px, 3.5vw, 36px);
  font-weight: 800;
  color: #0f1240;
  margin-bottom: 8px;
}

.section-sub {
  font-size: 15px;
  color: var(--text-muted);
  margin-bottom: 40px;
}

/* Category grid */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
}

.cat-card {
  background: #fff;
  border-radius: 18px;
  padding: 28px 16px 22px;
  text-align: center;
  border: 1.5px solid var(--border-light);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform .26s cubic-bezier(.34, 1.56, .64, 1), box-shadow .24s, border-color .22s;
  display: block;
}

.cat-card-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--cat-grad, var(--primary));
  opacity: 0;
  transition: opacity .24s;
}

.cat-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 14px 44px rgba(99, 102, 241, .12);
  border-color: #c7d2fe;
}

.cat-card:hover .cat-card-bar {
  opacity: 1;
}

.cat-icon-wrap {
  width: 56px;
  height: 56px;
  border-radius: 15px;
  margin: 0 auto 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .26s cubic-bezier(.34, 1.56, .64, 1);
}

.cat-card:hover .cat-icon-wrap {
  transform: scale(1.1) rotate(-3deg);
}

.cat-name {
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 700;
  color: #0f1240;
  margin-bottom: 5px;
}

.cat-count {
  font-size: 12px;
  color: var(--primary);
  font-weight: 600;
  margin-bottom: 10px;
}

.cat-arrow {
  display: inline-flex;
  color: #d1d5db;
  transition: color .2s, transform .2s;
}

.cat-card:hover .cat-arrow {
  color: var(--cat-color, var(--primary));
  transform: translateX(3px);
}

/* ── POPULAR CALCULATORS ─────────────────────────────────── */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.tool-card {
  background: #fff;
  border-radius: 16px;
  padding: 22px 20px;
  border: 1.5px solid var(--border-light);
  display: flex;
  flex-direction: column;
  transition: box-shadow .22s, border-color .22s;
  position: relative;
}

.tool-card:hover {
  box-shadow: var(--shadow-hover);
  border-color: #c7d2fe;
}

.tool-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.tool-card-title {
  font-size: 15px;
  font-weight: 700;
  color: #0f1240;
  line-height: 1.3;
}

.tool-card-arrow {
  flex-shrink: 0;
  color: var(--primary);
  transition: transform .2s;
}

.tool-card:hover .tool-card-arrow {
  transform: translate(2px, -2px);
}

.tool-card-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.55;
  flex: 1;
}

.tool-card-cat {
  font-size: 12px;
  color: var(--text-light);
  margin-top: 14px;
  font-weight: 500;
}

/* ── MISSION SECTION ─────────────────────────────────────── */
.mission-section {
  background: #fff;
  padding: 80px 28px;
  text-align: center;
}

.mission-about {
  max-width: 760px;
  margin: 0 auto 48px;
}

.mission-about h3 {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 16px;
  color: #0f1240;
}

.mission-about p {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.75;
}

.mission-statement {
  max-width: 860px;
  margin: 0 auto 40px;
}

.mission-statement p {
  font-family: var(--font-heading);
  font-size: clamp(20px, 3vw, 28px);
  font-weight: 800;
  color: #0f1240;
  line-height: 1.3;
}

.mission-statement p em {
  font-style: normal;
  color: #e5384f;
}

.mission-note {
  font-size: 13px;
  color: var(--text-light);
  margin-top: 8px;
  text-align: right;
}

.mission-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #0f1240;
  color: #fff;
  padding: 14px 28px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  transition: background .2s, transform .18s;
}

.mission-btn:hover {
  background: var(--primary);
  transform: translateY(-1px);
}

/* ── FEATURES STRIP ──────────────────────────────────────── */
.features-strip {
  background: linear-gradient(135deg, #0f1240, #1e1b6e);
  padding: 60px 28px;
}

.features-strip .section-inner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 32px;
}

.feature-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.feature-icon {
  width: 46px;
  height: 46px;
  border-radius: 13px;
  background: rgba(255, 255, 255, .1);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #a5b4fc;
}

.feature-title {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
}

.feature-desc {
  font-size: 13px;
  color: rgba(255, 255, 255, .5);
  line-height: 1.5;
}

/* ── FOOTER ──────────────────────────────────────────────── */
.site-footer {
  background: #fff;
  border-top: 1px solid var(--border);
}

.footer-top-line {
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(79, 70, 229, .4),
    rgba(124, 58, 237, .4),
    transparent
  );
}

.footer-main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 56px 28px 40px;
  display: grid;
  grid-template-columns: 240px 1fr 200px;
  gap: 48px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.footer-logo-words {
  display: flex;
  align-items: baseline;
  gap: 3px;
}

.footer-logo-mb {
  font-family: var(--font-heading);
  font-size: 19px;
  font-weight: 800;
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.footer-logo-calc {
  font-size: 14px;
  font-weight: 500;
  color: #6b7280;
}

.footer-tagline {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 800;
  color: #0f1240;
  line-height: 1.2;
  margin-bottom: 14px;
}

.footer-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 20px;
}

.footer-social {
  display: flex;
  gap: 8px;
}

.social-btn {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: #f3f4f6;
  color: #6b7280;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .18s, color .18s;
}

.social-btn:hover {
  background: #eef2ff;
  color: var(--primary);
}

.footer-col-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #374151;
  margin-bottom: 16px;
}

.footer-cats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.footer-cat-link {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
  transition: color .18s;
}

.footer-cat-link:hover {
  color: var(--primary);
}

.fc-icon {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.fc-icon svg {
  width: 16px;
  height: 16px;
}

.footer-link-group ul {
  list-style: none;
}

.footer-link-group ul li {
  margin-bottom: 9px;
}

.footer-link-group ul a {
  font-size: 14px;
  color: var(--text-muted);
  transition: color .18s;
}

.footer-link-group ul a:hover {
  color: var(--primary);
}

.footer-bottom {
  max-width: 1280px;
  margin: 0 auto;
  padding: 20px 28px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-bottom p {
  font-size: 13px;
  color: var(--text-light);
}

.footer-bottom a {
  color: var(--text-muted);
}

.footer-bottom a:hover {
  color: var(--primary);
}

/* ── EMPTY STATE ─────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 60px 24px;
  color: var(--text-muted);
  font-size: 15px;
}

/* ── RESPONSIVE ──────────────────────────────────────────── */
@media (max-width: 1100px) {
  .cat-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .tools-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 900px) {
  .hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .cat-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .tools-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-main {
    grid-template-columns: 1fr 1fr;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }

  .main-nav {
    display: none;
  }

  .hamburger {
    display: flex;
  }
}

@media (max-width: 640px) {
  .cat-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .tools-grid {
    grid-template-columns: 1fr;
  }

  .footer-cats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-main {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 56px 20px;
  }

  .hero {
    padding: 100px 20px 56px;
  }
}