/* =====================================================================
   All in One Calculator — Global Styles
   A warm, confident, editorial design.
   Deep navy header, warm teal accents, generous whitespace, layered cards.
   ===================================================================== */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=Caveat:wght@700&display=swap');

/* ---- Design tokens ---- */
:root {
  --font: 'DM Sans', system-ui, -apple-system, sans-serif;
  --clr-brand: #0D9488;          /* teal-600 – the signature accent */
  --clr-brand-hover: #0F766E;
  --clr-brand-light: #CCFBF1;    /* teal-100  */
  --clr-brand-pale: #F0FDFA;     /* teal-50   */
  --clr-navy: #0F172A;           /* slate-900 */
  --clr-navy-mid: #1E293B;       /* slate-800 */
  --clr-navy-soft: #334155;      /* slate-700 */
  --bg: #F1F5F9;                 /* slate-100 – full-page fill */
  --surface: #FFFFFF;
  --text: #1E293B;
  --text-secondary: #64748B;     /* slate-500  */
  --border: #E2E8F0;             /* slate-200  */
  --radius: 0px;
  --shadow-card: 0 1px 3px rgba(15,23,42,.06), 0 1px 2px rgba(15,23,42,.04);
  --shadow-hover: 0 10px 25px -5px rgba(15,23,42,.08), 0 8px 10px -6px rgba(15,23,42,.04);
  --ease: cubic-bezier(.4,0,.2,1);
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: var(--clr-brand); text-decoration: none; transition: color .2s var(--ease); }
a:hover { color: var(--clr-brand-hover); }
img { display: block; max-width: 100%; }

/* ==========  HEADER  ========== */
#site-header {
  background: var(--clr-navy);
  color: #FFF;
  position: sticky;
  top: 0;
  z-index: 200;
}
.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  height: 62px;
}

/* Logo */
.logo {
  font-size: 25px;
  font-weight: 800;
  letter-spacing: -.5px;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
}
.logo-icon {
  width: 26px;
  height: 26px;
  color: var(--clr-brand);
  transition: transform 0.3s var(--ease);
}
.logo-calc {
  font-family: 'Caveat', cursive;
  font-size: 34px;
  font-weight: 700;
  color: #FFF;
  transform: rotate(-3deg);
  display: inline-block;
  vertical-align: middle;
  transition: transform 0.3s var(--ease);
}
.logo-net {
  font-family: var(--font);
  text-transform: uppercase;
  font-weight: 800;
  font-size: 20px;
  letter-spacing: 0.5px;
  color: var(--clr-brand);
  vertical-align: middle;
}
.logo:hover .logo-calc {
  transform: rotate(-7deg) scale(1.05);
}
.logo:hover .logo-icon {
  transform: rotate(15deg) scale(1.1);
}

/* Nav tabs */
.header-nav { display: flex; gap: 4px; }
.nav-tab {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: rgba(255,255,255,.6);
  padding: 6px 14px;
  border-radius: 0px;
  transition: all .2s var(--ease);
}
.nav-tab:hover { color: #FFF; background: rgba(255,255,255,.08); }
.nav-tab.active {
  color: var(--clr-navy);
  background: var(--clr-brand);
}

/* Sign-in */
.sign-in-link {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,.55);
  border: 1px solid rgba(255,255,255,.2);
  padding: 6px 18px;
  border-radius: 0px;
  transition: all .2s var(--ease);
}
.sign-in-link:hover { color: #FFF; border-color: rgba(255,255,255,.5); }

/* ==========  HOMEPAGE  ========== */
.site-wrapper {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 40px 24px 60px;
  display: flex;
  flex-direction: column;
  gap: 48px;
  flex: 1;
}

/* ---- Hero section ---- */
.hero-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: transparent;
  border-radius: 0;
  padding: 40px 0 48px;
  overflow: visible;
  position: relative;
}
/* decorative circles – removed */
.hero-section::before,
.hero-section::after { display: none; }

.hero-search-col {
  position: relative; z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  width: 100%;
  max-width: 600px;
  margin-bottom: 40px;
  text-align: center;
}
.hero-main-row {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  width: 100%;
}
.hero-calc-col {
  grid-column: span 2;
  display: flex;
  justify-content: center;
  width: 100%;
}
.hero-list-col {
  grid-column: span 1;
  display: flex;
}
.popular-calc-card {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 24px;
  box-shadow: var(--shadow-card);
  flex: 1;
  display: flex;
  flex-direction: column;
  text-align: left;
}
.popular-calc-card h3 {
  font-size: 18px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 12px;
  font-weight: 700;
  color: var(--text);
}
.popular-calc-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.popular-calc-links a {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-secondary);
}
.popular-calc-links a:hover {
  color: var(--clr-brand);
}

.hero-title {
  font-size: 38px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -1px;
  color: var(--text);
}
.hero-title::after { display: none; }

/* Search */
.search-box { display: flex; gap: 10px; width: 100%; }
#search-input {
  flex: 1;
  padding: 14px 18px;
  font-size: 15px;
  border: 1px solid var(--border);
  border-radius: 0px;
  background: var(--surface);
  color: var(--text);
  font-family: var(--font);
}
#search-input::placeholder { color: var(--text-secondary); }
#search-input:focus { outline: none; border-color: var(--clr-brand); box-shadow: 0 0 0 3px rgba(13,148,136,.15); }
#search-btn {
  background: var(--clr-brand);
  color: #FFF;
  padding: 0 26px;
  border: none;
  border-radius: 0px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font);
  transition: background .2s var(--ease);
}
#search-btn:hover { background: var(--clr-brand-hover); }
.search-results { background: var(--surface); border-radius: 8px; padding: 12px; margin-top: 4px; border: 1px solid var(--border); box-shadow: var(--shadow-card); }
.hidden { display: none; }

/* ---- Calculator widget ---- */
.calc-container {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0px;
  padding: 24px;
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  box-shadow: var(--shadow-card);
}
.calc-display {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 0px;
  padding: 18px 16px;
  text-align: right;
  margin-bottom: 16px;
}
.calc-expression { font-size: 16px; color: var(--text-secondary); min-height: 22px; margin-bottom: 6px; font-family: 'DM Sans', monospace; }
.calc-result { font-size: 42px; font-weight: 700; color: var(--text); overflow: hidden; letter-spacing: -.5px; }
.calc-mode-row { display: flex; justify-content: flex-end; gap: 12px; margin-bottom: 12px; font-size: 14px; color: var(--text-secondary); }
.mode-label { font-size: 14px; color: var(--text-secondary); cursor: pointer; }
 
.calc-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 5px; }
.calc-btn {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 0px;
  padding: 14px 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  transition: all .15s var(--ease);
  font-family: var(--font);
}
.calc-btn:hover { background: #E2E8F0; }
.fn-btn { font-size: 14px; }
.op-btn { background: var(--clr-brand-pale); color: var(--clr-brand); border-color: var(--clr-brand-light); font-size: 18px; }
.mem-btn { background: #FFF7ED; color: #EA580C; border-color: #FED7AA; }
.ac-btn { background: #FEE2E2; color: #DC2626; border-color: #FECACA; }
.ac-btn:hover { background: #EF4444; color: #FFF; }
.eq-btn {
  background: var(--clr-brand);
  color: #FFF;
  border: none;
  grid-column: span 2;
  font-size: 22px;
}
.eq-btn:hover { background: var(--clr-brand-hover); }

/* ==========  CATEGORIES GRID  ========== */
.categories-section { margin-top: 20px; }
.categories-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.category-col {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: all .25s var(--ease);
  display: flex;
  flex-direction: column;
}
.category-col:hover { box-shadow: var(--shadow-hover); transform: translateY(-4px); }

.cat-img-wrap {
  height: 140px;
  overflow: hidden;
  position: relative;
  background: var(--clr-brand-pale);
}
.cat-img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.category-col:hover .cat-img { transform: scale(1.06); }

.cat-title {
  font-size: 16px;
  font-weight: 700;
  padding: 18px 24px 14px;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
}
/* colour accents per category */
.cat-title.financial::before { content: '💰'; }
.cat-title.fitness::before  { content: '❤️'; }
.cat-title.math::before     { content: '📐'; }
.cat-title.other::before    { content: '⚙️'; }

.cat-links {
  list-style: none;
  padding: 16px 24px 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 16px;
  flex: 1;
}
#list-financial {
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.cat-links li {}
.cat-links a {
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 500;
  display: block;
  padding: 5px 0;
  transition: color .15s, padding-left .15s;
}
.cat-links a:hover { color: var(--clr-brand); padding-left: 4px; }

/* "All Calculators" CTA */
.all-calc-btn-wrap { text-align: center; margin-top: 16px; }
.all-calc-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--clr-brand);
  color: #FFF;
  padding: 14px 32px;
  border-radius: 0px;
  font-weight: 700;
  font-size: 15px;
  transition: all .25s var(--ease);
  box-shadow: 0 4px 14px rgba(13,148,136,.25);
}
.all-calc-btn:hover { background: var(--clr-brand-hover); transform: translateY(-2px); box-shadow: 0 6px 20px rgba(13,148,136,.3); color: #FFF; }
.btn-arrow { font-size: 12px; }

/* About blurb */
.about-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px 48px;
  line-height: 1.75;
  color: var(--text-secondary);
  font-size: 15px;
  box-shadow: var(--shadow-card);
}
.about-section p { margin-bottom: 14px; }
.about-section p:last-child { margin-bottom: 0; }

/* ==========  FOOTER  ========== */
#site-footer {
  background: var(--clr-navy);
  color: rgba(255,255,255,.45);
  padding: 28px 24px;
  text-align: center;
  font-size: 13px;
  margin-top: auto;
}
.footer-inner a { color: rgba(255,255,255,.55); margin: 0 10px; font-weight: 500; }
.footer-inner a:hover { color: #FFF; }

/* ==========  SITEMAP PAGE  ========== */
.sitemap-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 24px;
  margin-top: 24px;
}
.sitemap-col {
  background: var(--surface);
  padding: 24px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
}
.sitemap-col h2 { font-size: 15px; font-weight: 700; color: var(--clr-brand); margin-bottom: 14px; padding-bottom: 10px; border-bottom: 2px solid var(--clr-brand-pale); }
.sitemap-col ul { list-style: none; }
.sitemap-col li { margin-bottom: 8px; }
.sitemap-col a { font-size: 14px; color: var(--text-secondary); font-weight: 500; }
.sitemap-col a:hover { color: var(--clr-brand); }

/* ==========  POPULAR CALCULATORS SECTION  ========== */
.popular-section {
  margin-top: 10px;
}
.popular-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 24px;
  color: var(--text);
}
.popular-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
}
.popular-item-card {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  box-shadow: var(--shadow-card);
  transition: all .2s var(--ease);
  color: var(--text);
  font-weight: 600;
  font-size: 14px;
}
.popular-item-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: var(--clr-brand);
  color: var(--clr-brand-hover);
}
.popular-svg {
  width: 32px;
  height: 32px;
  margin-bottom: 12px;
  color: var(--clr-brand);
}

/* ==========  RESPONSIVE  ========== */
@media (max-width: 1024px) {
  .hero-section { padding: 32px 24px 40px; }
  .hero-main-row { display: flex; flex-direction: column; align-items: center; gap: 24px; }
  .hero-calc-col { width: 100%; max-width: 600px; }
  .hero-list-col { max-width: 600px; width: 100%; }
  .calc-container { max-width: 100%; }
  .categories-grid { grid-template-columns: 1fr; }
  .cat-links { grid-template-columns: 1fr; }
  .popular-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 640px) {
  .header-inner { flex-direction: row; height: 62px; justify-content: space-between; align-items: center; padding: 0 12px; }
  .header-nav { flex-wrap: wrap; justify-content: center; }
  .hero-section { padding: 24px 16px; }
  .hero-title { font-size: 28px; }
  .about-section { padding: 28px 20px; }
  .popular-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ==========  FOOTER FLAT CALCULATORS LIST  ========== */
.footer-calculators-list {
  background: var(--clr-navy);
  padding: 40px max(24px, calc((100% - 1200px) / 2));
  margin-top: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px 24px;
  text-align: left;
}
.footer-calculators-heading {
  grid-column: 1 / -1;
  color: #FFF;
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  text-transform: uppercase;
  letter-spacing: .5px;
}
.footer-calculators-list a {
  color: rgba(255,255,255,.6);
  font-size: 13.5px;
  font-weight: 500;
  transition: color .2s var(--ease);
}
.footer-calculators-list a:hover {
  color: #FFF;
  text-decoration: underline;
}
.footer-calculators-list span.separator {
  display: none;
}

/* ==========  ABOUT HERO CARD  ========== */
.about-hero-section {
  background: linear-gradient(135deg, var(--clr-navy-mid) 0%, #1e1b4b 100%);
  color: #FFFFFF;
  padding: 40px;
  border-radius: var(--radius);
  margin-bottom: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.08);
}
.about-hero-section::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(13,148,136,0.15) 0%, transparent 70%);
  pointer-events: none;
}
.about-hero-content {
  flex: 1;
}
.about-hero-title {
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 12px;
  color: #FFFFFF;
}
.about-hero-desc {
  font-size: 15px;
  color: rgba(255,255,255,0.8);
  margin-bottom: 24px;
  line-height: 1.6;
}
.about-hero-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}
.about-hero-feature-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.about-hero-feature-icon {
  width: 24px;
  height: 24px;
  color: var(--clr-brand);
  flex-shrink: 0;
  margin-top: 2px;
}
.about-hero-feature-text h4 {
  font-size: 14.5px;
  font-weight: 700;
  color: #FFFFFF;
  margin-bottom: 4px;
}
.about-hero-feature-text p {
  font-size: 12.5px;
  color: rgba(255,255,255,0.65);
  margin: 0;
}
.about-hero-illustration {
  width: 180px;
  height: 180px;
  color: var(--clr-brand);
  opacity: 0.9;
  flex-shrink: 0;
}
@media (max-width: 900px) {
  .about-hero-section {
    flex-direction: column-reverse;
    padding: 30px 24px;
    gap: 30px;
    text-align: center;
  }
  .about-hero-illustration {
    width: 140px;
    height: 140px;
  }
  .about-hero-feature-item {
    align-items: center;
    flex-direction: column;
    text-align: center;
  }
}

/* ==========  ANIMATIONS & MICRO-INTERACTIONS  ========== */

/* Fade-In Entrance */
.about-hero-section {
  animation: fadeInUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Calculator Screen Blinking Cursor Effect */
.calc-screen-cursor {
  animation: blink 1s step-end infinite;
}
@keyframes blink {
  from, to { fill: transparent; }
  50% { fill: var(--clr-brand); }
}

/* Interactive Calculator Keys sequential lighting */
@keyframes keyGlow {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.3); fill: var(--clr-brand); }
}
.hero-calc-btn-glow-1 { animation: keyGlow 4s infinite 0.5s; }
.hero-calc-btn-glow-2 { animation: keyGlow 4s infinite 1.5s; }
.hero-calc-btn-glow-3 { animation: keyGlow 4s infinite 2.5s; }

/* Float animation for standard illustrations */
.about-hero-illustration {
  animation: floatIllustration 6s ease-in-out infinite;
  transform-origin: center;
}
@keyframes floatIllustration {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* Search Focus Smooth Glow Transition */
#search-input {
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

/* ==========  HAMBURGER MENU & RESPONSIVE ALIGNMENTS  ========== */
.hamburger-menu-btn {
  display: none;
}

@media (max-width: 768px) {
  /* Less outer area on small screen (paddings) */
  .site-wrapper {
    padding: 24px 8px 40px !important;
  }
  .header-inner {
    padding: 0 12px !important;
    justify-content: space-between !important;
  }
  .hero-section {
    padding: 20px 8px 24px !important;
  }

  /* Hamburger Button styling */
  .hamburger-menu-btn {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 18px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 210;
  }
  .hamburger-line {
    width: 100%;
    height: 2.5px;
    background-color: #FFFFFF;
    border-radius: 2px;
    transition: all 0.3s ease;
  }
  /* Hamburger X morph animations */
  .hamburger-menu-btn.active .hamburger-line:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }
  .hamburger-menu-btn.active .hamburger-line:nth-child(2) {
    opacity: 0;
  }
  .hamburger-menu-btn.active .hamburger-line:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  /* Hamburger mobile navigation drawer */
  .header-nav {
    display: none !important;
    position: absolute;
    top: 62px;
    left: 0;
    width: 100%;
    background-color: var(--clr-navy-mid);
    border-bottom: 2px solid var(--clr-brand);
    flex-direction: column;
    padding: 16px;
    gap: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  }
  .header-nav.nav-open {
    display: flex !important;
  }
  .nav-tab {
    width: 100%;
    text-align: center;
    padding: 12px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.03);
  }
  .nav-tab:hover {
    background: var(--clr-brand);
  }

  /* Calculator buttons identical square sizes */
  .calc-grid {
    gap: 4px !important;
  }
  .calc-btn {
    padding: 8px 1px !important;
    font-size: 13px !important;
    min-height: 44px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    line-height: 1.1 !important;
    overflow: hidden !important;
  }
  .calc-btn sup, .calc-btn sub {
    font-size: 9px !important;
    margin-top: -1px;
  }
}





