/* ============================================================
   HealthCompass — Homepage showcase (Phase D3)
   ------------------------------------------------------------
   WHY THIS IS THE FOURTH ATTEMPT (read before "improving" it)
     v2.1.0 sized tiles by data volume -> big boxes with nothing in them.
     v2.2.0 added a constellation      -> a diagram ABOUT the content,
                                          plus a caption explaining it.
     Both made the same mistake: encoding INFORMATION ABOUT the content
     instead of SHOWING the content. Mike, correctly: "wasted space for
     some colored dots that do nothing."

   THE RULE NOW
     The content IS the show. Real food names, real supplement names,
     real markers, real goals — on the card, before any click. This page
     is a trailer for a long read: it has to make you want the read.
     If an element explains the site rather than showing it, cut it.

   MOTION
     Cards ARRIVE on scroll: rise, unblur, settle, staggered. Pure CSS
     scroll-driven animation (animation-timeline: view()) — zero JS,
     compositor-threaded. Authored VISIBLE BY DEFAULT; motion layered
     only inside @supports + prefers-reduced-motion, so an unsupported
     browser shows a correct static page, never empty boxes.
   ============================================================ */

.hcb-sec {
  padding: 5rem 1.5rem 4.5rem;
  background:
    radial-gradient(120% 80% at 15% 0%, rgba(0,180,162,.10), transparent 55%),
    radial-gradient(90% 70% at 90% 30%, rgba(255,107,53,.06), transparent 55%),
    var(--hc-ink-900);
}
.hcb-in { max-width: 1180px; margin: 0 auto; }

/* ---- header ---- */
.hcb-hd { margin-bottom: 2.6rem; max-width: 680px; }
.hcb-eye {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-size: .68rem; font-weight: 600;
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--hc-teal-light);
  margin: 0 0 .6rem;
}
.hcb-tl {
  font-family: 'Fraunces', Georgia, serif;
  font-size: clamp(2.1rem, 5vw, 3.4rem);
  font-weight: 700; line-height: 1.05;
  color: #fff; margin: 0 0 .8rem;
  letter-spacing: -.025em;
}
.hcb-ds {
  font-size: 1.02rem; line-height: 1.65;
  color: rgba(255,255,255,.6); margin: 0;
}

/* ---- the grid ---- */
.hcb-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0,1fr));
  gap: 16px;
}
.hcb-t.is-hero { grid-column: span 7; grid-row: span 2; }
.hcb-t.is-tall { grid-column: span 5; grid-row: span 2; }
.hcb-t.is-wide { grid-column: span 4; }
.hcb-t.is-std  { grid-column: span 4; }

/* ---- the card ---- */
.hcb-t {
  position: relative;
  display: flex; flex-direction: column;
  min-height: 190px;
  padding: 1.5rem 1.55rem;
  border-radius: 20px;
  text-decoration: none;
  overflow: hidden;
  isolation: isolate;
  background: linear-gradient(155deg, rgba(255,255,255,.07), rgba(255,255,255,.022));
  border: 1px solid rgba(255,255,255,.11);
  box-shadow: 0 1px 0 rgba(255,255,255,.05) inset, 0 18px 40px -24px rgba(0,0,0,.9);
  transition: transform .34s cubic-bezier(.16,1,.3,1),
              border-color .34s ease, box-shadow .34s ease;
}
.hcb-t.is-hero { min-height: 400px; padding: 2rem 2.1rem; }
.hcb-t.is-tall { min-height: 400px; }

/* the guide's own colour, as atmosphere */
.hcb-t::before {
  content: '';
  position: absolute; inset: 0; z-index: -2;
  background: radial-gradient(130% 100% at 85% 0%, var(--tint), transparent 60%);
  opacity: .75;
  transition: opacity .34s ease;
}

/* the light sweep — travels across on hover */
.hcb-t::after {
  content: '';
  position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(105deg, transparent 30%,
              rgba(255,255,255,.09) 48%, transparent 62%);
  transform: translateX(-120%);
  transition: transform .8s cubic-bezier(.16,1,.3,1);
}
.hcb-t:hover::after { transform: translateX(120%); }

.hcb-t:hover {
  transform: translateY(-6px);
  border-color: var(--edge);
  box-shadow: 0 1px 0 rgba(255,255,255,.08) inset,
              0 28px 60px -26px rgba(0,0,0,.95),
              0 0 0 1px var(--edge);
}
.hcb-t:hover::before { opacity: 1; }
.hcb-t:focus-visible { outline: 2px solid var(--hc-teal-light); outline-offset: 3px; }

/* ---- card content ---- */
.hcb-top { display: flex; align-items: center; gap: .6rem; margin-bottom: 1rem; }
.hcb-ic { font-size: 1.5rem; line-height: 1; }
.hcb-t.is-hero .hcb-ic { font-size: 2.4rem; }
.hcb-k {
  font-family: 'Space Grotesk','Inter',sans-serif;
  font-size: .58rem; font-weight: 700;
  letter-spacing: .15em; text-transform: uppercase;
  color: var(--edge);
}

.hcb-nm {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.35rem; font-weight: 700;
  color: #fff; line-height: 1.15;
  margin: 0 0 .5rem; letter-spacing: -.015em;
}
.hcb-t.is-hero .hcb-nm { font-size: 2.6rem; margin-bottom: .7rem; }
.hcb-t.is-tall .hcb-nm { font-size: 1.7rem; }

.hcb-de {
  font-size: .86rem; line-height: 1.6;
  color: rgba(255,255,255,.66); margin: 0;
}
.hcb-t.is-hero .hcb-de { font-size: 1.05rem; max-width: 30rem; line-height: 1.65; }

/* ---- THE POINT: real content, shown not encoded ---- */
.hcb-peek { display: flex; flex-wrap: wrap; gap: .4rem; margin: 1.1rem 0 0; }
.hcb-chip {
  display: inline-flex; align-items: center;
  padding: .34rem .68rem;
  border-radius: 50px;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.1);
  font-size: .72rem; font-weight: 500;
  color: rgba(255,255,255,.82);
  white-space: nowrap;
  transition: background .3s ease, border-color .3s ease, transform .3s ease;
}
.hcb-t.is-hero .hcb-chip { font-size: .82rem; padding: .42rem .85rem; }
.hcb-t:hover .hcb-chip {
  background: rgba(255,255,255,.11);
  border-color: rgba(255,255,255,.18);
}
/* chips lift in sequence on hover — the card feels alive */
.hcb-t:hover .hcb-chip:nth-child(1){ transform: translateY(-2px); transition-delay:0s }
.hcb-t:hover .hcb-chip:nth-child(2){ transform: translateY(-2px); transition-delay:.04s }
.hcb-t:hover .hcb-chip:nth-child(3){ transform: translateY(-2px); transition-delay:.08s }
.hcb-t:hover .hcb-chip:nth-child(4){ transform: translateY(-2px); transition-delay:.12s }
.hcb-t:hover .hcb-chip:nth-child(5){ transform: translateY(-2px); transition-delay:.16s }
.hcb-t:hover .hcb-chip:nth-child(6){ transform: translateY(-2px); transition-delay:.2s }

/* the big number — real, and it earns the space */
.hcb-count { margin-top: auto; padding-top: 1.2rem; display: flex; align-items: baseline; gap: .5rem; }
.hcb-n {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 2.2rem; font-weight: 700;
  line-height: 1; color: var(--edge);
  letter-spacing: -.03em;
}
.hcb-t.is-hero .hcb-n { font-size: 3.4rem; }
.hcb-nl {
  font-family: 'Space Grotesk','Inter',sans-serif;
  font-size: .7rem; font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase;
  color: rgba(255,255,255,.48);
}

.hcb-go {
  display: inline-flex; align-items: center; gap: .4rem;
  margin-top: 1rem;
  font-family: 'Space Grotesk','Inter',sans-serif;
  font-size: .78rem; font-weight: 600;
  color: var(--edge);
}
.hcb-go span { transition: transform .3s cubic-bezier(.16,1,.3,1); }
.hcb-t:hover .hcb-go span { transform: translateX(5px); }

/* ---- the quiet row ---- */
.hcb-more { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.8rem; }
.hcb-m {
  display: inline-flex; align-items: center; gap: .45rem;
  padding: .55rem .95rem; border-radius: 50px;
  background: rgba(255,255,255,.045);
  border: 1px solid rgba(255,255,255,.1);
  color: rgba(255,255,255,.74);
  font-size: .8rem; font-weight: 500; text-decoration: none;
  transition: all .2s ease;
}
.hcb-m:hover {
  background: rgba(0,180,162,.16);
  border-color: rgba(0,180,162,.5);
  color: #fff; transform: translateY(-2px);
}
.hcb-m:focus-visible { outline: 2px solid var(--hc-teal-light); outline-offset: 2px; }

/* ============================================================
   MOTION — the cards ARRIVE
   Default = visible. Motion only where supported AND wanted.
   ============================================================ */
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .hcb-t {
      animation: hcb-arrive linear both;
      animation-timeline: view();
      animation-range: entry 0% cover 34%;
    }
    .hcb-t:nth-child(2) { animation-range: entry 2%  cover 36%; }
    .hcb-t:nth-child(3) { animation-range: entry 4%  cover 38%; }
    .hcb-t:nth-child(4) { animation-range: entry 6%  cover 40%; }
    .hcb-t:nth-child(5) { animation-range: entry 8%  cover 42%; }
    .hcb-t:nth-child(6) { animation-range: entry 10% cover 44%; }
    .hcb-t:nth-child(7) { animation-range: entry 12% cover 46%; }
    .hcb-t:nth-child(8) { animation-range: entry 14% cover 48%; }

    .hcb-hd {
      animation: hcb-rise linear both;
      animation-timeline: view();
      animation-range: entry 0% cover 30%;
    }
  }
}

@keyframes hcb-arrive {
  from { opacity: 0; transform: translateY(46px) scale(.94); filter: blur(6px); }
  60%  { filter: blur(0); }
  to   { opacity: 1; transform: none; filter: blur(0); }
}
@keyframes hcb-rise {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: none; }
}

/* ============================================================
   RESPONSIVE — merge, don't stack into a hierarchy-free scroll
   ============================================================ */
@media (max-width: 900px) {
  .hcb-t.is-hero { grid-column: span 12; grid-row: span 1; min-height: 320px; }
  .hcb-t.is-tall { grid-column: span 12; min-height: 260px; }
  .hcb-t.is-wide, .hcb-t.is-std { grid-column: span 6; }
}
@media (max-width: 560px) {
  .hcb-sec { padding: 3.2rem 1.1rem 2.8rem; }
  .hcb-grid { gap: 12px; }
  .hcb-t { padding: 1.2rem 1.15rem; min-height: 170px; }
  .hcb-t.is-hero { min-height: 280px; padding: 1.5rem 1.35rem; }
  .hcb-t.is-hero .hcb-nm { font-size: 1.9rem; }
  .hcb-t.is-hero .hcb-de { font-size: .92rem; }
  .hcb-t.is-hero .hcb-n { font-size: 2.6rem; }
  .hcb-t.is-wide, .hcb-t.is-std { grid-column: span 12; min-height: 150px; }
  .hcb-n { font-size: 1.8rem; }
}

/* ---- the rescued compass ----
   Was a whole banner section saying what the Food First card now says
   better. The art was the only thing worth keeping, so it lives here as
   atmosphere: large, low-opacity, bleeding off the card's right edge.
   It also slowly turns — a compass that never moves is just a logo. */
.hcb-compass {
  position: absolute;
  right: -14%; top: 50%;
  width: 62%; max-width: 340px;
  transform: translateY(-50%);
  opacity: .17;
  z-index: -1;
  pointer-events: none;
  transition: opacity .5s ease, transform .8s cubic-bezier(.16,1,.3,1);
}
.hcb-compass svg { width: 100%; height: auto; display: block; }

.hcb-t:hover .hcb-compass {
  opacity: .3;
  transform: translateY(-50%) rotate(8deg);
}

@media (prefers-reduced-motion: no-preference) {
  .hcb-compass svg { animation: hcb-spin 90s linear infinite; }
}
@keyframes hcb-spin { to { transform: rotate(360deg); } }

@media (max-width: 560px) {
  .hcb-compass { right: -22%; width: 74%; opacity: .12; }
}
