/* ============================================================================
   WELLNESS HUB — shared component styles

   Used by /mens-wellness/ and, later, a parallel /womens-wellness/: nothing
   page-specific lives here, only the hub layout itself (hero variant, card
   grid, the shared closing section every card leads to), so a second hub
   reuses this file unchanged and only supplies its own categories array
   (see wellness-hub.js) and its own page shell. Site-wide chrome (tokens,
   reset, type, buttons,
   header, footer) stays in each page's own <style>, matching how index.html
   already does it: this file adds to that design language, it does not
   replace or duplicate it. Never hardcode a colour here that is not already
   one of the tokens defined in index.html's :root.
   ============================================================================ */

/* ---- hero variant: a text-only dark band, no photo, for a page with no
   photography yet. Reuses .band.dark exactly as the homepage's own Sign In
   section does; this only adds the tagline line beneath the h1. ---- */
.hub-tagline{font-family:var(--display);font-size:1.4rem;font-weight:400;color:#4FD98A;margin:14px 0 18px;max-width:46ch}

/* ---- category grid ---- */
.hub-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:32px}
/* The card is now the photo's own 16:10 box, full bleed: .hub-img (the real
   img, or the placeholder div for a hub with no photography yet) is
   absolutely positioned to fill it edge to edge, and .hub-body sits over the
   bottom of that same box as a gradient-backed overlay rather than a
   separate white panel beneath it. Same overall card size and grid as
   before, position:relative is the only thing that changed here. */
.hub-card{display:block;position:relative;aspect-ratio:16/10;background:var(--white);border:1px solid var(--rule-2);border-radius:2px;overflow:hidden;transition:.18s}
.hub-card:hover{border-color:var(--emerald);box-shadow:0 16px 36px rgba(10,23,48,.08);transform:translateY(-3px)}

/* The image placeholder. Deliberately plain and clearly a placeholder, not a
   design element of its own: swap the whole .hub-img div for an <img> once
   real photography exists, nothing else on the card needs to change. No
   position of its own here: the grid-card variant below makes it full
   bleed, but the article variant (.hub-article-media, further down) is a
   normal in-flow box beside the article text and needs this to stay out of
   its way. */
.hub-img{background:var(--paper-2);border-bottom:1px solid var(--rule-2);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;color:var(--mute)}
.hub-img svg{opacity:.55}
.hub-img span{font-family:var(--mono);font-size:.64rem;letter-spacing:.1em;text-transform:uppercase}
/* Once a real photo replaces the placeholder div with an <img class="hub-img">
   (see the comment above and public/mens-wellness/index.html), an img needs
   object-fit:cover too or it stretches to fill its box instead of cropping,
   the same treatment index.html's own .hero-media img already uses. */
img.hub-img{display:block;width:100%;height:100%;object-fit:cover;border-bottom:none}

/* Grid-card variant only: full bleed within the relatively positioned
   .hub-card above, sized to the card's own 16:10 box via inset:0 rather
   than an aspect-ratio on .hub-img itself, which the article variant
   (outside any .hub-card) still needs free for its own 4:3 ratio below. */
.hub-card .hub-img{position:absolute;inset:0}

/* The heading, description and Save star, overlaid on the bottom third of the
   photo instead of sitting in a white panel beneath it, so a visitor can
   still read what each card is without the image losing the full-bleed
   treatment. The gradient alone (not the placeholder's paper-2) carries
   enough contrast for white text even where there is no photo yet. */
.hub-body{position:absolute;left:0;right:0;bottom:0;z-index:1;padding:40px 20px 18px;
  background:linear-gradient(to top, rgba(10,23,48,.92) 0%, rgba(10,23,48,.82) 40%, rgba(10,23,48,0) 100%)}
.hub-body h3{font-size:1.18rem;margin-bottom:8px;color:#fff}
.hub-body p{font-size:.88rem;color:rgba(255,255,255,.82);min-height:2.6em}

/* The Save star, light on the dark gradient rather than the mute grey it was
   on a white panel; #4FD98A is the same bright emerald the site already uses
   for emphasis on a dark background (see .dark .eyebrow in index.html). */
.hub-save{position:relative;z-index:1;display:inline-flex;align-items:center;gap:6px;font-family:var(--mono);font-size:.64rem;letter-spacing:.08em;text-transform:uppercase;color:rgba(255,255,255,.75);padding:2px 0}
.hub-save:hover{color:#4FD98A}
.hub-save svg path{fill:none;transition:fill .14s}
.hub-save.on{color:#4FD98A}
.hub-save.on svg path{fill:currentColor}

/* ---- #hub-start: the closing section every card leads to ---- */
.hub-closing .sec-hd{margin-bottom:0}

/* ---- individual category sections: one per card, image placeholder beside
   the full article text. .alt on alternating sections for rhythm down the
   page, the same var(--paper-2) the rest of the site already uses to break
   up a run of white bands. A future hub with nothing behind its cards yet
   simply has none of these; the cards fall back to #hub-start above.

   Hidden by default and shown one at a time by wellness-hub.js's
   showArticleFromHash(), keyed to the URL hash: without this a reader
   sees all six laid end to end regardless of which card they clicked,
   because an anchor link only scrolls, it does not hide anything on its
   own. ---- */
.hub-article{display:none;padding:88px 0;border-top:1px solid var(--rule)}
.hub-article.is-open{display:block}
.hub-article.alt{background:var(--paper-2)}
.hub-article-in{display:grid;grid-template-columns:1fr 1.3fr;gap:56px;align-items:start}
.hub-article-media{aspect-ratio:4/3}
.hub-article-body .eyebrow{display:block;margin-bottom:14px}
.hub-article-body h2{font-size:clamp(1.6rem,2.6vw,2.1rem);margin-bottom:20px}
.hub-article-body p{color:var(--ink-2);margin-bottom:16px}
.hub-article-body p:last-of-type{margin-bottom:0}
.hub-article-body a{color:var(--emerald-deep);text-decoration:underline;text-underline-offset:2px}

@media(max-width:1000px){
  .hub-grid{grid-template-columns:repeat(2,1fr)}
}
@media(max-width:560px){
  .hub-grid{grid-template-columns:1fr}
}
@media(max-width:820px){
  .hub-article-in{grid-template-columns:1fr;gap:28px}
}
