/*
 * Homepage front sections: intro, live strip, in-season shelf, category shelves, atlas card.
 * Spacing, type steps, radii, shadows and ink use the Visual V1 tokens
 * (/assets/visual-v1-tokens.css). Fonts and page paper stay with home-almanac.css so the
 * About record and the rest of the page keep their look.
 */

.hf-intro { padding: var(--v-space-32) 0 var(--v-space-16); }
.hf-intro__inner { display: grid; gap: var(--v-space-16); }
.hf-intro__lede { margin: 0; max-width: 860px; font-size: var(--v-type-18); line-height: 1.55; color: var(--v-ink); }
.hf-intro__actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--v-space-12) var(--v-space-24); }
.hf-intro__links { margin: 0; font-size: var(--v-type-14); color: var(--v-muted); }
.hm-page .hf-intro__links a { color: inherit; }
.hm-page .hf-button {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 var(--v-space-24);
  border-radius: 999px; background: var(--v-accent-5); color: #fff; font-weight: 600;
  font-size: var(--v-type-16); text-decoration: none;
}
.hm-page .hf-button:hover, .hm-page .hf-button:focus-visible { background: var(--v-accent-4); color: #fff; }

.hf-section { padding: var(--v-space-32) 0; }
.hf-head {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between;
  gap: var(--v-space-8) var(--v-space-16); margin-bottom: var(--v-space-16);
}
.hf-head h2 { margin: 0; font-size: var(--v-type-28); line-height: 1.2; color: var(--v-ink); }
.hf-head__note { margin: 0; font-size: var(--v-type-14); color: var(--v-muted); }

.hf-kind {
  display: inline-block; align-self: flex-start; padding: 2px var(--v-space-8); border-radius: 999px;
  background: var(--v-accent-1); color: var(--v-accent-5); font-size: 12px; font-weight: 700;
  letter-spacing: .04em; text-transform: uppercase;
}

/* Live strip */
.hf-live__track {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--v-space-12); min-height: 148px;
}
.hf-live__card {
  display: flex; flex-direction: column; gap: var(--v-space-8); min-height: 148px;
  padding: var(--v-space-16); border-radius: var(--v-radius-card); background: var(--v-surface);
  box-shadow: var(--v-shadow-card); color: var(--v-ink); text-decoration: none;
}
.hf-live__card strong { font-size: var(--v-type-16); line-height: 1.3; }
.hf-live__card .hf-live__value { font-size: var(--v-type-22); font-weight: 700; line-height: 1.2; }
.hf-live__card span:not(.hf-kind):not(.hf-live__value) { font-size: var(--v-type-14); color: var(--v-muted); line-height: 1.4; }
.hf-live__card time { margin-top: auto; font-size: 12px; color: var(--v-muted); }
.hf-live__card:hover, .hf-live__card:focus-visible { box-shadow: var(--v-shadow-raised); }
.hf-live__card[hidden] { display: none; }
.hf-live__state { display: inline-flex; gap: 6px; align-items: center; font-size: var(--v-type-14); font-weight: 600; }
.hf-live__state::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--v-accent-4); }
.hf-live__state[data-tone="good"]::before { background: #2f7d4a; }
.hf-live__state[data-tone="caution"]::before { background: #b8740f; }
.hf-live__state[data-tone="alert"]::before { background: #b3261e; }

/* Shelves: grid on wide screens, swipe row on phones */
.hf-shelf__track {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: var(--v-space-16);
}
.hf-card {
  display: flex; flex-direction: column; gap: var(--v-space-8); padding: var(--v-space-16);
  border-radius: var(--v-radius-card); background: var(--v-surface); box-shadow: var(--v-shadow-card);
  color: var(--v-ink); text-decoration: none; overflow: hidden;
}
.hf-card[hidden] { display: none; }
.hf-card strong { font-size: var(--v-type-18); line-height: 1.3; }
.hf-card > span:not(.hf-kind) { font-size: var(--v-type-14); line-height: 1.45; color: var(--v-muted); }
.hf-card a { margin-top: auto; font-weight: 600; color: var(--v-accent-5); }
a.hf-card:hover, a.hf-card:focus-visible, .hf-card:focus-within { box-shadow: var(--v-shadow-raised); }
.hf-card--photo { padding-top: 0; }
.hf-card--photo img {
  display: block; width: calc(100% + 2 * var(--v-space-16)); max-width: none; height: auto;
  aspect-ratio: 16 / 10; object-fit: cover; margin: 0 calc(-1 * var(--v-space-16)) var(--v-space-8);
}
.hf-credit { margin-top: auto; font-size: 11px; color: var(--v-muted); }
.hf-card--more { justify-content: center; background: var(--v-surface-soft); box-shadow: none; }
.hf-card--more strong { color: var(--v-accent-5); }

.hf-shelf__controls { display: none; align-items: center; gap: var(--v-space-8); }
.hf-shelf__count { font-size: var(--v-type-14); color: var(--v-muted); min-width: 4.5em; text-align: right; }
.hf-shelf__btn {
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--v-accent-2);
  background: var(--v-surface); color: var(--v-accent-5); font-size: var(--v-type-18); cursor: pointer;
}
.hf-shelf__btn:disabled { opacity: .4; cursor: default; }

.winter-path[hidden] { display: none; }
#home-season .winter-path { margin-top: var(--v-space-24); }

/* Atlas card */
.hm-page .hf-atlas-card {
  display: grid; gap: var(--v-space-8); padding: var(--v-space-24); border-radius: var(--v-radius-card);
  background: var(--v-accent-5); color: #fff; text-decoration: none; box-shadow: var(--v-shadow-card);
}
.hf-atlas-card .hf-kind { background: rgba(255, 255, 255, .16); color: #fff; }
.hf-atlas-card strong { font-size: var(--v-type-22); }
.hf-atlas-card__go { font-weight: 600; }

/* Dossier links, moved from the old top ribbon into the About block */
.hf-dossier-nav { display: flex; flex-wrap: wrap; gap: var(--v-space-8) var(--v-space-16); margin: 0 0 var(--v-space-16); font-size: var(--v-type-14); }
.hf-dossier-nav span { font-weight: 700; }

@media (max-width: 760px) {
  .hf-intro { padding-top: var(--v-space-24); }
  .hf-head h2 { font-size: var(--v-type-22); }
  .hf-live__track, .hf-shelf__track {
    grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 78%;
    overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory;
    padding-bottom: var(--v-space-8); scrollbar-width: thin;
  }
  .hf-live__track { grid-auto-columns: 62%; }
  .hf-live__card, .hf-card { scroll-snap-align: start; }
  .hf-shelf__controls:not([hidden]) { display: flex; }
}

@media (prefers-reduced-motion: no-preference) {
  .hf-shelf__track, .hf-live__track { scroll-behavior: smooth; }
}

.hf-group-head { padding-top: var(--v-space-32); }
.hf-group-head h2 { margin: 0 0 var(--v-space-8); font-size: var(--v-type-28); color: var(--v-ink); }
.hf-group-head p { margin: 0; color: var(--v-muted); font-size: var(--v-type-16); }
.hf-head h3 { margin: 0; font-size: var(--v-type-22); line-height: 1.25; color: var(--v-ink); }

/* Whole-card links end with a quiet action line so cards of different lengths still read as one row */
a.hf-card:not(.hf-card--more)::after {
  content: "Open \2192"; margin-top: auto; padding-top: var(--v-space-8);
  font-size: var(--v-type-14); font-weight: 600; color: var(--v-accent-5);
}
.hf-card--photo img { max-height: 150px; }
.hf-card--photo .hf-credit { margin-top: 0; }

/* The masthead scrolls away with the page here instead of staying pinned to the top
   (owner report 2026-12-06: navigation stayed locked at the top of the homepage).
   home-almanac.css keeps its sticky masthead for the other pages that use it. */
.hm-page .hm-masthead { position: relative; top: auto; }
