/* ==========================================================================
   HealthCalc — components
   Nav · Hero + 3D float layer · Category grid · Featured ·
   Popular row · Footer · Responsive

   Structure mirrors the reference section for section. Motion lives in
   main.js (GSAP); CSS here owns state, depth and layout.
   ========================================================================== */

/* ============================================================== NAV */
.nav {
  position: sticky;
  top: 0;
  z-index: 90;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, box-shadow .3s;
}
.nav.is-stuck {
  border-bottom-color: var(--line);
  box-shadow: var(--sh-xs);
}

.nav__in {
  display: flex;
  align-items: center;
  gap: var(--sp-6);
  height: var(--nav-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 800;
  font-size: 19px;
  letter-spacing: -.03em;
  flex: none;
}
.brand__mark {
  width: 30px; height: 30px;
  flex: none;
  transition: transform .5s cubic-bezier(.34,1.56,.64,1);
}
.brand:hover .brand__mark { transform: rotate(-8deg) scale(1.06); }

.nav__links {
  display: flex;
  align-items: center;
  gap: var(--sp-8);
  margin-left: var(--sp-10);
}
.nav__links a {
  position: relative;
  padding: 6px 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink-2);
  transition: color .22s;
}
.nav__links a:hover { color: var(--ink); }
.nav__links a.is-active { color: var(--ink); }
.nav__links a.is-active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 2.5px;
  border-radius: 3px;
  background: var(--brand);
  transform-origin: center;
  animation: navUnderline .4s cubic-bezier(.22,1,.36,1) both;
}
@keyframes navUnderline {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}

.nav__end {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin-left: auto;
}

/* Language switch. Two text buttons, no dropdown: with two locales a menu is
   a click more for no gain, and the pair reads as a pair. The inactive half
   stays legible rather than being hidden, because a visitor who cannot see
   that Arabic exists will not know to ask for it. */
.nav__lang {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  line-height: 1;
}
.nav__lang button {
  appearance: none;
  border: 0;
  background: none;
  padding: 6px 2px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-3);
  cursor: pointer;
  border-bottom: 1.5px solid transparent;
  transition: color .16s ease, border-color .16s ease;
}
.nav__lang button:hover { color: var(--ink); }
.nav__lang button.is-active {
  color: var(--ink);
  border-bottom-color: var(--brand);
}
.nav__lang button:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: 3px;
}
.nav__lang span[aria-hidden] { color: var(--ink-4, var(--ink-3)); opacity: .5; }

.nav__search {
  position: relative;
  display: flex;
  align-items: center;
  gap: 9px;
  width: 250px;
  height: 42px;
  padding: 0 var(--sp-4);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: var(--sh-xs);
  transition: border-color .22s, box-shadow .22s, width .3s;
}
.nav__search:focus-within {
  border-color: var(--brand-3);
  box-shadow: 0 0 0 4px rgba(63,224,168,.16);
}
.nav__search .ico { width: 17px; height: 17px; color: var(--ink-3); }
.nav__search input {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  background: none;
  font-size: 14.5px;
  color: var(--ink);
  padding: 0;
}
.nav__search input:focus { outline: none; }
.nav__search input::placeholder { color: var(--ink-4); }
.nav__search input::-webkit-search-cancel-button { cursor: pointer; }

.iconbtn {
  display: grid;
  place-items: center;
  width: 40px; height: 40px;
  border: 1px solid transparent;
  border-radius: 50%;
  background: none;
  color: var(--ink-2);
  transition: background .22s, color .22s, border-color .22s, transform .3s;
}
.iconbtn:hover {
  background: var(--surface);
  color: var(--brand-ink);
  border-color: var(--line);
  transform: rotate(15deg);
}

.burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 42px; height: 40px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface);
}
.burger span {
  display: block;
  width: 18px; height: 2px;
  border-radius: 2px;
  background: var(--ink);
  transition: transform .28s cubic-bezier(.22,1,.36,1), opacity .18s;
}
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.drawer {
  display: none;
  background: var(--surface);
  border-top: 1px solid var(--line);
  box-shadow: var(--sh-md);
}
.drawer.is-open { display: block; }
.drawer__in { display: flex; flex-direction: column; padding: var(--sp-3) 0 var(--sp-5); }
.drawer a {
  padding: 14px 2px;
  font-weight: 600;
  color: var(--ink-2);
  border-bottom: 1px solid var(--line);
}
.drawer a:last-child { border-bottom: 0; }
.drawer a.is-active { color: var(--brand-ink); }
.drawer__search { margin-top: var(--sp-4); display: none; }

/* ============================================================= HERO */
.hero {
  position: relative;
  padding: var(--sp-10) 0 var(--sp-9);
  overflow: hidden;
}

/* soft atmospheric wash behind the hero only */
.hero::before {
  content: "";
  position: absolute;
  inset: -30% -10% auto -10%;
  height: 130%;
  background:
    radial-gradient(48% 42% at 22% 30%, rgba(22,192,138,.10), transparent 68%),
    radial-gradient(42% 38% at 78% 22%, rgba(74,147,232,.09), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.hero__grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr);
  gap: var(--sp-12);
  align-items: center;
}

/* ---- left column ---- */
.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-ink);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .005em;
  margin-bottom: var(--sp-6);
}
.hero__badge .ico { width: 14px; height: 14px; fill: var(--brand); stroke: none; }

.hero__title {
  font-size: clamp(38px, 5.4vw, 66px);
  line-height: 1.03;
  letter-spacing: -.04em;
  margin-bottom: var(--sp-5);
}
.hero__title em {
  font-style: normal;
  color: var(--accent);
  position: relative;
  white-space: nowrap;
}
/* hand-drawn underline under the accent phrase, as in the reference */
.hero__title em::after {
  content: "";
  position: absolute;
  left: 2%; right: 2%; bottom: -.06em;
  height: .085em;
  border-radius: 999px;
  background: var(--brand-2);
  opacity: .34;
  transform-origin: left center;
  animation: swash .9s .45s cubic-bezier(.22,1,.36,1) both;
}
@keyframes swash {
  from { transform: scaleX(0); opacity: 0; }
  to   { transform: scaleX(1); opacity: .34; }
}

.hero__sub {
  max-width: 44ch;
  font-size: 17px;
  line-height: 1.66;
  color: var(--ink-2);
  margin-bottom: var(--sp-8);
}

/* ---- hero search ---- */
.hsearch {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  max-width: 500px;
  padding: 7px 7px 7px var(--sp-5);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: var(--sh);
  transition: border-color .24s, box-shadow .24s;
}
.hsearch:focus-within {
  border-color: var(--brand-3);
  box-shadow: 0 0 0 5px rgba(63,224,168,.15), var(--sh);
}
.hsearch .ico { width: 19px; height: 19px; color: var(--ink-3); }
.hsearch input {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  background: none;
  font-size: 15.5px;
  color: var(--ink);
  padding: 11px 0;
}
.hsearch input:focus { outline: none; }
.hsearch input::placeholder { color: var(--ink-4); }

.hsearch__go {
  flex: none;
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  border: 0;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  box-shadow: var(--sh-brand);
  transition: background .22s, transform .3s cubic-bezier(.34,1.56,.64,1);
}
.hsearch__go:hover { background: var(--brand-ink); transform: scale(1.08) translateX(2px); }
.hsearch__go:active { transform: scale(.96); }

.chips { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; margin-top: var(--sp-5); }
.chips__lab { font-size: 13.5px; font-weight: 700; color: var(--ink-3); margin-right: 2px; }
.chip {
  padding: 8px 15px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink-2);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: transform .24s cubic-bezier(.34,1.56,.64,1), border-color .2s,
              color .2s, background .2s, box-shadow .2s;
}
.chip:hover {
  transform: translateY(-3px);
  border-color: var(--brand-3);
  color: var(--brand-ink);
  background: var(--surface);
  box-shadow: var(--sh-sm);
}
.chip.is-on {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
  box-shadow: var(--sh-brand);
}

/* ---- right column: the floating composition ----
   Height is sized to the 3D framing (objects ring the card within a
   ~4.6 x 3.9 world box), not to an arbitrary min-height — otherwise the
   stage outruns the copy column and leaves dead space above the next
   section. */
.hero__stage {
  position: relative;
  min-height: 470px;
  perspective: 1400px;
}

/* The hero decoration is the flat 2D sticker set in .floaty-layer, moved by
   sticker-parallax.js and given an idle bob in CSS.

   There is deliberately no .hero__gl canvas and no .has-gl cross-fade here any
   more. That handoff - CSS stickers on first paint, then a WebGL scene fading
   in over them and hiding them - made the hero visibly change a second after
   load, which read as a glitch rather than a reveal. It also put real 3D
   geometry behind the copy, which is the opposite of the flat 2D sticker
   direction the design settled on. */
.floaty-layer {
  position: absolute;
  inset: 0;
}

/* the white dashboard card. Narrower than the stage so the flat stickers read
   as a ring around it instead of competing for the same space. */
.dash {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(296px, 62%);
  transform: translate(-50%, -50%);
  background: var(--surface);
  border-radius: var(--r-xl);
  padding: var(--sp-6);
  box-shadow: var(--sh-lg);
  z-index: 5;
}
.dash__head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: var(--sp-5);
}
.dash__back {
  display: grid;
  place-items: center;
  width: 30px; height: 30px;
  border: 0;
  border-radius: 50%;
  background: var(--surface-3);
  color: var(--ink-2);
  transition: background .2s, transform .25s;
}
.dash__back:hover { background: var(--brand-soft); color: var(--brand-ink); transform: translateX(-2px); }
.dash__back .ico { width: 16px; height: 16px; }
.dash__title { font-size: 15px; font-weight: 800; color: var(--ink); }

.dash__dial { position: relative; width: 172px; height: 172px; margin: 0 auto var(--sp-5); }
.dash__dial svg { width: 100%; height: 100%; transform: rotate(-90deg); overflow: visible; }
.dash__trk { fill: none; stroke: var(--surface-3); stroke-width: 13; }
.dash__bar {
  fill: none;
  stroke: url(#dashGrad);
  stroke-width: 13;
  stroke-linecap: round;
  filter: drop-shadow(0 3px 7px rgba(22,192,138,.35));
}
.dash__mid {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  text-align: center;
  line-height: 1.1;
}
.dash__num {
  font-size: 40px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -.04em;
  font-variant-numeric: tabular-nums;
  transition: opacity .25s ease;
}
/* Empty state: the em dash inherits the 40px/800 number styling and renders as
   a heavy black bar, which reads as a broken loading state rather than "no
   result yet". Drop it to body weight and mute it so the ring carries the
   empty look on its own. */
.dash__num.is-empty {
  font-size: 26px;
  font-weight: 500;
  color: var(--ink-3);
  opacity: .5;
  letter-spacing: 0;
}
.dash__unit { font-size: 14px; font-weight: 600; color: var(--ink-3); margin-top: 2px; }
.dash__cap {
  text-align: center;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-3);
}
.dash__cap b { color: var(--ink); font-weight: 800; }
.dash__more {
  color: var(--brand-600, #0E9E6E);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
  white-space: nowrap;
}
.dash__more:hover { color: var(--ink); }

/* floating flat 2D stickers — pointer parallax in sticker-parallax.js,
   idle bob via the independent `translate` property */
.floaty {
  position: absolute;
  z-index: 4;
  pointer-events: none;
  will-change: transform;
  /* No preserve-3d: the stickers are flat 2D artwork that only translate and
     rotate toward the pointer. A 3D context here would invite child layers to
     be composited in depth for no visual gain. */
  transform: translate3d(0, 0, 0);
}
.floaty img, .floaty svg { width: 100%; height: auto; filter: drop-shadow(0 14px 24px rgba(14,42,61,.16)); }

/* Idle bob. The pointer parallax writes `transform` on the same element, so
   this has to be a separate property or the two will fight over the same
   value and the sticker will jitter. */
@media (prefers-reduced-motion: no-preference) {
  .floaty { animation: floatyBob var(--bob-dur, 7s) ease-in-out infinite; }
}
@keyframes floatyBob {
  0%, 100% { translate: 0 0; }
  50%      { translate: 0 -9px; }
}

.f-apple   { left: 2%;  top: 6%;  width: 116px; z-index: 6; }
.f-bottle  { left: 26%; top: -3%;  width: 62px;  z-index: 7; }
.f-dumbbell{ left: 4%;  top: 54%; width: 108px; z-index: 6; }
.f-heart   { right: 3%; top: 8%;  width: 148px; z-index: 7; }
.f-bowl    { right: -2%; top: 40%; width: 236px; z-index: 6; }
.f-egg     { right: 8%; bottom: 3%; width: 46px; z-index: 3; }
.f-petal   { right: 1%; top: 26%; width: 54px; z-index: 3; }
.f-blob1   { left: 30%; bottom: 6%; width: 76px; z-index: 2; opacity: .9; }
.f-blob2   { left: 12%; top: 34%; width: 40px; z-index: 2; opacity: .8; }
.f-blob3   { right: 24%; top: 2%;  width: 34px; z-index: 2; opacity: .75; }

/* the tilted hand-written note card */
.f-note {
  right: 2%;
  top: 12%;
  width: 160px;
  z-index: 8;
  background: var(--surface);
  border-radius: var(--r-lg);
  padding: 18px 20px;
  box-shadow: var(--sh-lg);
  transform: rotate(6deg);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--brand-ink);
  text-align: center;
}
.f-note span { display: block; }
.f-note .ico { width: 17px; height: 17px; margin: 7px auto 0; fill: var(--brand-2); stroke: none; }

/* the pink heart-rate card */
.f-card {
  left: -1%;
  top: 33%;
  width: 66px;
  z-index: 7;
  background: linear-gradient(150deg, #FDE7EC, #FBD5DE);
  border-radius: var(--r);
  padding: 13px 9px;
  box-shadow: var(--sh-md);
  text-align: center;
}
.f-card .ico { width: 26px; height: 26px; margin: 0 auto; stroke: #E8637F; stroke-width: 2.1; }
.f-card small { display: block; font-size: 9.5px; font-weight: 700; color: #C2536C; margin-top: 3px; letter-spacing: .04em; }

/* thin decorative swooshes */
.swoosh {
  position: absolute;
  z-index: 1;
  pointer-events: none;
  color: var(--brand-2);
  opacity: .5;
}

/* ========================================================== SECTIONS */
.section { padding: var(--sp-16) 0; }
.section--tight { padding-top: 0; }

.sec-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--sp-6);
  margin-bottom: var(--sp-8);
}
.sec-title { font-size: clamp(25px, 3.1vw, 34px); }
.sec-sub { margin-top: 7px; color: var(--ink-3); font-size: 15.5px; }
.sec-more {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: none;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--brand-ink);
  transition: gap .24s;
}
.sec-more:hover { gap: 12px; }
.sec-more .ico { width: 16px; height: 16px; }

/* ==================================================== CATEGORY GRID */
.cats {
  display: grid;
  grid-template-columns: repeat(6, minmax(0,1fr));
  gap: var(--sp-4);
}

.cat {
  position: relative;
  display: block;
  padding: var(--sp-5) var(--sp-4);
  border-radius: var(--r-lg);
  background: var(--c-bg, var(--surface-3));
  color: var(--c-ink, var(--ink-2));
  border: 1px solid transparent;
  transition: transform .3s cubic-bezier(.22,1,.36,1), box-shadow .3s, border-color .3s;
}
.cat:hover {
  transform: translateY(-6px);
  box-shadow: var(--sh-md);
  border-color: var(--c-ink);
}

.cat__ico {
  display: grid;
  place-items: center;
  width: 42px; height: 42px;
  margin-bottom: var(--sp-3);
  border-radius: 50%;
  background: color-mix(in srgb, var(--c-ic) 20%, transparent);
  color: var(--c-ic);
}
.cat__ico .ico { width: 21px; height: 21px; }

.cat__name { font-size: 15px; font-weight: 700; color: var(--ink); margin-bottom: 2px; }
.cat__meta { display: block; font-size: 12.5px; color: var(--c-ink); opacity: .85; }
.cat__meta b { font-weight: 700; }
/* a category with no implemented calculator: say so in words rather than
   printing a count that includes calculators which do not exist */
.cat__meta.is-soon { font-style: italic; opacity: .7; }

.cat__go {
  position: absolute;
  right: 13px; bottom: 13px;
  display: grid;
  place-items: center;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--c-ic) 18%, var(--surface));
  color: var(--c-ic);
  opacity: 0;
  transform: translateX(-5px);
  transition: opacity .28s, transform .28s;
}
.cat__go .ico { width: 14px; height: 14px; }
.cat:hover .cat__go { opacity: 1; transform: none; }

/* ======================================================== FEATURED */
.feature {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.06fr) minmax(0, .92fr);
  gap: var(--sp-8);
  align-items: center;
  padding: var(--sp-10) var(--sp-12);
  border-radius: var(--r-2xl);
  background: linear-gradient(126deg, #E9F8F1 0%, #DDF3EA 46%, #D2EFE4 100%);
}
.is-dark .feature { background: linear-gradient(126deg, #0E3329 0%, #124036 48%, #164C3E 100%); }

.feature__tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--surface);
  color: var(--brand-ink);
  font-size: 12.5px;
  font-weight: 700;
  margin-bottom: var(--sp-4);
  box-shadow: var(--sh-xs);
}
.feature__tag .ico { width: 13px; height: 13px; fill: var(--brand); stroke: none; }
.feature__title { font-size: clamp(25px, 2.9vw, 33px); margin-bottom: 10px; }
.feature__desc { color: #1D5344; max-width: 34ch; font-size: 15.5px; margin-bottom: var(--sp-6); }
.is-dark .feature__desc { color: #A8D4C4; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 14px 26px;
  border: 0;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  background: var(--brand);
  box-shadow: var(--sh-brand);
  transition: background .22s, transform .3s cubic-bezier(.34,1.56,.64,1), box-shadow .22s;
}
.btn:hover { background: var(--brand-ink); transform: translateY(-2px); box-shadow: 0 14px 32px rgba(14,158,110,.34); }
.btn:active { transform: translateY(0) scale(.97); }
.btn .ico { width: 17px; height: 17px; }

/* the mini calculator mockup */
.mini {
  background: var(--surface);
  border-radius: var(--r-lg);
  padding: var(--sp-5);
  box-shadow: var(--sh-md);
}
.mini__tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  background: var(--surface-3);
  border-radius: 999px;
  margin-bottom: var(--sp-4);
}
.mini__tab {
  padding: 9px;
  border: 0;
  border-radius: 999px;
  background: none;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink-3);
  transition: background .24s, color .24s, box-shadow .24s;
}
.mini__tab[aria-selected="true"] {
  background: var(--brand);
  color: #fff;
  box-shadow: var(--sh-sm);
}

.mini__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; }
.mini__f { min-width: 0; }
.mini__f--wide { grid-column: 1 / -1; }
.mini__lab { display: block; font-size: 11.5px; font-weight: 600; color: var(--ink-3); margin-bottom: 4px; }
/* the input + unit suffix live in one bordered control, matching the
   reference's "value ..... unit" rows */
.mini__field { display: flex; align-items: center; gap: 8px; }
.mini__in {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  display: block;
  padding: 9px 11px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-xs);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  transition: border-color .2s, background .2s, box-shadow .2s;
  -moz-appearance: textfield;
}
.mini__in::-webkit-outer-spin-button,
.mini__in::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
select.mini__in { cursor: pointer; -webkit-appearance: none; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237A96A5' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 9px center; background-size: 15px; padding-right: 30px; }
.mini__in:focus { outline: none; background: var(--surface); border-color: var(--brand-3); box-shadow: 0 0 0 3px rgba(63,224,168,.15); }
.mini__u { font-size: 11.5px; font-weight: 600; color: var(--ink-4); margin-left: auto; }

.mini__err {
  margin: var(--sp-3) 0 0;
  padding: 9px 12px;
  border-radius: var(--r-xs);
  background: var(--c-heart);
  color: var(--c-heart-ink);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
}

.mini__calc {
  width: 100%;
  margin-top: var(--sp-4);
  padding: 13px;
  border: 0;
  border-radius: var(--r-sm);
  background: var(--brand);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  box-shadow: var(--sh-brand);
  transition: background .22s, transform .2s;
}
.mini__calc:hover { background: var(--brand-ink); }
.mini__calc:active { transform: scale(.98); }
.mini__calc[disabled] { opacity: .6; cursor: progress; }

/* the result card */
.result {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--surface);
  border-radius: var(--r-lg);
  padding: var(--sp-5);
  box-shadow: var(--sh-md);
  text-align: center;
}
.result__dial { position: relative; width: 132px; height: 132px; margin-bottom: var(--sp-4); }
.result__dial svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.result__trk { fill: none; stroke: var(--surface-3); stroke-width: 15; }
.result__bar {
  fill: none;
  stroke: url(#resGrad);
  stroke-width: 15;
  stroke-linecap: round;
  filter: drop-shadow(0 3px 8px rgba(22,192,138,.32));
}
.result__mid { position: absolute; inset: 0; display: grid; place-content: center; line-height: 1.12; }
.result__num {
  font-size: 30px; font-weight: 800; color: var(--ink);
  letter-spacing: -.03em; font-variant-numeric: tabular-nums;
}
.result__u { font-size: 11.5px; font-weight: 600; color: var(--ink-3); }

.result__rows { width: 100%; display: flex; flex-direction: column; gap: 7px; margin-bottom: var(--sp-4); }
.result__row {
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
  font-size: 13px; padding-bottom: 6px; border-bottom: 1px solid var(--line);
}
.result__row dt { color: var(--ink-3); font-weight: 600; }
.result__row dd { margin: 0; font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; }
.result__row.is-off dd { font-weight: 600; color: var(--ink-4); font-size: 12px; }

.result__note {
  display: flex; gap: 9px; text-align: left;
  font-size: 12px; line-height: 1.5; color: var(--ink-3);
  background: var(--surface-2); border-radius: var(--r-sm); padding: 11px;
}
.result__note .ico { width: 16px; height: 16px; color: var(--brand); flex: none; margin-top: 1px; }

/* food photo panel */
.feature__food { position: relative; display: grid; place-items: center; }
.feature__food img { width: 100%; max-width: 300px; filter: drop-shadow(0 20px 34px rgba(14,42,61,.2)); }
.feature__scribble {
  position: absolute;
  top: -6px; right: 4%;
  font-size: 14px;
  font-weight: 700;
  font-style: italic;
  line-height: 1.25;
  color: var(--brand-ink);
  transform: rotate(-7deg);
  text-align: right;
}

/* ========================================================== POPULAR */
.prow {
  display: grid;
  grid-template-columns: repeat(6, minmax(0,1fr));
  gap: var(--sp-3);
}
.pcard {
  position: relative;
  display: block;
  padding: var(--sp-4) var(--sp-5);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--sh-xs);
  transition: transform .28s cubic-bezier(.22,1,.36,1), box-shadow .28s, border-color .28s;
}
.pcard:hover { transform: translateY(-5px); box-shadow: var(--sh-md); border-color: var(--brand-3); }

.pcard__ico {
  display: grid; place-items: center;
  width: 34px; height: 34px;
  border-radius: 50%;
  margin-bottom: 10px;
  background: color-mix(in srgb, var(--c-ic) 18%, transparent);
  color: var(--c-ic);
}
.pcard__ico .ico { width: 17px; height: 17px; }
.pcard__name { display: block; font-size: 14px; font-weight: 700; color: var(--ink); margin-bottom: 3px; }
.pcard__desc { display: block; font-size: 12.5px; line-height: 1.45; color: var(--ink-3); padding-right: 18px; }
.pcard__go {
  position: absolute; right: 12px; bottom: 12px;
  display: grid; place-items: center;
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--surface-3); color: var(--ink-3);
  transition: background .24s, color .24s, transform .24s;
}
.pcard__go .ico { width: 13px; height: 13px; }
.pcard:hover .pcard__go { background: var(--brand); color: #fff; transform: translateX(2px); }

.pcard.is-soon { opacity: .92; }
.pcard__soon {
  position: absolute; right: 10px; top: 10px;
  font-size: 9.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  color: var(--ink-4); background: var(--surface-2);
  border: 1px solid var(--line); border-radius: 999px; padding: 3px 8px;
}
.empty {
  padding: var(--sp-10) 0;
  text-align: center;
  color: var(--ink-3);
  font-size: 15px;
}

/* ========================================================== FOOTER */
.foot {
  background: var(--surface);
  border-top: 1px solid var(--line);
  padding: var(--sp-10) 0;
  margin-top: var(--sp-10);
}
.foot__in {
  display: flex; align-items: center; gap: var(--sp-8);
  flex-wrap: wrap;
}
.foot__brand { display: flex; align-items: center; gap: 11px; }
.foot__brand .brand__mark { width: 28px; height: 28px; }
.foot__brand strong { display: block; font-size: 16px; font-weight: 800; color: var(--ink); }
.foot__brand small { display: block; font-size: 12.5px; color: var(--ink-4); }

.foot__links { display: flex; gap: var(--sp-6); margin-left: auto; }
.foot__links a {
  font-size: 14.5px; font-weight: 600; color: var(--ink-2);
  transition: color .2s;
}
.foot__links a:hover { color: var(--brand-ink); }

.foot__end { display: flex; align-items: center; gap: var(--sp-5); }
.social { display: flex; gap: 8px; }
.social a {
  display: grid; place-items: center;
  width: 34px; height: 34px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink-3);
  transition: color .22s, border-color .22s, transform .28s, background .22s;
}
.social a:hover { color: var(--brand-ink); border-color: var(--brand-3); background: var(--brand-soft); transform: translateY(-3px); }
.social .ico { width: 16px; height: 16px; }
.foot__end small { font-size: 12.5px; color: var(--ink-4); }

/* ======================================================== REVEALS */
/* JS adds .is-in; without JS these stay visible via the no-js guard below. */
.reveal { opacity: 0; transform: translateY(22px); }
html.no-js .reveal { opacity: 1; transform: none; }
.reveal.is-in {
  opacity: 1;
  transform: none;
  transition: opacity .7s cubic-bezier(.22,1,.36,1), transform .7s cubic-bezier(.22,1,.36,1);
}

/* ==================================================== RESPONSIVE */
@media (max-width: 1180px) {
  .cats, .prow { grid-template-columns: repeat(4, minmax(0,1fr)); }
  .feature { grid-template-columns: 1fr 1fr; padding: var(--sp-8); }
  .feature__food { grid-column: 1 / -1; }
  .hero__stage { min-height: 480px; }
  .f-bowl { width: 200px; }
}

@media (max-width: 980px) {
  .hero__grid { grid-template-columns: 1fr; gap: var(--sp-10); }
  .hero__copy { max-width: 640px; }
  .hero__stage { min-height: 500px; max-width: 620px; margin-inline: auto; width: 100%; }
  .nav__links { display: none; }
  .nav__search { width: 200px; }
  .burger { display: flex; }
  .cats, .prow { grid-template-columns: repeat(3, minmax(0,1fr)); }
}

@media (max-width: 760px) {
  .wrap { padding-inline: var(--sp-5); }
  .section { padding: var(--sp-12) 0; }
  .nav__search { display: none; }
  .drawer__search { display: block; }
  .cats, .prow { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .feature { grid-template-columns: 1fr; padding: var(--sp-6); }
  .sec-head { flex-direction: column; align-items: flex-start; gap: var(--sp-3); }
  .hero__stage { min-height: 430px; }
  .f-note { width: 130px; font-size: 13px; padding: 14px 15px; }
  .f-apple { width: 84px; }
  .f-bowl { width: 168px; }
  .f-dumbbell { width: 80px; }
  .f-bottle, .f-egg, .f-petal, .f-blob3 { display: none; }
  .f-card { width: 56px; padding: 10px 7px; }
  .dash { width: min(272px, 82%); }
  .foot__in { flex-direction: column; align-items: flex-start; gap: var(--sp-5); }
  .foot__links { margin-left: 0; }
}

@media (max-width: 420px) {
  .cats, .prow { grid-template-columns: 1fr; }
  .hero__title { font-size: clamp(31px, 8.6vw, 40px); }
  .hero__stage { min-height: 400px; }
  .f-note { display: none; }
  .hsearch { padding-left: var(--sp-4); }
  .mini__grid { grid-template-columns: 1fr; }
}
