/* Home (pages/index.html, assets/js/home.js): the hub. The key art as a wide hero with a title plate over its lower
   edge (live status, title, facts, the main actions), "Jump to" tiles, then titled sections: server time, summons this
   week, new on the server, the weekly rotation, game modes, how to join, roster, patch notes, news.
   Layout only; colours, type, radii and shadows come from the site.css tokens (docs/design-system.md). */

/* ---------- hero: the key art, a plate over its lower-left edge ---------- */
.home-hero { padding: var(--sp-6) 0 0; }
.hh-art { border-radius: var(--blade); overflow: hidden; background: var(--well); box-shadow: var(--shadow-card); }
.hh-art img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 1; object-fit: cover; }
.hh-plate { position: relative; z-index: 1; width: min(720px, 100%); margin: -88px 0 0 var(--sp-8); padding: var(--sp-6) var(--sp-6) var(--sp-5);
  background: rgba(16, 24, 40, 0.95); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: var(--shadow-pop); }
.hh-plate h1 { margin: 0 0 6px; font: 700 clamp(1.85rem, 1.3rem + 1.8vw, 2.6rem)/1.05 var(--head); text-transform: uppercase; letter-spacing: 0.01em; }
.hh-plate .lead { margin: var(--sp-3) 0 var(--sp-4); color: var(--muted); font-size: var(--fs-base); max-width: 60ch; }
.hh-plate .lead em { color: var(--text); font-style: normal; font-weight: 700; }
.hh-cta { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.hub-meta { margin: 0; min-height: 1.5em; color: var(--muted); font-size: var(--fs-sm); }
.hub-meta b { color: var(--text); font: 700 var(--fs-base)/1 var(--head); font-variant-numeric: tabular-nums; }
.hub-meta i { font-style: normal; color: var(--faint); margin: 0 8px; }
/* the server status as a live tag on the plate (home.js setStatus; per-server list under it) */
[data-page="home"] .status-pill { display: inline-flex; align-items: center; gap: 8px; min-height: 0; margin: 0 0 var(--sp-3); padding: 4px 9px; border: 0; border-radius: var(--blade-sm);
  background: var(--leaf-soft); font: 700 0.6875rem/1.3 var(--head); letter-spacing: 0.08em; text-transform: uppercase; color: var(--leaf); }
[data-page="home"] .status-pill .status-dot { width: 7px; height: 7px; background: var(--live); }
[data-page="home"] .status-pill[data-state="maintenance"], [data-page="home"] .status-pill[data-state="slow"], [data-page="home"] .status-pill[data-state="partial"] { background: rgba(251, 191, 36, 0.13); color: var(--wip); }
[data-page="home"] .status-pill[data-state="offline"] { background: rgba(248, 113, 113, 0.13); color: var(--bad); }
[data-page="home"] .status-pill[data-state="maintenance"] .status-dot, [data-page="home"] .status-pill[data-state="slow"] .status-dot,
[data-page="home"] .status-pill[data-state="partial"] > .status-dot { background: var(--wip); }
[data-page="home"] .status-pill[data-state="offline"] .status-dot { background: var(--bad); }
[data-page="home"] .status-worlds { text-transform: none; letter-spacing: 0; font-size: var(--fs-sm); color: var(--text); }

/* ---------- sections: the same diamond titles as the rest of the site ---------- */
.hub-sec { margin-top: var(--sp-10); }
.hub-sec-head { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); margin: 0 0 var(--sp-3); min-height: 34px; }
.hub-label { display: flex; align-items: center; gap: 12px; margin: 0 0 var(--sp-4); font: 700 var(--fs-lg)/1.2 var(--head); letter-spacing: 0.01em; color: var(--text); }
.hub-label::before { content: ""; flex: none; width: 9px; height: 9px; border-radius: 1px; background: var(--accent); transform: rotate(45deg); box-shadow: 0 0 0 3px var(--accent-soft); }
.hub-label.is-live::before { background: var(--live); box-shadow: 0 0 0 3px var(--leaf-soft); }
.hub-sec-head .hub-label { margin: 0; }
.hub-sub { margin: -6px 0 var(--sp-3); color: var(--muted); font-size: var(--fs-sm); max-width: 760px; }
[data-page="home"] .section-head { margin-bottom: var(--sp-4); }
[data-page="home"] .section-head > p { margin: 0 auto 0 0; }

/* ---------- jump to: compact tiles, a small piece of game art, the name, one line, a count ---------- */
.hub-jump { margin-top: var(--sp-8); }
.ex-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-3); }
.ex-tile { display: flex; align-items: center; gap: var(--sp-3); min-width: 0; padding: 10px 14px 10px 10px; border-radius: var(--blade-sm); background: var(--surface);
  box-shadow: var(--ring), inset 2px 0 0 var(--accent); color: var(--text); }
.ex-tile:hover { color: var(--text); background: var(--surface-2); box-shadow: 0 0 0 1px var(--line-3), inset 2px 0 0 var(--accent); }
.ex-ico { flex: none; width: 56px; height: 56px; border-radius: var(--blade-sm); overflow: hidden; background: var(--well); box-shadow: inset 0 0 0 1px var(--line); }
.ex-ico img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 15%; }
.ex-ico.is-contain img { object-fit: contain; object-position: 50% 50%; padding: 4px; }
.ex-t { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ex-name { font: 700 var(--fs-md)/1.15 var(--head); letter-spacing: 0.01em; }
.ex-line { color: var(--muted); font-size: var(--fs-xs); line-height: 1.35; }
.ex-count { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 6px; color: var(--faint); font-size: var(--fs-xs); }
.ex-count b { color: var(--accent); font: 700 var(--fs-sm)/1.2 var(--head); }
.ex-grid > .skc-tile { min-height: 78px; border-radius: var(--blade-sm); }
.ex-grid > .skc-tile .skc-body { padding: 12px 14px; }

/* ---------- server time + numbers ---------- */
[data-page="home"] .clock-block { margin: 0; gap: var(--sp-3); }
[data-page="home"] .clock-block .clk-card { padding: 14px 18px; box-shadow: var(--ring), inset 0 2px 0 var(--accent); }
[data-page="home"] .clock-block strong { font: 700 var(--fs-xl)/1.15 var(--head); margin-top: 4px; }
[data-page="home"] .clock-block .clk-card:first-child strong { color: var(--gold); }
[data-page="home"] .clock-block small { font-size: var(--fs-xs); }
[data-page="home"] .clock-block .clk-zone { font-size: var(--fs-xs); }
.stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--sp-2); margin: var(--sp-3) 0 0; }
.stats > .stat, .stats > .skc-stat { display: flex; flex-direction: column; gap: 3px; min-height: 104px; min-width: 0; margin: 0; padding: 14px 16px; border: 0; border-radius: var(--blade-sm);
  background: var(--surface); box-shadow: var(--ring), inset 2px 0 0 var(--leaf); }
.stats .stat b { font: 700 var(--fs-xl)/1.05 var(--head); color: var(--text); font-variant-numeric: tabular-nums; }
.stats .stat > span { font: 600 var(--fs-label)/1.25 var(--head); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.stats .stat small { margin: 0; color: var(--faint); font-size: var(--fs-xs); line-height: 1.35; }
.stats > .skc-stat .skc-body { padding: 0; min-height: 0; gap: 8px; }

/* ---------- new on the server: compact cards, card art on the left, an element-coloured edge ---------- */
.nf-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--sp-3); }
.nf-card { display: grid; grid-template-columns: 104px minmax(0, 1fr); min-height: 168px; overflow: hidden; background: var(--surface);
  box-shadow: var(--shadow-card), inset 0 -3px 0 var(--el, var(--accent)); }
.nf-card .nf-art { position: relative; display: block; background: radial-gradient(circle at 50% 30%, color-mix(in srgb, var(--el, #444) 30%, transparent), transparent 70%), var(--well); overflow: hidden; }
.nf-card .nf-art .nf-card-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 12%; }
.nf-card .nf-body { padding: 12px 14px 14px; display: flex; flex-direction: column; align-items: flex-start; gap: 3px; min-width: 0; }
.nf-top { display: flex; align-items: center; gap: 6px; margin-bottom: 2px; }
.nf-top .nf-el { position: static; width: 20px; height: 20px; }
.nf-card .nf-body h3 { margin: 0; font: 700 var(--fs-md)/1.15 var(--head); }
.nf-card .nf-body h3 a { color: var(--text); }
.nf-card .nf-body h3 a:hover { color: var(--accent); }
.nf-card .nf-title { color: var(--muted); font-size: var(--fs-xs); margin: 0; }
.nf-card .nf-state { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-top: 6px; font-size: var(--fs-xs); }
.nf-src { margin: 2px 0 0; font-size: var(--fs-xs); color: var(--muted); }
.nf-open { margin-top: auto; padding-top: 6px; color: var(--accent); font: 700 0.75rem/1 var(--head); letter-spacing: 0.06em; text-transform: uppercase; }
.nf-open::after { content: " \203A"; }
.nf-meta { margin: var(--sp-3) 0 0; font-size: var(--fs-xs); }
.nf-grid > .skc-feat { flex-direction: row; min-height: 168px; }
.nf-grid > .skc-feat .sk-media { width: 104px; aspect-ratio: auto; flex: none; }
.nf-grid > .skc-feat .skc-body { padding: 12px 14px; justify-content: center; }

/* ---------- banners and the weekly rotation ---------- */
#summons-band .marquee, #rot-sec .marquee { border-radius: var(--r-md); }
.rot-block { margin: 0; padding: var(--sp-5); background: var(--surface); border: 0; border-radius: var(--blade); box-shadow: var(--shadow-card); }
.rot-bar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2) var(--sp-4); }
.rot-bar .hub-label { margin: 0; }
.rot-bar .chips { display: inline-flex; gap: 4px; }
.rot-bar .chip { min-height: 32px; }
.rot-when { margin-left: auto; font-size: var(--fs-xs); }
.rot-line { margin: var(--sp-4) 0 0; font-size: var(--fs-sm); color: var(--muted); }

/* ---------- modes, steps, roster strips, patch notes, news ---------- */
[data-page="home"] .modes { gap: var(--sp-3); }
[data-page="home"] .mode { border-radius: var(--blade); }
[data-page="home"] .mode-body h3 { font-size: var(--fs-md); }
[data-page="home"] .mode-body p { font-size: var(--fs-sm); }
[data-page="home"] .steps { gap: var(--sp-3); }
[data-page="home"] .step h3 { font-size: var(--fs-md); }
[data-page="home"] .step p { font-size: var(--fs-sm); }
#roster-band #mq-cards { margin-top: var(--sp-3); }
[data-page="home"] .news-item { border-radius: var(--blade); }
[data-page="home"] .news-item h3 { font-size: var(--fs-md); }

/* ---------- tablets and phones ---------- */
@media (max-width: 1180px) {
  .nf-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1100px) {
  .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ex-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .home-hero { padding-top: var(--sp-4); }
  .hh-plate { width: auto; margin: -28px var(--sp-2) 0; padding: var(--sp-4); }
  .hh-cta { display: grid; grid-template-columns: minmax(0, 1fr); }
  .hh-cta .btn { width: 100%; padding: 0 10px; }
  .hub-meta i { margin: 0 5px; }
  .hub-sec { margin-top: var(--sp-8); }
  .hub-jump { margin-top: var(--sp-6); }
  .ex-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-2); }
  .ex-tile { align-items: flex-start; gap: 10px; padding: 10px; }
  .ex-ico { width: 40px; height: 40px; }
  .ex-line { display: none; }
  .ex-count .now-ver { flex-basis: 100%; font-size: 0.6875rem; line-height: 1.3; }
  .ex-name { font-size: var(--fs-base); }
  .ex-grid > .skc-tile { min-height: 64px; }
  [data-page="home"] .clock-block { grid-template-columns: 1fr 1fr; }
  [data-page="home"] .clock-block .clk-card { padding: 12px 14px; }
  [data-page="home"] .clock-block strong { font-size: 1.3rem; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats > .stat, .stats > .skc-stat { min-height: 96px; padding: 12px 14px; }
  .stats > .stat:first-of-type, .stats > .skc-stat:first-of-type { grid-column: 1 / -1; }
  .stats .stat b { font-size: 1.35rem; }
  .nf-grid { grid-template-columns: minmax(0, 1fr); }
  .nf-card { min-height: 150px; grid-template-columns: 96px minmax(0, 1fr); }
  .nf-grid > .skc-feat { min-height: 150px; }
  .nf-grid > .skc-feat .sk-media { width: 96px; }
  .rot-block { padding: var(--sp-4); }
  .rot-when { margin-left: 0; flex-basis: 100%; }
}
