/* Home page: "Where everyone is reading today" photo cards + season row + ticker.
   Built for index.html, filled by js/home-trending.js. */
.hm-tr { padding: clamp(56px, 8vw, 110px) 0; background: var(--ag-parchment, #F4F6F4); }
.hm-tr-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px 40px; margin-bottom: 22px; }
.hm-tr-title { font-family: var(--font-display, "Playfair Display", serif); font-size: clamp(1.8rem, 3.6vw, 2.9rem); line-height: 1.1; color: var(--ag-green-900, #0D2118); margin: 8px 0 0; }
.hm-tr-lede { margin: 0; max-width: 420px; color: #4a5a52; font-size: .98rem; line-height: 1.5; }
.hm-tr-dot { display: inline-block; width: 9px; height: 9px; margin-right: 8px; border-radius: 50%; background: #2fb36b; box-shadow: 0 0 0 0 rgba(47,179,107,.55); animation: hm-tr-pulse 2s infinite; vertical-align: 1px; }
@keyframes hm-tr-pulse { 70% { box-shadow: 0 0 0 9px rgba(47,179,107,0); } 100% { box-shadow: 0 0 0 0 rgba(47,179,107,0); } }

/* ticker */
.hm-tr-ticker { direction: ltr; overflow: hidden; margin: 0 0 26px; border-block: 1px solid rgba(26,58,43,.14); background: #0D2118; border-radius: 12px; }
.hm-tr-ticker:empty { display: none; }
.hm-tr-track { display: flex; width: max-content; animation: hm-tr-run 55s linear infinite; }
.hm-tr-ticker:hover .hm-tr-track { animation-play-state: paused; }
.hm-tr-tick { display: inline-flex; align-items: center; gap: 9px; padding: 11px 22px; color: #e9efe9; font-size: .88rem; white-space: nowrap; border-right: 1px solid rgba(255,255,255,.08); }
.hm-tr-tick b { color: #D9BC80; font-weight: 700; font-variant-numeric: tabular-nums; }
.hm-tr-tick i { font-style: normal; color: #9db2a6; font-size: .8rem; }
@keyframes hm-tr-run { to { transform: translateX(-50%); } }

/* grid: lead card spans two columns and two rows */
.hm-tr-grid { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: minmax(210px, auto); gap: 16px; }
.hm-tr-grid .hm-tc:first-child { grid-column: span 2; grid-row: span 2; }
.hm-tr-grid-se { grid-template-columns: repeat(4, 1fr); }
.hm-tr-grid-se .hm-tc:first-child { grid-column: auto; grid-row: auto; }
.hm-tr-fallback { grid-column: 1 / -1; padding: 40px; text-align: center; color: var(--ag-green-900, #0D2118); font-weight: 600; }
.hm-tr-season { margin-top: clamp(40px, 6vw, 70px); }
.hm-tr-sub { font-family: var(--font-display, "Playfair Display", serif); font-size: clamp(1.4rem, 2.4vw, 1.9rem); color: var(--ag-green-900, #0D2118); margin: 0 0 16px; }

.hm-tc { position: relative; display: block; overflow: hidden; border-radius: 18px; color: #fff; background: #12301f; min-height: 210px; box-shadow: 0 10px 28px -16px rgba(13,33,24,.55); transition: transform .3s, box-shadow .3s; }
.hm-tc:hover { transform: translateY(-4px); box-shadow: 0 20px 36px -16px rgba(13,33,24,.65); }
.hm-tc img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .7s; }
.hm-tc:hover img { transform: scale(1.05); }
.hm-tc::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(13,33,24,0) 30%, rgba(13,33,24,.92) 100%); pointer-events: none; }
.hm-tc-tag, .hm-tc-rank { position: absolute; top: 12px; z-index: 2; font-size: .68rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; }
.hm-tc-tag { left: 12px; background: rgba(13,33,24,.72); color: #e9efe9; backdrop-filter: blur(4px); }
.hm-tc-rank { right: 12px; background: #D9BC80; color: #0D2118; }
.hm-tc-body { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 6px; }
.hm-tc-name { font-family: var(--font-display, "Playfair Display", serif); font-size: 1.35rem; line-height: 1.15; margin: 0; }
.hm-tc-name a { color: #fff; text-decoration: none; }
.hm-tc-cover { position: absolute; inset: 0; z-index: 1; }
.hm-tc-body { pointer-events: none; }
.hm-tc-body a { pointer-events: auto; }
.hm-tc-meta { font-size: .8rem; color: #cfdcd3; }
.hm-tc-hook { display: none; font-size: .92rem; line-height: 1.45; color: #eef2ef; max-width: 52ch; }
.hm-tc-chips { display: none; gap: 8px; margin-top: 4px; position: relative; z-index: 3; flex-wrap: wrap; }
.hm-tc-chips a { font-size: .8rem; font-weight: 700; padding: 7px 14px; border-radius: 999px; background: #D9BC80; color: #0D2118; text-decoration: none; }
.hm-tc-chips a.alt { background: rgba(255,255,255,.16); color: #fff; backdrop-filter: blur(4px); }
.hm-tc-chips a:hover { filter: brightness(1.08); }
.hm-tr-grid:not(.hm-tr-grid-se) .hm-tc:first-child .hm-tc-name { font-size: clamp(1.7rem, 3vw, 2.4rem); }
.hm-tr-grid:not(.hm-tr-grid-se) .hm-tc:first-child .hm-tc-body { padding: 24px 26px 26px; gap: 9px; }
.hm-tr-grid:not(.hm-tr-grid-se) .hm-tc:first-child .hm-tc-hook,
.hm-tr-grid:not(.hm-tr-grid-se) .hm-tc:first-child .hm-tc-chips { display: flex; }
.hm-tr-grid:not(.hm-tr-grid-se) .hm-tc:first-child .hm-tc-hook { display: block; }

@media (max-width: 959px) {
  .hm-tr-grid, .hm-tr-grid-se { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .hm-tr-grid { grid-template-columns: 1fr 1fr; gap: 12px; grid-auto-rows: minmax(190px, auto); }
  .hm-tr-grid:not(.hm-tr-grid-se) .hm-tc:first-child { grid-column: 1 / -1; grid-row: auto; min-height: 330px; }
  .hm-tr-grid-se { grid-template-columns: 1fr 1fr; }
  .hm-tc-name { font-size: 1.1rem; }
  .hm-tc-tag { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .hm-tr-track, .hm-tr-dot { animation: none; }
  .hm-tr-ticker { overflow-x: auto; }
  .hm-tc, .hm-tc img { transition: none; }
}

/* fixed link set: plain HTML so the main guides are always linked without JavaScript */
.hm-tr-fav { margin-top: clamp(36px, 5vw, 60px); }
.hm-tr-favlist { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.hm-tr-favlist a { display: inline-block; padding: 9px 18px; border-radius: 999px; border: 1px solid rgba(26,58,43,.2); background: #fff; color: var(--ag-green-900, #0D2118); font-weight: 600; font-size: .92rem; text-decoration: none; transition: background .2s, color .2s, border-color .2s; }
.hm-tr-favlist a:hover { background: var(--ag-green-900, #0D2118); color: #D9BC80; border-color: var(--ag-green-900, #0D2118); }
