@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Sora:wght@600;700;800&display=swap');

/* ═══════════════════════════════════════════════════════════
   BR Calculators — Main Stylesheet
   Updated theme: Teal + Navy + Soft Blue
   Fonts: Inter (body) + Sora (headings)
   ═══════════════════════════════════════════════════════════ */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --primary: #0f766e;
  --primary-dark: #0b5e57;
  --secondary: #1d4ed8;
  --secondary-dark: #1e40af;
  --accent: #0891b2;

  --text: #0f172a;
  --text-muted: #64748b;
  --text-light: #94a3b8;

  --bg: #f4f9f8;
  --bg-soft: #edf7f6;
  --bg-white: #ffffff;

  --border: #d9e7e4;
  --border-light: #e7f1ef;

  --radius: 16px;
  --radius-sm: 10px;

  --shadow: 0 6px 28px rgba(15, 23, 42, 0.06);
  --shadow-hover: 0 14px 40px rgba(15, 118, 110, 0.14);

  --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.96);
  backdrop-filter: blur(18px);
  border-color: rgba(15, 23, 42, 0.08);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 28px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Logo */
.logo-link {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  position: relative;
}

.logo-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  filter: drop-shadow(0 10px 22px rgba(15, 118, 110, 0.18));
  transition: transform .22s ease, filter .22s ease;
}

.logo-icon svg {
  display: block;
}

.logo-link:hover .logo-icon {
  transform: translateY(-1px) scale(1.03);
  filter: drop-shadow(0 14px 28px rgba(29, 78, 216, 0.16));
}

.logo-words {
  display: flex;
  align-items: baseline;
  gap: 4px;
  line-height: 1;
}

.logo-mb {
  font-family: var(--font-heading);
  font-size: 29px;
  font-weight: 800;
  letter-spacing: -1.2px;
  background: linear-gradient(135deg, #0f766e 0%, #155e75 45%, #1d4ed8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.logo-calc {
  font-size: 14px;
  font-weight: 700;
  color: #475569;
  letter-spacing: -0.2px;
}

.site-header.scrolled .logo-calc {
  color: #334155;
}

/* Nav */
.main-nav {
  display: flex;
  align-items: center;
  gap: 5px;
}

.main-nav a {
  padding: 9px 14px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  color: #334155;
  transition: background .18s, color .18s, transform .18s;
}

.main-nav a:hover {
  background: rgba(15, 118, 110, 0.08);
  color: var(--primary);
  transform: translateY(-1px);
}

/* 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: #1e293b;
  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: 72px;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
  padding: 12px 20px 20px;
  flex-direction: column;
  gap: 2px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
  z-index: 999;
}

.mobile-nav.open {
  display: flex;
}

.mobile-nav a {
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  color: #334155;
  transition: all .18s;
}

.mobile-nav a:hover {
  background: rgba(15, 118, 110, 0.08);
  color: var(--primary);
}

/* ── HERO ────────────────────────────────────────────────── */
.hero {
  background: linear-gradient(180deg, #f7fbfb 0%, #eef7f6 100%);
  padding: 126px 28px 76px;
  position: relative;
  overflow: hidden;
}

.hero-bg-gradient {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 60% 70% at 0% 50%, rgba(8, 145, 178, 0.16) 0%, transparent 55%),
    radial-gradient(ellipse 50% 60% at 100% 25%, rgba(29, 78, 216, 0.13) 0%, transparent 55%),
    radial-gradient(ellipse 42% 52% at 50% 100%, rgba(15, 118, 110, 0.12) 0%, transparent 50%);
}

.hero-dots {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(rgba(15, 118, 110, 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, 44px);
  font-weight: 800;
  line-height: 1.12;
  color: #0f172a;
  margin-bottom: 4px;
}

.hero-left h1 .hero-count {
  color: var(--primary);
  font-size: clamp(36px, 5vw, 58px);
}

.hero-left h1 .hero-free {
  color: var(--secondary);
}

.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 12px 30px rgba(15, 23, 42, 0.08);
  transition: border-color .2s, box-shadow .2s, transform .2s;
}

.hero-search input::placeholder {
  color: #94a3b8;
}

.hero-search input:focus {
  border-color: rgba(15, 118, 110, 0.45);
  box-shadow: 0 16px 36px rgba(15, 118, 110, 0.13);
  transform: translateY(-1px);
}

.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: 84px 28px;
}

.section-white {
  background: #fff;
}

.section-inner {
  max-width: 1280px;
  margin: 0 auto;
}

.section-eyebrow {
  font-size: 11px;
  font-weight: 800;
  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: #0f172a;
  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;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.03);
}

.cat-card-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--cat-grad, linear-gradient(135deg, var(--primary), var(--secondary)));
  opacity: 0;
  transition: opacity .24s;
}

.cat-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 44px rgba(15, 118, 110, 0.12);
  border-color: #bde2dc;
}

.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: #0f172a;
  margin-bottom: 5px;
}

.cat-count {
  font-size: 12px;
  color: var(--primary);
  font-weight: 700;
  margin-bottom: 10px;
}

.cat-arrow {
  display: inline-flex;
  color: #cbd5e1;
  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, transform .22s;
  position: relative;
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.03);
}

.tool-card:hover {
  box-shadow: var(--shadow-hover);
  border-color: #bde2dc;
  transform: translateY(-4px);
}

.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: #0f172a;
  line-height: 1.3;
}

.tool-card-arrow {
  flex-shrink: 0;
  color: var(--primary);
  transition: transform .2s, color .2s;
}

.tool-card:hover .tool-card-arrow {
  transform: translate(2px, -2px);
  color: var(--secondary);
}

.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: 600;
}

/* ── MISSION SECTION ─────────────────────────────────────── */
.mission-section {
  background: #fff;
  padding: 84px 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: #0f172a;
}

.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: #0f172a;
  line-height: 1.3;
}

.mission-statement p em {
  font-style: normal;
  color: var(--primary);
}

.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: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: #fff;
  padding: 14px 28px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  transition: background .2s, transform .18s, box-shadow .2s;
  box-shadow: 0 12px 30px rgba(15, 118, 110, 0.18);
}

.mission-btn:hover {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(15, 118, 110, 0.22);
}

/* ── FEATURES STRIP ──────────────────────────────────────── */
.features-strip {
  background: linear-gradient(135deg, #0f172a, #103a46, #0b5e57);
  padding: 62px 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: #7dd3fc;
}

.feature-title {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
}

.feature-desc {
  font-size: 13px;
  color: rgba(255, 255, 255, .68);
  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(15, 118, 110, .45),
    rgba(29, 78, 216, .45),
    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: 12px;
  margin-bottom: 16px;
}

.footer-logo .logo-icon {
  filter: drop-shadow(0 10px 22px rgba(15, 118, 110, 0.16));
}

.footer-logo-words {
  display: flex;
  align-items: baseline;
  gap: 4px;
  line-height: 1;
}

.footer-logo-mb {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -1px;
  background: linear-gradient(135deg, #0f766e 0%, #155e75 45%, #1d4ed8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.footer-logo-calc {
  font-size: 14px;
  font-weight: 700;
  color: #64748b;
  letter-spacing: -0.2px;
}

.footer-tagline {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 800;
  color: #0f172a;
  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: #f1f5f9;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .18s, color .18s, transform .18s;
}

.social-btn:hover {
  background: rgba(15, 118, 110, 0.08);
  color: var(--primary);
  transform: translateY(-2px);
}

.footer-col-title {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #334155;
  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: 102px 20px 56px;
  }

  .header-inner {
    padding: 0 20px;
  }

  .logo-link {
    gap: 10px;
  }

  .logo-icon svg {
    width: 38px;
    height: 38px;
  }

  .logo-mb {
    font-size: 25px;
  }

  .logo-calc {
    font-size: 13px;
  }

  .footer-logo-mb {
    font-size: 22px;
  }

  .footer-logo-calc {
    font-size: 13px;
  }
}