/* ============================================================================
   TRINITYRP — public site (vitrine)
   Extends the "Iris Command" system (portal.css is loaded globally: CSS vars,
   aurora, fonts). This file only adds the public chrome + landing sections.
   ========================================================================== */

.site {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	min-height: 100vh;
}

.site-main {
	flex: 1;
	width: 100%;
	max-width: 1100px;
	margin: 0 auto;
	padding: 0 24px 64px;
}

.muted { color: var(--muted); }

/* ------------------------------------------------------------------- nav */

.site-nav {
	position: sticky;
	top: 0;
	z-index: 30;
	display: flex;
	align-items: center;
	gap: 28px;
	padding: 14px 28px;
	background: rgba(7, 7, 15, 0.72);
	backdrop-filter: blur(20px);
	border-bottom: 1px solid var(--line-soft);
}

.site-brand {
	font: 700 19px/1 var(--font-display);
	letter-spacing: 0.06em;
	color: #fff;
}

.site-brand span { color: var(--iris-2); }
.site-brand:hover { color: #fff; }

.site-links {
	display: flex;
	gap: 20px;

}

.site-links a {
	color: var(--muted);
	font-weight: 500;
	font-size: 14.5px;
}

.site-links a:hover { color: var(--text); }

.site-actions {
	margin-left: auto;
	display: flex;
	align-items: center;
	gap: 10px;
}

.site-lang {
	display: flex;
	align-items: center;
	gap: 4px;
	margin-right: 4px;
	font: 700 12px var(--font-body);
	letter-spacing: 0.06em;
}

.site-lang span { color: var(--line); }
.site-lang a { color: var(--muted); padding: 4px 2px; }
.site-lang a:hover { color: var(--text); }
.site-lang a.active { color: var(--iris-2); }

.site-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 9px 18px;
	border-radius: 10px;
	font: 600 13.5px var(--font-body);
	transition: transform 0.12s ease, filter 0.12s ease, background-color 0.12s ease;
}

.site-btn.play {
	background: linear-gradient(135deg, var(--iris), var(--iris-2));
	color: #fff;
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 4px 16px rgba(124, 108, 255, 0.25);
}

.site-btn.play:hover { filter: brightness(1.1); transform: translateY(-1px); }

.site-btn.ghost {
	background: var(--glass-2);
	border: 1px solid var(--line);
	color: var(--text);
}

.site-btn.ghost:hover { background: rgba(148, 142, 255, 0.14); color: #fff; }

.site-btn.big { padding: 13px 28px; font-size: 15.5px; border-radius: 12px; }

/* ------------------------------------------------------------------ hero */

.hero {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	gap: 18px;
	padding: 84px 0 64px;
}

.hero-title {
	margin: 0;
	font: 700 clamp(52px, 9vw, 92px)/1 var(--font-display);
	letter-spacing: 0.04em;
	color: #fff;
	text-shadow: 0 0 60px rgba(124, 108, 255, 0.35);
}

.hero-title span { color: var(--iris-2); }

.hero-sub {
	margin: 0;
	max-width: 560px;
	font-size: 17px;
	color: var(--muted);
}

.status-chip {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 9px 18px;
	border-radius: 999px;
	font-size: 14px;
	font-weight: 600;
	border: 1px solid var(--line);
	background: var(--glass);
	backdrop-filter: blur(12px);
}

.status-chip i {
	width: 9px;
	height: 9px;
	border-radius: 50%;
	background: var(--muted);
}

.status-chip.on { color: var(--pulse); border-color: rgba(76, 194, 255, 0.35); }
.status-chip.on i { background: var(--pulse); box-shadow: 0 0 10px var(--pulse); animation: chip-pulse 2s ease-in-out infinite; }
.status-chip.on b { color: #fff; }
.status-chip.off { color: var(--muted); }
.status-chip.off i { background: var(--bad); }

@keyframes chip-pulse {
	0%, 100% { box-shadow: 0 0 6px var(--pulse); }
	50% { box-shadow: 0 0 16px var(--pulse); }
}

.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }

/* -------------------------------------------------------------- sections */

.site-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 18px;
	margin-bottom: 18px;
}

.site-grid .highlights { grid-column: 1 / -1; }

.site-card {
	position: relative;
	background: var(--glass);
	border: 1px solid var(--line-soft);
	border-radius: var(--r-card);
	padding: 24px;
	backdrop-filter: blur(14px);
}

.site-card h2 {
	margin: 0 0 14px;
	font: 600 17px/1.3 var(--font-display);
	color: var(--text);
}

/* Mairie */

.mairie-mayor { margin: 0 0 12px; font-size: 15px; }
.mairie-mayor b { color: var(--iris-2); }

.laws {
	margin: 0;
	padding-left: 22px;
	display: flex;
	flex-direction: column;
	gap: 7px;
	color: var(--muted);
	font-size: 14px;
}

.laws li::marker { color: var(--iris); font-weight: 700; }

/* Wanted */

.wanted-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
	gap: 12px;
}

.wanted-card {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 7px;
	padding: 12px 8px;
	border-radius: 12px;
	background: rgba(255, 92, 119, 0.06);
	border: 1px solid rgba(255, 92, 119, 0.22);
}

.wanted-card img {
	width: 52px;
	height: 52px;
	border-radius: 10px;
	object-fit: cover;
	border: 2px solid rgba(255, 92, 119, 0.5);
}

.wanted-card span {
	font-size: 12.5px;
	font-weight: 600;
	color: var(--text);
	max-width: 100%;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* Highlights */

.hl-feed { display: flex; flex-direction: column; }

.hl-row {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 11px 2px;
	border-bottom: 1px solid var(--line-soft);
}

.hl-row:last-child { border-bottom: none; }

.hl-icon { font-size: 20px; flex-shrink: 0; }

.hl-body { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1; }
.hl-title { font-weight: 600; font-size: 14.5px; }
.hl-detail { font-size: 13px; color: var(--muted); }

.hl-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; flex-shrink: 0; }
.hl-amount { font: 600 13px var(--font-mono); color: var(--ok); }
.hl-time { font-size: 11.5px; color: var(--muted); }

/* Photos */

.photos-strip { margin-bottom: 18px; }

.photos-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 4px;
}

.photos-head h2 { margin: 0; }

.gallery-hero { text-align: center; padding: 56px 0 28px; }
.gallery-hero h1 { margin: 0 0 8px; font: 700 34px/1.2 var(--font-display); }

.photo-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
	gap: 14px;
	margin-top: 14px;
}

.photo-card {
	margin: 0;
	border-radius: 14px;
	overflow: hidden;
	background: var(--glass-2);
	border: 1px solid var(--line-soft);
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.photo-card:hover {
	transform: translateY(-3px);
	box-shadow: 0 10px 28px rgba(124, 108, 255, 0.18);
}

/* Direct child only — the nested figcaption avatar (.photo-avatar) is a separate img and must keep
   its own 26px sizing, so this must NOT match it. */
.photo-card > img {
	width: 100%;
	height: auto;
	display: block;
	background: rgba(0, 0, 0, 0.25);
}

.photo-card figcaption {
	padding: 10px 12px;
	font-size: 13px;
	color: var(--muted);
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.photo-card figcaption b { color: var(--text); }

.photo-meta { display: flex; align-items: center; gap: 8px; }

/* flex-shrink:0 stops the flex row from squeezing the avatar into a tall rectangle next to a long
   name; object-fit:cover keeps it a clean square (Steam avatars are square, so the whole image shows). */
.photo-avatar {
	width: 26px;
	height: 26px;
	flex-shrink: 0;
	border-radius: 7px;
	object-fit: cover;
}

.photo-stats { margin-left: auto; font-size: 12px; }

.photo-caption { font-size: 13px; }

/* ------------------------------------------------------------ leaderboards */

.lb-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 18px;
}

.lb-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
}

.lb-row {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 9px 8px;
	border-bottom: 1px solid var(--line-soft);
	border-radius: 8px;
}

.lb-row:last-child { border-bottom: none; }

.lb-rank {
	width: 24px;
	text-align: center;
	font: 700 15px var(--font-display);
	color: var(--muted);
	flex-shrink: 0;
}

.lb-avatar {
	width: 30px;
	height: 30px;
	border-radius: 8px;
	flex-shrink: 0;
	object-fit: cover;
}

.lb-name {
	flex: 1;
	font-weight: 600;
	font-size: 14px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.lb-value {
	font: 600 13px var(--font-mono);
	color: var(--iris-2);
	flex-shrink: 0;
}

.lb-row.podium { background: rgba(124, 108, 255, 0.06); }
.lb-row.r1 .lb-rank { color: #f1c40f; }
.lb-row.r1 .lb-avatar { border: 2px solid #f1c40f; }
.lb-row.r2 .lb-rank { color: #c0c6d4; }
.lb-row.r3 .lb-rank { color: #cd7f32; }

/* ---------------------------------------------------------------- footer */

.site-footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 22px 28px;
	border-top: 1px solid var(--line-soft);
	color: var(--muted);
	font-size: 13px;
}

/* ------------------------------------------------------------- responsive */

@media (max-width: 820px) {
	.site-grid { grid-template-columns: 1fr; }
	.lb-grid { grid-template-columns: 1fr; }
	.hero { padding: 56px 0 44px; }
	.site-nav { padding: 12px 16px; gap: 16px; }
	.site-links { display: none; }
	.site-main { padding: 0 14px 48px; }
}

@media (prefers-reduced-motion: reduce) {
	.status-chip.on i { animation: none; }
	.mm-pulse,
	.mm-heist .mm-dot { animation: none; }
}

/* ---------------------------------------------------------------- minimap */

.mm-wrap {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 260px;
	gap: 20px;
	align-items: start;
}

.mm-canvas {
	position: relative;
	aspect-ratio: 1 / 1;
	border-radius: 16px;
	border: 1px solid var(--line-soft);
	overflow: hidden;
	background-color: #0a0a14;
	/* The map render sits on top; if /minimap.png is missing, the grid shows through as a placeholder. */
	background-image:
		url('/minimap.png'),
		linear-gradient(rgba(148, 142, 255, 0.06) 1px, transparent 1px),
		linear-gradient(90deg, rgba(148, 142, 255, 0.06) 1px, transparent 1px);
	background-size: cover, 40px 40px, 40px 40px;
	background-position: center;
}

.mm-blip {
	position: absolute;
	transform: translate(-50%, -50%);
	display: flex;
	align-items: center;
	gap: 5px;
	z-index: 2;
}

.mm-dot {
	width: 12px;
	height: 12px;
	border-radius: 50%;
	background: currentColor;
	border: 2px solid rgba(0, 0, 0, 0.55);
	box-shadow: 0 0 8px currentColor;
	flex: none;
}

.mm-label {
	font: 600 11px/1 var(--font-display);
	color: #fff;
	background: rgba(7, 7, 15, 0.82);
	padding: 2px 6px;
	border-radius: 6px;
	white-space: nowrap;
	border: 1px solid var(--line-soft);
}

.mm-mayor { color: #ffcf5c; }
.mm-police { color: #4c8dff; }
.mm-wanted { color: var(--bad); }
.mm-heist { color: var(--warn); }

.mm-heist .mm-dot { animation: mm-pulse 1s infinite; }

@keyframes mm-pulse {
	0%, 100% { transform: scale(1); opacity: 1; }
	50% { transform: scale(1.45); opacity: 0.55; }
}

.mm-empty {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	padding: 24px;
	color: var(--muted);
	font-size: 15px;
}

.mm-side {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.mm-live {
	display: flex;
	align-items: center;
	gap: 8px;
	font: 700 12px/1 var(--font-display);
	letter-spacing: 0.12em;
	color: var(--bad);
}

.mm-pulse {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--bad);
	box-shadow: 0 0 8px var(--bad);
	animation: mm-pulse 1.4s infinite;
}

.mm-count {
	font: 700 26px/1.1 var(--font-display);
	margin-top: 8px;
}

.mm-count span { font-size: 14px; font-weight: 500; }
.mm-mayorline { margin-top: 8px; font-size: 13px; }

.mm-legend ul {
	list-style: none;
	padding: 0;
	margin: 8px 0 0;
	display: flex;
	flex-direction: column;
	gap: 9px;
}

.mm-legend li {
	display: flex;
	align-items: center;
	gap: 9px;
	font-size: 13.5px;
}

.mm-note { margin-top: 12px; font-size: 12px; }

/* calibration overlay (?calib=1) */
.mm-grid {
	position: absolute;
	transform: translate(-50%, -50%);
	z-index: 1;
	pointer-events: none;
	text-align: center;
}

.mm-grid::before {
	content: "";
	display: block;
	width: 4px;
	height: 4px;
	margin: 0 auto 2px;
	border-radius: 50%;
	background: rgba(167, 139, 255, 0.75);
}

.mm-grid span {
	font: 500 9px/1 var(--font-mono, monospace);
	color: rgba(167, 139, 255, 0.9);
	background: rgba(7, 7, 15, 0.6);
	padding: 1px 3px;
	border-radius: 3px;
	white-space: nowrap;
}

.mm-calibbox code {
	display: block;
	margin-top: 6px;
	padding: 8px 10px;
	border-radius: 8px;
	background: rgba(7, 7, 15, 0.5);
	color: var(--iris-2);
	font: 500 12px/1.6 var(--font-mono, monospace);
	word-break: break-all;
}

@media (max-width: 820px) {
	.mm-wrap { grid-template-columns: 1fr; }
}

/* ----------------------------------------------------- photo post (lightbox) */

.photo-card.clickable { position: relative; cursor: pointer; }

.photo-hover {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background: linear-gradient(180deg, rgba(7, 7, 15, 0.1), rgba(7, 7, 15, 0.55));
	opacity: 0;
	transition: opacity 0.15s ease;
	pointer-events: none;
}

.photo-card.clickable:hover .photo-hover { opacity: 1; }

.photo-hover span {
	font: 600 13px/1 var(--font-display);
	color: #fff;
	padding: 8px 14px;
	border-radius: 999px;
	background: rgba(124, 108, 255, 0.92);
	border: 1px solid rgba(255, 255, 255, 0.22);
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.post-overlay {
	position: fixed;
	inset: 0;
	z-index: 100;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	background: rgba(4, 4, 10, 0.8);
	backdrop-filter: blur(8px);
	animation: post-fade 0.15s ease;
}

@keyframes post-fade { from { opacity: 0; } to { opacity: 1; } }

.post-modal {
	position: relative;
	display: flex;
	width: min(940px, 100%);
	max-height: min(86vh, 720px);
	background: #0b0b14;
	border: 1px solid var(--line-soft);
	border-radius: 18px;
	overflow: hidden;
	box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
}

.post-media {
	flex: 1 1 60%;
	min-width: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #000;
}

.post-media img {
	max-width: 100%;
	max-height: min(86vh, 720px);
	object-fit: contain;
	display: block;
}

.post-side {
	flex: 0 0 340px;
	display: flex;
	flex-direction: column;
	min-width: 0;
	border-left: 1px solid var(--line-soft);
}

.post-head {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 14px 16px;
	border-bottom: 1px solid var(--line-soft);
}

.post-avatar {
	width: 38px;
	height: 38px;
	flex-shrink: 0;
	border-radius: 10px;
	object-fit: cover;
}

.post-author { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.post-author b { color: var(--text); }
.post-time { font-size: 12px; }

.post-body {
	flex: 1;
	overflow-y: auto;
	padding: 14px 16px;
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.post-line { display: flex; gap: 10px; align-items: flex-start; }

.post-c-avatar {
	width: 28px;
	height: 28px;
	flex-shrink: 0;
	border-radius: 8px;
	object-fit: cover;
}

.post-line-text { font-size: 13.5px; line-height: 1.45; color: var(--muted); word-break: break-word; }
.post-line-text b { color: var(--text); margin-right: 5px; }
.post-line.caption .post-line-text { color: #d8d8e2; }

.post-empty { font-size: 13px; margin: auto 0; text-align: center; }

.post-foot {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 12px 16px;
	border-top: 1px solid var(--line-soft);
	font-size: 13px;
}

.post-like { color: var(--bad); font-weight: 600; }
.post-like .muted { font-weight: 400; }

.post-close {
	position: absolute;
	top: 10px;
	right: 12px;
	z-index: 2;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	border: 1px solid var(--line-soft);
	background: rgba(7, 7, 15, 0.7);
	color: #fff;
	font-size: 15px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
}

.post-close:hover { background: var(--bad); border-color: var(--bad); }

@media (max-width: 720px) {
	.post-modal { flex-direction: column; width: 100%; max-height: 90vh; }
	.post-media { max-height: 48vh; }
	.post-media img { max-height: 48vh; }
	.post-side { flex: 1 1 auto; border-left: none; border-top: 1px solid var(--line-soft); }
}
