:root {
  --brand: #0f79d0;
  --brand-dark: #075da6;
  --brand-soft: #eaf5ff;
  --green: #39a844;
  --green-soft: #ebf7ec;
  --ink: #16212d;
  --muted: #667789;
  --line: #dfe7ee;
  --page: #f8fbfd;
  --card: #ffffff;
  --footer: #102b3a;
  --radius: 18px;
  --shadow: 0 16px 45px rgba(28, 72, 105, 0.10);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--page);
  -webkit-font-smoothing: antialiased;
}

section[id], article[id] {
  scroll-margin-top: 90px;
}

.navbar {
  --bs-navbar-padding-y: .7rem;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  color: var(--brand);
}

.brand-name {
  display: block;
  font-size: 1.35rem;
  line-height: 1.05;
  letter-spacing: -.03em;
  color: var(--ink);
}

.brand-name span,
.footer-brand span {
  color: var(--brand);
}

.brand-tagline {
  margin-top: 3px;
  color: var(--muted);
  font-size: .69rem;
  letter-spacing: .02em;
}

.nav-link {
  color: #40505f;
  font-weight: 600;
}

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

.hero {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(105deg, rgba(242,248,252,.98) 0%, rgba(239,247,251,.93) 43%, rgba(239,247,251,.28) 72%, rgba(239,247,251,.10) 100%),
    url("assets/hero.jpg") center 38% / cover no-repeat;
}

/*
  Add your final hero photo at assets/hero.jpg.
  Until then, this fallback gradient still looks intentional.
*/
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 80% 30%, rgba(83, 175, 224, .45), transparent 28%),
    linear-gradient(135deg, #e8f5fb 0%, #b8d9e7 50%, #88b9c6 100%);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(to bottom, transparent 75%, rgba(248,251,253,.85));
}

.min-vh-hero {
  min-height: 470px;
}

.hero-card {
  max-width: 620px;
}

.eyebrow {
  color: var(--brand);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .11em;
  font-size: .78rem;
}

.hero h1 {
  margin: 0;
  font-size: clamp(3rem, 6vw, 5.4rem);
  line-height: .94;
  letter-spacing: -.06em;
  font-weight: 850;
  color: #121b24;
}

.hero-copy {
  max-width: 580px;
  margin: 1.4rem 0 1.7rem;
  font-size: clamp(1.05rem, 1.5vw, 1.25rem);
  line-height: 1.6;
  color: #4a5c6c;
}

.btn-primary {
  --bs-btn-bg: var(--brand);
  --bs-btn-border-color: var(--brand);
  --bs-btn-hover-bg: var(--brand-dark);
  --bs-btn-hover-border-color: var(--brand-dark);
  font-weight: 700;
}

.section-space {
  padding: 4.7rem 0 3rem;
}

.section-heading {
  max-width: 650px;
  margin: 0 auto 2.3rem;
}

.section-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  margin-bottom: .6rem;
  border-radius: 50%;
  color: white;
  background: var(--brand);
  font-weight: 900;
}

.section-heading h2 {
  margin-bottom: .55rem;
  font-size: clamp(2rem, 3vw, 2.7rem);
  font-weight: 800;
  letter-spacing: -.045em;
}

.section-heading p {
  color: var(--muted);
  font-size: 1.05rem;
}

.calculator-card {
  padding: clamp(1.3rem, 2.2vw, 2rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
}

.calculator-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.calculator-header h3 {
  margin: 0 0 .2rem;
  font-size: 1.28rem;
  font-weight: 800;
}

.calculator-header p {
  margin: 0;
  color: var(--muted);
}

.calculator-icon {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border-radius: 14px;
  font-size: 1.35rem;
  background: var(--brand-soft);
}

.form-label {
  font-size: .88rem;
  font-weight: 750;
  color: #40505f;
}

.form-control,
.form-select,
.input-group-text {
  border-color: #ccd8e0;
  min-height: 51px;
}

.form-control:focus,
.form-select:focus {
  border-color: rgba(15,121,208,.55);
  box-shadow: 0 0 0 .23rem rgba(15,121,208,.11);
}

.input-group-text {
  background: #f4f8fa;
  color: var(--muted);
  font-size: .92rem;
  font-weight: 700;
}

.unit-toggle {
  display: inline-flex;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f5f8fa;
}

.unit-btn {
  min-width: 88px;
  padding: .46rem .9rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-weight: 750;
}

.unit-btn.active {
  background: white;
  color: var(--brand);
  box-shadow: 0 2px 8px rgba(35,70,94,.11);
}

.result-panel {
  padding: 1.25rem;
  border: 1px solid #bde4c1;
  border-radius: 14px;
  background: var(--green-soft);
}

.result-panel > small {
  display: block;
  margin-bottom: .25rem;
  color: #52725a;
  font-weight: 700;
}

.result-main {
  display: flex;
  align-items: center;
  gap: .8rem;
  flex-wrap: wrap;
}

.result-main strong {
  font-size: 2.35rem;
  line-height: 1;
  letter-spacing: -.04em;
}

.status-pill {
  padding: .35rem .65rem;
  border-radius: 999px;
  background: rgba(57,168,68,.13);
  color: #24772c;
  font-size: .82rem;
  font-weight: 800;
}

.scale-track {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1.8fr 1.25fr 1.25fr;
  height: 9px;
  overflow: visible;
  border-radius: 999px;
}

.scale-track span:first-child { border-radius: 999px 0 0 999px; }
.scale-track span:last-of-type { border-radius: 0 999px 999px 0; }
.s1 { background: #4ea6d8; }
.s2 { background: #48b34f; }
.s3 { background: #e5bd32; }
.s4 { background: #e36a55; }

.scale-track i {
  position: absolute;
  top: -5px;
  left: 50%;
  width: 3px;
  height: 19px;
  border-radius: 2px;
  background: #15212b;
  transform: translateX(-50%);
  transition: left .25s ease;
}

.scale-labels {
  display: grid;
  grid-template-columns: 1fr 1.8fr 1.25fr 1.25fr;
  gap: .2rem;
  margin-top: .55rem;
  color: #71818d;
  font-size: .68rem;
  text-align: center;
}

.result-note {
  color: #5b6f61;
  font-size: .84rem;
  line-height: 1.5;
}

.calorie-total {
  display: flex;
  align-items: baseline;
  gap: .45rem;
}

.calorie-total strong {
  color: var(--brand);
  font-size: 2.45rem;
  line-height: 1;
  letter-spacing: -.045em;
}

.calorie-total span {
  color: #557080;
  font-weight: 700;
}

.goal-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .65rem;
}

.goal-grid > div {
  padding: .75rem .55rem;
  border-radius: 10px;
  background: rgba(255,255,255,.58);
  text-align: center;
}

.goal-grid small,
.goal-grid span {
  display: block;
  color: #6b7c74;
  font-size: .69rem;
}

.goal-grid strong {
  display: block;
  margin: .12rem 0;
  font-size: 1.08rem;
}

.ad-section {
  background: var(--page);
}

.ad-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 110px;
  width: 100%;
  border: 1px dashed #bdcbd5;
  border-radius: 12px;
  background: #f0f4f7;
  color: #7a8994;
  text-align: center;
}

.ad-placeholder-large {
  min-height: 140px;
}

.ad-placeholder span {
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: .7rem;
  font-weight: 800;
}

.ad-placeholder small {
  margin-top: .25rem;
}

.why-section {
  background: white;
  border-top: 1px solid #eef2f4;
}

.why-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 1.35rem;
  font-weight: 900;
}

.why-section h3 {
  font-size: 1.12rem;
  font-weight: 800;
}

.why-section p {
  max-width: 300px;
  margin: 0 auto;
  color: var(--muted);
  font-size: .92rem;
}

.site-footer {
  background: var(--footer);
  color: #cad7de;
}

.footer-brand {
  margin-bottom: .6rem;
  color: white;
  font-size: 1.4rem;
  font-weight: 850;
  letter-spacing: -.035em;
}

.site-footer p {
  color: #a9bbc4;
}

.site-footer a {
  display: inline-block;
  margin-left: 1.2rem;
  color: #dbe6eb;
  text-decoration: none;
  font-size: .9rem;
  font-weight: 650;
}

.site-footer a:hover {
  color: white;
}

.site-footer hr {
  margin: 2rem 0;
  border-color: rgba(255,255,255,.14);
}

.disclaimer {
  max-width: 900px;
  font-size: .76rem;
  line-height: 1.55;
}

.copyright {
  font-size: .78rem;
}

/* Tablet */
@media (max-width: 991.98px) {
  .hero {
    background-position: 64% center;
  }

  .hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(244,249,252,.19);
    pointer-events: none;
  }

  .hero-card {
    position: relative;
    z-index: 2;
    max-width: 520px;
    padding: 1.45rem;
    border-radius: 18px;
    background: rgba(255,255,255,.74);
    backdrop-filter: blur(7px);
    box-shadow: 0 15px 45px rgba(34,78,104,.12);
  }

  .min-vh-hero {
    min-height: 430px;
  }

  .section-space {
    padding-top: 3.6rem;
  }
}

/* Mobile */
@media (max-width: 575.98px) {
  .container {
    --bs-gutter-x: 1.35rem;
  }

  .navbar-brand {
    max-width: calc(100% - 58px);
  }

  .brand-name {
    font-size: 1.18rem;
  }

  .hero {
    min-height: 430px;
    background-position: 68% center;
  }

  .hero h1 {
    font-size: clamp(2.8rem, 14vw, 4rem);
  }

  .hero-copy {
    font-size: 1rem;
    line-height: 1.5;
  }

  .hero-card {
    padding: 1.25rem;
    background: rgba(255,255,255,.80);
  }

  .min-vh-hero {
    min-height: 430px;
  }

  .calculator-card {
    border-radius: 15px;
  }

  .goal-grid {
    grid-template-columns: 1fr;
  }

  .ad-placeholder {
    min-height: 90px;
    border-radius: 8px;
  }

  .site-footer a {
    display: block;
    margin: .55rem 0 0;
  }
}
