/* ==========================================================================
   Focused Nutrition Design: surface "home" (front page). Owner: the home surface builder.
   Handle fnd-surface-home (deps fnd-core). Loaded only on the home surface, so the few :root
   overrides below never reach other pages. Ported from the approved mock (mock/css/pages/home.css);
   the mock's ".home" scope is ".fnd-home" here (WordPress puts "home" on <body>).
   Sections: 01 Hero  02 Band  03 Categories  04 Best sellers  05 Goals
             06 Consultation  07 Shelves (tabs)  08 Store  09 Shared tweaks  10 Email sign-up
   ========================================================================== */
/* 01 Hero ---------------------------------------------------------------- */
.home-hero {
  position: relative;
  background: var(--fn-black);
  color: #fff;
  overflow: hidden;
  isolation: isolate;
}
.home-hero__stage {
  position: relative;
  height: 280px;
  width: 100%;
  background:
    radial-gradient(60% 70% at 50% 45%, rgba(247, 123, 1, .22), transparent 70%),
    var(--fn-black);
}
.home-hero__stage.fn3d-stage:focus-visible { box-shadow: inset 0 0 0 3px var(--fn-orange); border-radius: 0; outline: none; }
/* loading state: no white photo box on the black stage, just the warm glow until the 3D ring fades in */
.home-hero__stage .fn3d-poster {
  background: radial-gradient(34% 40% at 50% 55%, rgba(247, 123, 1, .2), transparent 70%);
  transition: opacity 400ms var(--ease);
}
.home-hero__stage .fn3d-poster img { display: none; }
/* static fallback when the 3D engine is missing */
.home-hero__still { position: absolute; inset: 0; display: grid; place-items: center; }
.home-hero__still img { max-height: 70%; width: auto; border-radius: 18px; background: #fff; padding: 4%; }

.home-hero__shade {
  position: absolute; left: 0; right: 0; top: 210px; height: 70px; z-index: 1;
  background: linear-gradient(180deg, rgba(13, 13, 13, 0), var(--fn-black));
  pointer-events: none;
}
.home-hero__inner { position: relative; z-index: 2; pointer-events: none; }
.home-hero__copy { margin-top: -22px; padding: 0 0 24px; }
.home-hero__copy a, .home-hero__copy button, .home-hero__copy ol { pointer-events: auto; }

/* type tiers: brand line (small, orange) > live headline > product name > meta */
.home-hero__brand {
  display: flex; align-items: center; gap: 10px;
  font-size: 11px; line-height: 1.2; font-weight: 700; letter-spacing: .2em; text-transform: uppercase;
  color: var(--fn-orange);
  margin-bottom: 10px;
}
.home-hero__brand::before { content: ""; width: 24px; height: 2px; background: var(--fn-orange); flex: none; }

.home-hero__kicker {
  font-size: clamp(18px, 1vw + 10px, 22px); line-height: 1.15; font-weight: 700; letter-spacing: -.005em;
  color: #fff;
}
.home-hero__kicker .fn-hl { color: var(--fn-orange); }

/* the name box is always exactly two lines tall and top-aligned:
   the gap above the name never changes and nothing below it moves between slides */
.home-hero__namebox {
  --name-fs: clamp(26px, 7.2vw, 36px);
  height: calc(var(--name-fs) * 1.04 * 2);
  display: flex; align-items: flex-start;
  margin-top: 6px;
}
.home-hero__name {
  font-size: var(--name-fs);
  line-height: 1.04; letter-spacing: -.025em;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  text-wrap: balance;
}
.home-hero__name a { color: #fff; }
.home-hero__name a:hover { text-decoration: underline; text-decoration-color: var(--fn-orange); text-decoration-thickness: 3px; text-underline-offset: 6px; }
.home-hero__swap.is-long .home-hero__name { font-size: max(22px, calc(var(--name-fs) * .8)); line-height: 1.08; }
.home-hero__swap.is-xlong .home-hero__name { font-size: max(22px, calc(var(--name-fs) * .68)); line-height: 1.1; }
/* below 900px a long name sits close to the kicker's size: the kicker steps down on long slides, so the product name
   always reads as the headline (at least 1.2x the kicker). The line height stays the same, so nothing below moves. */
@media (max-width: 899.98px) {
  .home-hero__swap.is-long .home-hero__kicker,
  .home-hero__swap.is-xlong .home-hero__kicker { font-size: 16px; line-height: calc(clamp(18px, 1vw + 10px, 22px) * 1.15); }
}

.home-hero__cat {
  display: inline-block; margin-top: 10px;
  font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--fn-on-dark);
  border-bottom: 1px solid rgba(255, 255, 255, .25);
  padding-bottom: 2px;
  transition: color var(--t) var(--ease), border-color var(--t) var(--ease);
}
.home-hero__cat:hover { color: #fff; border-color: var(--fn-orange); }

.home-hero__meta {
  display: flex; align-items: center; flex-wrap: wrap; gap: 6px 16px;
  margin-top: 12px;
  font-size: 14px; color: var(--fn-on-dark);
}
.home-hero__price { font-size: 26px; font-weight: 700; color: #fff; letter-spacing: -.01em; }
.home-hero__price small { font-size: 14px; font-weight: 400; color: var(--fn-on-dark); margin-right: 6px; letter-spacing: 0; }
.home-hero__stock { display: inline-flex; align-items: center; gap: 8px; }
.home-hero__dot { width: 8px; height: 8px; border-radius: 50%; background: #3ddc84; box-shadow: 0 0 0 4px rgba(61, 220, 132, .16); }
.home-hero__deliver { display: none; }

.home-hero__ctas { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.home-hero__ctas .fn-btn { padding: 0 14px; }
.home-hero__ctas .fn-btn svg { width: 18px; height: 18px; }

.home-hero__controls {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  margin-top: 16px; padding-top: 12px;
  border-top: 1px solid var(--fn-dark-line);
}
.home-hero__arrow {
  flex: none; width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center;
  border: 1.5px solid rgba(255, 255, 255, .28); color: #fff;
  transition: background-color var(--t) var(--ease), border-color var(--t) var(--ease), color var(--t) var(--ease);
}
.home-hero__arrow svg { width: 20px; height: 20px; }
.home-hero__arrow:hover { background: var(--fn-orange); border-color: var(--fn-orange); color: var(--fn-ink); }
.home-hero__thumbs { display: flex; gap: 6px; min-width: 0; min-height: 40px; justify-content: center; }
/* resting thumbs sit dark and dimmed on the black stage (not muddy grey); the current one lights up white with a clear orange ring */
.home-hero__thumb {
  position: relative; display: block;
  width: 40px; height: 40px; padding: 3px;
  border-radius: 10px; background: #1a1a1a;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1);
  filter: saturate(.6) brightness(.75);
  transition: filter var(--t) var(--ease), background-color var(--t) var(--ease), transform var(--t) var(--ease), box-shadow var(--t) var(--ease);
}
.home-hero__thumb img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: normal; }
.home-hero__thumb:hover { filter: saturate(.85) brightness(.95); }
.home-hero__thumb[aria-current="true"] { filter: none; background: #fff; box-shadow: 0 0 0 2px var(--fn-orange); }
.home-hero__count { display: none; white-space: nowrap; font-size: 13px; color: var(--fn-on-dark-2); letter-spacing: .06em; }
.home-hero__count strong { color: #fff; font-weight: 700; }

.home-hero__pause {
  position: absolute; z-index: 3; top: 10px; right: var(--fn-gutter);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; min-width: 44px; padding: 0 12px; border-radius: var(--r-pill);
  border: 1px solid rgba(255, 255, 255, .22); background: rgba(13, 13, 13, .55);
  color: #fff; font-size: 12px; font-weight: 700; letter-spacing: .04em;
  transition: background-color var(--t) var(--ease), border-color var(--t) var(--ease);
}
.home-hero__pause:hover { border-color: var(--fn-orange); }
.home-hero__pause svg { width: 14px; height: 14px; }
.home-hero__pi--play, .home-hero__pause[aria-pressed="true"] .home-hero__pi--pause { display: none; }
.home-hero__pause[aria-pressed="true"] .home-hero__pi--play { display: block; }
.home-hero__pause-label { display: none; }

/* product swap: quick fade + lift of the overlay text */
.home-hero__swap > *, .home-hero__price { transition: opacity 260ms var(--ease), transform 260ms var(--ease); }
.home-hero__swap.is-out > *, .home-hero__meta.is-out .home-hero__price { opacity: 0; transform: translateY(10px); }
.home-hero__swap > :nth-child(2) { transition-delay: 30ms; }
.home-hero__swap > :nth-child(3) { transition-delay: 60ms; }
.home-hero__swap.is-out > * { transition-delay: 0ms; }

/* intro: the H1 (brand line) and the Shop now button are server-rendered and visible from the first paint.
   Only the product-specific parts (name, price, controls) wait for home.js, with a short failsafe if scripts are slow.
   With scripts on, the price row and the controls keep their space while hidden, so the H1 and the button never move
   when they appear (the desktop copy is bottom-aligned). */
.fn-js .home-hero [data-intro] { opacity: 0; animation: homeFailsafe 0s linear .9s forwards; }
.fn-js .home-hero__meta[hidden], .fn-js .home-hero__controls[hidden] { display: flex !important; visibility: hidden; }
.fn-js .home-hero.is-painted [data-intro] {
  opacity: 1;
  animation: homeIn 700ms var(--ease) both;
  animation-delay: calc(var(--d, 0) * 60ms);
}
@keyframes homeFailsafe { to { opacity: 1; } }
@keyframes homeIn { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

/* phones: the category pill row is hidden on this page (the category grid sits just below the hero),
   so the 3D stage gets the room instead */
@media (max-width: 599.98px) {
  :root { --fn-nav-h: 0px; }
  body.fnd-surface-home .fn-nav { display: none; }
  .home-hero__stage { height: 320px; }
  .home-hero__shade { top: 250px; }
}
@media (min-width: 480px) and (max-width: 599.98px) {
  .home-hero__stage { height: 360px; }
  .home-hero__shade { top: 290px; }
}
@media (min-width: 600px) and (max-width: 899.98px) {
  .home-hero__stage { height: 340px; }
  .home-hero__shade { top: 270px; }
}
@media (min-width: 600px) {
  .home-hero__ctas { display: flex; flex-wrap: wrap; }
  .home-hero__ctas .fn-btn { padding: 0 28px; }
  .home-hero__thumb { width: 48px; height: 48px; }
  .home-hero__thumbs { gap: 8px; min-height: 48px; }
}

@media (min-width: 900px) {
  .home-hero { height: clamp(580px, calc(100svh - var(--fn-header-total)), 760px); }
  .home-hero__stage { position: absolute; inset: 0; height: auto; }
  /* soft right edge: the ring never looks hard-clipped by the viewport */
  .home-hero__stage::after {
    content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none;
    background: linear-gradient(270deg, var(--fn-black) 0%, rgba(13, 13, 13, 0) 12%);
  }
  /* CSS fallback carousel (file://, no WebGL): move the ring right like the WebGL shiftX does */
  .home-hero__stage .fn3d-css { inset: 0 -20% 0 20%; }
  /* the copy field stays clean: back-ring products fade out before they reach the text */
  .home-hero__shade {
    top: 0; bottom: 0; height: auto; right: auto; width: 64%;
    background: linear-gradient(90deg, #0d0d0d 0%, #0d0d0d 58%, rgba(13, 13, 13, 0) 100%);
  }
  /* copy sits low in the stage (no dead band under the nav) */
  .home-hero__inner { height: 100%; display: flex; align-items: flex-end; padding-bottom: 72px; }
  .home-hero__copy { width: min(46%, 560px); padding: 0; margin-top: 0; }
  .home-hero__brand { margin-bottom: 18px; font-size: 13px; letter-spacing: .18em; }
  .home-hero__namebox { --name-fs: clamp(36px, 3.3vw + 8px, 56px); margin-top: 10px; }
  .home-hero__cat { margin-top: 14px; }
  .home-hero__meta { margin-top: 18px; }
  .home-hero__ctas { margin-top: 24px; }
  .home-hero__deliver { display: inline-flex; align-items: center; gap: 8px; }
  .home-hero__deliver::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: var(--fn-on-dark-2); }
  .home-hero__controls { justify-content: flex-start; gap: 12px; margin-top: 32px; padding-top: 24px; }
  .home-hero__count { display: block; margin-left: 8px; }
  .home-hero__pause { top: 24px; height: 44px; padding: 0 16px; }
  .home-hero__pause-label { display: inline; }
}
@media (min-width: 900px) and (max-width: 1279.98px) {
  .home-hero__thumb { width: 40px; height: 40px; }
  .home-hero__thumbs { gap: 6px; min-height: 40px; }
  .home-hero__controls { gap: 10px; }
  .home-hero__count { display: none; }
}
@media (min-width: 1280px) {
  .home-hero__stage .fn3d-css { inset: 0 -18% 0 18%; }
  .home-hero__copy { width: 540px; }
  .home-hero__thumb { width: 56px; height: 56px; border-radius: 12px; padding: 4px; }
  .home-hero__thumbs { min-height: 56px; }
}

/* 02 Fact band (quiet near-black: orange stays tied to actions) ----------- */
.home-band { background: #111; color: #fff; border-top: 1px solid #222; --fn-focus-c: var(--fn-orange); }
.home-band .fn-band__item { align-items: center; gap: 12px; padding: 14px 8px; }
.home-band .fn-band__item svg { color: var(--fn-orange); }
.home-band .fn-band__item a { color: #fff; text-decoration-color: rgba(255, 255, 255, .35); }
.home-band .fn-band__item a:hover { text-decoration-color: var(--fn-orange); }
.home-band__t { display: block; font-size: 13px; font-weight: 700; line-height: 1.25; }
.home-nw { white-space: nowrap; }
.home-band__s { display: block; font-size: 12px; font-weight: 400; line-height: 1.35; margin-top: 2px; color: var(--fn-on-dark-2); }
@media (max-width: 1023.98px) {
  .home-band .fn-band__item:nth-child(n+3) { border-top: 1px solid #222; }
  .home-band .fn-band__item:nth-child(2n) { border-left: 1px solid #222; padding-left: 14px; }
}
@media (max-width: 767.98px) {
  .home-band__s { display: none; }
  .home-band .fn-band__item { min-height: 56px; padding: 10px 6px; gap: 10px; }
  .home-band .fn-band__item:nth-child(2n) { padding-left: 12px; }
  .home-band__t { font-size: 12.5px; }
  .fnd-home .fn-sechead { flex-wrap: wrap; align-items: flex-start; }
  .fnd-home .fn-sechead > div { flex: 1 1 100%; }
}
@media (min-width: 1024px) {
  .home-band .fn-band__item { justify-content: flex-start; padding: 16px 24px; }
  .home-band .fn-band__item:first-child { padding-left: 0; }
  .home-band .fn-band__item + .fn-band__item { border-left-color: #222; }
  .home-band__t { font-size: 15px; }
  .home-band__s { font-size: 13px; }
}

/* 03 Categories ---------------------------------------------------------- */
/* phones: a 2-col grid of six tiles (the two hero tiles run full width), the other shelves as pills below;
   tablet: 4-col mosaic; desktop: 6-col mosaic */
.home-tiles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-flow: row;
  gap: 12px;
}
.home-cat { aspect-ratio: 1 / 1; }
.home-cat--hero { grid-column: span 2; aspect-ratio: 2 / 1; }
@media (max-width: 639.98px) {
  .home-cat:not(.is-m) { display: none; }
  .home-cat.is-m { order: var(--m, 0); }
  .home-cat__body { padding: 6px 12px 12px; }
  .home-cat__img { height: 84%; bottom: 8px; }
  .home-cats__more ul { gap: 6px; }
  .home-cats__more a { min-height: 36px; padding: 0 12px; font-size: 13px; gap: 6px; }
}
.home-cats__mob { display: list-item; }
@media (min-width: 640px) { .home-cats__mob { display: none; } }
.home-cats__more a.home-cats__all { border-color: var(--fn-ink); background: var(--fn-ink); color: #fff; }

.home-cat {
  position: relative; isolation: isolate;
  display: flex; flex-direction: column;
  min-width: 0; min-height: 0; overflow: hidden;
  border-radius: 14px;
  background: var(--fn-warm); color: var(--fn-ink);
  transition: box-shadow var(--t) var(--ease), transform var(--t) var(--ease);
}
.home-cat::before { /* warm glow behind the product on hover */
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0;
  background: radial-gradient(60% 50% at 50% 48%, rgba(247, 123, 1, .2), transparent 70%);
  transition: opacity var(--t-slow) var(--ease);
}
.home-cat::after { /* orange underline on hover / focus */
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; z-index: 3;
  background: var(--fn-orange); transform: scaleX(0); transform-origin: left; transition: transform var(--t-slow) var(--ease);
}
.home-cat:hover::before, .home-cat:focus-visible::before { opacity: 1; }
.home-cat:hover::after, .home-cat:focus-visible::after { transform: scaleX(1); }
.home-cat:focus-visible { outline: 3px solid var(--fn-orange); outline-offset: 3px; box-shadow: none; }
@media (hover: hover) and (pointer: fine) { .home-cat:hover { box-shadow: var(--sh-hover); transform: translateY(-2px); } }

/* the media box clips: an image can never spill over the label */
.home-cat__media { position: relative; flex: 1 1 auto; min-height: 0; overflow: hidden; }
/* small tiles: one packshot each, same height, bottom-aligned on a common baseline 12px above the label */
.home-cat__img {
  position: absolute; left: 12%; bottom: 12px;
  width: 76%; height: 72%;
  object-fit: contain; object-position: 50% 100%;
  mix-blend-mode: multiply;
  transition: transform var(--t-slow) var(--ease);
}
.home-cat:hover .home-cat__img { transform: translateY(-4px) scale(1.04); }

.home-cat__cluster {
  position: absolute; inset: 8% 4% 0;
  display: flex; align-items: flex-end; justify-content: center;
}
.home-cat__pimg {
  display: block; min-width: 0; flex: none;
  height: 66%; width: auto; max-width: 36%; aspect-ratio: 1 / 1;
  object-fit: contain; object-position: 50% 100%;
  mix-blend-mode: multiply;
  transition: transform var(--t-slow) var(--ease);
}
.home-cat__pimg--1 { height: 88%; max-width: 48%; margin-inline: -5%; position: relative; z-index: 1; }
.home-cat:hover .home-cat__pimg--1 { transform: translateY(-6px); }
.home-cat:hover .home-cat__pimg--0 { transform: translateX(-4px) rotate(-3deg); }
.home-cat:hover .home-cat__pimg--2 { transform: translateX(4px) rotate(3deg); }

.home-cat__body {
  position: relative; z-index: 2; flex: none;
  display: flex; align-items: flex-end; justify-content: space-between; gap: 8px;
  padding: 8px 12px 12px;
}
.home-cat__text { min-width: 0; }
.home-cat__name { display: block; font-size: 14px; font-weight: 700; line-height: 1.2; }
.home-cat__count { display: block; font-size: 12px; color: var(--fn-meta); margin-top: 2px; }
.home-cat__go {
  flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%;
  background: var(--fn-orange); color: var(--fn-ink);
  opacity: 0; transform: translateX(-4px);
  transition: opacity var(--t) var(--ease), transform var(--t) var(--ease);
}
.home-cat__go svg { width: 16px; height: 16px; }
.home-cat:hover .home-cat__go, .home-cat:focus-visible .home-cat__go { opacity: 1; transform: none; }

.home-cat--hero { background: radial-gradient(90% 70% at 50% 100%, rgba(247, 123, 1, .16), transparent 70%), var(--fn-warm); }
.home-cat--hero .home-cat__name { font-size: 20px; letter-spacing: -.015em; }
.home-cat--hero .home-cat__name::after { content: "."; color: var(--fn-orange); }
.home-cat--hero .home-cat__go { opacity: 1; transform: none; background: var(--fn-ink); color: #fff; }
.home-cat--hero:hover .home-cat__go { background: var(--fn-orange); color: var(--fn-ink); }

.home-cats__more { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-top: 16px; }
.home-cats__more ul { display: flex; flex-wrap: wrap; gap: 8px; }
.home-cats__more-label { font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--fn-meta); }
.home-cats__more a {
  position: relative;
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px;
  border-radius: var(--r-pill); border: 1.5px solid var(--fn-line-2, #dcdcdc); background: #fff;
  font-size: 14px; font-weight: 700; color: var(--fn-ink);
  transition: border-color var(--t) var(--ease), background-color var(--t) var(--ease);
}
.home-cats__more a:hover { border-color: var(--fn-ink); }
.home-cats__n { font-size: 12px; font-weight: 700; color: var(--fn-meta); }

@media (min-width: 640px) {
  .home-tiles {
    grid-auto-flow: row dense;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
  }
  .home-cat--hero { aspect-ratio: auto; grid-column: span 2; grid-row: span 2; }
  .home-cat--protein { grid-column: 1 / 3; grid-row: 1 / 3; }
  .home-cat--health-wellness { grid-column: 3 / 5; grid-row: 3 / 5; }
  /* the last two tiles fill row five as wide tiles, so the grid ends flush */
  .home-cat:nth-last-child(-n+2) { grid-column: span 2; aspect-ratio: 2 / 1; }
  .home-cat--hero .home-cat__name { font-size: 26px; }
  .home-cat--hero .home-cat__body { padding: 14px 18px 18px; }
  .home-cats__more { margin-top: 20px; }
}
@media (min-width: 1024px) {
  .home-tiles { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 20px; }
  .home-cat, .home-cat:nth-last-child(-n+2) { grid-column: auto; aspect-ratio: 1 / 1; }
  .home-cat--hero { aspect-ratio: auto; }
  .home-cat--protein { grid-column: 1 / 3; grid-row: 1 / 3; }
  .home-cat--health-wellness { grid-column: 5 / 7; grid-row: 1 / 3; }
  .home-cat__name { font-size: 15px; }
  .home-cat__body { padding: 10px 16px 16px; }
  .home-cat--hero .home-cat__name { font-size: clamp(26px, 1.2vw + 12px, 32px); }
  .home-cat--hero .home-cat__count { font-size: 14px; }
  .home-cat--hero .home-cat__body { padding: 18px 22px 22px; }
  .home-cat--hero .home-cat__go { width: 40px; height: 40px; }
}

/* 04 Best sellers (one row of six on desktop, a swipe rail below) --------- */
.home-best .fn-sechead__sub { max-width: 70ch; }
.home-best__tools { display: flex; align-items: center; gap: 20px; flex: none; }
.home-best__tools .fn-arrow-link { margin-bottom: 0; }
.home-railnav { display: none; gap: 8px; }
.home-railnav__btn {
  width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center;
  border: 1.5px solid var(--fn-ink); background: #fff; color: var(--fn-ink);
  transition: background-color var(--t) var(--ease), color var(--t) var(--ease), opacity var(--t) var(--ease);
}
.home-railnav__btn svg { width: 20px; height: 20px; }
.home-railnav__btn:hover:not(:disabled) { background: var(--fn-ink); color: #fff; }
.home-railnav__btn:disabled { opacity: .3; cursor: default; }
@media (min-width: 768px) and (max-width: 1199.98px) { .home-railnav { display: flex; } }
/* phones: about 15% of the third card peeks in, so the rail reads as swipeable */
@media (max-width: 767.98px) {
  .home-best__rail, .home-shelves__rail { grid-auto-columns: minmax(150px, 42%); }
}
@media (min-width: 1200px) {
  .home-best__rail { grid-auto-flow: row; grid-template-columns: repeat(6, minmax(0, 1fr)); overflow: visible; margin: 0; padding: 0; }
}

/* white sections that follow a warm or dark one keep their top padding */
.fnd-home .fn-section.home-goals.home-goals,
.fnd-home .fn-section.home-shelves.home-shelves { padding-top: var(--fn-section-y); } /* beats the shared "section + section" reset */

/* 05 Goals --------------------------------------------------------------- */
.home-goals__list {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(236px, 72%);
  gap: var(--fn-gap);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--fn-gutter);
  margin-inline: calc(var(--fn-gutter) * -1);
  padding: 4px var(--fn-gutter) 12px;
  scrollbar-width: none;
}
.home-goals__list::-webkit-scrollbar { display: none; }
.home-goals__list > * { scroll-snap-align: start; }
@media (min-width: 640px) { .home-goals__list { grid-auto-columns: minmax(240px, 44%); } }
@media (min-width: 1024px) {
  .home-goals__list { grid-auto-flow: row; grid-template-columns: repeat(5, minmax(0, 1fr)); overflow: visible; margin: 0; padding: 0; }
}

.home-goal {
  position: relative;
  display: flex; flex-direction: column;
  background: #fff;
  border: 1px solid var(--fn-line);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: box-shadow var(--t) var(--ease), transform var(--t) var(--ease), border-color var(--t) var(--ease);
}
@media (hover: hover) and (pointer: fine) {
  .home-goal:hover { box-shadow: var(--sh-hover); transform: translateY(-2px); border-color: transparent; }
}
.home-goal:focus-within { border-color: var(--fn-ink); }
.home-goal__well {
  position: relative;
  aspect-ratio: 4 / 3;
  background: radial-gradient(90% 80% at 50% 100%, rgba(247, 123, 1, .16), transparent 70%), var(--fn-warm);
  isolation: isolate;
  display: flex; align-items: flex-end; justify-content: center;
  /* side padding + top room for the icon chip: no packshot is ever clipped by the well */
  padding: 64px 8% 6%;
  overflow: hidden;
}
.home-goal__img {
  display: block; min-width: 0;
  width: 32%; height: auto; aspect-ratio: 1 / 1;
  object-fit: contain;
  mix-blend-mode: multiply;
  transition: opacity 250ms var(--ease), transform var(--t-slow) var(--ease);
}
.home-goal__img--1 { width: 44%; margin-inline: -5%; position: relative; z-index: 1; }
.home-goal__img { scale: 1.1; transform-origin: 50% 90%; }
.home-goal__img.is-3d { mix-blend-mode: normal; scale: 1.2; }
.home-goal__img.is-fading { opacity: 0; }
.home-goal:hover .home-goal__img--1 { transform: translateY(-6px) scale(1.04); }
.home-goal:hover .home-goal__img--0 { transform: translateX(-4px) rotate(-3deg); }
.home-goal:hover .home-goal__img--2 { transform: translateX(4px) rotate(3deg); }
.home-goal__icon {
  position: absolute; top: 12px; left: 12px; z-index: 2;
  width: 40px; height: 40px; border-radius: 12px;
  display: grid; place-items: center;
  background: var(--fn-black); color: var(--fn-orange);
}
.home-goal__icon svg { width: 22px; height: 22px; }
.home-goal__body { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px 16px; flex: 1; }
.home-goal__title { font-size: 19px; line-height: 1.15; }
.home-goal__link { color: var(--fn-ink); }
.home-goal__link::after { content: ""; position: absolute; inset: 0; z-index: 3; border-radius: inherit; }
.home-goal__link:focus-visible { outline: none; box-shadow: none; }
.home-goal__link:focus-visible::after { outline: 2px solid var(--fn-ink); outline-offset: -2px; box-shadow: inset 0 0 0 6px var(--fn-orange-glow); }
.home-goal__count { font-size: 13px; color: var(--fn-meta); }
/* chips stay on one row in every card, so the row of cards ends on one line */
.home-goal__cats { display: flex; flex-wrap: nowrap; gap: 6px; margin-top: 10px; min-width: 0; }
.home-goal__cats li { min-width: 0; flex: 0 1 auto; }
.home-goal__cats a {
  position: relative; z-index: 4;
  display: inline-flex; align-items: center; min-height: 32px; padding: 0 10px; max-width: 100%;
  border-radius: var(--r-pill); background: var(--fn-warm-2);
  font-size: 12.5px; font-weight: 700; color: var(--fn-ink); white-space: nowrap;
  transition: background-color var(--t) var(--ease), color var(--t) var(--ease);
}
.home-goal__cats a:hover { background: var(--fn-orange); }
@media (min-width: 1024px) {
  .home-goal__body { gap: 6px; padding: 16px 16px 18px; }
  .home-goal__title { font-size: 20px; }
  .home-goal__cats { margin-top: auto; padding-top: 8px; } /* chips line up across the row */
}
@media (min-width: 1024px) and (max-width: 1279.98px) {
  .home-goal__body { padding-inline: 12px; }
  .home-goal__cats { gap: 4px; }
  .home-goal__cats a { padding: 0 8px; font-size: 11.5px; }
}

/* 06 Consultation -------------------------------------------------------- */
.home-consult { position: relative; overflow: hidden; isolation: isolate; }
.home-consult::before {
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  width: 900px; height: 900px; left: -300px; top: -200px;
  background: radial-gradient(closest-side, rgba(247, 123, 1, .22), transparent);
}
.home-consult__grid { display: grid; gap: 32px; align-items: center; }
.home-consult__media {
  position: relative; margin: 0;
  border-radius: 20px; overflow: hidden;
  aspect-ratio: 4 / 5; max-height: 560px;
  background: #0b0b0b;
  box-shadow: 0 40px 80px -40px rgba(0, 0, 0, .9), 0 0 0 1px rgba(255, 255, 255, .06);
}
.home-consult__media img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; }
.home-consult__media::after { /* orange edge light */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, transparent 55%, rgba(0, 0, 0, .78) 100%),
              linear-gradient(90deg, rgba(247, 123, 1, .16), transparent 30%);
}
.home-consult__cap {
  position: absolute; left: 16px; right: 16px; bottom: 16px; z-index: 1;
  display: grid; gap: 2px;
  font-size: 13px; color: var(--fn-on-dark); line-height: 1.4;
}
.home-consult__cap strong { font-size: 18px; color: #fff; }
.home-consult__title { font-size: clamp(30px, 2.6vw + 16px, 52px); line-height: 1.04; letter-spacing: -.02em; margin-top: 12px; }
.home-consult__lead { margin-top: 18px; font-size: clamp(16px, .4vw + 14px, 19px); line-height: 1.55; color: #e6e6e6; max-width: 58ch; }
.home-consult__text { margin-top: 12px; font-size: 15px; line-height: 1.65; color: var(--fn-on-dark-2); max-width: 60ch; font-family: var(--fn-font-text); }
.home-consult__facts {
  display: grid; grid-template-columns: 1fr; gap: 1px;
  margin: 28px 0 0;
  border-radius: var(--r-lg); overflow: hidden;
  background: var(--fn-dark-line);
  border: 1px solid var(--fn-dark-line);
}
.home-consult__fact { background: #141414; padding: 16px 18px; display: flex; flex-direction: column-reverse; justify-content: flex-start; gap: 4px; }
.home-consult__fact dt { font-size: 13px; line-height: 1.35; color: var(--fn-on-dark-2); }
.home-consult__fact dd { margin: 0; font-size: 20px; line-height: 1.2; font-weight: 700; color: #fff; letter-spacing: -.01em; }
.home-consult__note strong { color: #fff; font-weight: 700; }
.home-consult__fact:first-child dd { color: var(--fn-orange); }
.home-consult__ctas { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; margin-top: 28px; }
.home-consult__note { font-size: 13px; color: var(--fn-on-dark-2); max-width: 52ch; }
@media (max-width: 899.98px) { .home-consult__media { aspect-ratio: 1 / 1; } }
/* phones: a shorter photo, the lead paragraph only, the three facts side by side */
@media (max-width: 639.98px) {
  .home-consult__grid { gap: 24px; }
  .home-consult__media { aspect-ratio: 4 / 3; }
  .home-consult__media img { object-position: 50% 15%; }
  .home-consult__text { display: none; }
  .home-consult__facts { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 22px; }
  .home-consult__fact { padding: 12px 10px; }
  .home-consult__fact dt { font-size: 11.5px; }
  .home-consult__fact dd { font-size: 16px; }
  .home-consult__ctas { margin-top: 22px; }
}
/* small phones: two columns, the price range on its own full-width first row (a lone second fact also runs full width) */
@media (max-width: 559.98px) {
  .home-consult__facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-consult__fact { padding: 12px 14px; }
  .home-consult__fact:first-child,
  .home-consult__fact:nth-child(2):last-child { grid-column: 1 / -1; }
  .home-consult__fact:first-child dd { font-size: 20px; }
  .home-consult__fact dt { font-size: 12.5px; }
  /* the full-width price row reads label left, price right: one line instead of two (keeps the mock's density) */
  .home-consult__fact:first-child { flex-direction: row; align-items: baseline; justify-content: space-between; gap: 12px; }
  .home-consult__fact:first-child dd { text-align: right; }
  .home-consult__title { margin-top: 10px; }
  .home-consult__lead { margin-top: 14px; }
  .home-consult__facts { margin-top: 18px; }
  .home-consult__ctas { margin-top: 18px; gap: 12px; }
}
@media (min-width: 640px) {
  .home-consult__facts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 900px) {
  .home-consult__grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 64px; }
  .home-consult__media { max-height: none; }
  .home-consult__cap { left: 24px; bottom: 22px; }
  .home-consult__ctas { flex-direction: row; align-items: center; gap: 24px; }
}
@media (min-width: 1200px) { .home-consult__grid { gap: 88px; } }

/* 07 Shelves (tabs; editorial mosaic on desktop) ------------------------- */
.home-shelves__head { margin-bottom: var(--s-4); }
.home-tabs {
  display: flex; gap: 8px;
  overflow-x: auto; scrollbar-width: none;
  margin: 0 calc(var(--fn-gutter) * -1) var(--s-5);
  padding: 2px var(--fn-gutter) 6px;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 var(--fn-gutter), #000 calc(100% - 24px), transparent);
          mask-image: linear-gradient(90deg, transparent 0, #000 var(--fn-gutter), #000 calc(100% - 24px), transparent);
}
.home-tabs::-webkit-scrollbar { display: none; }
.home-tab {
  position: relative; /* keeps the screen-reader-only count inside the scrolling tab row */
  flex: none;
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px; padding: 0 18px;
  border-radius: var(--r-pill);
  border: 1.5px solid var(--fn-line-2);
  background: #fff; color: var(--fn-ink);
  font-size: 14px; font-weight: 700;
  transition: background-color var(--t) var(--ease), border-color var(--t) var(--ease), color var(--t) var(--ease);
}
.home-tab:hover { border-color: var(--fn-ink); }
.home-tab[aria-selected="true"] { background: var(--fn-ink); border-color: var(--fn-ink); color: #fff; }
.home-tab__n { font-size: 12px; font-weight: 700; color: var(--fn-meta); }
.home-tab[aria-selected="true"] .home-tab__n { color: var(--fn-orange); }
.home-shelves__panel { border-radius: var(--r-md); }
.home-shelves__panel:focus-visible { outline-offset: 6px; }
.home-shelves__rail { min-height: 320px; }
@media (min-width: 1024px) { .home-tabs { margin-inline: 0; padding-inline: 0; -webkit-mask-image: none; mask-image: none; flex-wrap: wrap; } }
@media (min-width: 1200px) {
  .home-shelves__rail {
    grid-auto-flow: row dense; grid-template-columns: repeat(5, minmax(0, 1fr));
    overflow: visible; margin: 0; padding: 0;
  }
  .home-shelves__rail > :first-child { grid-column: span 2; grid-row: span 2; padding: 20px; }
  .home-shelves__rail > :first-child .fn-card__media { aspect-ratio: auto; flex: 1 1 auto; min-height: 280px; }
  .home-shelves__rail > :first-child .fn-card__imgwrap { inset: 8% 12%; }
  .home-shelves__rail > :first-child .fn-card__body { flex: none; padding-top: 16px; }
  .home-shelves__rail > :first-child .fn-card__title { font-size: 22px; line-height: 1.2; min-height: 0; }
  .home-shelves__rail > :first-child .fn-card__foot { flex-direction: row; align-items: center; justify-content: space-between; gap: 16px; }
  .home-shelves__rail > :first-child .fn-card__price { font-size: 24px; }
  .home-shelves__rail > :first-child .fn-card__cta { width: auto; padding: 0 24px; }
  .home-shelves__rail > :nth-child(n+8) { display: none; }
}

/* 08 Store --------------------------------------------------------------- */
.home-store__grid { display: grid; gap: 24px; }
.home-store__title { font-size: clamp(22px, .8vw + 14px, 28px); line-height: 1.18; margin-top: 10px; max-width: 24ch; }
.home-store__cards { display: grid; gap: 12px; align-items: stretch; }
.home-store__card {
  position: relative;
  display: flex; flex-direction: column; gap: 10px;
  background: #fff; border-radius: var(--r-lg);
  padding: 22px 20px;
  border: 1px solid var(--fn-line);
}
.home-store__icon {
  width: 44px; height: 44px; border-radius: 12px;
  display: grid; place-items: center;
  background: var(--fn-black); color: var(--fn-orange); /* matches the goal-card icon chips */
}
.home-store__icon svg { width: 22px; height: 22px; }
.home-store__card h3 { font-size: 18px; margin-top: 6px; }
.home-store__card p, .home-store__card li { font-size: 15px; line-height: 1.5; color: var(--fn-ink-2); }
.home-store__hours { display: grid; gap: 2px; }
.home-store__hours li { display: flex; justify-content: space-between; gap: 12px; }
.home-store__hours li span:last-child { color: var(--fn-ink); font-weight: 700; }
.home-store__card a:not(.fn-arrow-link) { color: var(--fn-ink); font-weight: 700; text-decoration: underline; text-decoration-color: var(--fn-orange); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.home-store__card a:not(.fn-arrow-link):hover { text-decoration-color: var(--fn-ink); }
.home-store__card .fn-arrow-link { margin-top: auto; padding-top: 6px; }
.home-store__links { line-height: 1.9 !important; }
.home-store__card .home-store__status {
  display: grid; grid-template-columns: auto 1fr; align-items: center; column-gap: 10px;
  padding: 8px 12px; border-radius: 10px; background: var(--fn-warm);
  font-size: 13px; font-weight: 700; line-height: 1.35; color: var(--fn-ink);
}
.home-store__card .home-store__status[hidden] { display: none; }
.home-store__status::before { content: ""; grid-row: span 2; width: 9px; height: 9px; border-radius: 50%; background: var(--fn-meta); }
.home-store__status.is-open::before { background: var(--fn-success); box-shadow: 0 0 0 4px rgba(26, 127, 55, .15); }
.home-store__card .home-store__status small { grid-column: 2; font-weight: 400; color: var(--fn-meta); font-size: 12px; }
@media (max-width: 767.98px) { /* a compact stacked list: icon beside the text, each card only as tall as its content */
  .home-store__cards { align-items: start; gap: 10px; }
  .home-store__card {
    display: grid; grid-template-columns: 40px minmax(0, 1fr); column-gap: 14px; row-gap: 6px;
    padding: 16px;
  }
  .home-store__card > * { grid-column: 2; }
  .home-store__card > .home-store__icon { grid-column: 1; grid-row: 1 / span 2; width: 40px; height: 40px; border-radius: 11px; }
  .home-store__card h3 { margin-top: 0; font-size: 17px; align-self: center; }
  .home-store__card .fn-arrow-link { padding-top: 2px; }
  .home-store__more { display: none; } /* "costs are shown at checkout": the checkout says so; phones keep the mock's short card */
}
@media (min-width: 768px) { .home-store__cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1100px) {
  .home-store__grid { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 56px; align-items: center; }
  .home-store__card { padding: 26px 24px; }
}

/* 09 Shared pieces, tuned for this page ----------------------------------- */
/* one card button style in every rail: outline at rest, solid on hover */
/* card buttons: one shared style in css/fn.css. The orange consultation band is off by default (fn.js),
   and the footer keeps the single email sign-up */
/* anchors and scrollIntoView: section headings land below the sticky bar (fn.css --fn-sticky-top includes the admin
   bar when it is shown); a title also leaves room for the eyebrow above it */
.fnd-home section[aria-labelledby] { scroll-margin-top: calc(var(--fn-sticky-top, 72px) + 8px); }
.fnd-home .fn-sechead__title, .fnd-home [id$="-title"] { scroll-margin-top: calc(var(--fn-sticky-top, 72px) + 40px); }
/* section titles step down evenly from the hero (56) and consultation (52) titles */
.fnd-home .fn-sechead__title { font-size: clamp(26px, 1.6vw + 16px, 42px); letter-spacing: -.02em; }
/* card titles: no break inside hyphenated words (home.js wraps them in .home-nw) */
.fnd-home .fn-card__title { hyphens: manual; overflow-wrap: normal; }

/* the hero thumbs use the 300px catalog thumb (same photo) */
.home-hero__thumb img { display: block; }
/* before home.js fills the hero, the server copy ("Shop all products") sits in the name box */
.home-hero__name a { overflow-wrap: anywhere; }

/* 10 Email sign-up / contact card ------------------------------------------
   The mock keeps its sign-up inside the black footer, so this is a quiet dark card on the footer's black (orange only
   on the eyebrow and the main button), not a loud full-width orange band. The footer's top padding steps down on this
   page so the card and the footer read as one block. A real form renders here only when one is configured. */
.home-news { background: var(--fn-black); color: var(--fn-on-dark); padding-top: 32px; --fn-focus-c: var(--fn-orange); }
.home-news__inner {
  display: flex; flex-direction: column; gap: 16px;
  position: relative; isolation: isolate; overflow: hidden;
  padding: 20px; border-radius: var(--r-lg);
  background: #141414; border: 1px solid var(--fn-dark-line);
}
.home-news__inner::before { /* soft orange edge light, like the consultation photo */
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(60% 120% at 0% 50%, rgba(247, 123, 1, .14), transparent 70%);
}
.home-news .home-news__eyebrow { color: var(--fn-orange); }
.home-news__title { color: #fff; font-size: clamp(20px, .8vw + 15px, 26px); line-height: 1.15; letter-spacing: -.015em; margin-top: 6px; }
.home-news__text { margin-top: 4px; font-size: 14px; line-height: 1.5; max-width: 52ch; color: var(--fn-on-dark-2); }
.home-news__ctas { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.home-news__ctas .fn-btn { min-height: 48px; padding: 0 12px; white-space: nowrap; }
.home-news__ctas .fn-btn svg { width: 18px; height: 18px; flex: none; }
.home-news__form { min-width: 0; }
.home-news__form input[type="email"], .home-news__form input[type="text"] { max-width: 100%; }
body.fnd-surface-home .fn-footer__main { padding-top: 40px; }
@media (max-width: 479.98px) { /* the phone number does not fit beside "Contact us": one button per row */
  .home-news__ctas { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .home-news__text { display: none; } /* the two buttons already say it */
  .home-news__inner { gap: 14px; padding: 18px; }
}
@media (min-width: 768px) {
  .home-news { padding-top: 40px; }
  .home-news__inner { flex-direction: row; align-items: center; justify-content: space-between; gap: 32px; padding: 24px 28px; }
  .home-news__ctas { display: flex; flex: none; gap: 12px; }
  .home-news__ctas .fn-btn { padding: 0 22px; }
  .home-news--form .home-news__form { flex: 0 1 480px; }
}
@media (min-width: 1024px) {
  .home-news { padding-top: 48px; }
  .home-news__inner { padding: 26px 32px; }
  body.fnd-surface-home .fn-footer__main { padding-top: 56px; }
}

/* Footer brand column (shared footer, fixed here for this page until fn.css has it): the brand block is a grid whose
   rows stretched to the height of the link columns at desktop, spreading the logo, tagline and about text apart.
   Rows pack to the top, so the stack keeps the mock's 16px rhythm. */
body.fnd-surface-home .fn-footer__brand { align-content: start; }

/* Motion ----------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .fn-js .home-hero [data-intro], .fn-js .home-hero.is-painted [data-intro] { opacity: 1; animation: none; }
  .home-hero__swap > *, .home-hero__price, .home-goal, .home-goal__img, .home-cat, .home-cat__img, .home-cat__pimg { transition: none; }
  .home-hero__swap.is-out > *, .home-hero__meta.is-out .home-hero__price { opacity: 1; transform: none; }
  .home-hero__stage .fn3d-poster { transition: none; }
}
