/*
 * Home page (src/Views/home.php) — on top of the site's design system (public/sounds/styles.css tokens).
 * The memorable part is the hero: the game's own map plate, inverted into a night survey, under the site search.
 * The rest is a quiet ledger: one band per section, its words on the left, what it holds right now on the right.
 */
.hm { padding-top: var(--topbar-h); color: var(--text); }
.hm a { color: inherit; text-decoration: none; }

/* ---------------------------------------------------------------- hero */
.hm-hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--border); }
.hm-hero-map {
	position: absolute; inset: 0;
	background: url(/images/home/hero.webp) center 40% / cover no-repeat;
	filter: invert(1) sepia(0.35) hue-rotate(160deg) saturate(0.7) brightness(0.5) contrast(1.15);
	opacity: 0.75;
}
.hm-hero::after {   /* night falls from the left, where the words are */
	content: ""; position: absolute; inset: 0; pointer-events: none;
	background: linear-gradient(90deg, var(--bg) 0%, rgba(0, 5, 15, 0.86) 38%, rgba(0, 5, 15, 0.35) 100%),
		linear-gradient(0deg, var(--bg) 0%, transparent 35%);
}
.hm-hero-in { position: relative; z-index: 1; max-width: 1180px; margin: 0 auto; padding: 4.5rem 2rem 3rem; }
.hm-patch {
	display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.3rem 0.75rem; margin-bottom: 1.4rem;
	border: 1px solid rgba(184, 145, 62, 0.45); border-radius: 999px; font-size: 0.82rem; color: var(--gold-hi);
	background: rgba(184, 145, 62, 0.08);
}
.hm-patch:hover { border-color: var(--gold-hi); }
.hm-patch-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--gold-hi); box-shadow: 0 0 8px var(--gold); }
.hm-title {
	font-family: var(--font-serif); font-weight: 500; font-size: clamp(2.6rem, 6vw, 4.4rem); line-height: 1;
	letter-spacing: 0.01em; color: var(--text-strong); margin: 0 0 0.9rem;
}
.hm-sub { max-width: 34rem; font-size: 1.08rem; color: var(--text-muted); margin: 0 0 1.8rem; }
.hm-search {
	display: flex; align-items: center; gap: 0.8rem; width: 100%; max-width: 560px; height: 54px; padding: 0 1rem;
	background: rgba(6, 16, 25, 0.88); border: 1px solid var(--border-hi); border-radius: 10px;
	color: var(--text-dim); font: inherit; font-size: 1.02rem; text-align: left; cursor: text;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.45);
}
.hm-search:hover, .hm-search:focus-visible { border-color: var(--accent); color: var(--text-muted); outline: none; box-shadow: 0 0 0 3px var(--accent-glow), 0 10px 40px rgba(0, 0, 0, 0.45); }
.hm-search svg { width: 20px; height: 20px; color: var(--accent); flex: none; }
.hm-search span { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.hm-search kbd { font: inherit; font-size: 0.75rem; padding: 2px 6px; border: 1px solid var(--border); border-radius: 4px; color: var(--text-dim); }
.hm-now { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.6rem; }
.hm-now-card {
	display: flex; align-items: center; gap: 0.75rem; min-width: 0; max-width: 340px; padding: 0.5rem 0.9rem 0.5rem 0.5rem;
	background: rgba(6, 16, 25, 0.8); border: 1px solid var(--border); border-radius: 10px;
}
.hm-now-card:hover { border-color: var(--border-hi); }
.hm-now-card img { width: 72px; height: 44px; object-fit: cover; border-radius: 6px; flex: none; }
.hm-now-big { width: 56px; text-align: center; font-family: var(--font-serif); font-size: 1.7rem; line-height: 1; color: var(--gold-hi); flex: none; }
.hm-now-big small { font-size: 0.9rem; color: var(--text-dim); }
.hm-now-txt { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.hm-now-txt strong { color: var(--text-strong); font-weight: 600; line-height: 1.25; }
.hm-live { font-size: 0.7rem; color: var(--success); display: inline-flex; align-items: center; gap: 0.35rem; }
.hm-live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--success); }
.hm-now-left { font-size: 0.78rem; color: var(--text-muted); }

/* ---------------------------------------------------------------- section bands */
.hm-sec {
	max-width: 1180px; margin: 0 auto; padding: 3.2rem 2rem;
	display: grid; grid-template-columns: minmax(260px, 360px) minmax(0, 1fr); gap: 2.5rem 3.5rem; align-items: start;
	border-bottom: 1px solid var(--border);
}
.hm-kicker { display: inline-block; font-size: 0.78rem; letter-spacing: 0.08em; color: var(--gold-hi); margin-bottom: 0.6rem; }
.hm-kicker:hover { color: var(--text-strong); }
.hm-sec h2 { font-family: var(--font-serif); font-weight: 500; font-size: 1.95rem; line-height: 1.12; color: var(--text-strong); margin: 0 0 0.8rem; }
.hm-sec-text p { color: var(--text-muted); margin: 0 0 1.3rem; }
.hm-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 1.1rem; }
.hm-actions .btn { text-decoration: none; }
.hm .btn-primary { color: var(--bg-deep); }
.hm-link { color: var(--accent-hi) !important; font-size: 0.92rem; }
.hm-link:hover { text-decoration: underline !important; }
.hm h3 { font-size: 0.95rem; font-weight: 600; color: var(--text-strong); margin: 0; }
.hm-row-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: 0.9rem; }

/* maps: the four plates */
.hm-maps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.9rem; }
.hm-map { position: relative; display: block; aspect-ratio: 1; border-radius: 10px; overflow: hidden; border: 1px solid var(--border); background: var(--surface-2); }
.hm-map img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(0.4) brightness(0.62); transition: filter 0.2s ease, transform 0.3s ease; }
.hm-map:hover img { filter: grayscale(0) brightness(0.8); transform: scale(1.03); }
.hm-map:hover { border-color: var(--border-hi); }
.hm-map::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(0, 3, 8, 0.92) 0%, transparent 60%); }
.hm-map-name, .hm-map-n { position: absolute; left: 0.8rem; right: 0.8rem; z-index: 1; }
.hm-map-name { bottom: 1.75rem; font-family: var(--font-serif); font-size: 1.25rem; line-height: 1.1; color: var(--text-strong); }
.hm-map-n { bottom: 0.65rem; font-size: 0.78rem; color: var(--accent-hi); }

/* arsenal: what is new */
.hm-fresh-list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.75rem; }
.hm-fresh-item { display: flex; flex-direction: column; gap: 0.45rem; min-width: 0; }
.hm-fresh-pic { display: flex; align-items: center; justify-content: center; height: 96px; border-radius: 8px; background: radial-gradient(ellipse at 50% 60%, var(--surface-3), var(--surface)); border: 1px solid var(--border); overflow: hidden; }
.hm-fresh-item:hover .hm-fresh-pic { border-color: var(--border-hi); }
.hm-fresh-pic img { max-width: 92%; max-height: 86%; object-fit: contain; }
.hm-k-hunter .hm-fresh-pic img, .hm-k-charm .hm-fresh-pic img, .hm-k-trait .hm-fresh-pic img { max-height: 100%; }
.hm-k-hunter .hm-fresh-pic img { width: 100%; height: 100%; object-fit: cover; object-position: center 25%; max-width: none; }
.hm-fresh-name { font-size: 0.85rem; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* loadouts */
.hm-los { display: flex; flex-direction: column; gap: 0.6rem; }
.hm-lo { display: flex; align-items: center; gap: 1rem; padding: 0.75rem 1rem; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.hm-lo:hover { border-color: var(--border-hi); background: var(--surface-2); }
.hm-lo-guns { display: flex; flex-direction: column; gap: 2px; width: 150px; flex: none; }
.hm-lo-guns img { height: 30px; width: 100%; object-fit: contain; object-position: left center; }
.hm-lo-txt { display: flex; flex-direction: column; min-width: 0; }
.hm-lo-txt strong { color: var(--text-strong); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hm-lo-txt span { font-size: 0.82rem; color: var(--text-muted); }

/* quiz: today's daily */
.hm-daily { padding: 1.3rem 1.4rem; border: 1px solid rgba(184, 145, 62, 0.35); border-radius: 12px; background: linear-gradient(160deg, rgba(184, 145, 62, 0.08), var(--surface) 55%); max-width: 520px; }
.hm-daily-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.hm-daily-head h3 { font-family: var(--font-serif); font-size: 1.35rem; font-weight: 500; color: var(--gold-hi); }
.hm-daily-reset { font-size: 0.78rem; color: var(--text-dim); white-space: nowrap; }
.hm-daily-p { color: var(--text-muted); margin: 0.4rem 0 1rem; font-size: 0.92rem; }
.hm-podium { list-style: none; margin: 0 0 0.6rem; padding: 0; }
.hm-podium li { display: flex; align-items: center; gap: 0.75rem; padding: 0.4rem 0; border-top: 1px solid var(--border); }
.hm-rank { width: 1.4rem; font-family: var(--font-serif); font-size: 1.2rem; color: var(--gold-hi); }
.hm-who { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hm-score { color: var(--accent-hi); font-variant-numeric: tabular-nums; }
.hm-daily-n, .hm-daily-none { font-size: 0.85rem; color: var(--text-muted); margin: 0 0 1rem; }
.hm-daily-go { text-decoration: none; }

/* codex */
.hm-cx { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.9rem; max-width: 620px; }
.hm-cx-card { position: relative; display: block; height: 240px; border-radius: 10px; overflow: hidden; border: 1px solid var(--border); background: radial-gradient(ellipse at 50% 40%, var(--surface-3), var(--bg-deep)); }
.hm-cx-card:hover { border-color: var(--border-hi); }
.hm-cx-card img { width: 100%; height: 100%; object-fit: contain; object-position: center; padding: 0.6rem 0.6rem 3.4rem; box-sizing: border-box; }
.hm-cx-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(0, 3, 8, 0.9) 0%, transparent 45%); }
.hm-cx-txt { position: absolute; left: 0.9rem; right: 0.9rem; bottom: 0.7rem; z-index: 1; display: flex; flex-direction: column; }
.hm-cx-txt span { font-size: 0.75rem; color: var(--gold-hi); }
.hm-cx-txt strong { font-family: var(--font-serif); font-size: 1.3rem; font-weight: 500; color: var(--text-strong); }

/* news */
.hm-news-date { align-self: center; justify-self: start; font-family: var(--font-serif); font-size: 2.4rem; color: var(--text-dim); }
.hm-news-date:hover { color: var(--gold-hi); }

/* the creator */
.hm-made { max-width: 1180px; margin: 0 auto; padding: 2.4rem 2rem 3rem; display: flex; align-items: center; gap: 1.4rem; flex-wrap: wrap; }
.hm-made-pic { border-radius: 50%; border: 2px solid rgba(184, 145, 62, 0.5); flex: none; }
.hm-made-txt { flex: 1; min-width: 240px; }
.hm-made h2 { font-family: var(--font-serif); font-weight: 500; font-size: 1.4rem; color: var(--text-strong); margin: 0 0 0.25rem; }
.hm-made p { color: var(--text-muted); font-size: 0.9rem; margin: 0 0 0.4rem; max-width: 46rem; }
.hm-social { list-style: none; display: flex; gap: 0.5rem; margin: 0; padding: 0; }
.hm-social a { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--border); color: var(--text-muted); }
.hm-social a:hover { color: var(--text-strong); border-color: var(--border-hi); }

/* the language menu holds links here */
.home-body .lang-menu a { display: block; padding: 0.45rem 0.9rem; color: var(--text); text-decoration: none; white-space: nowrap; }
.home-body .lang-menu a:hover, .home-body .lang-menu a.active { background: var(--surface-2); color: var(--accent-hi); }

/* ---------------------------------------------------------------- smaller screens */
@media (max-width: 1100px) {
	.hm-sec { grid-template-columns: minmax(0, 1fr); gap: 1.6rem; }
	.hm-cx { max-width: none; }
}
@media (max-width: 700px) {
	.hm-hero-in { padding: 2.6rem 1rem 2rem; }
	.hm-sec { padding: 2.2rem 1rem; }
	.hm-sec h2 { font-size: 1.6rem; }
	.hm-maps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.hm-fresh-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.hm-cx-card { height: 190px; }
	.hm-lo-guns { width: 96px; }
	.hm-search kbd { display: none; }
	.hm-made { padding: 2rem 1rem 2.4rem; }
	.hm-news-date { font-size: 1.6rem; }
}
@media (prefers-reduced-motion: reduce) { .hm-map img { transition: none; } .hm-map:hover img { transform: none; } }
